/api/agent

PUT /api/agent/v1/metric/{id}

Changed on

Update a saved metric. Patch semantics - only fields that you pass are changed.

Set collection_id to move the metric to a different collection. Set archived: true to archive. Archiving is a soft delete - there is no delete endpoint. It can be reversed by setting archived: false. Pass query (a query_handle from construct_query, or a base64 MBQL string) to replace the underlying query; the replacement must still be a valid metric (exactly one aggregation, at most one date/datetime grouping). The target card must be a metric — use update_question for questions.

put/api/agent/v1/metric/{id}

Request

  • Base URL
    (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    API key in header X-API-Key

Path parameters

idinteger required

value must be an integer greater than zero.

Request body

archivedboolean nullable
collection_idinteger nullable

value must be an integer greater than zero.

descriptionstring nullable
display'table' | 'bar' | 'line' | 'pie' | 'scatter' | 'area' | 'row' | 'combo' | 'pivot' | 'scalar' | 'smartscalar' | 'gauge' | 'progress' | 'funnel' | 'map' | 'waterfall' | 'sankey'

Display types accepted by Card. Validates LLM-passed values so a bogus value (e.g. "potato") gets a 400 rather than persisting junk.

namestring nullable

value must be a non-blank string.

querystring nullable

value must be a non-blank string.

visualization_settingsobject nullable

Value must be a map.

Response

Successful response

archivedboolean required
collection_idinteger nullable required

value must be an integer greater than zero.

collection_pathstring required
descriptionstring nullable required
displaystring required
idinteger required

value must be an integer greater than zero.

namestring required

value must be a non-blank string.

Changes