List GCP metrics

List the Google Cloud metrics a GCP source can collect. The list is empty until the source's GCP project is connected and has finished its first sync.

GET https://telemetry.betterstack.com/api/v4/sources/{source_id}/gcp-metrics

URL parameters

source_id
required string

Query parameters

page
integer
per_page
DEFAULT 50 integer
team_id
string

Headers

Authorization
required string

Results are paginated

Use pagination.next and pagination.prev to move through pages or jump to a specific one using page and per_page. See Pagination.

200

Response body

{
  "data": [
    {
      "id": "123456789",
      "type": "gcp_metric",
      "attributes": {
        "metric_type": "compute.googleapis.com/instance/cpu/utilization",
        "display_name": "CPU utilization",
        "description": "Fractional utilization of the allocated CPU on this instance.",
        "kind": "GAUGE",
        "service_name": "compute.googleapis.com",
        "collected": true
      }
    }
  ],
  "pagination": {
    "first": "https://telemetry.betterstack.com/api/v4/sources/123456/gcp-metrics?page=1",
    "last": "https://telemetry.betterstack.com/api/v4/sources/123456/gcp-metrics?page=1",
    "prev": null,
    "next": null,
    "total_count": 1
  }
}
401

Response body

{
  "errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/logs/api/getting-started/#obtaining-a-logtail-api-token"
}
403
404

Response body

{
  "errors": "Resource with the provided ID was not found"
}

Response attributes

id
string
type
string
metric_type
string
display_name
string
description
string
kind
string
service_name
string
collected
boolean
pagination.first
string
pagination.last
string
pagination.prev
string or null
pagination.next
string or null
pagination.total_count
integer

Example cURL

List GCP metrics
curl --request GET \
  --url https://telemetry.betterstack.com/api/v4/sources/123456/gcp-metrics \
  --header "Authorization: Bearer $TOKEN"