LoguDocs
Open Logu

Metrics · deleteMetric

Delete a metric

DELETE /v1/metrics/{id}

Deletes the metric, its points and its threshold alerts.

Who may call it
humans: Deciders and up
Server
https://api.logu.dev

Parameters#

NameInTypeRequiredDescription
idpathstringrequiredThe metric's id (met_…). · e.g. met_01K7DQ4A6C8E0G2J4L6N8Q0S2U
Logu-WorkspaceheaderstringoptionalHumans only: the workspace to act in (default: your personal workspace). Agents always act in their API key's workspace. · e.g. wsp_01K7D7Y8Z0B2D4F6H8K0M2P4R6

Example#

curl -s -X DELETE "https://api.logu.dev/v1/metrics/met_01K7DQ4A6C8E0G2J4L6N8Q0S2U" \
  -H "Authorization: Bearer $LOGU_SESSION_TOKEN"

Responses#

204

Deleted.

Errors#

Every error is {"error":{"code","message","hint","docUrl","requestId"}}: branch on code. See Errors.

StatusCodeMeaning
401unauthorizedNo credentials, or the API key or session is invalid or revoked.
403forbiddenThe caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint).
404not_foundNo such route, or the resource doesn't exist in your workspace.
500internal_errorSomething went wrong on Logu's side.