HTTP API

Live JSON

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

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

search?string

Search by name

is_shared?boolean

Filter by shared status

content_type?string

Filter by content type

page?integer

Page number

Formatint32
Range0 <= value
limit?integer

Items per page

Formatint32
Range0 <= value

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"    }  ],  "pagination": {    "has_more": true,    "page": 0,    "page_size": 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

connection_id?string

Filter by connection ID

document?string

Filter by document

Response Body

application/json

curl -X GET "https://example.com/api/v1/live-json/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

On this page