Skip to content
StatusSupportDashboard

Get request status

GET/v1/data/{namespace}/requests/{requestId}

Retrieve status on data ingestion request. Supports both add and import requests.

Path ParametersExpand Collapse
namespace: string

The namespace the data was ingested into

requestId: string

The request ID returned from the Add endpoint

ReturnsExpand Collapse
UnionMember0 = object { data, namespace, request_id, status }
data: array of object { id, output, url, metadata }
id: string

Object identifier from the ingested data

output: object { actions, fields, labels }
actions: array of unknown
fields: map[unknown]
labels: array of object { label }
label: string
url: string
metadata: optional map[unknown]
namespace: string
request_id: string
status: "queued" or "uploading" or "ingesting" or 2 more
One of the following:
"queued"
"uploading"
"ingesting"
"succeeded"
"failed"
UnionMember1 = object { data_count, data_expires_at, data_url, 3 more }
data_count: number
minimum0
data_expires_at: string
data_url: string
namespace: string
request_id: string
status: "queued" or "uploading" or "ingesting" or 2 more
One of the following:
"queued"
"uploading"
"ingesting"
"succeeded"
"failed"

Get request status

curl https://api.safetykit.com/v1/data/$NAMESPACE/requests/$REQUEST_ID \
    -H "Authorization: Bearer $SAFETYKIT_API_KEY"
{
  "data": [
    {
      "id": "item-001",
      "output": {
        "actions": [
          {}
        ],
        "fields": {},
        "labels": [
          {
            "label": "illegal_drugs.violation"
          },
          {
            "label": "hazardous.violation"
          }
        ]
      },
      "url": "https://app.safetykit.com/...",
      "metadata": {
        "internal-ref": "bar"
      }
    }
  ],
  "namespace": "products",
  "request_id": "request_01KHSKHQSYJN4A5P7RRVEXHWE9",
  "status": "succeeded"
}
Returns Examples
{
  "data": [
    {
      "id": "item-001",
      "output": {
        "actions": [
          {}
        ],
        "fields": {},
        "labels": [
          {
            "label": "illegal_drugs.violation"
          },
          {
            "label": "hazardous.violation"
          }
        ]
      },
      "url": "https://app.safetykit.com/...",
      "metadata": {
        "internal-ref": "bar"
      }
    }
  ],
  "namespace": "products",
  "request_id": "request_01KHSKHQSYJN4A5P7RRVEXHWE9",
  "status": "succeeded"
}