Replace token
PUT
/api/projects/{projectId}/sources/{sourceId}/tokenQuản trị viên
Tham số đường dẫn
| Tên | Kiểu | Bắt buộc | Ghi chú |
|---|---|---|---|
projectId | string (uuid) | Bắt buộc | |
sourceId | string (uuid) | Bắt buộc |
Request body
application/json
| Trường | Kiểu | Bắt buộc | Ghi chú |
|---|---|---|---|
token | string | Bắt buộc | max 255 · pattern \\S* |
accountEmail | string | Tùy chọn | max 255 · email |
Response
Thành công: 204
Không có response body.
Lỗi
| Trạng thái | Mã | Áp dụng cho |
|---|---|---|
400 | validation_failedthiếu trường hoặc giá trị nằm ngoài khoảng cho phép | Mọi endpoint |
400 | malformed_requestkhông đọc được body | Mọi endpoint |
400 | invalid_parametermột tham số trên đường dẫn hoặc query bị thiếu hoặc không chuyển đổi được, chẳng hạn một ID không phải UUID | Mọi endpoint |
401 | authentication_requiredchưa có phiên đăng nhập | Mọi endpoint |
403 | access_deniedendpoint dành cho quản trị viên, hoặc CSRF token thiếu hay đã cũ | Mọi endpoint |
404 | not_foundkhông có địa chỉ đó | Mọi endpoint |
405 | method_not_allowedđịa chỉ không nhận phương thức đó | Mọi endpoint |
415 | unsupported_media_typeđịa chỉ không đọc body thuộc kiểu đó | Mọi endpoint |
500 | internal_errormột lỗi ReleaseFlow không lường trước; body không bao giờ chứa exception gây ra nó | Mọi endpoint |
400 | gitlab_base_url_invalid | Khu vực Sources |
400 | gitlab_host_not_allowed | Khu vực Sources |
400 | jira_site_invalid | Khu vực Sources |
400 | github_token_rejected | Khu vực Sources |
400 | gitlab_token_rejected | Khu vực Sources |
400 | linear_token_rejected | Khu vực Sources |
400 | jira_token_rejected | Khu vực Sources |
400 | source_credential_required | Khu vực Sources |
400 | source_signing_token_invalid | Khu vực Sources |
404 | project_not_found | Khu vực Sources |
404 | source_not_found | Khu vực Sources |
409 | github_repository_already_connected | Khu vực Sources |
409 | gitlab_project_already_connected | Khu vực Sources |
409 | linear_team_already_connected | Khu vực Sources |
409 | jira_project_already_connected | Khu vực Sources |
409 | source_token_missing | Khu vực Sources |
409 | source_sync_in_progress | Khu vực Sources |
409 | source_import_not_supported | Khu vực Sources |
409 | source_import_not_resumable | Khu vực Sources |
409 | source_disconnected | Khu vực Sources |
409 | source_not_disconnected | Khu vực Sources |
409 | source_reconnect_required | Khu vực Sources |
409 | source_has_no_webhook | Khu vực Sources |
409 | source_secret_generated | Khu vực Sources |
409 | source_secret_pasted | Khu vực Sources |
503 | github_unavailable | Khu vực Sources |
503 | gitlab_unavailable | Khu vực Sources |
503 | jira_unavailable | Khu vực Sources |
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>"
}'
Request body là ví dụ dựng từ schema; thay mọi giá trị giữ chỗ trước khi gửi.
Response
204Không có response body.