Skip to main content

List imports

GET/api/projects/{projectId}/imports
Signed-in memberRead-only

Read more: History importSource: SourceImportApiController#imports(opens in new tab)

Path parameters​

NameTypeRequiredNotes
projectIdstring (uuid)Required

Response​

Success: 200

An array of SourceSyncView, each with:

FieldTypeRequiredNotes
sourceIdstring (uuid)Optional
typeenum SourceTypeOptionalGITHUBGITLABLINEARJIRA
externalProjectKeystringOptional
externalTeamKeystringOptional
deliveryMechanismstringOptional
supportsImportbooleanOptional
polledbooleanOptional
nextPollAtstring (date-time)Optional
accessTokenConfiguredbooleanOptional
statusstringOptional
windowStartstring (date-time)Optional
windowEndstring (date-time)Optional
scannedCountintegerOptional
importedCountintegerOptional
itemLimitintegerOptional
requesterNamestringOptional
startedAtstring (date-time)Optional
completedAtstring (date-time)Optional
nextAttemptAtstring (date-time)Optional
lastErrorstringOptional
lastSyncAtstring (date-time)Optional
lastErrorCodestringOptional
canResumeImportbooleanOptional
lastDeliveryAtstring (date-time)Optional
healthSourceHealthOptional
health.connectedbooleanOptional
health.disconnectedAtstring (date-time)Optional
health.secretUpdatedAtstring (date-time)Optional
health.signatureFailureCountintegerOptional
health.lastSignatureFailureAtstring (date-time)Optional
health.quietbooleanOptional
health.quietSincestring (date-time)Optional
health.usualGapHoursintegerOptional
health.overduebooleanOptional

Errors​

StatusCodeApplies to
400validation_faileda field is missing or out of rangeAny endpoint
400invalid_parametera path or query parameter is missing or does not convert, such as an ID that is not a UUIDAny endpoint
401authentication_requiredno sessionAny endpoint
404not_foundno such addressAny endpoint
405method_not_allowedthe address does not take that methodAny endpoint
415unsupported_media_typethe address does not read a body of that typeAny endpoint
500internal_errora fault ReleaseFlow did not foresee; the body never carries the exception behind itAny endpoint
400gitlab_base_url_invalidSources area
400gitlab_host_not_allowedSources area
400jira_site_invalidSources area
400github_token_rejectedSources area
400gitlab_token_rejectedSources area
400linear_token_rejectedSources area
400jira_token_rejectedSources area
400source_credential_requiredSources area
400source_signing_token_invalidSources area
404project_not_foundSources area
404source_not_foundSources area
409github_repository_already_connectedSources area
409gitlab_project_already_connectedSources area
409linear_team_already_connectedSources area
409jira_project_already_connectedSources area
409source_token_missingSources area
409source_sync_in_progressSources area
409source_import_not_supportedSources area
409source_import_not_resumableSources area
409source_disconnectedSources area
409source_not_disconnectedSources area
409source_reconnect_requiredSources area
409source_has_no_webhookSources area
409source_secret_generatedSources area
409source_secret_pastedSources area
503github_unavailableSources area
503gitlab_unavailableSources area
503jira_unavailableSources area

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/imports" \
-b cookies.txt -c cookies.txt

Response

200

Example

[
  {
    "sourceId": "<uuid>",
    "type": "GITHUB",
    "externalProjectKey": "<string>",
    "externalTeamKey": "<string>",
    "deliveryMechanism": "<string>",
    "supportsImport": false,
    "polled": false,
    "nextPollAt": "<date-time>",
    "accessTokenConfigured": false,
    "status": "<string>",
    "windowStart": "<date-time>",
    "windowEnd": "<date-time>",
    "scannedCount": 0,
    "importedCount": 0,
    "itemLimit": 0,
    "requesterName": "<string>",
    "startedAt": "<date-time>",
    "completedAt": "<date-time>",
    "nextAttemptAt": "<date-time>",
    "lastError": "<string>",
    "lastSyncAt": "<date-time>",
    "lastErrorCode": "<string>",
    "canResumeImport": false,
    "lastDeliveryAt": "<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
    }
  }
]