Skip to content
cloudhostDocs
API reference

Log export

Send a project's or team's logs to your endpoint over HTTPS or syslog over TLS. Pro feature.

GET/v1/drains

The team's log exports#

Credential
An API key or a dashboard session
Roles
owner, admin, developer

Parameters

  • projectstringquery

    only this project's

Response

200object

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

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
500internal: an unexpected failure

Example

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

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

Credential
An API key or a dashboard session
Roles
owner, admin

Request bodyapplication/json

  • namestringrequired
  • kindstringrequired

    one of https, syslog

  • urlstringrequired

    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

Response

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

Errors

StatusDescription
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

Example

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#

Credential
An API key or a dashboard session
Roles
owner, admin, developer

Parameters

  • idstringpathrequired

    log export id

Response

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

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

Example

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

Delete a log export#

Credential
An API key or a dashboard session
Roles
owner, admin

Parameters

  • idstringpathrequired

    log export id

Response

200object

  • deletedboolean

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

Example

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#

Credential
An API key or a dashboard session
Roles
owner, admin

Parameters

  • idstringpathrequired

    log export id

Request bodyapplication/json

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

Response

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

Errors

StatusDescription
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

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}'
POST/v1/drains/{id}/rotate-secret

A new signing secret (https, shown once)#

Credential
An API key or a dashboard session
Roles
owner, admin

Parameters

  • idstringpathrequired

    log export id

Response

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

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

Example

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#

Credential
An API key or a dashboard session
Roles
owner, admin

Parameters

  • idstringpathrequired

    log export id

Response

200object

  • okboolean
  • statusinteger | null
  • duration_msinteger
  • errorstring

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

Example

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#

Credential
An API key or a dashboard session
Roles
owner, admin, developer

Parameters

  • idstringpathrequired

    log export id

  • limitintegerquery

    1 to 200

Response

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[]

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

Example

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