Update a metric
PATCH/projects/:project/metrics/:metric
Changes the fields you send. The result is checked as a whole metric, so a change that leaves it inconsistent is refused: to switch a value_per_visitor metric to unique_count, send event_parameter: null in the same call. Fields you leave out keep their values; send a field as null to clear it. Needs an editor or publisher key.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
The metric as it is now.
The key is missing, wrong, revoked or expired.
The key is a viewer (forbidden), the plan has no API access (feature_unavailable), or the account cannot make changes right now (account_read_only).
Nothing at this address, or it belongs to a project the key cannot reach.
A field is wrong, or the metric would no longer be consistent. errors lists each field and why.
Too many calls. Wait for the number of seconds in Retry-After.
Response Headers
Seconds to wait before calling again.