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

خروجی لاگ

لاگ‌ها به آدرس شما: HTTPS یا syslog روی TLS. پلن حرفه‌ای.

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

The team's log exports#

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

پارامترها

  • projectstringکوئری

    only this project's

پاسخ

200object

  • drainsDrain[]
  • limitinteger
  • planstring
  • sourcesstring[]
  • levelsstring[]

خطاها

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

نمونه

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

Create a log export (the signing secret is shown once)#

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

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

  • namestringالزامی
  • kindstringالزامی

    one of https, syslog

  • urlstringالزامی

    https://… or syslog+tls://host:port

  • projectstring
  • sourcesstring[]
  • levelsstring[]
  • sampling_pctinteger

    1–100

  • gzipboolean
  • headersmap of string

    up to 5 custom headers (https only); values are never shown again

پاسخ

200Drain

  • idstring (uuid)
  • namestring
  • kindstring

    one of https, syslog

  • urlstring
  • projectobject | null
  • sourcesstring[]
  • levelsstring[]
  • sampling_pctinteger
  • gzipboolean
  • header_namesstring[]
  • signing_secret_hintstring | null
  • enabledboolean
  • disabled_reasonstring | null
  • created_atstring (date-time)
  • healthobject
  • signing_secretstring

خطاها

وضعیتتوضیح
400Bad request: bad_name, bad_kind, bad_url, bad_sources, bad_levels, bad_sampling, bad_headers, bad_gzip
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden, plan_required (Pro), limit_reached
404Not found: not_found
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/drains" \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"my-api","kind":"https","url":"…"}'
GET/v1/drains/{id}

One log export#

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

پارامترها

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

    log export id

پاسخ

200Drain

  • idstring (uuid)
  • namestring
  • kindstring

    one of https, syslog

  • urlstring
  • projectobject | null
  • sourcesstring[]
  • levelsstring[]
  • sampling_pctinteger
  • gzipboolean
  • header_namesstring[]
  • signing_secret_hintstring | null
  • enabledboolean
  • disabled_reasonstring | null
  • created_atstring (date-time)
  • healthobject

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/drains/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"
DELETE/v1/drains/{id}

Delete a log export#

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

پارامترها

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

    log export id

پاسخ

200object

  • deletedboolean

خطاها

وضعیتتوضیح
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/drains/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"
PATCH/v1/drains/{id}

Change a log export or re-enable it#

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

پارامترها

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

    log export id

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

  • namestring
  • urlstring
  • sourcesstring[]
  • levelsstring[]
  • sampling_pctinteger
  • gzipboolean
  • headersmap of string
  • enabledboolean

پاسخ

200Drain

  • idstring (uuid)
  • namestring
  • kindstring

    one of https, syslog

  • urlstring
  • projectobject | null
  • sourcesstring[]
  • levelsstring[]
  • sampling_pctinteger
  • gzipboolean
  • header_namesstring[]
  • signing_secret_hintstring | null
  • enabledboolean
  • disabled_reasonstring | null
  • created_atstring (date-time)
  • healthobject

خطاها

وضعیتتوضیح
400Bad request: bad_url, bad_sources, bad_levels, bad_sampling, bad_headers, bad_enabled, nothing_to_change
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

نمونه

curl -X PATCH "https://api.ibel.ai/v1/drains/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"my-api","url":"…","sources":["…"],"levels":["…"],"sampling_pct":1,"gzip":true,"headers":{"KEY":"s3cr3t"},"enabled":true}'
POST/v1/drains/{id}/rotate-secret

A new signing secret (https, shown once)#

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

پارامترها

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

    log export id

پاسخ

200Drain

  • idstring (uuid)
  • namestring
  • kindstring

    one of https, syslog

  • urlstring
  • projectobject | null
  • sourcesstring[]
  • levelsstring[]
  • sampling_pctinteger
  • gzipboolean
  • header_namesstring[]
  • signing_secret_hintstring | null
  • enabledboolean
  • disabled_reasonstring | null
  • created_atstring (date-time)
  • healthobject
  • signing_secretstring

خطاها

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

نمونه

curl -X POST "https://api.ibel.ai/v1/drains/88e2fe1d-6d75-4de5-8c8f-27380ec66903/rotate-secret" \
  -H "Authorization: Bearer $KEY"
POST/v1/drains/{id}/test

Send one sample line now#

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

پارامترها

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

    log export id

پاسخ

200object

  • okboolean
  • statusinteger | null
  • duration_msinteger
  • errorstring

خطاها

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

نمونه

curl -X POST "https://api.ibel.ai/v1/drains/88e2fe1d-6d75-4de5-8c8f-27380ec66903/test" \
  -H "Authorization: Bearer $KEY"
GET/v1/drains/{id}/health

Delivery health and the newest sends#

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

پارامترها

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

    log export id

  • limitintegerکوئری

    1 to 200

پاسخ

200Drain

  • idstring (uuid)
  • namestring
  • kindstring

    one of https, syslog

  • urlstring
  • projectobject | null
  • sourcesstring[]
  • levelsstring[]
  • sampling_pctinteger
  • gzipboolean
  • header_namesstring[]
  • signing_secret_hintstring | null
  • enabledboolean
  • disabled_reasonstring | null
  • created_atstring (date-time)
  • healthobject
  • last_24hobject
  • batchesobject[]

خطاها

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

نمونه

curl "https://api.ibel.ai/v1/drains/88e2fe1d-6d75-4de5-8c8f-27380ec66903/health" \
  -H "Authorization: Bearer $KEY"