Saltar al contenido

Dry-run an import

Módulo Platform

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`.

  • Requiere la capacidad data.classification.write.
  • Alcances de OAuth: data.
  • Envía el encabezado Idempotency-Key. Una repetición con la misma clave devuelve la respuesta original.
  • Estados de error: 400, 401, 404, 409, 422, 429. Los errores son detalles de problema RFC 9457.

Parámetros de ruta y de consulta

importJobs.dryRun: Parámetros de ruta y de consulta
CampoTipoObligatorioDescripción
idstring (uuid)SíIdentifier of the import job.

Respuesta 200: ImportDryRun

importJobs.dryRun: ImportDryRun
CampoTipoObligatorioDescripción
createsintegerSíRows that will create a record.Restricciones: range 0 to any
updatesintegerSíRows that will update the record their strong key matched.Restricciones: range 0 to any
mergesintegerSíRows that will merge into a record a person chose.Restricciones: range 0 to any
refusalsintegerSíRows that are Invalid or Refused.Restricciones: range 0 to any
skippedintegerSíRows skipped.Restricciones: range 0 to any
pending_reviewsintegerSíPossible duplicates still waiting for a person.Restricciones: range 0 to any
{
  "creates": 12,
  "updates": 3,
  "merges": 1,
  "refusals": 2,
  "skipped": 0,
  "pending_reviews": 0
}

Ejemplos de código

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