MetricDescriptors: create

Requires authorization

Create a new metric. See custom metrics for details of the use of this API. Try it now.

Request

HTTP request

POST https://www.googleapis.com/cloudmonitoring/v2beta2/projects/project/metricDescriptors

Parameters

Parameter name Value Description
Path parameters
project string The project id. The value can be the numeric project ID or string-based project name.

Authorization

This request requires authorization with at least one of the following scopes (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/monitoring
https://www.googleapis.com/auth/cloud-platform

Request body

In the request body, supply a MetricDescriptors resource.

Response

If successful, this method returns a MetricDescriptors resource in the response body.

Try it!

Use the APIs Explorer below to call this method on live data and see the response. Alternatively, try the standalone Explorer.

Send feedback about...

Stackdriver Monitoring