مرجع API
خروجی لاگ
لاگها به آدرس شما: HTTPS یا syslog روی TLS. پلن حرفهای.
توضیح هر مسیر به انگلیسی است، همان متنی که مرجع از کد ساخته میشود. مسیرها، نام فیلدها و کدها هماناند که در درخواست مینویسید.
GET
/v1/drainsThe team's log exports#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
projectstringکوئریonly this project's
پاسخ
200object
drainsDrain[]idstring (uuid)namestringkindstringone of
https,syslogurlstringprojectobject | nullnamestringkindstring
sourcesstring[]levelsstring[]sampling_pctintegergzipbooleanheader_namesstring[]signing_secret_hintstring | nullenabledbooleandisabled_reasonstring | nullcreated_atstring (date-time)healthobjectstatestringone of
waiting,healthy,failing,disabledlines_sentintegerbatches_sentintegerbytes_sentintegerlast_success_atstring (date-time) | nulllast_errorstring | nulllast_error_atstring (date-time) | nullconsecutive_failuresinteger
limitintegerplanstringsourcesstring[]levelsstring[]
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/drains" \
-H "Authorization: Bearer $KEY"POST
/v1/drainsCreate a log export (the signing secret is shown once)#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین
بدنهٔ درخواستapplication/json
namestringالزامیkindstringالزامیone of
https,syslogurlstringالزامیhttps://… or syslog+tls://host:port
projectstringsourcesstring[]levelsstring[]sampling_pctinteger1–100
gzipbooleanheadersmap of stringup to 5 custom headers (https only); values are never shown again
پاسخ
200Drain
idstring (uuid)namestringkindstringone of
https,syslogurlstringprojectobject | nullnamestringkindstring
sourcesstring[]levelsstring[]sampling_pctintegergzipbooleanheader_namesstring[]signing_secret_hintstring | nullenabledbooleandisabled_reasonstring | nullcreated_atstring (date-time)healthobjectstatestringone of
waiting,healthy,failing,disabledlines_sentintegerbatches_sentintegerbytes_sentintegerlast_success_atstring (date-time) | nulllast_errorstring | nulllast_error_atstring (date-time) | nullconsecutive_failuresinteger
signing_secretstring
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | Bad request: bad_name, bad_kind, bad_url, bad_sources, bad_levels, bad_sampling, bad_headers, bad_gzip |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden, plan_required (Pro), limit_reached |
| 404 | Not found: not_found |
| 500 | internal: 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)namestringkindstringone of
https,syslogurlstringprojectobject | nullnamestringkindstring
sourcesstring[]levelsstring[]sampling_pctintegergzipbooleanheader_namesstring[]signing_secret_hintstring | nullenabledbooleandisabled_reasonstring | nullcreated_atstring (date-time)healthobjectstatestringone of
waiting,healthy,failing,disabledlines_sentintegerbatches_sentintegerbytes_sentintegerlast_success_atstring (date-time) | nulllast_errorstring | nulllast_error_atstring (date-time) | nullconsecutive_failuresinteger
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: 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
خطاها
| وضعیت | توضیح |
|---|---|
| 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/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
namestringurlstringsourcesstring[]levelsstring[]sampling_pctintegergzipbooleanheadersmap of stringenabledboolean
پاسخ
200Drain
idstring (uuid)namestringkindstringone of
https,syslogurlstringprojectobject | nullnamestringkindstring
sourcesstring[]levelsstring[]sampling_pctintegergzipbooleanheader_namesstring[]signing_secret_hintstring | nullenabledbooleandisabled_reasonstring | nullcreated_atstring (date-time)healthobjectstatestringone of
waiting,healthy,failing,disabledlines_sentintegerbatches_sentintegerbytes_sentintegerlast_success_atstring (date-time) | nulllast_errorstring | nulllast_error_atstring (date-time) | nullconsecutive_failuresinteger
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | Bad request: bad_url, bad_sources, bad_levels, bad_sampling, bad_headers, bad_enabled, nothing_to_change |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: 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-secretA new signing secret (https, shown once)#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین
پارامترها
idstringمسیرالزامیlog export id
پاسخ
200Drain
idstring (uuid)namestringkindstringone of
https,syslogurlstringprojectobject | nullnamestringkindstring
sourcesstring[]levelsstring[]sampling_pctintegergzipbooleanheader_namesstring[]signing_secret_hintstring | nullenabledbooleandisabled_reasonstring | nullcreated_atstring (date-time)healthobjectstatestringone of
waiting,healthy,failing,disabledlines_sentintegerbatches_sentintegerbytes_sentintegerlast_success_atstring (date-time) | nulllast_errorstring | nulllast_error_atstring (date-time) | nullconsecutive_failuresinteger
signing_secretstring
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: 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}/testSend one sample line now#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین
پارامترها
idstringمسیرالزامیlog export id
پاسخ
200object
okbooleanstatusinteger | nullduration_msintegererrorstring
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: 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}/healthDelivery health and the newest sends#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
idstringمسیرالزامیlog export id
limitintegerکوئری1 to 200
پاسخ
200Drain
idstring (uuid)namestringkindstringone of
https,syslogurlstringprojectobject | nullnamestringkindstring
sourcesstring[]levelsstring[]sampling_pctintegergzipbooleanheader_namesstring[]signing_secret_hintstring | nullenabledbooleandisabled_reasonstring | nullcreated_atstring (date-time)healthobjectstatestringone of
waiting,healthy,failing,disabledlines_sentintegerbatches_sentintegerbytes_sentintegerlast_success_atstring (date-time) | nulllast_errorstring | nulllast_error_atstring (date-time) | nullconsecutive_failuresinteger
last_24hobjectbatches_okintegerbatches_failedintegerlinesinteger
batchesobject[]idintegeratstring (date-time)linesintegerbytesintegerokbooleanhttp_statusinteger | nullerrorstring | nullmsinteger | null
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/drains/88e2fe1d-6d75-4de5-8c8f-27380ec66903/health" \
-H "Authorization: Bearer $KEY"