Log export
Send a project's or team's logs to your endpoint over HTTPS or syslog over TLS. Pro feature.
/v1/drainsThe team's log exports#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
projectstringqueryonly this project's
Response
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[]
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/drains" \
-H "Authorization: Bearer $KEY"/v1/drainsCreate a log export (the signing secret is shown once)#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin
Request bodyapplication/json
namestringrequiredkindstringrequiredone of
https,syslogurlstringrequiredhttps://… or syslog+tls://host:port
projectstringsourcesstring[]levelsstring[]sampling_pctinteger1–100
gzipbooleanheadersmap of stringup to 5 custom headers (https only); values are never shown again
Response
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
Errors
| Status | Description |
|---|---|
| 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 |
Example
curl -X POST "https://api.ibel.ai/v1/drains" \
-H "Authorization: Bearer $KEY" \
-d '{"name":"my-api","kind":"https","url":"…"}'/v1/drains/{id}One log export#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
idstringpathrequiredlog export id
Response
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
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 "https://api.ibel.ai/v1/drains/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
-H "Authorization: Bearer $KEY"/v1/drains/{id}Delete a log export#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin
Parameters
idstringpathrequiredlog export id
Response
200object
deletedboolean
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/drains/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
-H "Authorization: Bearer $KEY"/v1/drains/{id}Change a log export or re-enable it#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin
Parameters
idstringpathrequiredlog export id
Request bodyapplication/json
namestringurlstringsourcesstring[]levelsstring[]sampling_pctintegergzipbooleanheadersmap of stringenabledboolean
Response
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
Errors
| Status | Description |
|---|---|
| 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 |
Example
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}'/v1/drains/{id}/rotate-secretA new signing secret (https, shown once)#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin
Parameters
idstringpathrequiredlog export id
Response
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
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 POST "https://api.ibel.ai/v1/drains/88e2fe1d-6d75-4de5-8c8f-27380ec66903/rotate-secret" \
-H "Authorization: Bearer $KEY"/v1/drains/{id}/testSend one sample line now#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin
Parameters
idstringpathrequiredlog export id
Response
200object
okbooleanstatusinteger | nullduration_msintegererrorstring
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 POST "https://api.ibel.ai/v1/drains/88e2fe1d-6d75-4de5-8c8f-27380ec66903/test" \
-H "Authorization: Bearer $KEY"/v1/drains/{id}/healthDelivery health and the newest sends#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
idstringpathrequiredlog export id
limitintegerquery1 to 200
Response
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
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 "https://api.ibel.ai/v1/drains/88e2fe1d-6d75-4de5-8c8f-27380ec66903/health" \
-H "Authorization: Bearer $KEY"