---
title: "Gets device play statistics aggregated by device."
method: GET
path: "/adhawk/deviceplaystats"
tags: ["AdHawk"]
---

# Gets device play statistics aggregated by device.

`GET /adhawk/deviceplaystats`

## Request

- Base URL: `https://api.reveldigital.com`
- URL: `https://api.reveldigital.com/adhawk/deviceplaystats`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://id.reveldigital.com/connect/authorize`
    - Token URL: `https://id.reveldigital.com/connect/token` scopes: `webapi`
  - API key in header `X-RevelDigital-ApiKey`
  - API key in query parameter `api_key`
- TypeScript: <https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/docs/adhawk/deviceplaystats/get.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `startDate` string, date-time
- `endDate` string, date-time
- `deviceId` string[]
- `fileId` string[]
- `limit` integer

## Response `200`

OK

- AdHawkDevicePlayStats[]
  - `device_id` string, nullable: The device ID
  - `device_name` string, nullable: The device name
  - `total_plays` integer: Total number of media files played on this device
  - `total_duration` integer: Total duration of all plays in seconds
  - `avg_duration` number, double, nullable: Average play duration in seconds
  - `file_count` integer: Number of unique media files played on this device
  - `first_play` string, date-time, nullable: First play timestamp for the period
  - `last_play` string, date-time, nullable: Last play timestamp for the period

---

[API](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api.md) - [All operations](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/revisions/39d5c8302822?raw)
