---
source_url: https://www.pubnub.com/docs/admin-api/v2026-03-01/get-data
title: getData
---

# getData

> For AI agents: documentation index at https://www.pubnub.com/llms-full.txt

getData

## Request

Example

```
{
  "metrics": {
    "new_vs_recurring_users": {
      "status": "failed",
      "reason": "Invalid period",
      "code": 400
    },
    "unique_users_by_country": {
      "status": "successful"
    }
  },
  "dataResult": {
    "unique_users_by_country": [
      {
        "timestamp_value": "2023-10-01T00:00:00.000Z",
        "period": "daily",
        "country": "Poland",
        "unique_users": 3122
      },
      {
        "timestamp_value": "2023-10-01T00:00:00.000Z",
        "period": "daily",
        "country": "Slovakia",
        "unique_users": 139
      },
      {
        "timestamp_value": "2023-10-01T00:00:00.000Z",
        "period": "daily",
        "country": "Portual",
        "unique_users": 14208
      },
      {
        "timestamp_value": "2023-10-01T00:00:00.000Z",
        "period": "daily",
        "country": "Ecuador",
        "unique_users": 24
      }
    ]
  }
}
```

Example

```
{
  "statusCode": 400,
  "message": [
    "period must be one of the following values: hourly, daily"
  ],
  "error": "Bad Request"
}
```

Example

```
{
  "statusCode": 401,
  "message": "Unauthorized"
}
```

Example

```
{
  "statusCode": 403,
  "message": "Forbidden resource",
  "error": "Forbidden"
}
```
