API queries
Run DataPrime or Lucene queries on your indexed and archived logs directly from code— no need to open the Coralogix UI.
Choose the API archtecture that best fits your workflow:
- JSON over HTTP
- gRPC
For large, recurring analytics (e.g., monthly or quarterly reports) you can submit background queries that run asynchronously in JSON-over-HTTP or gRPC.
Quick facts
HTTP | gRPC | |
---|---|---|
Transport security | HTTPS | HTTPS |
Request format | JSON body via POST | Protobuf message |
Response format | NDJSON for server streams JSON for non server streams | Protobuf stream |
Status codes | Standard HTTP | gRPC status codes |
Prerequisites
- JSON over HTTP: Requests must be sent over HTTPS.
- gRPC: Requests must use HTTPS as well.
Base URL
Use the DataPrime endpoint for your Coralogix domain.
Authentication
Create a personal or team API key and pass it in the Authorization header:
Tip
Select the DataQuerying permission preset so your key stays up to date as new permissions are added.
Action | Purpose |
---|---|
LEGACY-ARCHIVE-QUERIES:EXECUTE | Query archived data |
LOGS.DATA-API#HIGH:READDATA | Query frequent‑search logs |
LOGS.DATA-API#LOW:READDATA | Query monitoring & compliance logs |
METRICS.DATA-API#HIGH:READDATA | Query metrics |
SPANS.DATA-API#HIGH:READDATA | Query frequent‑search spans |
SPANS.DATA-API#LOW:READDATA | Query monitoring & compliance spans |
Next steps
Choose your guide and jump straight into examples:
JSON over HTTP reference – request/response schema, examples, and error handling.
gRPC reference – proto definitions and streaming examples.
Theme
Light