# Imports ## Get the status of an import job `client.prism.imports.get(stringjobID, ImportGetParamsparams?, RequestOptionsoptions?): 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. ### Parameters - `jobID: string` - `params: ImportGetParams` - `teamId?: string` ### Returns - `ImportGetResponse` Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}. - `job_id: string | null` Null for sync imports (results inlined). Set for async imports. - `status: "complete" | "processing" | "failed"` - `"complete"` - `"processing"` - `"failed"` - `total: number` Total number of rows in the import. - `created_at?: string` - `error?: Error` Set when status=failed; describes the job-level failure (not per-row). - `code?: string` - `message?: string` - `expires_at?: string` - `failed?: number` - `processed?: number` Rows that have been attempted (succeeded + failed). - `results?: Array` Per-row outcomes. Always present for sync imports; populated for async imports once the job reaches `complete`. - `id?: string | null` - `created?: boolean` - `error?: Error` - `code?: string` - `message?: string` - `existing?: boolean` True if the row matched an existing record via the dedupe key. - `succeeded?: number` - `updated_at?: string` ### Example ```typescript import Micro from '@micro-so/sdk'; const client = new Micro({ teamID: 'My Team ID', apiKey: process.env['MICRO_API_KEY'], // This is the default and can be omitted }); const _import = await client.prism.imports.get('jobId'); console.log(_import.job_id); ``` #### Response ```json { "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" } ``` ## Domain Types ### Import Get Response - `ImportGetResponse` Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}. - `job_id: string | null` Null for sync imports (results inlined). Set for async imports. - `status: "complete" | "processing" | "failed"` - `"complete"` - `"processing"` - `"failed"` - `total: number` Total number of rows in the import. - `created_at?: string` - `error?: Error` Set when status=failed; describes the job-level failure (not per-row). - `code?: string` - `message?: string` - `expires_at?: string` - `failed?: number` - `processed?: number` Rows that have been attempted (succeeded + failed). - `results?: Array` Per-row outcomes. Always present for sync imports; populated for async imports once the job reaches `complete`. - `id?: string | null` - `created?: boolean` - `error?: Error` - `code?: string` - `message?: string` - `existing?: boolean` True if the row matched an existing record via the dedupe key. - `succeeded?: number` - `updated_at?: string`