Skip to main content
GET
/
metrics
Get all metrics
curl --request GET \
  --url https://api-m.paypal.com/v1/commerce/billing/metrics \
  --header 'Authorization: Bearer <token>'
{
  "metrics": [
    {
      "id": "bm_01H2XT1G7N8E2JHJKBVPDS0TQD",
      "name": "API Requests",
      "code": "api_requests",
      "type": "METERED",
      "description": "Measures the total number of API requests made",
      "aggregation_type": "COUNT",
      "field_filters": [
        {
          "key": "region",
          "values": [
            "us-east-1",
            "us-west-1",
            "eu-west-1"
          ]
        }
      ],
      "created_at": "2023-05-10T14:32:18Z"
    }
  ],
  "pagination_metadata": {
    "total_count": 1,
    "total_pages": 10,
    "current_page": 1
  }
}

Authorizations

Authorization
string
header
required

Use the /v1/oauth2/token endpoint to obtain an access token and pass it as a Bearer token in the Authorization header.

Query Parameters

per_page
integer

Number of records per page

page
integer

Page number

Response

A list of metrics

metrics
object[]
pagination_metadata
object
I