Skip to content

Open upload session

POST
/v1/ns/{nsid}/lcr/tables/{table}/uploads
curl --request POST \
--url https://example.com/v1/ns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/lcr/tables/example/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "mode": "replace" }'

Starts a staged bulk load for row counts too large for a single /replace or /patch request. The flow is:

  1. POST .../uploads (this call) — opens a session in mode replace or patch and returns an upload_id.
  2. POST .../uploads/{upload_id}/rows — append row batches (CSV or JSON), repeated as many times as needed.
  3. POST .../uploads/{upload_id}/commit — atomically swaps in the new version.

DELETE .../uploads/{upload_id} aborts an open session. Sessions expire (see expires_at); an expired session commit fails with lcr-upload-expired.

nsid
required
string format: uuid

Namespace UUID

table
required
string
Media typeapplication/json
object
mode
required
string
Allowed values: replace patch

OK

Media typeapplication/json
object
success
required
boolean
session
required
object
upload_id
required
string
target_version
required
integer format: int64
source_version
integer format: int64
mode
required
string
state
required
string
accepted_rows
required
integer format: int64
expires_at
string format: date-time
created_at
string format: date-time
Examplegenerated
{
"success": true,
"session": {
"upload_id": "example",
"target_version": 1,
"source_version": 1,
"mode": "example",
"state": "example",
"accepted_rows": 1,
"expires_at": "2026-04-15T12:00:00Z",
"created_at": "2026-04-15T12:00:00Z"
}
}

Error response

Media typeapplication/problem+json

RFC 7807 Problem Details

object
type

Problem type slug URI

string
title
string
status
integer
detail
string
key
additional properties
any
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example"
}