Chuyển tới nội dung chính

Source source

GET/api/projects/{projectId}/sources/{sourceId}
Thành viên đã đăng nhậpChỉ đọc

Đọc hướng dẫnMã nguồn: ProjectApiController#source(mở trong thẻ mới)

Tham số đường dẫn​

TênKiểuBắt buộcGhi chú
projectIdstring (uuid)Bắt buộc
sourceIdstring (uuid)Bắt buộc

Response​

Thành công: 200

TrườngKiểuBắt buộcGhi chú
idstring (uuid)Tùy chọn
typeenum SourceTypeTùy chọnGITHUBGITLABLINEARJIRA
deliveryMechanismstringTùy chọn
externalProjectKeystringTùy chọn
externalTeamKeystringTùy chọn
ownerstringTùy chọn
repositorystringTùy chọn
apiBaseUrlstringTùy chọn
externalWorkspaceKeystringTùy chọn
credentialIdentitystringTùy chọn
webhookAuthModeenum WebhookAuthModeTùy chọnGITHUB_HMACGITLAB_SIGNING_TOKENGITLAB_SECRET_TOKENLINEAR_HMACNONE
webhookIdstring (uuid)Tùy chọn
webhookPathstringTùy chọn
createdAtstring (date-time)Tùy chọn
lastDeliveryAtstring (date-time)Tùy chọn
accessTokenConfiguredbooleanTùy chọn
accessTokenUpdatedAtstring (date-time)Tùy chọn
connectionStatusenum ConnectionStatusTùy chọnACTIVEERRORDISCONNECTED
lastSyncAtstring (date-time)Tùy chọn
lastErrorCodestringTùy chọn
nextPollAtstring (date-time)Tùy chọn
healthSourceHealthTùy chọn
health.connectedbooleanTùy chọn
health.disconnectedAtstring (date-time)Tùy chọn
health.secretUpdatedAtstring (date-time)Tùy chọn
health.signatureFailureCountintegerTùy chọn
health.lastSignatureFailureAtstring (date-time)Tùy chọn
health.quietbooleanTùy chọn
health.quietSincestring (date-time)Tùy chọn
health.usualGapHoursintegerTùy chọn
health.overduebooleanTùy chọn

Lỗi​

Trạng tháiMãÁp dụng cho
400validation_failedthiếu trường hoặc giá trị nằm ngoài khoảng cho phépMọi endpoint
400invalid_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 UUIDMọi endpoint
401authentication_requiredchưa có phiên đăng nhậpMọi endpoint
404not_foundkhông có địa chỉ đóMọi endpoint
405method_not_allowedđịa chỉ không nhận phương thức đóMọi endpoint
415unsupported_media_typeđịa chỉ không đọc body thuộc kiểu đóMọi endpoint
500internal_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
400gitlab_base_url_invalidKhu vực Sources
400gitlab_host_not_allowedKhu vực Sources
400jira_site_invalidKhu vực Sources
400github_token_rejectedKhu vực Sources
400gitlab_token_rejectedKhu vực Sources
400linear_token_rejectedKhu vực Sources
400jira_token_rejectedKhu vực Sources
400source_credential_requiredKhu vực Sources
400source_signing_token_invalidKhu vực Sources
404project_not_foundKhu vực Sources
404source_not_foundKhu vực Sources
409github_repository_already_connectedKhu vực Sources
409gitlab_project_already_connectedKhu vực Sources
409linear_team_already_connectedKhu vực Sources
409jira_project_already_connectedKhu vực Sources
409source_token_missingKhu vực Sources
409source_sync_in_progressKhu vực Sources
409source_import_not_supportedKhu vực Sources
409source_import_not_resumableKhu vực Sources
409source_disconnectedKhu vực Sources
409source_not_disconnectedKhu vực Sources
409source_reconnect_requiredKhu vực Sources
409source_has_no_webhookKhu vực Sources
409source_secret_generatedKhu vực Sources
409source_secret_pastedKhu vực Sources
503github_unavailableKhu vực Sources
503gitlab_unavailableKhu vực Sources
503jira_unavailableKhu vực Sources

Request

bash
# Sign in first and keep the session cookie in cookies.txt (see Sessions and CSRF).
curl "http://localhost:8080/api/projects/$PROJECT_ID/sources/$SOURCE_ID" \
-b cookies.txt -c cookies.txt

Response

200

Ví dụ

{
  "id": "<uuid>",
  "type": "GITHUB",
  "deliveryMechanism": "<string>",
  "externalProjectKey": "<string>",
  "externalTeamKey": "<string>",
  "owner": "<string>",
  "repository": "<string>",
  "apiBaseUrl": "<string>",
  "externalWorkspaceKey": "<string>",
  "credentialIdentity": "<string>",
  "webhookAuthMode": "GITHUB_HMAC",
  "webhookId": "<uuid>",
  "webhookPath": "<string>",
  "createdAt": "<date-time>",
  "lastDeliveryAt": "<date-time>",
  "accessTokenConfigured": false,
  "accessTokenUpdatedAt": "<date-time>",
  "connectionStatus": "ACTIVE",
  "lastSyncAt": "<date-time>",
  "lastErrorCode": "<string>",
  "nextPollAt": "<date-time>",
  "health": {
    "connected": false,
    "disconnectedAt": "<date-time>",
    "secretUpdatedAt": "<date-time>",
    "signatureFailureCount": 0,
    "lastSignatureFailureAt": "<date-time>",
    "quiet": false,
    "quietSince": "<date-time>",
    "usualGapHours": 0,
    "overdue": false
  }
}