GET /ingest/jobs¶
Use the GET /ingest/jobs endpoint to return a list of jobs from your tenant that occurred within the previous 7 days.
Prerequisites¶
Base URL¶
Direct all requests to the GET /ingest/jobs endpoint to the following base URL:
https://{tenant-id}.amperity.com/api/ingest/jobs
Rate limit¶
A rate limit is the number of requests that may be made to the Amperity API in a given time period.
Requests¶
A request to the GET /ingest/jobs endpoint is similar to:
curl --request GET \
'https://tenant.amperity.com/api/ingest/jobs \
?created_from=2024-10-01 \
?created_to=2024-10-07' \
--header 'amperity-tenant: {tenant}' \
--header 'api-version: 2024-04-01' \
--header 'Authorization: Bearer {token}'
(This example is formatted for readability in a narrow page layout.)
Request parameters¶
The following table describes the parameters that may be used with the GET /ingest/jobs endpoint.
Parameter |
Description |
---|---|
api_version |
String. Optional. A supported version of the Amperity API. For example: 2024-04-01. Note You may use the api-version request header instead of the api_version request parameter. |
created_from |
Datetime. Required. A timestamp that defines the start (inclusive) of a 7-day time window in which one (or more) ingest jobs started. See the created_to request parameter. This timestamp may be a partial timestamp, such as YYYY-MM-DD. The timestamp must be in ISO 8601 format and is in Coordinated Universal Time (UTC). Important Only ingest jobs that have a started_at value that falls within this time window will be returned. (See the created_at response property for the GET /ingest/jobs/{id} endpoint.) |
created_to |
Datetime. Required. A timestamp that defines the end (exclusive) of a 7-day time window in which one (or more) ingest jobs started. See the created_from request parameter. This timestamp may be a partial timestamp, such as YYYY-MM-DD. The timestamp must be in ISO 8601 format and is in Coordinated Universal Time (UTC). Important Only ingest jobs that have a started_at value that falls within this time window will be returned. (See the created_at response property for the GET /ingest/jobs/{id} endpoint.) |
with_total |
Boolean. Optional. Set this value to true to include a total count of all results. Default value: false. Note Obtaining the total count of all results can be an expensive operation when there is a high number of pages in the results set. |
Request examples¶
The following examples show how to send requests to the GET /ingest/jobs endpoint.
The following example shows how to use cURL to send a request to the GET /ingest/jobs endpoint.
curl --request GET \
'https://tenant.amperity.com/api/ingest/jobs \
?created_from=2024-10-01 \
?created_to=2024-10-07' \
--header 'amperity-tenant: {tenant}' \
--header 'api-version: 2024-04-01' \
--header 'Authorization: Bearer {token}'
(This example is formatted for readability in a narrow page layout.)
Responses¶
A response from the GET /ingest/jobs endpoint will match an HTTP status code. A 200 response will contain the results set. A 4xx response indicates an issue with the configuration of your request. A 5xx response indicates that the endpoint is unavailable.
200 OK¶
The 200 response returns a set of records, files, and feeds that were ingested during the specified range, similar to the following response example, but with a response section for each record, file, and feed.
1{
2 "total": 0,
3 "data": [
4 {
5 "id": "isj-1f73r9u2",
6 "tables": [
7 {
8 "errors": 200,
9 "feed_id": "df-5L6d1veh",
10 "read": 1000,
11 "rejected": 200,
12 "updated": 200,
13 "started_at": "2024-06-01T04:02:54.433Z",
14 "state": "succeeded",
15 "ended_at": "2024-06-01T04:02:57.433Z",
16 "files": [
17 {
18 "file_id": "cb-20240618-71992-SF3Uz/part0.avro",
19 "name": "part0.avro",
20 "read": 1000,
21 "errors": 200
22 }
23 ],
24 "inserted": 400,
25 "table_name": "My table",
26 "job_id": "isj-1f73r9u2"
27 }
28 ],
29 "workflow_id": "wf-20240618-3423-b45"
30 }
31 ],
32}
Response parameters¶
A 200 OK response contains the following parameters.
Parameter |
Description |
---|---|
id |
The ingest job identifier. |
tables |
A summary of table details from this ingest job. The JSON array for this summary is similar to: "tables" : [ {
"errors" : 200,
"feed_id" : "df-5L6d1veh",
"read" : 1000,
"rejected" : 200,
"updated" : 200,
"started_at" : "2024-06-01T04:02:54.433Z",
"state" : "succeeded",
"ended_at" : "2024-06-01T04:02:57.433Z",
"files" : [ {
"file_id" : "cb-20240618-71992-SF3Uz/part0.avro",
"name" : "part0.avro",
"read" : 1000,
"errors" : 200
} ],
"inserted" : 400,
"table_name" : "My table",
"job_id" : "isj-1f73r9u2"
} ],
where
|
workflow_id |
The Amperity internal identifier for the workflow that ran this job. |
next_token |
The next_token parameter is included in the response, but is not available for use with the GET /ingest/jobs endpoint. The GET /ingest/jobs endpoint only returns a list of ingest jobs that occurred within the previous 7 days. |