Skip to content
Go to Micro

Get the status of an import job

GET/v2/prism/{teamId}/imports/{jobId}

Poll the status of an async import. Sync imports complete in the original response and don’t appear here. Async jobs are retained for 7 days. Returns 404 once the job has expired.

Path ParametersExpand Collapse
teamId: optional string
formatuuid
jobId: string
ReturnsExpand Collapse
job_id: string

Null for sync imports (results inlined). Set for async imports.

status: "complete" or "processing" or "failed"
One of the following:
"complete"
"processing"
"failed"
total: number

Total number of rows in the import.

created_at: optional string
formatdate-time
error: optional object { code, message }

Set when status=failed; describes the job-level failure (not per-row).

code: optional string
message: optional string
expires_at: optional string
formatdate-time
failed: optional number
processed: optional number

Rows that have been attempted (succeeded + failed).

results: optional array of object { id, created, error, existing }

Per-row outcomes. Always present for sync imports; populated for async imports once the job reaches complete.

id: optional string
formatuuid
created: optional boolean
error: optional object { code, message }
code: optional string
message: optional string
existing: optional boolean

True if the row matched an existing record via the dedupe key.

succeeded: optional number
updated_at: optional string
formatdate-time

Get the status of an import job

curl https://developers.micro.so/v2/prism/$TEAM_ID/imports/$JOB_ID \
    -H "x-api-key: $MICRO_API_KEY"
{
  "job_id": "job_id",
  "status": "complete",
  "total": 0,
  "created_at": "2019-12-27T18:11:19.117Z",
  "error": {
    "code": "code",
    "message": "message"
  },
  "expires_at": "2019-12-27T18:11:19.117Z",
  "failed": 0,
  "processed": 0,
  "results": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "created": true,
      "error": {
        "code": "code",
        "message": "message"
      },
      "existing": true
    }
  ],
  "succeeded": 0,
  "updated_at": "2019-12-27T18:11:19.117Z"
}
Returns Examples
{
  "job_id": "job_id",
  "status": "complete",
  "total": 0,
  "created_at": "2019-12-27T18:11:19.117Z",
  "error": {
    "code": "code",
    "message": "message"
  },
  "expires_at": "2019-12-27T18:11:19.117Z",
  "failed": 0,
  "processed": 0,
  "results": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "created": true,
      "error": {
        "code": "code",
        "message": "message"
      },
      "existing": true
    }
  ],
  "succeeded": 0,
  "updated_at": "2019-12-27T18:11:19.117Z"
}