Projects

Update a project metric's curation

Changes a metric's display name, position, hidden flag, or headline flag. Reports never overwrite these. Hiding a headline metric clears headline; a project has at most three headline metrics, and a scatter metric cannot be headline.

patch/api/v1/projects/{projectId}/metrics/{metricKey}

Request

  • Base URL
    https://app.khotan.com
  • URL
    https://app.khotan.com/api/v1/projects/{projectId}/metrics/{metricKey}
  • Auth
    • HTTP bearer
    • or API key in header x-api-key

Path parameters

projectIdstring required
metricKeystring required

Request body

displayNamestring nullable

Curated name. Null clears it, so the reported name shows again.

positioninteger

Sort position among the project's metrics, ascending.

hiddenboolean

Hides the metric from readers. Hiding also clears headline.

headlineboolean

Leads the Metrics tab and the project card. At most 3 per project; a fourth returns 409.

Response

The updated metric.

keystring required
namestring required

The name shown: the curated name, else the reported name, else the key.

displayNamestring nullable required
reportedNamestring nullable required
shape'series' | 'breakdown' | 'scatter' required
grain'day' | 'hour' nullable required
unitstring required
goal'increase' | 'decrease' | 'neutral' required

Which direction of change is good news.

aggregate'sum' | 'average' | 'latest' required

How values across a range combine into one number.

descriptionstring nullable required
positioninteger required
hiddenboolean required
headlineboolean required
headlineSlotinteger nullable required
lastReportedAtstring nullable required
createdAtstring required
updatedAtstring required

Changes

No recorded changes to this operation across all 1 revision of this API.