Dry-run an import
Platform module
POST/import-jobs/{id}/dry-runimportJobs.dryRun
Counts what committing a validated import would write (app.import_dry_run): creates, strong key updates, merges a person chose, refusals and possible duplicates still pending. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.
- Requires the capability data.classification.write.
- OAuth scopes: data.
- Send an Idempotency-Key header. A replay with the same key returns the original response.
- Error statuses: 400, 401, 404, 409, 422, 429. Errors are RFC 9457 problem details.
Path and query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | string (uuid) | Yes | Identifier of the import job. |
Response 200: ImportDryRun
| Field | Type | Required | Description |
|---|---|---|---|
| creates | integer | Yes | Rows that will create a record.Constraints: range 0 to any |
| updates | integer | Yes | Rows that will update the record their strong key matched.Constraints: range 0 to any |
| merges | integer | Yes | Rows that will merge into a record a person chose.Constraints: range 0 to any |
| refusals | integer | Yes | Rows that are Invalid or Refused.Constraints: range 0 to any |
| skipped | integer | Yes | Rows skipped.Constraints: range 0 to any |
| pending_reviews | integer | Yes | Possible duplicates still waiting for a person.Constraints: range 0 to any |
{
"creates": 12,
"updates": 3,
"merges": 1,
"refusals": 2,
"skipped": 0,
"pending_reviews": 0
}Code samples
curl -X POST "$XOS_BASE_URL/import-jobs/0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f/dry-run" \
-H "Authorization: Bearer $XOS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"const { data } = await xos.importJobs.dryRun("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f");response = xos.import_jobs.dry_run("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f")xos import-jobs dry-run 0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f