Method projects.metrics.list

Lists the logs-based metrics associated with a project.

HTTP request

GET https://logging.googleapis.com/v1beta3/{projectName=projects/*}/metrics

(This URI uses URI Template syntax.)

Path parameters

Parameter name Type Description
projectName string The resource name for the project whose metrics are wanted.

Query parameters

Parameter name Type Description
pageToken string An opaque token, returned as nextPageToken by a prior ListLogMetrics operation. If pageToken is supplied, then the other fields of this request are ignored, and instead the previous ListLogMetrics operation is continued.
pageSize number The maximum number of LogMetric objects to return in one operation.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Result returned from ListLogMetrics.

JSON representation
{
  "metrics": [
    {
      object(LogMetric)
    }
  ],
  "nextPageToken": string,
}
Field name Type Description
metrics[] object(LogMetric) The list of metrics that was requested.
nextPageToken string If there are more results, then nextPageToken is returned in the response. To get the next batch of entries, use the value of nextPageToken as pageToken in the next call of ListLogMetrics. If nextPageToken is empty, then there are no more results.

Authorization

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/logging.read
  • https://www.googleapis.com/auth/logging.admin
  • https://www.googleapis.com/auth/cloud-platform.read-only
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Auth Guide.

Try it!