Replace token
PUT
/api/projects/{projectId}/sources/{sourceId}/tokenAdministrator
Path parameters
| Name | Type | Required | Notes |
|---|---|---|---|
projectId | string (uuid) | Required | |
sourceId | string (uuid) | Required |
Request body
application/json
| Field | Type | Required | Notes |
|---|---|---|---|
token | string | Required | max 255 · pattern \\S* |
accountEmail | string | Optional | max 255 · email |
Response
Success: 204
No response body.
Errors
| Status | Code | Applies to |
|---|---|---|
400 | validation_faileda field is missing or out of range | Any endpoint |
400 | malformed_requestthe body cannot be read | Any endpoint |
400 | invalid_parametera path or query parameter is missing or does not convert, such as an ID that is not a UUID | Any endpoint |
401 | authentication_requiredno session | Any endpoint |
403 | access_deniedan administrator endpoint, or a missing or stale CSRF token | Any endpoint |
404 | not_foundno such address | Any endpoint |
405 | method_not_allowedthe address does not take that method | Any endpoint |
415 | unsupported_media_typethe address does not read a body of that type | Any endpoint |
500 | internal_errora fault ReleaseFlow did not foresee; the body never carries the exception behind it | Any endpoint |
400 | gitlab_base_url_invalid | Sources area |
400 | gitlab_host_not_allowed | Sources area |
400 | jira_site_invalid | Sources area |
400 | github_token_rejected | Sources area |
400 | gitlab_token_rejected | Sources area |
400 | linear_token_rejected | Sources area |
400 | jira_token_rejected | Sources area |
400 | source_credential_required | Sources area |
400 | source_signing_token_invalid | Sources area |
404 | project_not_found | Sources area |
404 | source_not_found | Sources area |
409 | github_repository_already_connected | Sources area |
409 | gitlab_project_already_connected | Sources area |
409 | linear_team_already_connected | Sources area |
409 | jira_project_already_connected | Sources area |
409 | source_token_missing | Sources area |
409 | source_sync_in_progress | Sources area |
409 | source_import_not_supported | Sources area |
409 | source_import_not_resumable | Sources area |
409 | source_disconnected | Sources area |
409 | source_not_disconnected | Sources area |
409 | source_reconnect_required | Sources area |
409 | source_has_no_webhook | Sources area |
409 | source_secret_generated | Sources area |
409 | source_secret_pasted | Sources area |
503 | github_unavailable | Sources area |
503 | gitlab_unavailable | Sources area |
503 | jira_unavailable | Sources area |
Request
bash
# Sign in first and keep the session cookie in cookies.txt (see Sessions and CSRF).
# CSRF_HEADER and CSRF_TOKEN are the headerName and token GET /api/csrf returned.
curl -X PUT "http://localhost:8080/api/projects/$PROJECT_ID/sources/$SOURCE_ID/token" \
-b cookies.txt -c cookies.txt \
-H "$CSRF_HEADER: $CSRF_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"token": "<string>",
"accountEmail": "<string>"
}'
The request body is an example built from the schema; replace every placeholder.
Response
204No response body.