Logs
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
POST | |
GET | |
POST | |
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
POST | |
POST | |
POST | |
POST | |
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
POST |
Create logs group by
Required API key scopes
logs:readRequest parameters
- query
Response
Example request
POST /api /projects /:project_id /logs /group-byExample response
Status 200
Retrieve logs has logs
Required API key scopes
logs:readExample request
GET /api /projects /:project_id /logs /has_logsExample response
Status 200
Create logs impact
Required API key scopes
logs:readRequest parameters
- query
Response
Example request
POST /api /projects /:project_id /logs /impactExample response
Status 200
List all logs metric rules
Required API key scopes
logs:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /logs /metric_rulesExample response
Status 200
Create logs metric rules
Required API key scopes
logs:writemetrics:writeRequest parameters
- namestring
- metric_namestring
- enabledbooleanDefault:
false - filter_group
- value_attributestring | null
- group_byarray
- sourceDefault:
logs
Response
Example request
POST /api /projects /:project_id /logs /metric_rulesExample response
Status 201
Retrieve logs metric rules
Required API key scopes
logs:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /logs /metric_rules /:idExample response
Status 200
Update logs metric rules
Required API key scopes
logs:writemetrics:writePath parameters
- idstring
Request parameters
- namestring
- metric_namestring
- enabledbooleanDefault:
false - filter_group
- value_attributestring | null
- group_byarray
- sourceDefault:
logs
Response
Example request
PATCH /api /projects /:project_id /logs /metric_rules /:idExample response
Status 200
Delete logs metric rules
Required API key scopes
logs:writemetrics:writePath parameters
- idstring
Example request
DELETE /api /projects /:project_id /logs /metric_rules /:idExample response
Status 204 No response body
Create logs natural language query
Turn a plain-language request into ranked log viewer filter candidates. Nothing is persisted. Only the request text, service names and attribute keys are sent to the models.
Required API key scopes
logs:readRequest parameters
- querystring
- dateRange
Response
Example request
POST /api /projects /:project_id /logs /natural_language_queryExample response
Status 200
Status 502
Status 503
Create logs patterns
Required API key scopes
logs:readRequest parameters
- query
Response
Example request
POST /api /projects /:project_id /logs /patternsExample response
Status 200
Create logs patterns diff
Required API key scopes
logs:readRequest parameters
- query
- baselineDateRange
Response
Example request
POST /api /projects /:project_id /logs /patterns_diffExample response
Status 200
Create logs query
Required API key scopes
logs:readRequest parameters
- query
Response
Example request
POST /api /projects /:project_id /logs /queryExample response
Status 200
List all logs retention rules
Retention rules for one record kind.
TracingRetentionRuleViewSet reuses this for span rules, which live in their own model. It
swaps the queryset, the serializer and team_rules, so every read and write here goes through
team_rules rather than naming a model.
Required API key scopes
logs:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /logs /retention_rulesExample response
Status 200
Create logs retention rules
Retention rules for one record kind.
TracingRetentionRuleViewSet reuses this for span rules, which live in their own model. It
swaps the queryset, the serializer and team_rules, so every read and write here goes through
team_rules rather than naming a model.
Required API key scopes
logs:writeRequest parameters
- namestring
- enabledbooleanDefault:
false - priorityinteger | null
- config
Response
Example request
POST /api /projects /:project_id /logs /retention_rulesExample response
Status 201
Retrieve logs retention rules
Retention rules for one record kind.
TracingRetentionRuleViewSet reuses this for span rules, which live in their own model. It
swaps the queryset, the serializer and team_rules, so every read and write here goes through
team_rules rather than naming a model.
Required API key scopes
logs:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /logs /retention_rules /:idExample response
Status 200
Update logs retention rules
Retention rules for one record kind.
TracingRetentionRuleViewSet reuses this for span rules, which live in their own model. It
swaps the queryset, the serializer and team_rules, so every read and write here goes through
team_rules rather than naming a model.
Required API key scopes
logs:writePath parameters
- idstring
Request parameters
- namestring
- enabledbooleanDefault:
false - priorityinteger | null
- config
Response
Example request
PATCH /api /projects /:project_id /logs /retention_rules /:idExample response
Status 200
Delete logs retention rules
Retention rules for one record kind.
TracingRetentionRuleViewSet reuses this for span rules, which live in their own model. It
swaps the queryset, the serializer and team_rules, so every read and write here goes through
team_rules rather than naming a model.
Required API key scopes
logs:writePath parameters
- idstring
Example request
DELETE /api /projects /:project_id /logs /retention_rules /:idExample response
Status 204 No response body
Create logs retention rules reorder
Atomically reassign priorities so the given ID order maps to ascending priorities (0..n-1).
Query parameters
- limitinteger
- offsetinteger
Request parameters
- ordered_idsarray
Response
Example request
POST /api /projects /:project_id /logs /retention_rules /reorder










