GET /ingest/jobs/{id}

Use the /ingest/jobs/{id} endpoint to return a list of jobs from your tenant.

Available HTTP methods

GET /ingest/jobs/{id}

Prerequisites

  1. Add an API key.

  2. Generate an access token.

Base URL

All requests made to the /ingest/jobs/{id} endpoint should be directed to the following base URL:

https://{tenant-id}.amperity.com/api/ingest/jobs/{id}

Rate limit

A rate limit is the number of requests that may be made to the Amperity API in a given time period.

The Amperity API supports requests to endpoints that do not exceed a rate of 10 requests per second. Response times will vary by endpoint and the complexity of data that is returned by the response. Some requests may take seconds to return.

Requests to the Amperity API that exceed 10 requests per second may return an error response with an HTTP 429 status code.

Requests

A request to the /ingest/jobs/{id} endpoint is similar to:

curl --request GET \
       'https://app.amperity.com/api/ingest/jobs/{id}" \
     --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 ingest/jobs{id} 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.

id

String. Required.

The Amperity internal identifier for the injest job. For example isj-20240701-48815-6dcXdk.

Note

From the workflows page, on the right side, click Recent Activity, select Ingest details under the job, and copy the job id from the open dialog box.

Request examples

The following examples show how to send requests to the /ingest/jobs{id} endpoint.

cURL

The following example shows how to use cURL to send a request to the ingest/jobs{id} endpoint.

curl --request GET \
       'https://tenant.amperity.com/api/ingest/jobs/{id}" \
     --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 /injest/job/{id} 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 jobs.

{
  "id": "isj-1f73r9u2",
  "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"
    }
  ],
  "workflow_id": "wf-20240618-3423-b45"
}

Response parameters

A 200 OK response contains the following parameters.

Parameter

Description

id

The ingest job identifier.

workflow_id

The Amperity internal identifier for the workflow that ran this job.

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

errors

The number of rows with an ingest error. For example, when Amperity cannot match a field value to the expected data type.

feed_id

The unique ID of this feed.

read

The number of rows ingested into this feed.

rejected

The number of duplicate rows that were not ingested.

updated

The total count of rows updated for this feed during the job.

started_at

The date and time at which a job started.

state

The current state of the job. For example:

  • Scheduled

  • Started

  • In progress

  • Running

  • Finalizing

  • Succeeded

  • Stopping

  • Stopped

  • Failed

  • Skipped

  • Canceled

Note

This is the same value that is visible from the Status column on each individual workflow page. Some values are only visible while a task is active.

ended_at

The date and time at which a job ended.