Logs

Create a log ingest key. The response is the only time the key is shown.

Changed on
post/projects/{project_id}/logs/ingest-keys

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    HTTP bearer

Path parameters

project_idinteger required

Project ID

Request body

default_servicestring nullable

Service label for lines that do not name one. Default external.

environment_idinteger nullable

Pin the key to one environment of the project. Absent: lines are labelled with the environment external.

namestring required

A label for the collector or host using the key.

Response

Key created; the plaintext is in key

created_atstring date-time required
created_by_user_idinteger nullable
default_servicestring required
environment_idinteger nullable
idinteger required
is_activeboolean required
key_prefixstring required

The first characters of the key, for recognising it.

last_used_atstring date-time nullable
line_countinteger required

Lines ingested with this key. Updated every 30 seconds.

namestring required
project_idinteger required
revoked_atstring date-time nullable
keystring required

The full key. Shown once; only its hash is stored.

Changes