Openi DeveloperDeveloper

Send records inline or request a file upload

POST
/v1/datasets/{dataset_id}/ingestions
AuthorizationBearer <token>

In: header

Path Parameters

dataset_id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
Formatuuid

Header Parameters

Idempotency-Key?string

Repeating a request with the same key returns the original ingestion.

Lengthlength <= 200

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

records?array<>|

Inline records. Omit to upload a file instead.

format?string

File format, for uploads.

Value in

  • "ndjson"
  • "csv"
csv_delimiter?string

Value in

  • "comma"
  • "semicolon"
  • "tab"
  • "pipe"
error_policy?string

reject_all (default) loads nothing if any row is invalid; skip_invalid loads the valid rows.

Value in

  • "reject_all"
  • "skip_invalid"

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/v1/datasets/497f6eca-6276-4993-bfeb-53cbbbba6f08/ingestions" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": -9007199254740991,  "dataset_id": "string",  "status": "awaiting_upload",  "source": "api",  "format": "ndjson",  "error_policy": "reject_all",  "stats": {    "rows_total": -9007199254740991,    "rows_valid": -9007199254740991,    "rows_rejected": -9007199254740991,    "rows_inserted": -9007199254740991,    "rows_duplicate": -9007199254740991,    "errors_truncated": true  },  "error": "string",  "errors_report_url": "string",  "upload_url": "string",  "created_at": "2019-08-24T14:15:22Z",  "started_at": "2019-08-24T14:15:22Z",  "finished_at": "2019-08-24T14:15:22Z"}