رفتن به محتوا
cloudhostمستندات
مرجع API

کش

کش بدون سرور برای هر کلاینت کش و HTTP.

توضیح هر مسیر به انگلیسی است، همان متنی که مرجع از کد ساخته می‌شود. مسیرها، نام فیلدها و کدها همان‌اند که در درخواست می‌نویسید.
GET/v1/cache/databases

List caches#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پاسخ

200object

  • databasesCache[]الزامی
    • namestringالزامی
    • hoststringالزامی
    • portintegerالزامی
    • rest_urlstringالزامی
    • max_memory_mbinteger

      one of 32, 64, 128, 256

    • evictionboolean
    • created_atstring (date-time)
    • statusstring

      one of available, unavailable

    • projectsConnected[]

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/cache/databases" \
  -H "Authorization: Bearer $KEY"
POST/v1/cache/databases

Create a cache#

With a read-write token default, returned once.

دسترسی
کلید 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 characters

  • max_memory_mbinteger

    one of 32, 64, 128, 256 · default 64

  • evictionboolean

    default true

پاسخ

201CacheCreated

  • namestringالزامی
  • hoststringالزامی
  • portintegerالزامی
  • rest_urlstringالزامی
  • max_memory_mbinteger

    one of 32, 64, 128, 256

  • evictionboolean
  • created_atstring (date-time)
  • statusstring

    one of available, unavailable

  • projectsConnected[]
  • tokenstringالزامی

    chc_ token, shown once

  • notestring

خطاها

وضعیتتوضیح
400Bad request: bad_name, bad_memory, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
409Conflict: name_taken
500internal: an unexpected failure
503Unavailable: no_nodes

نمونه

curl -X POST "https://api.ibel.ai/v1/cache/databases" \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"sessions"}'
GET/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_mbinteger

    one of 32, 64, 128, 256

  • evictionboolean
  • created_atstring (date-time)
  • statusstring

    one of available, unavailable

  • projectsConnected[]

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/cache/databases/sessions" \
  -H "Authorization: Bearer $KEY"
DELETE/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

  • namestring
  • deletedbooleanالزامی

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden, step_up_required
404Not found: not_found
409Conflict: bound
500internal: an unexpected failure

نمونه

curl -X DELETE "https://api.ibel.ai/v1/cache/databases/sessions" \
  -H "Authorization: Bearer $KEY"
PATCH/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_mbinteger
  • checkpoint_daysinteger
  • max_memory_mbinteger
  • evictionboolean

پاسخ

200object

خطاها

وضعیتتوضیح
400Bad request: bad_storage, bad_checkpoint_days, bad_memory, nothing_to_change
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not 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}'
GET/v1/cache/databases/{name}/tokens

List 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, ro

    • namestring
    • created_atstring (date-time)
    • revoked_atstring (date-time) | null

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/cache/databases/sessions/tokens" \
  -H "Authorization: Bearer $KEY"
POST/v1/cache/databases/{name}/tokens

Make 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

  • rolestring

    one of rw, ro · default "rw"

  • namestring

    up to 100 characters

پاسخ

201object

  • idstringالزامی
  • rolestringالزامی
  • tokenstringالزامی

    shown once

خطاها

وضعیتتوضیح
400Bad request: bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden, step_up_required
404Not found: not_found
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/cache/databases/sessions/tokens" \
  -H "Authorization: Bearer $KEY" \
  -d '{"role":"rw","name":"sessions"}'
DELETE/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 characters

  • idstringمسیرالزامی

    token id

پاسخ

200object

  • idstring
  • revokedboolean

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

نمونه

curl -X DELETE "https://api.ibel.ai/v1/cache/databases/sessions/tokens/7e5926b6f29c" \
  -H "Authorization: Bearer $KEY"
POST/v1/cache/databases/{name}/command

Run 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

خطاها

وضعیتتوضیح
400Bad request: bad_command, command_error, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure
503Unavailable: unavailable

نمونه

curl -X POST "https://api.ibel.ai/v1/cache/databases/sessions/command" \
  -H "Authorization: Bearer $KEY" \
  -d '["…"]'
GET/v1/cache/limits

What 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

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential

نمونه

curl "https://api.ibel.ai/v1/cache/limits" \
  -H "Authorization: Bearer $KEY"
GET/v1/cache/databases/{name}/stats

Keys, 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

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found

نمونه

curl "https://api.ibel.ai/v1/cache/databases/sessions/stats" \
  -H "Authorization: Bearer $KEY"
GET/v1/cache/databases/{name}/checkpoints

The 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

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
409Not available: not_available

نمونه

curl "https://api.ibel.ai/v1/cache/databases/sessions/checkpoints" \
  -H "Authorization: Bearer $KEY"
POST/v1/cache/databases/{name}/checkpoints

Take 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

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
409Not available: not_available

نمونه

curl -X POST "https://api.ibel.ai/v1/cache/databases/sessions/checkpoints" \
  -H "Authorization: Bearer $KEY" \
  -d '{}'
POST/v1/cache/databases/{name}/checkpoints/{id}/restore

Restore 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 characters

  • idstringمسیرالزامی

    the checkpoint's id

    up to 128 characters

بدنهٔ درخواستapplication/json

object

پاسخ

200object

خطاها

وضعیتتوضیح
400Bad request: not_available
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden, step_up_required
404Not found: not_found
409Not available: not_available

نمونه

curl -X POST "https://api.ibel.ai/v1/cache/databases/sessions/checkpoints/7e5926b6f29c/restore" \
  -H "Authorization: Bearer $KEY" \
  -d '{}'
GET/v1/cache/databases/{name}/usage

Commands 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 characters

  • hoursintegerکوئری

    1-744, default 1

    1–744 · default 1

پاسخ

200CacheUsage

  • totalobjectالزامی
    • commandsinteger
    • bytesinteger
  • seriesobject[]الزامی
    • minutestring (date-time)
    • commandsinteger
    • bytesinteger

خطاها

وضعیتتوضیح
400Bad request: bad_param
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/cache/databases/sessions/usage" \
  -H "Authorization: Bearer $KEY"
GET/v1/cache/databases/{name}/observability

Commands, 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 characters

  • rangestringکوئری

    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[]الزامی
  • seriesobject[]الزامی
  • tablesobject[]

    databases only: the latest top statements

  • notestring

خطاها

وضعیتتوضیح
400Bad request: bad_range
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/cache/databases/sessions/observability" \
  -H "Authorization: Bearer $KEY"