Skip to content

Distributed State

GET/api/v1/distributed-state/{namespace}
GET
/api/v1/distributed-state/{namespace}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

namespace*string

Namespace to list keys from

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: created_at, 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/distributed-state/string"
{  "keys": [    {      "created_at": "2019-08-24T14:15:22Z",      "key": "string",      "namespace": "string",      "state_id": "string",      "ttl_seconds": 0,      "updated_at": "2019-08-24T14:15:22Z",      "value": null,      "version": "string"    }  ],  "namespace": "string",  "page": {    "has_more": true,    "next_cursor": "string",    "page": 0,    "total": 0  }}
DELETE/api/v1/distributed-state/{namespace}
DELETE
/api/v1/distributed-state/{namespace}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

namespace*string

Namespace to delete

Query Parameters

pattern?string

Optional pattern to limit deletion

confirm*string

Must be 'true' to proceed

Response Body

application/json

curl -X DELETE "https://example.com/api/v1/distributed-state/string?confirm=string"
{  "deleted_count": 0,  "namespace": "string",  "pattern_used": "string"}
GET/api/v1/distributed-state/{namespace}/{key}
GET
/api/v1/distributed-state/{namespace}/{key}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

namespace*string

Namespace for the state key

key*string

State key identifier

Response Body

application/json

curl -X GET "https://example.com/api/v1/distributed-state/string/string"
{  "created_at": "2019-08-24T14:15:22Z",  "key": "string",  "namespace": "string",  "state_id": "string",  "ttl_seconds": 0,  "updated_at": "2019-08-24T14:15:22Z",  "value": null,  "version": "string"}
POST/api/v1/distributed-state/{namespace}/{key}
POST
/api/v1/distributed-state/{namespace}/{key}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

namespace*string

Namespace for the state key

key*string

State key identifier

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request to set or update a distributed state value

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/distributed-state/string/string" \  -H "Content-Type: application/json" \  -d '{    "value": null  }'
{  "created_at": "2019-08-24T14:15:22Z",  "key": "string",  "namespace": "string",  "operation": "created",  "ttl_seconds": 0,  "updated_at": "2019-08-24T14:15:22Z",  "value": null,  "version": "string"}
DELETE/api/v1/distributed-state/{namespace}/{key}
DELETE
/api/v1/distributed-state/{namespace}/{key}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

namespace*string

Namespace for the state key

key*string

State key identifier

Response Body

curl -X DELETE "https://example.com/api/v1/distributed-state/string/string"
Empty