Caches
Serverless caches for any cache client and over HTTP.
/v1/cache/databasesList caches#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Response
200object
databasesCache[]requirednamestringrequiredhoststringrequiredportintegerrequiredrest_urlstringrequiredmax_memory_mbintegerone of
32,64,128,256evictionbooleancreated_atstring (date-time)statusstringone of
available,unavailableprojectsConnected[]namestringrequiredkindstringrequiredone of
function,appenvironmentsstring[]requiredbindingsstring[]required
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/cache/databases" \
-H "Authorization: Bearer $KEY"- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Request bodyapplication/json
namestringrequiredone DNS label: lowercase letters, digits and hyphens, 1-63 characters, no
--pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersmax_memory_mbintegerone of
32,64,128,256· default64evictionbooleandefault true
Response
201CacheCreated
namestringrequiredhoststringrequiredportintegerrequiredrest_urlstringrequiredmax_memory_mbintegerone of
32,64,128,256evictionbooleancreated_atstring (date-time)statusstringone of
available,unavailableprojectsConnected[]namestringrequiredkindstringrequiredone of
function,appenvironmentsstring[]requiredbindingsstring[]required
tokenstringrequiredchc_ token, shown once
notestring
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_name, bad_memory, bad_json |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 409 | Conflict: name_taken |
| 500 | internal: an unexpected failure |
| 503 | Unavailable: no_nodes |
Example
curl -X POST "https://api.ibel.ai/v1/cache/databases" \
-H "Authorization: Bearer $KEY" \
-d '{"name":"sessions"}'/v1/cache/databases/{name}Get a cache#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200Cache
namestringrequiredhoststringrequiredportintegerrequiredrest_urlstringrequiredmax_memory_mbintegerone of
32,64,128,256evictionbooleancreated_atstring (date-time)statusstringone of
available,unavailableprojectsConnected[]namestringrequiredkindstringrequiredone of
function,appenvironmentsstring[]requiredbindingsstring[]required
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/cache/databases/sessions" \
-H "Authorization: Bearer $KEY"/v1/cache/databases/{name}Delete a cache#
With its data. Refused while a live version binds it (checked after the role and the name).
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
- Step-up
- With a dashboard session, a second factor confirmed in the last 10 minutes; API keys pass.
Parameters
namestringpathrequiredthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200Deleted
namestringdeletedbooleanrequired
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden, step_up_required |
| 404 | Not found: not_found |
| 409 | Conflict: bound |
| 500 | internal: an unexpected failure |
Example
curl -X DELETE "https://api.ibel.ai/v1/cache/databases/sessions" \
-H "Authorization: Bearer $KEY"/v1/cache/databases/{name}Change the settings of a cache#
Only the fields sent change; the cache restarts on them and keeps its data.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Request bodyapplication/json
max_storage_mbintegercheckpoint_daysintegermax_memory_mbintegerevictionboolean
Response
200object
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_storage, bad_checkpoint_days, bad_memory, nothing_to_change |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
Example
curl -X PATCH "https://api.ibel.ai/v1/cache/databases/sessions" \
-H "Authorization: Bearer $KEY" \
-d '{"max_storage_mb":1,"checkpoint_days":1,"max_memory_mb":1,"eviction":true}'/v1/cache/databases/{name}/tokensList tokens#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200object
tokensCacheToken[]requiredidstringrequiredrolestringrequiredone of
rw,ronamestringcreated_atstring (date-time)revoked_atstring (date-time) | null
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/cache/databases/sessions/tokens" \
-H "Authorization: Bearer $KEY"/v1/cache/databases/{name}/tokensMake a token#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
- Step-up
- With a dashboard session, a second factor confirmed in the last 10 minutes; API keys pass.
Parameters
namestringpathrequiredthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Request bodyapplication/json
rolestringone of
rw,ro· default"rw"namestringup to 100 characters
Response
201object
idstringrequiredrolestringrequiredtokenstringrequiredshown once
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_json |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden, step_up_required |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl -X POST "https://api.ibel.ai/v1/cache/databases/sessions/tokens" \
-H "Authorization: Bearer $KEY" \
-d '{"role":"rw","name":"sessions"}'/v1/cache/databases/{name}/tokens/{id}Revoke a token#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersidstringpathrequiredtoken id
Response
200object
idstringrevokedboolean
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl -X DELETE "https://api.ibel.ai/v1/cache/databases/sessions/tokens/7e5926b6f29c" \
-H "Authorization: Bearer $KEY"/v1/cache/databases/{name}/commandRun a cache command or pipeline#
A single command the cache refuses is 400 command_error with its reply as the message.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Request bodyapplication/json
CacheCommand
Response
200CacheReply
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_command, command_error, bad_json |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
| 503 | Unavailable: unavailable |
Example
curl -X POST "https://api.ibel.ai/v1/cache/databases/sessions/command" \
-H "Authorization: Bearer $KEY" \
-d '["…"]'/v1/cache/limitsWhat the plan allows for caches#
Memory and stored sizes, checkpoint days and the command rate of the plan of the team. Any role.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Response
200object
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
Example
curl "https://api.ibel.ai/v1/cache/limits" \
-H "Authorization: Bearer $KEY"/v1/cache/databases/{name}/statsKeys, memory, hit rate and stored size of a cache#
Live from the cache; while it is idle, the stored size of the last hour with live false. Any role.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200object
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
Example
curl "https://api.ibel.ai/v1/cache/databases/sessions/stats" \
-H "Authorization: Bearer $KEY"/v1/cache/databases/{name}/checkpointsThe checkpoints of a cache#
Newest first, each kept checkpoint_days. Any role.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200object
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 409 | Not available: not_available |
Example
curl "https://api.ibel.ai/v1/cache/databases/sessions/checkpoints" \
-H "Authorization: Bearer $KEY"/v1/cache/databases/{name}/checkpointsTake a cache checkpoint now#
Every write acknowledged before it is in it.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Request bodyapplication/json
object
Response
201object
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 409 | Not available: not_available |
Example
curl -X POST "https://api.ibel.ai/v1/cache/databases/sessions/checkpoints" \
-H "Authorization: Bearer $KEY" \
-d '{}'/v1/cache/databases/{name}/checkpoints/{id}/restoreRestore a cache from a checkpoint#
Replaces every key with the checkpoints; writes since then are lost. A session needs a step-up.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersidstringpathrequiredthe checkpoint's id
up to 128 characters
Request bodyapplication/json
object
Response
200object
Errors
| Status | Description |
|---|---|
| 400 | Bad request: not_available |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden, step_up_required |
| 404 | Not found: not_found |
| 409 | Not available: not_available |
Example
curl -X POST "https://api.ibel.ai/v1/cache/databases/sessions/checkpoints/7e5926b6f29c/restore" \
-H "Authorization: Bearer $KEY" \
-d '{}'/v1/cache/databases/{name}/usageCommands and bytes per minute#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactershoursintegerquery1-744, default 1
1–744 · default
1
Response
200CacheUsage
totalobjectrequiredcommandsintegerbytesinteger
seriesobject[]requiredminutestring (date-time)commandsintegerbytesinteger
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_param |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/cache/databases/sessions/usage" \
-H "Authorization: Bearer $KEY"/v1/cache/databases/{name}/observabilityCommands, hit rate, memory, keys#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersrangestringquery1h (1-minute steps), 24h (15 minutes) or 7d (2 hours); any other value is 400 bad_range
one of
1h,24h,7d· default"1h"
Response
200ResourceObservability
rangestringrequiredstepstringrequiredtotalsobjectrequiredmetricsobject[]requiredkeystringrequiredlabelstringrequiredunitstringrequired
seriesobject[]requiredtstring (date-time)
tablesobject[]databases only: the latest top statements
keystringlabelstringsampled_atstring (date-time)columnsobject[]keystringlabelstring
rowsobject[]
notestring
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_range |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/cache/databases/sessions/observability" \
-H "Authorization: Bearer $KEY"