Parseable Docs

Ingest logs with headers


Log Ingestion API via Custom Headers
This approach allows you to send logs to Parseable using custom headers to specify the target stream.

Required headers:

  • X-PBL-Stream: The name of the stream to ingest logs into

The API accepts logs in JSON format. You can send single log entries or arrays of log entries.

Example:

{
  "level": "info",
  "message": "User logged in",
  "timestamp": "2023-01-01T12:00:00Z",
  "user_id": "user123"
}

Or as an array:

[
  {
    "level": "info",
    "message": "User logged in",
    "timestamp": "2023-01-01T12:00:00Z",
    "user_id": "user123"
  },
  {
    "level": "error",
    "message": "Failed to process request",
    "timestamp": "2023-01-01T12:01:00Z",
    "error_code": "ERR-1001"
  }
]
POST
/api/v1/ingest

Authorization

AuthorizationRequiredBasic <token>

In: header

Request Body

application/jsonOptional

Header Parameters

X-PBL-StreamRequiredstring

Response Body

Successful response

curl -X POST "https://demo.parseable.com/api/v1/ingest" \
  -H "X-PBL-Stream: string" \
  -H "Authorization: Basic <token>" \
  -H "Content-Type: application/json" \
  -d '{}'
Empty