Update metric
Patch a metric by key. Updating a metric uses a JSON patch representation of the desired changes. To learn more, read Updates.
Path parameters
projectKey
The project key
metricKey
The metric key
Headers
Authorization
Request
This endpoint expects a list of objects.
op
The type of operation to perform
path
A JSON Pointer string specifying the part of the document to operate on
value
Response
Metric response
_id
The ID of this metric
_versionId
The version ID of the metric
key
A unique key to reference the metric
name
A human-friendly name for the metric
kind
The kind of event the metric tracks
Allowed values:
_links
The location and content type of related resources
_creationDate
Timestamp of when the metric was created
experimentCount
The number of experiments using this metric
metricGroupCount
The number of metric groups using this metric
_attachedFlagCount
The number of feature flags currently attached to this metric
_site
Details on how to access the metric in the LaunchDarkly UI
_access
Details on the allowed and denied actions for this metric
lastModified
maintainerId
The ID of the member who maintains this metric
_maintainer
Details on the member who maintains this metric
description
Description of the metric
category
The category of the metric
isNumeric
For custom 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
).
successCriteria
For custom metrics, the success criteria
Allowed values:
unit
For numeric custom metrics, the unit of measure
eventKey
For custom metrics, the event key to use in your code
randomizationUnits
An array of randomization units allowed for this metric
filters
The filters narrowing down the audience based on context attributes or event properties.
unitAggregationType
The method by which multiple unit event values are aggregated
Allowed values:
analysisType
The method for analyzing metric events
Allowed values:
percentileValue
The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when analysisType
is percentile
.
eventDefault
experiments
Experiments that use this metric, including those using a metric group that contains this metric
metricGroups
Metric groups that use this metric
isActive
Whether the metric is active
_attachedFeatures
Details on the flags attached to this metric
_version
Version of the metric
selector
For click metrics, the CSS selectors
urls
For click and pageview metrics, the target URLs