Records

Import records from a JSONL document

POST
/records/types/{record_type_id}/imports

Import records from a JSONL document of the same Space, up to 50000 lines: one JSON object per line in the shape of a records.rows.upsert_many row. Runs in the background; poll records.imports.get. Run it with dry_run true first: applying needs an error-free dry run of the same document. Semantics per line: without merge_on every line CREATES a record (nothing is matched). With merge_on (field keys, non-empty in every line, each value once per block) the line updates the active record with the same key and creates one when none matches; an archived match fails unless restore_archived. On update only what the line names changes: fields absent from values keep their stored value (null clears one); a relation or document field named in relations/documents REPLACES that field's whole target list (include the targets to keep; send [] to clear); relation fields not named keep their links. An update of a strict type needs expected_revision on the line; types in write_mode merge do not (relations replace without a revision check there). Read the records guide, 'Import from a file'.

Authorization

bearerApiKey
AuthorizationBearer <token>

Create a scoped API key in the Adlass settings.

In: header

Path Parameters

record_type_id*string

Resource identifier: record_type_id.

Formatuuid

Header Parameters

X-Request-Id?string

Optional correlation identifier.

Lengthlength <= 128
Idempotency-Key?string

A unique key for this intended write; the body field idempotency_key is accepted instead. One of the two is required. Reuse it only for an identical retry.

Length1 <= length <= 200

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/records/types/123e4567-e89b-42d3-a456-426614174000/imports" \  -H "Idempotency-Key: 123e4567-e89b-42d3-a456-426614174000" \  -H "Content-Type: application/json" \  -d '{    "document_id": "123e4567-e89b-42d3-a456-426614174000"  }'
{}