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
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| id | string (uuid) | Sí | Identifier of the import job. |
Respuesta 200: ImportDryRun
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| creates | integer | Sí | Rows that will create a record.Restricciones: range 0 to any |
| updates | integer | Sí | Rows that will update the record their strong key matched.Restricciones: range 0 to any |
| merges | integer | Sí | Rows that will merge into a record a person chose.Restricciones: range 0 to any |
| refusals | integer | Sí | Rows that are Invalid or Refused.Restricciones: range 0 to any |
| skipped | integer | Sí | Rows skipped.Restricciones: range 0 to any |
| pending_reviews | integer | Sí | 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