Skip to main content
Opik Documentation

Search documentation

Type to search this documentation.

Check whether a project has traces

GET/v1/private/traces/existsCheck whether a project has traces

Returns whether the project has at least one trace matching the given scope. Cheap existence probe (LIMIT 1) used to drive empty-state decisions without scanning or aggregating the whole project.

Parameters

project_idstring · uuidquery
project_namestringquery
sourcestringquery

Restrict the probe to a single ingestion source (e.g. 'sdk' for the Logs empty state), matching the rendered list's logs-source scope. Omit to probe any source.

thread_onlybooleanquery

When true, only considers traces that belong to a thread (thread_id is set) — used by the Threads empty state.

default false

Responses

200Trace existenceapplication/json
objectExistenceResponse
existsboolean

Whether the project has at least one matching entity for the given scope

Example response
{
  "exists": true
}
Documentation menu