Update metric
Patch a metric by key. Updating a metric uses a JSON patch representation of the desired changes. To learn more, read Updates.
Authorizations
Path Parameters
The project key
The metric key
Body
Response
Metric response
The ID of this metric
"5902deadbeef667524a01290"
The version ID of the metric
"version-id-123abc"
A unique key to reference the metric
"metric-key-123abc"
A human-friendly name for the metric
"My metric"
The kind of event the metric tracks
pageview, click, custom, trace "custom"
The location and content type of related resources
Tags for the metric
Timestamp of when the metric was created
"1628192791148"
The number of experiments using this metric
0
The number of metric groups using this metric
0
The number of active experiments using this metric
2
The number of active guarded rollouts using this metric
1
Version of the metric
1
The number of feature flags currently attached to this metric
0
Details on how to access the metric in the LaunchDarkly UI
"{\"href\":\"/my-project/metrics/my-metric/details\",\"type\":\"text/html\"}"
Details on the allowed and denied actions for this metric
The ID of the member who maintains this metric
"569fdeadbeef1644facecafe"
Details on the member who maintains this metric
"{\"_links\":{\"self\":{\"href\":\"/api/v2/members/569fdeadbeef1644facecafe\",\"type\":\"application/json\"}},\"_id\":\"569fdeadbeef1644facecafe\",\"firstName\":\"Ariel\",\"lastName\":\"Flores\",\"role\":\"owner\",\"email\":\"ariel@acme.com\"}"
Description of the metric
The category of the metric
"Error monitoring"
For custom and trace metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).
true
For custom and trace metrics, the success criteria
HigherThanBaseline, LowerThanBaseline For numeric custom and trace metrics, the unit of measure
For custom metrics, the event key to use in your code
"Order placed"
Deprecated, use analysisUnits instead.
An array of analysis units allowed for this metric.
The filters narrowing down the audience based on context attributes or event properties.
"{\"type\":\"group\",\"op\":\"and\",\"values\":[{\"type\":\"contextAttribute\",\"op\":\"in\",\"contextKind\":\"user\",\"attribute\":\"country\",\"values\":[\"JP\"],\"negate\":false},{\"type\":\"eventProperty\",\"op\":\"in\",\"attribute\":\"category\",\"values\":[\"magic-wands\"],\"negate\":false}]}"
The method by which multiple unit event values are aggregated
average, sum, count_distinct "average"
The method for analyzing metric events
mean, percentile "mean"
The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when analysisType is percentile.
95
Timestamp of most recent data for this metric, at one-hour fidelity
Whether the metric version is archived
Timestamp when the metric version was archived
"1609459200000"
For click metrics, the CSS selectors
For click and pageview metrics, the target URLs
"[{\"kind\":\"exact\",\"url\":\"https://www.example.com/page1\"}]"
Not yet implemented - The start of the measurement window, in milliseconds relative to the unit's first exposure to a flag variation
Not yet implemented - The end of the measurement window, in milliseconds relative to the unit's first exposure to a flag variation
Lower winsorization percentile, expressed as a percent in the open interval (0, 100). When both bounds are set, defines a two-sided clamp range. Otherwise lower-only winsorization.
1
Upper winsorization percentile, expressed as a percent in the open interval (0, 100). When both bounds are set, must be greater than winsorLowerPercentile.
99.5
When true, the percentile bound calculation includes imputed zeros. Only meaningful when at least one bound is set and the metric includes units that didn't send events.
false
For trace metrics, the trace query to use for the metric.
"service.name = \"checkout\""
For trace metrics, the location in the trace to use for numeric values.
"duration"
For count_distinct metrics, the column to count distinct values of
For ratio metrics, the denominator event configuration
Experiments that use this metric, including those using a metric group that contains this metric
Metric groups that use this metric
The most recent experiment that used this metric
The most recent guarded rollout that used this metric
Whether the metric is active
true
Details on the flags attached to this metric