کش
کش بدون سرور برای هر کلاینت کش و HTTP.
/v1/cache/databasesList caches#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پاسخ
200object
databasesCache[]الزامیnamestringالزامیhoststringالزامیportintegerالزامیrest_urlstringالزامیmax_memory_mbintegerone of
32,64,128,256evictionbooleancreated_atstring (date-time)statusstringone of
available,unavailableprojectsConnected[]namestringالزامیkindstringالزامیone of
function,appenvironmentsstring[]الزامیbindingsstring[]الزامی
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/cache/databases" \
-H "Authorization: Bearer $KEY"- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
بدنهٔ درخواستapplication/json
namestringالزامیone 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
پاسخ
201CacheCreated
namestringالزامیhoststringالزامیportintegerالزامیrest_urlstringالزامیmax_memory_mbintegerone of
32,64,128,256evictionbooleancreated_atstring (date-time)statusstringone of
available,unavailableprojectsConnected[]namestringالزامیkindstringالزامیone of
function,appenvironmentsstring[]الزامیbindingsstring[]الزامی
tokenstringالزامیchc_ token, shown once
notestring
خطاها
| وضعیت | توضیح |
|---|---|
| 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 |
نمونه
curl -X POST "https://api.ibel.ai/v1/cache/databases" \
-H "Authorization: Bearer $KEY" \
-d '{"name":"sessions"}'/v1/cache/databases/{name}Get a cache#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پارامترها
namestringمسیرالزامیthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
پاسخ
200Cache
namestringالزامیhoststringالزامیportintegerالزامیrest_urlstringالزامیmax_memory_mbintegerone of
32,64,128,256evictionbooleancreated_atstring (date-time)statusstringone of
available,unavailableprojectsConnected[]namestringالزامیkindstringالزامیone of
function,appenvironmentsstring[]الزامیbindingsstring[]الزامی
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
نمونه
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).
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
- تایید دوم
- با نشست داشبورد، عامل دوم در ۱۰ دقیقهٔ اخیر لازم است؛ کلید API نیازی ندارد.
پارامترها
namestringمسیرالزامیthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
پاسخ
200Deleted
namestringdeletedbooleanالزامی
خطاها
| وضعیت | توضیح |
|---|---|
| 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 |
نمونه
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.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
namestringمسیرالزامیthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
بدنهٔ درخواستapplication/json
max_storage_mbintegercheckpoint_daysintegermax_memory_mbintegerevictionboolean
پاسخ
200object
خطاها
| وضعیت | توضیح |
|---|---|
| 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 |
نمونه
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#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پارامترها
namestringمسیرالزامیthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
پاسخ
200object
tokensCacheToken[]الزامیidstringالزامیrolestringالزامیone of
rw,ronamestringcreated_atstring (date-time)revoked_atstring (date-time) | null
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/cache/databases/sessions/tokens" \
-H "Authorization: Bearer $KEY"/v1/cache/databases/{name}/tokensMake a token#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
- تایید دوم
- با نشست داشبورد، عامل دوم در ۱۰ دقیقهٔ اخیر لازم است؛ کلید API نیازی ندارد.
پارامترها
namestringمسیرالزامیthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
بدنهٔ درخواستapplication/json
rolestringone of
rw,ro· default"rw"namestringup to 100 characters
پاسخ
201object
idstringالزامیrolestringالزامیtokenstringالزامیshown once
خطاها
| وضعیت | توضیح |
|---|---|
| 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 |
نمونه
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#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
namestringمسیرالزامیthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersidstringمسیرالزامیtoken id
پاسخ
200object
idstringrevokedboolean
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
نمونه
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.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
namestringمسیرالزامیthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
بدنهٔ درخواستapplication/json
CacheCommand
پاسخ
200CacheReply
خطاها
| وضعیت | توضیح |
|---|---|
| 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 |
نمونه
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.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پاسخ
200object
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
نمونه
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.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پارامترها
namestringمسیرالزامیthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
پاسخ
200object
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
نمونه
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.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پارامترها
namestringمسیرالزامیthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
پاسخ
200object
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 409 | Not available: not_available |
نمونه
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.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
namestringمسیرالزامیthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
بدنهٔ درخواستapplication/json
object
پاسخ
201object
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 409 | Not available: not_available |
نمونه
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.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
namestringمسیرالزامیthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersidstringمسیرالزامیthe checkpoint's id
up to 128 characters
بدنهٔ درخواستapplication/json
object
پاسخ
200object
خطاها
| وضعیت | توضیح |
|---|---|
| 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 |
نمونه
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#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پارامترها
namestringمسیرالزامیthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactershoursintegerکوئری1-744, default 1
1–744 · default
1
پاسخ
200CacheUsage
totalobjectالزامیcommandsintegerbytesinteger
seriesobject[]الزامیminutestring (date-time)commandsintegerbytesinteger
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | Bad request: bad_param |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/cache/databases/sessions/usage" \
-H "Authorization: Bearer $KEY"/v1/cache/databases/{name}/observabilityCommands, hit rate, memory, keys#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پارامترها
namestringمسیرالزامیthe cache's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersrangestringکوئری1h (1-minute steps), 24h (15 minutes) or 7d (2 hours); any other value is 400 bad_range
one of
1h,24h,7d· default"1h"
پاسخ
200ResourceObservability
rangestringالزامیstepstringالزامیtotalsobjectالزامیmetricsobject[]الزامیkeystringالزامیlabelstringالزامیunitstringالزامی
seriesobject[]الزامیtstring (date-time)
tablesobject[]databases only: the latest top statements
keystringlabelstringsampled_atstring (date-time)columnsobject[]keystringlabelstring
rowsobject[]
notestring
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | Bad request: bad_range |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/cache/databases/sessions/observability" \
-H "Authorization: Bearer $KEY"