API Reference
OpenAPI-backed reference for PrairieLog endpoints, request examples, response bodies, and raw curl calls. Use Getting Started for SDK setup.
Log ingestion uses ingestion tokens. Slack and Discord alert destinations use separate alert webhooks; list responses never expose full webhook URLs.
SDK entry points
Prefer SDKs for application logging. This page keeps the package install targets visible, then drops into the generated endpoint reference below.
Package install targets
npm install @prairielog/client
pip install prairielog-handler
<dependency>
<groupId>io.github.robertsima</groupId>
<artifactId>prairielog-logback</artifactId>
<version>0.2.0</version>
</dependency>
The SDKs are the default path for application logging; use raw curl calls below for endpoint-level testing and automation.
TypeScript / Node
import { PrairieLogClient } from "@prairielog/client";
const prairieLog = new PrairieLogClient({
apiUrl: "__API_BASE_URL__",
ingestionToken: "YOUR_INGESTION_TOKEN",
defaultLogger: "checkout-api",
batchSize: 50
});
prairieLog.installNodeHandlers();
await prairieLog.captureException(error, {
endpoint: "/api/v1/checkout",
orderId: "ord_123"
});
Python logging
import logging
from prairielog_handler import PrairieLogHandler
logging.getLogger().addHandler(PrairieLogHandler(
api_url="__API_BASE_URL__",
ingestion_token="YOUR_INGESTION_TOKEN",
logger_name="checkout-worker",
))
logging.exception("Payment failed")
Java Logback
<appender name="PRAIRIELOG" class="com.prairielog.logback.PrairieLogAppender">
<apiUrl>__API_BASE_URL__</apiUrl>
<ingestionToken>${PRAIRIELOG_INGESTION_TOKEN}</ingestionToken>
<batchSize>50</batchSize>
</appender>
<root level="INFO">
<appender-ref ref="PRAIRIELOG"/>
</root>
Loading API contract...