HTTP API

KV Store

POST/api/v1/kv/batch/delete
POST
/api/v1/kv/batch/delete

POST /kv/batch/delete

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request for batch delete

Response Body

application/json

curl -X POST "https://example.com/api/v1/kv/batch/delete" \  -H "Content-Type: application/json" \  -d '{    "keys": [      "string"    ]  }'
{  "deleted": [    "string"  ],  "forbidden": [    "string"  ],  "not_found": [    "string"  ]}
POST/api/v1/kv/batch/get
POST
/api/v1/kv/batch/get

POST /kv/batch/get

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request for batch get

Response Body

application/json

curl -X POST "https://example.com/api/v1/kv/batch/get" \  -H "Content-Type: application/json" \  -d '{    "keys": [      "string"    ]  }'
{  "forbidden": [    "string"  ],  "items": {    "property1": {      "content_type": "string",      "value": null    },    "property2": {      "content_type": "string",      "value": null    }  },  "missing": [    "string"  ]}
POST/api/v1/kv/batch/set
POST
/api/v1/kv/batch/set

POST /kv/batch/set

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request for batch set

Response Body

application/json

curl -X POST "https://example.com/api/v1/kv/batch/set" \  -H "Content-Type: application/json" \  -d '{    "items": [      {        "key": "string",        "value": null      }    ]  }'
{  "results": [    {      "error": "string",      "key": "string",      "success": true    }  ]}
GET/api/v1/kv/binary/{path}
GET
/api/v1/kv/binary/{path}

GET /kv/binary/{*path}

Path Parameters

path*string

Key path

Response Body

application/octet-stream

curl -X GET "https://example.com/api/v1/kv/binary/string"
Empty
PUT/api/v1/kv/binary/{path}
PUT
/api/v1/kv/binary/{path}

PUT /kv/binary/{*path}

Path Parameters

path*string

Key path (e.g., images/logo.png)

Query Parameters

nx?boolean

Only set if key does not exist

xx?boolean

Only set if key exists

ttl_seconds?integer

Time-to-live in seconds

Formatint64
Range0 <= value
tags?string

Tags (comma-separated)

private?boolean

Make the key private

Request Body

application/octet-stream

Raw binary data

TypeScript Definitions

Use the request body type in TypeScript.

[index: integer]?integer
Formatint32
Range0 <= value

Response Body

application/json

curl -X PUT "https://example.com/api/v1/kv/binary/string" \  -H "Content-Type: application/octet-stream" \  -d '<0>0</0>'
{  "content_type": "string",  "created_at": "2019-08-24T14:15:22Z",  "indexed": true,  "key": "string",  "owner": "string",  "private": true,  "size_bytes": 0,  "tags": [    "string"  ],  "ttl_expires_at": "2019-08-24T14:15:22Z",  "ttl_seconds": 0,  "updated_at": "2019-08-24T14:15:22Z"}
GET/api/v1/kv/keys
GET
/api/v1/kv/keys

GET /kv/keys

Query Parameters

prefix?string

Filter by key path prefix

depth?integer

Recursion depth (0 = immediate children only)

Formatint32
Range0 <= value
tags?string

Filter by tags (comma-separated)

q?string

Full-text search on key names

owner?string

Filter by owner ('me' for current user)

private?boolean

Filter by privacy

content_type?string

Filter by content type

page?integer

Page number

Formatint64
Range0 <= value
page_size?integer

Items per page

Formatint64
Range0 <= value
sort_by?string

Sort field

sort_order?string

Sort direction (asc/desc)

Response Body

application/json

curl -X GET "https://example.com/api/v1/kv/keys"
{  "keys": [    {      "child_count": 0,      "content_type": "string",      "created_at": "2019-08-24T14:15:22Z",      "is_namespace": true,      "key": "string",      "owner": "string",      "private": true,      "size_bytes": 0,      "tags": [        "string"      ],      "ttl_expires_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  }}
POST/api/v1/kv/ops/increment/{path}
POST
/api/v1/kv/ops/increment/{path}

POST /kv/ops/increment/{*path}

Path Parameters

path*string

Key path

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request to increment a numeric value

Response Body

application/json

curl -X POST "https://example.com/api/v1/kv/ops/increment/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "key": "string",  "value": 0}
POST/api/v1/kv/ops/ttl/{path}
POST
/api/v1/kv/ops/ttl/{path}

POST /kv/ops/ttl/{*path}

Path Parameters

path*string

Key path

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request to manage TTL

Response Body

application/json

curl -X POST "https://example.com/api/v1/kv/ops/ttl/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "key": "string",  "sliding": true,  "ttl_expires_at": "2019-08-24T14:15:22Z",  "ttl_seconds": 0}
GET/api/v1/kv/search
GET
/api/v1/kv/search

GET /kv/search

Query Parameters

q*string

Search query

prefix?string

Filter by key path prefix

tags?string

Filter by tags

page?integer

Page number

Formatint64
Range0 <= value
page_size?integer

Items per page

Formatint64
Range0 <= value

Response Body

application/json

curl -X GET "https://example.com/api/v1/kv/search?q=string"
{  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  },  "results": [    {      "content_type": "string",      "key": "string",      "score": 0.1,      "snippet": "string",      "tags": [        "string"      ],      "updated_at": "2019-08-24T14:15:22Z"    }  ]}
GET/api/v1/kv/stats
GET
/api/v1/kv/stats

GET /kv/stats

Query Parameters

prefix?string

Limit stats to a namespace prefix

Response Body

application/json

curl -X GET "https://example.com/api/v1/kv/stats"
{  "indexed_keys": 0,  "keys_by_content_type": {    "property1": 0,    "property2": 0  },  "keys_by_namespace": {    "property1": 0,    "property2": 0  },  "keys_with_ttl": 0,  "private_keys": 0,  "total_keys": 0,  "total_size_bytes": 0}
GET/api/v1/kv/{path}
GET
/api/v1/kv/{path}

GET /kv/{*path}

Path Parameters

path*string

Key path

Query Parameters

path?string

JSONPath expression to extract a subset

include_metadata?boolean

Include full metadata

Response Body

application/json

curl -X GET "https://example.com/api/v1/kv/string"
{  "content_type": "string",  "key": "string",  "metadata": null,  "updated_at": "2019-08-24T14:15:22Z",  "value": null}
PATCH/api/v1/kv/{path}
PATCH
/api/v1/kv/{path}

PATCH /kv/{*path}

Path Parameters

path*string

Key path

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request for JSON merge patch

Response Body

application/json

curl -X PATCH "https://example.com/api/v1/kv/string" \  -H "Content-Type: application/json" \  -d '{    "patch": null  }'
{  "key": "string",  "value": null}
DELETE/api/v1/kv/{path}
DELETE
/api/v1/kv/{path}

DELETE /kv/{*path}

Path Parameters

path*string

Key path

Response Body

curl -X DELETE "https://example.com/api/v1/kv/string"
Empty
HEAD/api/v1/kv/{path}
HEAD
/api/v1/kv/{path}

HEAD /kv/{*path}

Path Parameters

path*string

Key path

Response Body

curl -X HEAD "https://example.com/api/v1/kv/string"
Empty
PUT/api/v1/kv/{path}
PUT
/api/v1/kv/{path}

PUT /kv/{*path}

Path Parameters

path*string

Key path (e.g., config/db/host)

Query Parameters

nx?boolean

Only set if key does not exist

xx?boolean

Only set if key exists

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request to set a key-value pair (JSON body)

Response Body

application/json

application/json

curl -X PUT "https://example.com/api/v1/kv/string" \  -H "Content-Type: application/json" \  -d '{    "value": null  }'
{  "content_type": "string",  "created_at": "2019-08-24T14:15:22Z",  "indexed": true,  "key": "string",  "owner": "string",  "private": true,  "size_bytes": 0,  "tags": [    "string"  ],  "ttl_expires_at": "2019-08-24T14:15:22Z",  "ttl_seconds": 0,  "updated_at": "2019-08-24T14:15:22Z"}

On this page