Skip to content
Go to Micro

Get the status of an import job

prism.imports.get(strjob_id, ImportGetParams**kwargs) -> ImportGetResponse
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.

ParametersExpand Collapse
team_id: Optional[str]
formatuuid
job_id: str
ReturnsExpand Collapse
class ImportGetResponse:

Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}.

job_id: Optional[str]

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

status: Literal["complete", "processing", "failed"]
One of the following:
"complete"
"processing"
"failed"
total: int

Total number of rows in the import.

created_at: Optional[datetime]
formatdate-time
error: Optional[Error]

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

code: Optional[str]
message: Optional[str]
expires_at: Optional[datetime]
formatdate-time
failed: Optional[int]
processed: Optional[int]

Rows that have been attempted (succeeded + failed).

results: Optional[List[Result]]

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

id: Optional[str]
formatuuid
created: Optional[bool]
error: Optional[ResultError]
code: Optional[str]
message: Optional[str]
existing: Optional[bool]

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

succeeded: Optional[int]
updated_at: Optional[datetime]
formatdate-time

Get the status of an import job

import os
from micro_so import Micro

client = Micro(
    api_key=os.environ.get("MICRO_API_KEY"),  # This is the default and can be omitted
)
import_ = client.prism.imports.get(
    job_id="jobId",
)
print(import_.job_id)
{
  "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"
}