Skip to content

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

importJobs.dryRun: Path and query parameters
FieldTypeRequiredDescription
idstring (uuid)YesIdentifier of the import job.

Response 200: ImportDryRun

importJobs.dryRun: ImportDryRun
FieldTypeRequiredDescription
createsintegerYesRows that will create a record.Constraints: range 0 to any
updatesintegerYesRows that will update the record their strong key matched.Constraints: range 0 to any
mergesintegerYesRows that will merge into a record a person chose.Constraints: range 0 to any
refusalsintegerYesRows that are Invalid or Refused.Constraints: range 0 to any
skippedintegerYesRows skipped.Constraints: range 0 to any
pending_reviewsintegerYesPossible 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