> ## Documentation Index
> Fetch the complete documentation index at: https://www.artie.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Query analytics data

> Queries Datadog metrics for analytics datasets such as rows synced, ingestion lag, flush time, and more. pipelineUUID is required for API keys bound to an environment. For windows of 59 minutes or longer, from and to are floored to 30 s and results are cached for up to 1 minute.

`GET /analytics`

## Authorization

* `Authorization` (header): API key passed as a Bearer token in the Authorization header.

## Query parameters

* `from` (string, required)
* `to` (string, required)
* `datasets[]` (string[], required)
* `pipelineUUID` (string)
* `tables[]` (string[])
* `backfillOptions` (string)
* `transferMode` (string)
* `groupBy` (string)

## Example request

```bash
curl --request GET \
  --url 'https://api.artie.com/analytics?from=<from>&to=<to>&datasets%5B%5D=<datasets[]>' \
  --header 'Authorization: Bearer <token>'
```

## Responses

### 200 OK

* `datasets` (Record<string, object>, required)
  * `data` (object[] | null, required)
    * `Option 1` (object[])
      * `dimensions` (object)
        * `operation` (string)
        * `pipelineUUID` (string<uuid> | null)
        * `reason` (string)
        * `slot` (string)
        * `table` (string)
        * `warehouseName` (string)
        * `warehouseSize` (string)
      * `granularityInterval` (integer | null)
      * `points` (object[] | null)
        * `value` (integer<int64>)
    * `Option 2` (object[])
      * `dimensions` (object)
        * `operation` (string)
        * `pipelineUUID` (string<uuid> | null)
        * `reason` (string)
        * `slot` (string)
        * `table` (string)
        * `warehouseName` (string)
        * `warehouseSize` (string)
      * `granularityInterval` (integer | null)
      * `points` (object[] | null)
        * `time` (integer<int64>)
        * `value` (number<double>)
    * `Option 3` (null)
  * `err` (string | null, required)
  * `unit` (string, required) One of: `count`, `megabytes`, `ms`, `bytes`.

```json
{
  "datasets": {
    "key": {
      "data": [
        {
          "dimensions": {
            "operation": "<string>",
            "pipelineUUID": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "reason": "<string>",
            "slot": "<string>",
            "table": "<string>",
            "warehouseName": "<string>",
            "warehouseSize": "<string>"
          },
          "granularityInterval": 123,
          "points": [
            {
              "value": {}
            }
          ]
        }
      ],
      "err": "<string>",
      "unit": "count"
    }
  }
}
```

### 400 Bad Request

### 500 Internal Server Error