Skip to content

API queries

Run DataPrime or Lucene queries directly from your code—no need to open the Coralogix UI.

Choose the API architecture that best fits your workflow:

  • JSON over HTTP
  • gRPC

For large or recurring analytics jobs (like monthly or quarterly reports), use background queries that run asynchronously. These are available via both JSON-over-HTTP and gRPC.

Quick comparison

FeatureJSON over HTTPgRPC
Transport SecurityHTTPSHTTPS
Request FormatJSON (POST body)Protobuf message
Response FormatNDJSON for streaming
JSON for non-streaming
Protobuf stream
Status CodesStandard HTTPgRPC status codes

Setup & authentication

All requests must be sent over HTTPS, regardless of whether you're using HTTP or gRPC.

To get started:

  1. Use the appropriate DataPrime endpoint for your Coralogix domain. Refer to the list of supported endpoints here.
  2. Create a personal or team API key.
  3. Include your API key in the Authorization header of your request:
Authorization: Bearer <YOUR_API_KEY>

Note

Select the DataQuerying permission preset to keep your key automatically aligned with future permission updates.

Required permissions

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: