HTTP API

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

q?string

Full-text search query applied to key name

page?integer

1-indexed page number

Formatint64
Range0 <= value
page_size?integer

Page size

Formatint64
Range0 <= value
sort_by?string

Sort field (created_at, updated_at, key)

sort_order?string

Sort order (asc or desc)

Value in

  • "asc"
  • "desc"
filter?array<string>

Additional filter expressions in the form field:operator:value

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

On this page