For AI agents: this page in Markdown: https://www.pubnub.com/docs/admin-api/get-metrics.md. Documentation index: https://www.pubnub.com/llms-full.txt.

getMetrics

GET 

/v2/usage-metrics

getMetrics

Request​

Example
{
  "metrics": [
    {
      "publish": {
        "2024-04-03": 1234,
        "2024-04-04": 1567,
        "2024-04-05": 2134
      },
      "subscribe_msgs": {
        "2024-04-03": 5678,
        "2024-04-04": 6234,
        "2024-04-05": 7890
      }
    },
    {
      "mtd_uuid": {
        "2024-04-30": 20480259
      }
    }
  ]
}
Example
{
  "statusCode": 400,
  "message": [
    "Invalid metrics: invalid_metric_name"
  ],
  "error": "Bad Request"
}