Skip to content

Live JSON

GET/api/v1/live-json/documents
GET
/api/v1/live-json/documents

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

filter?

Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.

q?string

Full-text search over this list's searchable fields.

Length1 <= length <= 200
sort?string

Comma-separated sort keys, - for descending, at most 1. Keys: size_bytes, subscriber_count, updated_at. Default: -updated_at.

limit?integer

Rows per page, 1 to 100 (default 25).

Range1 <= value <= 100
cursor?string

The page.next_cursor of the previous page. Cannot be combined with page.

page?integer

A 1-based page number, for jumping. Cannot be combined with cursor.

Range1 <= value
total?boolean

Set to true to include the number of matching rows in page.total.

Response Body

application/json

curl -X GET "https://example.com/api/v1/live-json/documents"
{  "documents": [    {      "content_type": "string",      "created_at": "2019-08-24T14:15:22Z",      "id": "string",      "is_shared": true,      "locked": true,      "name": "string",      "owner_id": "string",      "size_bytes": 0,      "subscriber_count": 0,      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "page": {    "has_more": true,    "next_cursor": "string",    "page": 0,    "total": 0  }}
POST/api/v1/live-json/documents
POST
/api/v1/live-json/documents

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request for creating a new document

Response Body

application/json

curl -X POST "https://example.com/api/v1/live-json/documents" \  -H "Content-Type: application/json" \  -d '{    "content": null  }'
{  "created_at": "2019-08-24T14:15:22Z",  "id": "string"}
GET/api/v1/live-json/documents/{document_id}
GET
/api/v1/live-json/documents/{document_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

document_id*string

Document ID

Query Parameters

view?string

View: meta (default), content, or full

Response Body

application/json

curl -X GET "https://example.com/api/v1/live-json/documents/string"
{  "content_type": "string",  "created_at": "2019-08-24T14:15:22Z",  "description": "string",  "id": "string",  "is_shared": true,  "lock_expires_at": "2019-08-24T14:15:22Z",  "locked": true,  "locked_by": "string",  "name": "string",  "owner_id": "string",  "size_bytes": 0,  "subscriber_count": 0,  "tags": {    "property1": "string",    "property2": "string"  },  "ttl_seconds": 0,  "updated_at": "2019-08-24T14:15:22Z"}
DELETE/api/v1/live-json/documents/{document_id}
DELETE
/api/v1/live-json/documents/{document_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

document_id*string

Document ID

Response Body

curl -X DELETE "https://example.com/api/v1/live-json/documents/string"
Empty
PUT/api/v1/live-json/documents/{document_id}
PUT
/api/v1/live-json/documents/{document_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

document_id*string

Document ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request for creating or updating a document (legacy/simple)

Response Body

curl -X PUT "https://example.com/api/v1/live-json/documents/string" \  -H "Content-Type: application/json" \  -d '{    "content": null  }'
Empty
GET/api/v1/live-json/documents/{document_id}/content
GET
/api/v1/live-json/documents/{document_id}/content

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

document_id*string

Document ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/live-json/documents/string/content"
null
PATCH/api/v1/live-json/documents/{document_id}/content
PATCH
/api/v1/live-json/documents/{document_id}/content

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

document_id*string

Document ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request for patching a document with JSONPath

Response Body

curl -X PATCH "https://example.com/api/v1/live-json/documents/string/content" \  -H "Content-Type: application/json" \  -d '{    "path": "string",    "value": null  }'
Empty
PUT/api/v1/live-json/documents/{document_id}/content
PUT
/api/v1/live-json/documents/{document_id}/content

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

document_id*string

Document ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request for creating or updating a document (legacy/simple)

Response Body

curl -X PUT "https://example.com/api/v1/live-json/documents/string/content" \  -H "Content-Type: application/json" \  -d '{    "content": null  }'
Empty
GET/api/v1/live-json/documents/{document_id}/full
GET
/api/v1/live-json/documents/{document_id}/full

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

document_id*string

Document ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/live-json/documents/string/full"
{  "content_type": "string",  "created_at": "2019-08-24T14:15:22Z",  "description": "string",  "id": "string",  "is_shared": true,  "lock_expires_at": "2019-08-24T14:15:22Z",  "locked": true,  "locked_by": "string",  "name": "string",  "owner_id": "string",  "size_bytes": 0,  "subscriber_count": 0,  "tags": {    "property1": "string",    "property2": "string"  },  "ttl_seconds": 0,  "updated_at": "2019-08-24T14:15:22Z",  "content": null}
POST/api/v1/live-json/documents/{document_id}/lock
POST
/api/v1/live-json/documents/{document_id}/lock

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

document_id*string

Document ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request for acquiring a document lock

Response Body

application/json

curl -X POST "https://example.com/api/v1/live-json/documents/string/lock" \  -H "Content-Type: application/json" \  -d '{}'
{  "document_id": "string",  "lock_expires_at": "2019-08-24T14:15:22Z",  "locked_by": "string"}
DELETE/api/v1/live-json/documents/{document_id}/lock
DELETE
/api/v1/live-json/documents/{document_id}/lock

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

document_id*string

Document ID

Response Body

curl -X DELETE "https://example.com/api/v1/live-json/documents/string/lock"
Empty
PATCH/api/v1/live-json/documents/{document_id}/metadata
PATCH
/api/v1/live-json/documents/{document_id}/metadata

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

document_id*string

Document ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request for updating document metadata only

Response Body

application/json

curl -X PATCH "https://example.com/api/v1/live-json/documents/string/metadata" \  -H "Content-Type: application/json" \  -d '{}'
{  "content_type": "string",  "created_at": "2019-08-24T14:15:22Z",  "description": "string",  "id": "string",  "is_shared": true,  "lock_expires_at": "2019-08-24T14:15:22Z",  "locked": true,  "locked_by": "string",  "name": "string",  "owner_id": "string",  "size_bytes": 0,  "subscriber_count": 0,  "tags": {    "property1": "string",    "property2": "string"  },  "ttl_seconds": 0,  "updated_at": "2019-08-24T14:15:22Z"}
GET/api/v1/live-json/stats
GET
/api/v1/live-json/stats

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X GET "https://example.com/api/v1/live-json/stats"
{  "connections_active": 0,  "documents_watched": 0,  "total_subscriptions": 0}
POST/api/v1/live-json/subscribe
POST
/api/v1/live-json/subscribe

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/live-json/subscribe" \  -H "Content-Type: application/json" \  -d '{    "document": "string",    "path": "string"  }'
{  "connection_id": "string",  "initial_value": null,  "subscription_id": "string"}
GET/api/v1/live-json/subscriptions
GET
/api/v1/live-json/subscriptions

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

filter?

Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.

sort?string

Comma-separated sort keys, - for descending, at most 1. Keys: created_at. Default: -created_at.

limit?integer

Rows per page, 1 to 100 (default 25).

Range1 <= value <= 100
cursor?string

The page.next_cursor of the previous page. Cannot be combined with page.

page?integer

A 1-based page number, for jumping. Cannot be combined with cursor.

Range1 <= value
total?boolean

Set to true to include the number of matching rows in page.total.

Response Body

application/json

curl -X GET "https://example.com/api/v1/live-json/subscriptions"
{  "page": {    "has_more": true,    "next_cursor": "string",    "page": 0,    "total": 0  },  "subscriptions": [    {      "connection_id": "string",      "created_at": "string",      "document": "string",      "path": "string",      "subscription_id": "string"    }  ]}
DELETE/api/v1/live-json/subscriptions/{subscription_id}
DELETE
/api/v1/live-json/subscriptions/{subscription_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

subscription_id*string

Subscription ID to unsubscribe

Response Body

curl -X DELETE "https://example.com/api/v1/live-json/subscriptions/string"
Empty
GET/ws/live-json/{document_id}
GET
/ws/live-json/{document_id}

The document is fixed by the path. After the upgrade the server sends a [LiveJsonServerMessage::ConnectionEstablished] frame, then the client picks JSONPaths to watch by sending [LiveJsonClientMessage::Subscribe] over the socket; every matching change arrives as a [LiveJsonServerMessage::Change].

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

document_id*string

Document to watch

Query Parameters

token?string

JWT token (alternative to the Authorization header for browser clients).

Response Body

curl -X GET "https://example.com/ws/live-json/string"
Empty