list_datasource_sync_jobs

DatasourcesApi.list_datasource_sync_jobs(role_id, datasource_id, limit=None, offset=None, sortorder=None, sortby=None, projection_expression=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

List datasource sync jobs

Lists sync job runs for a datasource. Caller needs at least read/view (else AUTH-1012). Supported types: amorphic, arcgis, and jdbc with IngestionType metadataonly (other types raise a generic Exception → 500). Pagination: offset is 1-based (converted to offset-1 internally; omitted starts at 0); limit defaults to 100, max 1000 (else GE-1028). Last page when next_available is “no”.

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)

  • limit (str) – Page size. Default 100. Maximum 1000; over max returns GE-1028.

  • offset (str) – 1-based page offset (converted to offset-1). When omitted, paging starts at index 0. Last page when next_available is “no”.

  • sortorder (str) – Sort direction. Default desc.

  • sortby (str) – Sort field on each job item. Default JobStartTime. Must exist on projected items.

  • projection_expression (str) – Comma-separated fields to return, or * for all fields after ResourcesToSync is removed from each item. Default JobId,JobStatus,JobStartTime,JobEndTime,TriggeredBy. Missing keys are returned as “N/A”.

  • _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:

DatasourceSyncJobsListResponse

Returns:

Returns the result object.

Request and Response Examples

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

Success (HTTP 200)

Paginated syncJobRuns. ResourcesToSync is never included in list items.

Default projected fields

{
  "syncJobRuns": [
    {
      "JobId": "b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f",
      "JobStatus": "RUNNING",
      "JobStartTime": "2024-06-01 12:00:00",
      "JobEndTime": "N/A",
      "TriggeredBy": "user1"
    }
  ],
  "next_available": "no",
  "count": 1,
  "total_count": 1
}

Errors

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

HTTP 400

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

Caller lacks view access

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

limit greater than 1000

{
  "Message": "GE-1028 - Out of range for items per page, Limit is 1000"
}

HTTP 500

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

Unsupported datasource type

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