Skip to content

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

HTTPgRPC
Transport securityHTTPSHTTPS
Request formatJSON body via POSTProtobuf message
Response formatNDJSON for server streams
JSON for non server streams
Protobuf stream
Status codesStandard HTTPgRPC 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:

Authorization: Bearer <YOUR_API_KEY>

Tip

Select the DataQuerying permission preset so your key stays up to date as new permissions are added.

ActionPurpose
LEGACY-ARCHIVE-QUERIES:EXECUTEQuery archived data
LOGS.DATA-API#HIGH:READDATAQuery frequent‑search logs
LOGS.DATA-API#LOW:READDATAQuery monitoring & compliance logs
METRICS.DATA-API#HIGH:READDATAQuery metrics
SPANS.DATA-API#HIGH:READDATAQuery frequent‑search spans
SPANS.DATA-API#LOW:READDATAQuery monitoring & compliance spans

Next steps

Choose your guide and jump straight into examples: