Parseable

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 dataset.

Required headers:

  • X-P-Stream: The name of the dataset 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

basicAuth
AuthorizationBasic <token>

In: header

Header Parameters

X-P-Stream*string

Request Body

application/json

Response Body

application/json

curl -X POST "http://localhost:8000/api/v1/ingest" \  -H "X-P-Stream: string" \  -H "Content-Type: application/json" \  -d '{}'
Empty

Was this page helpful?