get_datasource_sync_job

DatasourcesApi.get_datasource_sync_job(role_id, datasource_id, job_id, include_resource_metrics=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Get a datasource sync job

Returns one sync job run. Caller needs at least read/view (else AUTH-1012). Supported types: amorphic, or jdbc with IngestionType metadataonly (arcgis and others → 500). ResourcesToSync is normalized to “All” or a comma-separated string. DatasourceId and JobReportLocation are omitted from the response. LogsDownloadURL is set when LogStatus is AVAILABLE.

Parameters:
  • role_id (str) – Amorphic role ID. Must grant at least read/view on the datasource. (required)

  • datasource_id (str) – UUID of the datasource. Rejected with IPV-1045 if missing or unknown. (required)

  • job_id (str) – Sync job run UUID. Rejected with IPV-1045 if not found for this datasource. (required)

  • include_resource_metrics (str) – When true, keeps JobMetrics.ResourceTypeMetrics. Default false — ResourceTypeMetrics is stripped to keep the payload small.

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

DatasourceSyncJobDetails

Returns:

Returns the result object.

Request and Response Examples

HTTP: GET /datasources/{datasource_id}/sync-jobs/{job_id}

Success (HTTP 200)

Sync job details. ResourcesToSync is “All” or a comma-separated string when present.

Running catalog sync (default metrics)

{
  "JobId": "b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f",
  "GlueJobRunId": "jr_abc123",
  "JobStatus": "RUNNING",
  "JobStartTime": "2024-06-01 12:00:00",
  "TriggeredBy": "user1",
  "ResourcesToSync": "All",
  "MaxRuntimeHours": 10,
  "RootJobId": "b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f",
  "ResumeFromJobId": null,
  "ForceSync": "False",
  "EnableOrphanCleanup": "False",
  "JobMetrics": {
    "IndexingSuccessfulItemsCount": 120,
    "IndexingFailedItemsCount": 0,
    "ExecutionTime": "5.2 minutes"
  }
}

Completed job with downloadable report

{
  "JobId": "a2f7d3b1-8e5c-4a6f-9d1e-2b3c4d5e6f7a",
  "JobStatus": "SUCCEEDED",
  "ResourcesToSync": "datasets, glossaries, domains",
  "LogStatus": "AVAILABLE",
  "LogsDownloadURL": "https://amorphic-misc.s3.amazonaws.com/...?X-Amz-Algorithm=..."
}

Errors

Documented error codes: AUTH-1012, IPV-1045.

HTTP 400

Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Common codes: AUTH-1012 (no view access), IPV-1045 (unknown datasource or JobId).

JobId not found for datasource

{
  "Message": "IPV-1045 - Invalid parameter - JobId(b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f), value either missing or is invalid."
}

Caller lacks view access

{
  "Message": "AUTH-1012 - User: user1 requires at least read-only access on the resource to perform this action."
}

HTTP 500

Backend failure, or unsupported datasource type Message “Only Amorphic and Jdbc metadataonly type of datasources are allowed for this /sync-jobs/JobId operation”.

Unsupported datasource type

{
  "Message": "Only Amorphic and Jdbc metadataonly type of datasources are allowed for this /sync-jobs/JobId operation"
}