# Reports

Report API endpoints let you retrieve information about push notifications that you have sent.


## Activity log report {#getactivitylogreport}

Returns the activity log data, including non-unicast pushes. The series begins with the earliest time given in which the group of pushes were sent.

[Jump to examples ↓](#getactivitylogreport-examples)

### `GET /api/reports/activity/details`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `start` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for start of report. |
| `end` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for end of report. |
| `limit` | `integer` |  | Number of results to return per request. Defaults to 100. Results paginate if requesting narrow precision over a long period of time. Min: 1 |

**Responses**

**`200`** Returned on success.

Response body:

**Content-Type:** `application/json;`

- **`activities`** `array[object]`

  An array of activity log data.

- **`app_key`** `string`

  The app key for the application.

- **`end`** `string`

  The end [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for the report.

  Format: `date-time`

- **`limit`** `integer`

  The optional limit for the number of entries to return per request. Defaults to 100.

- **`next_page`** `string`

  There might be more than one page of results for this listing. Follow this URL if it is present to the next batch of results.

  Format: `url`

- **`start`** `string`

  The start [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for the report.

  Format: `date-time`

**Examples**

*Example (response truncated)*

```http
GET /api/reports/activity/details?start=2020-06-02T20:47:20&end=2023-01-31T20:47:20 HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
    "app_key": "Wz9d8TlSWk0lZTAwzHA2qc",
    "start": "2020-06-02T20:47:20",
    "end": "2023-01-31T20:47:20",
    "limit": 10,
    "next_page": "https://go.urbanairship.com/api/reports/activity/details...",
    "activities": [
        {
            "push_id": "ecb8eaf0-0430-4dfa-93d8-c3149f479d96",
            "timestamp": "2023-01-31 20:47:20",
            "type": "GROUP",
            "experiment": true,
            "details": {
                "interaction": {
                    "web": {
                        "clicks": 20,
                        "sessions": 13
                    },
                    "app": {
                        "influenced": 13,
                        "direct": 12,
                        "indirect": 10,
                        "rich_read": 5
                    }
                },
                "delivery": {
                    "web": {
                        "total": 13
                    },
                    "app": {
                        "silent": 125,
                        "alerting": 13,
                        "rich": 5,
                        "in_app": {
                            "impressions": 10,
                            "impressions_opted_in": 5,
                            "impressions_opted_out": 5
                        }
                    }
                }
            }
        }
    ]
}

```

---

## App opens report {#getappopensreport}

Get the number of users who have opened your app within the specified time period.

[Jump to examples ↓](#getappopensreport-examples)

### `GET /api/reports/opens`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `start` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for start of report. |
| `end` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for end of report. |
| `precision` | `string` | Required | Granularity of results to return. Defaults to `DAILY`. Possible values: `HOURLY`, `DAILY`, `MONTHLY` Default: `DAILY` |

**Responses**

**`200`** Returned on success, with the JSON representation of the app opens in the body of the response.

Response body:

**Content-Type:** `application/json;`

- **`next_page`** `string`

  There might be more than one page of results for this listing. Follow this URL if it is present to the next batch of results.

  Format: `url`

- **`opens`** `array[object]`

  An array of App opens objects.

**`400`** There was a parsing or validation error in the request. Bad Request errors typically include `path` and `location` in the response to help you find the cause of the error.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`401`** Authentication information (the app key and secret or bearer token) was either incorrect or missing.

Response body:

**Content-Type:** `text/plain`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`403`** Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**Examples**

*Example*

```http
GET /api/reports/opens?start=2020-08-01T10:00&end=2020-08-15T20:00&precision=MONTHLY HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
    "opens": [
        {
            "date": "2020-08-01 00:00:00",
            "ios": 350,
            "android": 250
        }
    ]
}

```

```java
UrbanAirshipClient client = UrbanAirshipClient.newBuilder()
        .setKey("<app key>")
        .setSecret("<master secret>")
        .build();

PlatformStatsRequest request = PlatformStatsRequest.newRequest(PlatformStatsRequestType.APP_OPENS)
        .setStart(DateTime.parse("2020-08-01T10:34:22Z"))
        .setEnd(DateTime.parse("2020-08-15T10:34:22Z"))
        .setPrecision(Precision.MONTHLY);

Response<PlatformStatsResponse> response = client.execute(request);

```

```python
from datetime import datetime
from urbanairship import (
    BasicAuthClient, AppOpensList
)

client = BasicAuthClient(
    key='<app_key>',
    secret='<master_secret>'
)
start_date = datetime(2020, 8, 1)
end_date = datetime(2020, 8, 15)
for open in AppOpensList(airship=client, start_date=start_date, end_date=end_date, precision='DAILY'):
    print(open)

```

```ruby
require 'urbanairship'

UA = Urbanairship
airship = UA::Client.new(key: '<app key>', secret: '<master secret>')

listing = UA::AppOpensList.new(
    client: airship,
    start_date: '2020-08-01',
    end_date: '2020-08-15',
    precision: 'MONTHLY')
listing.each do |app_opens|
    puts(app_opens)
end

```

---

## Custom Events detail listing {#getcustomeventsreport}

Get a summary of Custom Event counts and values, by Custom Event, within the specified time period.

[Jump to examples ↓](#getcustomeventsreport-examples)

### `GET /api/reports/events`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `start` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for start of report. |
| `end` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for end of report. |
| `precision` | `string` |  | Granularity of results to return. Defaults to `DAILY`. Possible values: `HOURLY`, `DAILY`, `MONTHLY` Default: `DAILY` |
| `page` | `integer` |  | Identifies the desired page number. Defaults to 1. If page is given a negative or out of bounds value, the default value will be used. |
| `page_size` | `integer` |  | Specifies how many results to return per page. Has a default value of 25 and a maximum value of 100. |

**Responses**

**`200`** Returned on success, with the JSON representation of the events in the body of the response.

Response body:

**Content-Type:** `application/vnd.urbanairship+json; version=3`

- **`events`** `array[object]`

  An array of Custom Events and its details.

- **`next_page`** `string`

  There might be more than one page of results for this listing. Follow this URL if it is present to the next batch of results.

  Format: `url`

- **`ok`** `boolean`

  Success.

- **`prev_page`** `string`

  Link to the previous page, if available.

  Format: `url`

- **`total_count`** `integer`

  Sum of all the count fields in the above array.

  Example: `12`

- **`total_value`** `integer`

  Sum of all the value fields in the above array.

  Example: `321.2`

**`400`** There was a parsing or validation error in the request. Bad Request errors typically include `path` and `location` in the response to help you find the cause of the error.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`401`** Authentication information (the app key and secret or bearer token) was either incorrect or missing.

Response body:

**Content-Type:** `text/plain`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`403`** Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**Examples**

*Example*

```http
GET /api/reports/events?start=2020-08-01T10:00:00.000Z&end=2020-08-15T20:00:00.000Z&precision=MONTHLY&page_size=20 HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
    "ok": true,
    "total_value": 2,
    "total_count": 709,
    "next_page": "https://go.urbanairship.com/api/reports/events?start=2020-08-01T10:00:00.000Z&end=2020-08-15T20:00:00.000Z&precision=MONTHLY&page_size=20&page=2",
    "events": [
        {
            "name": "banner_image",
            "conversion": "indirect",
            "location": "ua_mcrap",
            "count": 1,
            "value": 1
        },
        {
            "name": "bounce",
            "conversion": "direct",
            "location": "custom",
            "count": 23,
            "value": 0
        },
        {
            "name": "button-click-Do it ",
            "conversion": "direct",
            "location": "in_app_message",
            "count": 1,
            "value": 0
        },
        {
            "name": "button-click-Get Notifications",
            "conversion": "unattributed",
            "location": "in_app_message",
            "count": 3,
            "value": 0
        },
        {
            "name": "button-click-RATE NOW",
            "conversion": "direct",
            "location": "in_app_message",
            "count": 1,
            "value": 0
        },
        {
            "name": "button-click-Rate the app.",
            "conversion": "direct",
            "location": "in_app_message",
            "count": 1,
            "value": 0
        }
    ]
}

```

```java
UrbanAirshipClient client = UrbanAirshipClient.newBuilder()
        .setKey("<app key>")
        .setSecret("<master secret>")
        .build();

DateTime startDate = DateTime.parse("2022-01-01T10:00:00");
DateTime endDate =  DateTime.parse("2023-01-01T10:00:00");

CustomEventsDetailsListingRequest customEventsDetailsListingRequest = CustomEventsDetailsListingRequest
        .newRequest(startDate, endDate)
        .setPageSize(10)
        .setPrecision(Precision.MONTHLY)
        .setPage(2);

Response<CustomEventsDetailsListingResponse> response = client.execute(customEventsDetailsListingRequest);
List<CustomEventsDetailResponse> customEventsDetailResponses = response.getBody().get().getEvents().get();

```

```python
from datetime import datetime
from urbanairship import (
    BasicAuthClient, CustomEventsList
)

client = BasicAuthClient(
    key='<app_key>',
    secret='<master_secret>'
)
start_date = datetime(2020, 8, 1)
end_date = datetime(2020, 8, 15)
for event in CustomEventsList(airship=client, start_date=start_date, end_date=end_date, precision='MONTHLY'):
    print(event)

```

---

## Custom Events per group summary {#getcustomeventspergroupsummary}

Get a summary of Custom Event counts and values associated with the provided Push ID. Includes all Custom Events from the time of the push up to current time.

[Jump to examples ↓](#getcustomeventspergroupsummary-examples)

### `GET /api/reports/events/summary/pergroup/{group_id}`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Path parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `group_id` | `string` | Required | The UUID for the requested group push ID. |

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `variant` | `integer` |  | Variant number (0 to 25), or -1 for control events. |
| `page` | `integer` |  | Identifies the desired page number. Defaults to 1. If page is given a negative or out of bounds value, the default value will be used. |
| `page_size` | `integer` |  | Specifies how many results to return per page. Has a default value of 25 and a maximum value of 100. |

**Responses**

**`200`** Returned on success, with the JSON representation of the events in the body of the response.

Response body:

**Content-Type:** `application/vnd.urbanairship+json; version=3`

**All of:**

  - **`group_id`** `string`

    The UUID representing a specific group push.

    Format: `uuid`

  - **`events`** `array[object]`

    An array of Custom Events and its details.

  - **`next_page`** `string`

    There might be more than one page of results for this listing. Follow this URL if it is present to the next batch of results. Will only be present if there are successive pages.

    Format: `url`

  - **`ok`** `boolean`

    Success.

  - **`prev_page`** `string`

    Link to the previous page, if available. Will only be present if there are preceding pages.

    Format: `url`

  - **`total_count`** `integer`

    Sum of all the count fields in the above array.

    Example: `12`

  - **`total_value`** `integer`

    Sum of all the value fields in the above array.

    Example: `321.2`

  - **`variant`** `integer`

    Variant number (0 to 25) or -1 for control events.


**`400`** There was a parsing or validation error in the request. Bad Request errors typically include `path` and `location` in the response to help you find the cause of the error.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`401`** Authentication information (the app key and secret or bearer token) was either incorrect or missing.

Response body:

**Content-Type:** `text/plain`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`403`** Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**Examples**

*Example request*

```http
GET /api/reports/events/summary/pergroup/8bd09679-f672-4783-a31a-d4e516f9e99c HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

*Response with Group ID parameter*

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
    "ok": true,
    "group_id": "8bd09679-f672-4783-a31a-d4e516f9e99c",
    "events": [
        {
            "name": "custom_event_name",
            "location": "custom",
            "conversion": "direct",
            "count": 4,
            "value": 16.4
        },
        ...
    ],
    "total_count": 12,
    "total_value": 321.2,
    "next_page": "https://go.urbanairship.com/api/reports/events/summary/pergroup/...",
    "prev_page": "https://go.urbanairship.com/api/reports/events/summary/pergroup/..."
}

```

---

## Custom Events per push summary {#getcustomeventsperpushsummary}

Get a summary of Custom Event counts and values associated with the provided Push ID. Includes all Custom Events from the time of the push up to current time.

[Jump to examples ↓](#getcustomeventsperpushsummary-examples)

### `GET /api/reports/events/summary/perpush/{push_id}`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Path parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `push_id` | `string` | Required | The UUID for the requested push. |

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `variant` | `integer` |  | Variant number (0 to 25), or -1 for control events. |
| `page` | `integer` |  | Identifies the desired page number. Defaults to 1. If page is given a negative or out of bounds value, the default value will be used. |
| `page_size` | `integer` |  | Specifies how many results to return per page. Has a default value of 25 and a maximum value of 100. |

**Responses**

**`200`** Returned on success, with the JSON representation of the events in the body of the response.

Response body:

**Content-Type:** `application/vnd.urbanairship+json; version=3`

**All of:**

  - **`push_id`** `string`

    The UUID representing a specific push.

    Format: `uuid`

  - **`events`** `array[object]`

    An array of Custom Events and its details.

  - **`next_page`** `string`

    There might be more than one page of results for this listing. Follow this URL if it is present to the next batch of results. Will only be present if there are successive pages.

    Format: `url`

  - **`ok`** `boolean`

    Success.

  - **`prev_page`** `string`

    Link to the previous page, if available. Will only be present if there are preceding pages.

    Format: `url`

  - **`total_count`** `integer`

    Sum of all the count fields in the above array.

    Example: `12`

  - **`total_value`** `integer`

    Sum of all the value fields in the above array.

    Example: `321.2`

  - **`variant`** `integer`

    Variant number (0 to 25) or -1 for control events.


**`400`** There was a parsing or validation error in the request. Bad Request errors typically include `path` and `location` in the response to help you find the cause of the error.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`401`** Authentication information (the app key and secret or bearer token) was either incorrect or missing.

Response body:

**Content-Type:** `text/plain`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`403`** Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**Examples**

*Example request*

```http
GET /api/reports/events/summary/perpush/8bd09679-f672-4783-a31a-d4e516f9e99c HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

*Response with Push ID parameter*

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
    "ok": true,
    "push_id": "8bd09679-f672-4783-a31a-d4e516f9e99c",
    "events": [
        {
            "name": "custom_event_name",
            "location": "custom",
            "conversion": "direct",
            "count": 4,
            "value": 16.4
        },
        ...
    ],
    "total_count": 12,
    "total_value": 321.2,
    "next_page": "https://go.urbanairship.com/api/reports/events/summary/perpush/...",
    "prev_page": "https://go.urbanairship.com/api/reports/events/summary/perpush/..."
}

```

*Response with variant parameter*

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
    "ok": true,
    "push_id": "8bd09679-f672-4783-a31a-d4e516f9e99c",
    "variant": 1,
    "events": [
        {
            "name": "custom_event_name",
            "location": "custom",
            "conversion": "direct",
            "count": 4,
            "value": 16.4
        },
        ...
    ],
    "total_count": 12,
    "total_value": 321.2,
    "next_page": "https://go.urbanairship.com/api/reports/events/summary/perpush/...",
    "prev_page": "https://go.urbanairship.com/api/reports/events/summary/perpush/..."
}

```

---

## Devices report {#getdevicesreport}

Get an app's opted-in and installed device counts by device type.

[Jump to examples ↓](#getdevicesreport-examples)

### `GET /api/reports/devices`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `date` | `string` | Required | All device events counted occurred before this [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format). |

**Responses**

**`200`** Returned on success, with the JSON representation of the device counts in the body of the response.

Response body:

**Content-Type:** `application/json;`

- **`counts`** `object`

  The counts for each device type.

  **OBJECT PROPERTIES**

  - **`amazon`** `object`

    The count object for a device type.

    **OBJECT PROPERTIES**

    - **`opted_in`** `integer`

      Opted in to receiving push notifications.

      Example: `140`

    - **`opted_out`** `integer`

      Opted out of receiving push notifications.

      Example: `89`

    - **`uninstalled`** `integer`

      Devices for which Reports has seen an uninstall event.

      Example: `9`

    - **`unique_devices`** `integer`

      Devices considered by Airship Reports to have the app installed.

      Example: `229`

  - **`android`** `object`

    The count object for a device type.

    **OBJECT PROPERTIES**

    - **`opted_in`** `integer`

      Opted in to receiving push notifications.

      Example: `140`

    - **`opted_out`** `integer`

      Opted out of receiving push notifications.

      Example: `89`

    - **`uninstalled`** `integer`

      Devices for which Reports has seen an uninstall event.

      Example: `9`

    - **`unique_devices`** `integer`

      Devices considered by Airship Reports to have the app installed.

      Example: `229`

  - **`ios`** `object`

    The count object for a device type.

    **OBJECT PROPERTIES**

    - **`opted_in`** `integer`

      Opted in to receiving push notifications.

      Example: `140`

    - **`opted_out`** `integer`

      Opted out of receiving push notifications.

      Example: `89`

    - **`uninstalled`** `integer`

      Devices for which Reports has seen an uninstall event.

      Example: `9`

    - **`unique_devices`** `integer`

      Devices considered by Airship Reports to have the app installed.

      Example: `229`

- **`date_closed`** `string`

  All device events counted occurred before this [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format).

  Format: `date-time`

  Example: `2018-06-06 11:47:51`

- **`date_computed`** `string`

  The [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) the device event data was tallied and stored.

  Format: `date-time`

  Example: `2018-06-07 11:47:51`

- **`total_unique_devices`** `integer`

  Sum of the unique devices for every device type.

  Example: `12545`

**`400`** There was a parsing or validation error in the request. Bad Request errors typically include `path` and `location` in the response to help you find the cause of the error.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`401`** Authentication information (the app key and secret or bearer token) was either incorrect or missing.

Response body:

**Content-Type:** `text/plain`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`403`** Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**Examples**

*Example*

```http
GET /api/reports/devices?date=2020-08-28T00:00:00 HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
    "total_unique_devices": 13186,
    "date_closed": "2020-08-28 00:00:00",
    "date_computed": "2020-08-29 13:30:45",
    "counts": {
        "ios": {
            "unique_devices": 231,
            "opted_in": 142,
            "opted_out": 89,
            "uninstalled": 2096
        },
        "android": {
            "unique_devices": 11795,
            "opted_in": 226,
            "opted_out": 11569,
            "uninstalled": 1069
        },
        "amazon": {
            "unique_devices": 29,
            "opted_in": 22,
            "opted_out": 7,
            "uninstalled": 9
        },
        "sms": {
            "unique_devices": 26,
            "opted_in": 23,
            "opted_out": 3,
            "uninstalled": 17
        }
    }
}

```

```java
UrbanAirshipClient client = UrbanAirshipClient.newBuilder()
        .setKey("<app key>")
        .setSecret("<master secret>")
        .build();

DevicesReportRequest request = DevicesReportRequest.newRequest()
        .setDate(DateTime.parse("2020-08-28T10:34:22Z"));

Response<DevicesReportResponse> response = client.execute(request);

```

```python
from datetime import datetime
from urbanairship import (
    BasicAuthClient, DevicesReport
)

client = BasicAuthClient(
    key='<app_key>',
    secret='<master_secret>'
)
date = datetime(2020, 8, 28)
response = DevicesReport(airship=client).get(date=date)

```

```ruby
require 'urbanairship'

UA = Urbanairship
airship = UA::Client.new(key: '<app key>', secret: '<master secret>')

d = UA::DevicesReport.new(client: airship)
devices = d.get(date: '2020/08/28')

```

---

## Experiment overview report {#getexperimentoverviewreport}

Returns statistics and metadata about an experiment (A/B Test).

[Jump to examples ↓](#getexperimentoverviewreport-examples)

### `GET /api/reports/experiment/overview/{push_id}`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Path parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `push_id` | `string` | Required | The `push_id` of the requested experiment. |

**Responses**

**`200`** Returned on success.

Response body:

**Content-Type:** `application/json;`

- **`app_key`** `string`

  The app key for the given `push_id`.

- **`control`** `object`

  JSON object describing the control group, i.e., those devices that receive no notification, for the experiment.

  **OBJECT PROPERTIES**

  - **`audience_pct`** `number`

    The percentage of the total audience belonging to the control group.

  - **`response_rate_pct`** `number`

    The response rate from the control group.

  - **`responses`** `integer`

    The number of responses from the control group.

    Example: `123`

  - **`sends`** `integer`

    The number of pushes sent to native mobile platforms, e.g., iOS. Exclusive of `open_channel_sends`, which are broken out under `open_channel_sends`.

    Example: `123`

- **`direct_responses`** `integer`

  The number of direct responses to the experiment.

- **`experiment_id`** `string`

  ID for the requested experiment.

  Format: `uuid`

- **`influenced_responses`** `integer`

  The number of influenced responses to the experiment.

- **`variants`** `object`

  Single variant reporting object or array of variant reporting objects, including associated metadata, audience percentage and response statistics.

  **OBJECT PROPERTIES**

  - **`audience_pct`** `number`
  - **`direct_response_pct`** `number`

    The percentage direct responses to the notification measured by the SDK.

    Example: `13.44`

  - **`direct_responses`** `integer`

    The number of direct responses to the variant measured by the SDK.

    Example: `45`

  - **`id`** `integer`
  - **`indirect_response_pct`** `number`

    The percentage indirect responses to the notification measured by the SDK.

    Example: `0`

  - **`indirect_responses`** `integer`

    The number of indirect responses to the variant measured by the SDK.

    Example: `0`

  - **`name`** `string`
  - **`sends`** `integer`

    The number of pushes sent SDK-supporting platforms, e.g., iOS, Android, and Web. Exclusive of `open_channel_sends`, which are broken out under `open_channel_sends`.

    Example: `123`

- **`web_clicks`** `integer`

  The number of web notifications that the audience clicked on.

- **`web_sessions`** `integer`

  The total number of web sessions that resulted in a notification. Use in conjunction with `web_clicks` to determine the effectiveness of your web notification experiments.


**`400`** There was a parsing or validation error in the request. Bad Request errors typically include `path` and `location` in the response to help you find the cause of the error.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`401`** Authentication information (the app key and secret or bearer token) was either incorrect or missing.

Response body:

**Content-Type:** `text/plain`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`403`** Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**Examples**

*Example*

```http
GET /api/reports/experiment/overview/b43ae1b2-3ff6-4c02-adb2-79deac0bbb19 HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
   "app_key": "some_app_key",
   "experiment_id": "a7806815-6483-4cb9-9d74-bc3b4f3dc1b8",
   "push_id": "b43ae1b2-3ff6-4c02-adb2-79deac0bbb19",
   "created": "2020-02-25 23:03:12",
   "sends": 532,
   "direct_responses": 50,
   "influenced_responses": 60,
   "web_clicks": 6,
   "web_sessions": 8,
   "variants": [
      {
         "id" : 0,
         "name": "call to action",
         "audience_pct": 45.0,
         "sends": 238,
         "direct_responses": 32,
         "direct_response_pct": 13.44,
         "indirect_responses": 0,
         "indirect_response_pct": 0.0
      },
      {
         "id" : 1,
         "name": "gentle reminder",
         "audience_pct": 45.0,
         "sends": 251,
         "direct_responses": 20,
         "direct_response_pct": 7.97,
         "indirect_responses": 4,
         "indirect_response_pct": 1.59
      }
   ],
   "control": {
     "audience_pct": 10.0,
     "sends": 50,
     "responses": 1,
     "response_rate_pct": 2.0
   }
}

```

```java
UrbanAirshipClient client = UrbanAirshipClient.newBuilder()
        .setKey("<app key>")
        .setSecret("<master secret>")
        .build();

ExperimentOverviewReportRequest experimentOverviewReportRequest = ExperimentOverviewReportRequest.newRequest("4b83d756-cc64-45e0-b140-3f5ec04170fb");
Response<ExperimentOverviewReportResponse> response = client.execute(experimentOverviewReportRequest);

```

```python
from datetime import datetime
from urbanairship import (
    BasicAuthClient, ExperimentReport
)

client = BasicAuthClient(
    key='<app_key>',
    secret='<master_secret>'
)

experiment_report = ExperimentReport(airship=client)
overview_report = experiment_report.get_overview(
                    push_id="b43ae1b2-3ff6-4c02-adb2-79deac0bbb19"
                  )
print(overview_report)

```

---

## Experiment variant report {#getexperimentvariantreport}

Returns statistics and metadata about a specific variant in an experiment (A/B Test).

[Jump to examples ↓](#getexperimentvariantreport-examples)

### `GET /api/reports/experiment/detail/{push_id}/{variant_id}`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Path parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `push_id` | `string` | Required | The `push_id` of the requested experiment. |
| `variant_id` | `integer` | Required | The specific variant you want to return results for. Min: 1 Max: 26 |

**Responses**

**`200`** Returned on success.

Response body:

**Content-Type:** `application/json;`

- **`app_key`** `string`

  The app key for the given `push_id`.

- **`created`** `string`

  The [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) when the variant was created.

  Format: `date-time`

  Read only: true

- **`direct_responses`** `integer`

  The number of direct responses to the variant.

- **`experiment_id`** `string`

  ID of the experiment that the variant belongs to.

  Format: `uuid`

- **`influenced_responses`** `integer`

  The total number of influenced responses to the variant.

- **`platforms`** `object`
  **OBJECT PROPERTIES**

  - **`amazon`** `object`
    **OBJECT PROPERTIES**

    - **`direct_responses`** `integer`

      The number of direct responses (clicks/app opens) to the variant notification on this platform as measured by the SDK.

    - **`influenced_responses`** `integer`

      The number of opens or clicks resulting from your notification (directly or indirectly).

    - **`sends`** `integer`

      The total number of audience members that accounted the variant on the specified platform.

  - **`android`** `object`
    **OBJECT PROPERTIES**

    - **`direct_responses`** `integer`

      The number of direct responses (clicks/app opens) to the variant notification on this platform as measured by the SDK.

    - **`influenced_responses`** `integer`

      The number of opens or clicks resulting from your notification (directly or indirectly).

    - **`sends`** `integer`

      The total number of audience members that accounted the variant on the specified platform.

  - **`ios`** `object`
    **OBJECT PROPERTIES**

    - **`direct_responses`** `integer`

      The number of direct responses (clicks/app opens) to the variant notification on this platform as measured by the SDK.

    - **`influenced_responses`** `integer`

      The number of opens or clicks resulting from your notification (directly or indirectly).

    - **`sends`** `integer`

      The total number of audience members that accounted the variant on the specified platform.

  - **`web`** `object`
    **OBJECT PROPERTIES**

    - **`direct_responses`** `integer`

      The number of direct responses (clicks/app opens) to the variant notification on this platform as measured by the SDK.

    - **`influenced_responses`** `integer`

      The number of opens or clicks resulting from your notification (directly or indirectly).

    - **`sends`** `integer`

      The total number of audience members that accounted the variant on the specified platform.

- **`push_id`** `string`

  The specific push_id that the variant belonged to.

  Format: `uuid`

- **`variant`** `integer`

  The individual variant you want to return results for. Variants are ordered 1-26 in the order that they are arranged in the `variants` array when you created the experiment.

  Min: 1, Max: 26

- **`variant_name`** `string`

  The name of the variant specified in the endpoint.

**Examples**

*Example*

```http
GET /api/reports/experiment/detail/b43ae1b2-3ff6-4c02-adb2-79deac0bbb19/2 HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
    "app_key": "some_app_key",
    "experiment_id": "a7806815-6483-4cb9-9d74-bc3b4f3dc1b8",
    "push_id": "b43ae1b2-3ff6-4c02-adb2-79deac0bbb19",
    "created": "2020-02-25 23:03:12",
    "variant": 2,
    "variant_name": "thing_two",
    "sends": 64,
    "direct_responses": 3,
    "influenced_responses": 1,
    "platforms": {
        "android": {
            "direct_responses": 0,
            "influenced_responses": 0,
            "sends": 22
        },
        "ios": {
            "direct_responses": 0,
            "influenced_responses": 1,
            "sends": 36
        },
        "amazon": {
            "direct_responses": 0,
            "influenced_responses": 0,
            "sends": 0
        },
        "web": {
            "direct_responses": 3,
            "indirect_responses": 0,
            "sends": 6
        }
    }
}

```

```java
UrbanAirshipClient client = UrbanAirshipClient.newBuilder()
        .setKey("<app key>")
        .setSecret("<master secret>")
        .build();

ExperimentVariantReportRequest experimentVariantReportRequest = ExperimentVariantReportRequest.newRequest("b43ae1b2-3ff6-4c02-adb2-79deac0bbb19", "1");
Response<ExperimentVariantReportResponse> response = client.execute(experimentVariantReportRequest);

```

```python
from datetime import datetime
from urbanairship import (
    BasicAuthClient, ExperimentReport
)

client = BasicAuthClient(
    key='<app_key>',
    secret='<master_secret>'
)

experiment_report = ExperimentReport(airship=client)
variant_report = experiment_report.get_variant(
  push_id="b43ae1b2-3ff6-4c02-adb2-79deac0bbb19",
  variant=2
)
print(variant_report)

```

---

## Individual push response statistics {#getresponsesforpush}

Returns detailed reports information about a specific push notification. Use the `push_id`, which is the identifier returned by the API that represents a specific push message delivery.

[Jump to examples ↓](#getresponsesforpush-examples)

### `GET /api/reports/responses/{push_id}`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Path parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `push_id` | `string` | Required | The UUID for the requested push. |

**Responses**

**`200`** Returned on success, with the JSON representation of the push statistics in the body of the response.

Response body:

**Content-Type:** `application/json;`

- **`direct_responses`** `integer`

  The number of native-platform direct responses to the notification measured by the SDK.

  Example: `45`

- **`open_channels_sends`** `object`

  Contains an array of the number of send counts per open platform. If there were no open channels sends associated with the push ID, an empty result will be returned.

  **OBJECT PROPERTIES**

  - **`platforms`** `array[object]`

    An array of objects indicating the total sends by open platform.

- **`push_time`** `string`

  The [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) indicating the time that the push was initially sent.

  Format: `date-time`

  Example: `2018-06-02 10:00:00`

- **`push_type`** `string`

  This string describes the push operation, which is often comparable to the audience selection.

  Possible values: `BROADCAST_PUSH`, `TAG_PUSH`, `SCHEDULED_PUSH`, `SEGMENTS_PUSH`, `UNICAST_PUSH`

  Example: `TAG_PUSH`

- **`push_uuid`** `string`

  The UUID for the requested push.

  Format: `uuid`

  Example: `f133a7c8-d750-11e1-a6cf-e06995b6c872`

- **`sends`** `integer`

  The number of pushes sent to native mobile platforms, e.g., iOS. Exclusive of `open_channel_sends`, which are broken out under `open_channel_sends`.

  Example: `123`

**`400`** There was a parsing or validation error in the request. Bad Request errors typically include `path` and `location` in the response to help you find the cause of the error.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`401`** Authentication information (the app key and secret or bearer token) was either incorrect or missing.

Response body:

**Content-Type:** `text/plain`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`404`** The requested resource doesn't exist.

Response body:

**Content-Type:** `application/vnd.urbanairship+json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**Examples**

*Example*

```http
GET /api/reports/responses/90f28bc6-6c9b-4c99-b970-973afc266e08 HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
   "push_uuid": "90f28bc6-6c9b-4c99-b970-973afc266e08",
   "push_time": "2020-02-25 23:03:12",
   "push_type": "UNICAST_PUSH",
   "sends": 167,
   "direct_responses": 15,
   "open_channels_sends": {
      "platforms": [
        {
           "id": "PLATFORM_NAME",
           "sends": 22
        },
        {
           "id": "ANOTHER_PLATFORM",
           "sends": 145
        }
      ]
   }
}

```

```java
UrbanAirshipClient client = UrbanAirshipClient.newBuilder()
        .setKey("<app key>")
        .setSecret("<master secret>")
        .build();

PushInfoRequest request = PushInfoRequest.newRequest("90f28bc6-6c9b-4c99-b970-973afc266e08");

Response<PushInfoResponse> response = client.execute(request);
PushInfoResponse pushInfo = response.getBody().get();

// Number of sends
int sends = pushInfo.getSends();
// Number of direct responses to the push
int directResponses = pushInfo.getDirectResponses();
// When the push was sent
DateTime date = pushInfo.getPushTime();
// The push type - can be one of BROADCAST_PUSH, SCHEDULED_PUSH, TAG_PUSH, UNICAST_PUSH
PushInfoResponse.PushType type = pushInfo.getPushType();
// The unique identifier for the push
UUID pushId = pushInfo.getPushId();

```

```python
from datetime import datetime
from urbanairship import (
    BasicAuthClient, IndividualResponseStats
)

client = BasicAuthClient(
    key='<app_key>',
    secret='<master_secret>'
)
push_id = '90f28bc6-6c9b-4c99-b970-973afc266e08'
response = IndividualResponseStats(airship=client).get(push_id)

```

```ruby
require 'urbanairship'

UA = Urbanairship
airship = UA::Client.new(key: '<app key>', secret: '<master secret>')

d = UA::IndividualResponseStats.new(client: airship)
statistics = d.get(push_id: '90f28bc6-6c9b-4c99-b970-973afc266e08')

```

---

## Opt-in report {#getoptinreport}

Get the number of opted-in Push users who access the app within the specified time period.

[Jump to examples ↓](#getoptinreport-examples)

### `GET /api/reports/optins`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `start` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for start of report. |
| `end` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for end of report. |
| `precision` | `string` | Required | Granularity of results to return. Defaults to `DAILY`. Possible values: `HOURLY`, `DAILY`, `MONTHLY` Default: `DAILY` |

**Responses**

**`200`** Returned on success, with the JSON representation of the opt-ins in the body of the response.

Response body:

**Content-Type:** `application/json;`

- **`next_page`** `string`

  There might be more than one page of results for this listing. Follow this URL if it is present to the next batch of results.

  Format: `url`

- **`optins`** `array[object]`

  An array of OptIn objects.

**`400`** There was a parsing or validation error in the request. Bad Request errors typically include `path` and `location` in the response to help you find the cause of the error.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`401`** Authentication information (the app key and secret or bearer token) was either incorrect or missing.

Response body:

**Content-Type:** `text/plain`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`403`** Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**Examples**

*Example*

```http
GET /api/reports/optins?start=2020-08-01T10:00&end=2020-08-15T20:00&precision=MONTHLY HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
   "optins": [
      {
         "android": 50,
         "date": "2020-05-01 00:00:00",
         "ios": 500
      }
   ],
   "next_page": "https://go.urbanairship.com/api/reports/..."
}

```

```java
UrbanAirshipClient client = UrbanAirshipClient.newBuilder()
        .setKey("<app key>")
        .setSecret("<master secret>")
        .build();

PlatformStatsRequest request = PlatformStatsRequest.newRequest(PlatformStatsRequestType.OPT_INS)
        .setStart(DateTime.parse("2020-08-01T10:34:22Z"))
        .setEnd(DateTime.parse("2020-08-15T10:34:22Z"))
        .setPrecision(Precision.MONTHLY);

Response<PlatformStatsResponse> response = client.execute(request);

```

```python
from datetime import datetime
from urbanairship import (
    BasicAuthClient, OptInList
)

client = BasicAuthClient(
    key='<app_key>',
    secret='<master_secret>'
)
start_date = datetime(2020, 8, 1)
end_date = datetime(2020, 8, 15)
for opt_in in OptInList(airship=client, start_date=start_date, end_date=end_date, precision='DAILY'):
    print(opt_in)

```

```ruby
require 'urbanairship'

UA = Urbanairship
airship = UA::Client.new(key: '<app key>', secret: '<master secret>')

listing = UA::OptInList.new(
    client: airship,
    start_date: '2020-08-01',
    end_date: '2020-08-15',
    precision: 'MONTHLY')
listing.each do |opt_ins|
    puts(opt_ins)
end

```

---

## Opt-out report {#getoptoutreport}

Get the number of opted-out Push users who access the app within the specified time period.

[Jump to examples ↓](#getoptoutreport-examples)

### `GET /api/reports/optouts`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `start` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for start of report. |
| `end` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for end of report. |
| `precision` | `string` | Required | Granularity of results to return. Defaults to `DAILY`. Possible values: `HOURLY`, `DAILY`, `MONTHLY` Default: `DAILY` |

**Responses**

**`200`** Returned on success, with the JSON representation of the opt-outs in the body of the response.

Response body:

**Content-Type:** `application/json;`

- **`next_page`** `string`

  There might be more than one page of results for this listing. Follow this URL if it is present to the next batch of results.

  Format: `url`

- **`optouts`** `array[object]`

  An array of OptOut objects.

**`400`** There was a parsing or validation error in the request. Bad Request errors typically include `path` and `location` in the response to help you find the cause of the error.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`401`** Authentication information (the app key and secret or bearer token) was either incorrect or missing.

Response body:

**Content-Type:** `text/plain`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`403`** Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**Examples**

*Example*

```http
GET /api/reports/optouts?start=2020-08-01T10:00&end=2020-08-15T20:00&precision=MONTHLY HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
   "optouts": [
      {
         "android": 5,
         "date": "2020-05-01 00:00:00",
         "ios": 25
      }
   ],
   "next_page": "https://go.urbanairship.com/api/reports/..."
}

```

```java
UrbanAirshipClient client = UrbanAirshipClient.newBuilder()
        .setKey("<app key>")
        .setSecret("<master secret>")
        .build();

PlatformStatsRequest request = PlatformStatsRequest.newRequest(PlatformStatsRequestType.OPT_OUTS)
        .setStart(DateTime.parse("2020-08-01T10:34:22Z"))
        .setEnd(DateTime.parse("2020-08-15T10:34:22Z"))
        .setPrecision(Precision.MONTHLY);

Response<PlatformStatsResponse> response = client.execute(request);

```

```python
from datetime import datetime
from urbanairship import (
    BasicAuthClient, OptOutList
)

client = BasicAuthClient(
    key='<app_key>',
    secret='<master_secret>'
)
start_date = datetime(2020, 8, 1)
end_date = datetime(2020, 8, 15)
for opt_out in OptOutList(airship=client, start_date=start_date, end_date=end_date, precision='DAILY'):
    print(opt_out)

```

```ruby
require 'urbanairship'

UA = Urbanairship
airship = UA::Client.new(key: '<app key>', secret: '<master secret>')

listing = UA::OptOutList.new(
    client: airship,
    start_date: '2020-08-01',
    end_date: '2020-08-15',
    precision: 'MONTHLY')
listing.each do |opt_outs|
    puts(opt_outs)
end

```

---

## Per group push detail report {#getpergrouppushdetailreport}

Returns statistics and other information for a given group push message.

[Jump to examples ↓](#getpergrouppushdetailreport-examples)

### `GET /api/reports/pergroup/detail/{group_id}`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Path parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `group_id` | `string` | Required | The `group_id` of the requested report. |

**Responses**

**`200`** Returned on success.

Response body:

**Content-Type:** `application/json;`

**All of:**

  - **`group_id`** `string`

    The UUID representing a specific group push.

    Format: `uuid`

  - **`alerting_sends`** `integer`

    The number of alerting sends.

  - **`app_key`** `string`

    The app key for the given push.

  - **`created`** `string`

    The [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) when the push was created.

    Format: `date-time`

    Read only: true

  - **`direct_responses`** `integer`

    The number of direct responses.

  - **`influenced_responses`** `integer`

    The total number of influenced responses.

  - **`platforms`** `object`
    **OBJECT PROPERTIES**

    - **`amazon`** `object`
      **OBJECT PROPERTIES**

      - **`direct_responses`** `integer`

        The number of direct responses (clicks/app opens) to the notification on this platform as measured by the SDK.

      - **`influenced_responses`** `integer`

        The number of opens or clicks resulting from your notification (directly or indirectly).

      - **`sends`** `integer`

        The total number of audience members accounted on the specified platform.

    - **`android`** `object`
      **OBJECT PROPERTIES**

      - **`direct_responses`** `integer`

        The number of direct responses (clicks/app opens) to the notification on this platform as measured by the SDK.

      - **`influenced_responses`** `integer`

        The number of opens or clicks resulting from your notification (directly or indirectly).

      - **`sends`** `integer`

        The total number of audience members accounted on the specified platform.

    - **`ios`** `object`
      **OBJECT PROPERTIES**

      - **`direct_responses`** `integer`

        The number of direct responses (clicks/app opens) to the notification on this platform as measured by the SDK.

      - **`influenced_responses`** `integer`

        The number of opens or clicks resulting from your notification (directly or indirectly).

      - **`sends`** `integer`

        The total number of audience members accounted on the specified platform.

    - **`web`** `object`
      **OBJECT PROPERTIES**

      - **`direct_responses`** `integer`

        The number of direct responses (clicks/app opens) to the notification on this platform as measured by the SDK.

      - **`influenced_responses`** `integer`

        The number of opens or clicks resulting from your notification (directly or indirectly).

      - **`sends`** `integer`

        The total number of audience members accounted on the specified platform.

  - **`rich_deletions`** `integer`

    The number of rich deletions.

  - **`rich_responses`** `integer`

    The number of rich responses.

  - **`rich_sends`** `integer`

    The number of rich sends.

  - **`sends`** `integer`

    The number of pushes sent.

  - **`silent_sends`** `integer`

    The number of silent sends.


**Examples**

*Example*

```http
GET /api/reports/pergroup/detail/57ef3728-79dc-46b1-a6b9-20081e561f97 HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
    "app_key": "some_app_key",
    "group_id": "57ef3728-79dc-46b1-a6b9-20081e561f97",
    "created": "2023-07-25 23:03:12",
    "rich_deletions": 0,
    "rich_responses": 0,
    "rich_sends": 0,
    "sends": 103,
    "alerting_sends": 103,
    "silent_sends": 0,
    "direct_responses": 0,
    "influenced_responses": 3,
    "platforms": {
        "android": {
            "direct_responses": 0,
            "influenced_responses": 0,
            "sends": 22
        },
        "ios": {
            "direct_responses": 0,
            "influenced_responses": 1,
            "sends": 36
        },
        "amazon": {
            "direct_responses": 0,
            "influenced_responses": 1,
            "sends": 5
        },
        "web": {
            "direct_responses": 0,
            "influenced_responses": 1,
            "sends": 40
        }
    }
}

```

---

## Per group push time series report {#getpergrouppushtimeseriesreport}

Returns the default time series data (hourly precision for 12 hours) for a given group push message. The series begins with the hour in which the push was sent. By specifying the precision without providing a time range, the default number of periods at each precision returned are as follows: Hourly: 12, Daily: 7, Monthly: 3. Results paginate if requesting narrow precision over a long period of time.

[Jump to examples ↓](#getpergrouppushtimeseriesreport-examples)

### `GET /api/reports/pergroup/series/{group_id}`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Path parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `group_id` | `string` | Required | The `group_id` of the requested report. |

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `precision` | `string` |  | The precision of the report. Defaults to `HOURLY`. Possible values: `HOURLY`, `DAILY`, `MONTHLY` |
| `start` | `string` |  | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for start of report. |
| `end` | `string` |  | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for end of report. |

**Responses**

**`200`** Returned on success.

Response body:

**Content-Type:** `application/json;`

**All of:**

  - **`group_id`** `string`

    The UUID representing a specific group push.

    Format: `uuid`

  - **`app_key`** `string`

    The app key for the application.

    Example: `your_app_key`

  - **`end`** `string`

    The end [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for the report.

    Format: `date-time`

    Example: `2018-06-02 10:00:00`

  - **`precision`** `string`

    The precision of the report.

    Possible values: `HOURLY`, `DAILY`, `MONTHLY`

    Example: `HOURLY`

  - **`start`** `string`

    The start [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for the report.

    Format: `date-time`

    Example: `2018-06-01 10:00:00`

  - **`counts`** `array[object]`

    Array of total count objects, each representing counts within the given [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) range and precision.


**Examples**

*Example (response truncated to 2 items)*

```http
GET /api/reports/pergroup/series/57ef3728-79dc-46b1-a6b9-20081e561f97 HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
    "app_key": "some_app_key",
    "group_id": "57ef3728-79dc-46b1-a6b9-20081e561f97",
    "start": "2023-07-25 23:00:00",
    "end": "2023-07-26 11:00:00",
    "precision": "HOURLY",
    "counts": [
        {
            "push_platforms": {
                "all": {
                    "direct_responses": 0,
                    "influenced_responses": 1,
                    "sends": 58
                },
                "android": {
                    "direct_responses": 0,
                    "influenced_responses": 0,
                    "sends": 22
                },
                "ios": {
                    "direct_responses": 0,
                    "influenced_responses": 1,
                    "sends": 36
                }
            },
            "rich_push_platforms": {
                "all": {
                    "responses": 0,
                    "sends": 0
                }
            },
            "time": "2023-07-25 23:00:00"
        },
        {
            "push_platforms": {
                "all": {
                    "direct_responses": 0,
                    "influenced_responses": 0,
                    "sends": 0
                },
                "android": {
                    "direct_responses": 0,
                    "influenced_responses": 0,
                    "sends": 0
                },
                "ios": {
                    "direct_responses": 0,
                    "influenced_responses": 0,
                    "sends": 0
                }
            },
            "rich_push_platforms": {
                "all": {
                    "responses": 0,
                    "sends": 0
                }
            },
            "time": "2023-07-26 00:00:00"
        }
    ]
}

```

---

## Per push detail report {#getperpushdetailreport}

Returns statistics and other information for a given push message.

[Jump to examples ↓](#getperpushdetailreport-examples)

### `GET /api/reports/perpush/detail/{push_id}`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Path parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `push_id` | `string` | Required | The `push_id` of the requested report. |

**Responses**

**`200`** Returned on success.

Response body:

**Content-Type:** `application/json;`

**All of:**

  - **`push_id`** `string`

    The UUID representing a specific push.

    Format: `uuid`

  - **`alerting_sends`** `integer`

    The number of alerting sends.

  - **`app_key`** `string`

    The app key for the given push.

  - **`created`** `string`

    The [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) when the push was created.

    Format: `date-time`

    Read only: true

  - **`direct_responses`** `integer`

    The number of direct responses.

  - **`influenced_responses`** `integer`

    The total number of influenced responses.

  - **`platforms`** `object`
    **OBJECT PROPERTIES**

    - **`amazon`** `object`
      **OBJECT PROPERTIES**

      - **`direct_responses`** `integer`

        The number of direct responses (clicks/app opens) to the notification on this platform as measured by the SDK.

      - **`influenced_responses`** `integer`

        The number of opens or clicks resulting from your notification (directly or indirectly).

      - **`sends`** `integer`

        The total number of audience members accounted on the specified platform.

    - **`android`** `object`
      **OBJECT PROPERTIES**

      - **`direct_responses`** `integer`

        The number of direct responses (clicks/app opens) to the notification on this platform as measured by the SDK.

      - **`influenced_responses`** `integer`

        The number of opens or clicks resulting from your notification (directly or indirectly).

      - **`sends`** `integer`

        The total number of audience members accounted on the specified platform.

    - **`ios`** `object`
      **OBJECT PROPERTIES**

      - **`direct_responses`** `integer`

        The number of direct responses (clicks/app opens) to the notification on this platform as measured by the SDK.

      - **`influenced_responses`** `integer`

        The number of opens or clicks resulting from your notification (directly or indirectly).

      - **`sends`** `integer`

        The total number of audience members accounted on the specified platform.

    - **`web`** `object`
      **OBJECT PROPERTIES**

      - **`direct_responses`** `integer`

        The number of direct responses (clicks/app opens) to the notification on this platform as measured by the SDK.

      - **`influenced_responses`** `integer`

        The number of opens or clicks resulting from your notification (directly or indirectly).

      - **`sends`** `integer`

        The total number of audience members accounted on the specified platform.

  - **`rich_deletions`** `integer`

    The number of rich deletions.

  - **`rich_responses`** `integer`

    The number of rich responses.

  - **`rich_sends`** `integer`

    The number of rich sends.

  - **`sends`** `integer`

    The number of pushes sent.

  - **`silent_sends`** `integer`

    The number of silent sends.


**Examples**

*Example*

```http
GET /api/reports/perpush/detail/57ef3728-79dc-46b1-a6b9-20081e561f97 HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
    "app_key": "some_app_key",
    "push_id": "57ef3728-79dc-46b1-a6b9-20081e561f97",
    "created": "2023-07-25 23:03:12",
    "rich_deletions": 0,
    "rich_responses": 0,
    "rich_sends": 0,
    "sends": 103,
    "alerting_sends": 103,
    "silent_sends": 0,
    "direct_responses": 0,
    "influenced_responses": 3,
    "platforms": {
        "android": {
            "direct_responses": 0,
            "influenced_responses": 0,
            "sends": 22
        },
        "ios": {
            "direct_responses": 0,
            "influenced_responses": 1,
            "sends": 36
        },
        "amazon": {
            "direct_responses": 0,
            "influenced_responses": 1,
            "sends": 5
        },
        "web": {
            "direct_responses": 0,
            "influenced_responses": 1,
            "sends": 40
        }
    }
}

```

---

## Per push time series report {#getperpushtimeseriesreport}

Returns the default time series data (hourly precision for 12 hours) for a given push message. The series begins with the hour in which the push was sent. By specifying the precision without providing a time range, the default number of periods at each precision returned are as follows: Hourly: 12, Daily: 7, Monthly: 3. Results paginate if requesting narrow precision over a long period of time.

[Jump to examples ↓](#getperpushtimeseriesreport-examples)

### `GET /api/reports/perpush/series/{push_id}`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Path parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `push_id` | `string` | Required | The `push_id` of the requested report. |

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `precision` | `string` |  | The precision of the report. Defaults to `HOURLY`. Possible values: `HOURLY`, `DAILY`, `MONTHLY` |
| `start` | `string` |  | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for start of report. |
| `end` | `string` |  | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for end of report. |

**Responses**

**`200`** Returned on success.

Response body:

**Content-Type:** `application/json;`

**All of:**

  - **`push_id`** `string`

    The UUID representing a specific push.

    Format: `uuid`

  - **`app_key`** `string`

    The app key for the application.

    Example: `your_app_key`

  - **`end`** `string`

    The end [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for the report.

    Format: `date-time`

    Example: `2018-06-02 10:00:00`

  - **`precision`** `string`

    The precision of the report.

    Possible values: `HOURLY`, `DAILY`, `MONTHLY`

    Example: `HOURLY`

  - **`start`** `string`

    The start [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for the report.

    Format: `date-time`

    Example: `2018-06-01 10:00:00`

  - **`counts`** `array[object]`

    Array of total count objects, each representing counts within the given [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) range and precision.


**Examples**

*Example (response truncated to 2 items)*

```http
GET /api/reports/perpush/series/57ef3728-79dc-46b1-a6b9-20081e561f97 HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
    "app_key": "some_app_key",
    "push_id": "57ef3728-79dc-46b1-a6b9-20081e561f97",
    "start": "2023-07-25 23:00:00",
    "end": "2023-07-26 11:00:00",
    "precision": "HOURLY",
    "counts": [
        {
            "push_platforms": {
                "all": {
                    "direct_responses": 0,
                    "influenced_responses": 1,
                    "sends": 58
                },
                "android": {
                    "direct_responses": 0,
                    "influenced_responses": 0,
                    "sends": 22
                },
                "ios": {
                    "direct_responses": 0,
                    "influenced_responses": 1,
                    "sends": 36
                }
            },
            "rich_push_platforms": {
                "all": {
                    "responses": 0,
                    "sends": 0
                }
            },
            "time": "2023-07-25 23:00:00"
        },
        {
            "push_platforms": {
                "all": {
                    "direct_responses": 0,
                    "influenced_responses": 0,
                    "sends": 0
                },
                "android": {
                    "direct_responses": 0,
                    "influenced_responses": 0,
                    "sends": 0
                },
                "ios": {
                    "direct_responses": 0,
                    "influenced_responses": 0,
                    "sends": 0
                }
            },
            "rich_push_platforms": {
                "all": {
                    "responses": 0,
                    "sends": 0
                }
            },
            "time": "2023-07-26 00:00:00"
        }
    ]
}

```

---

## Push body per push {#getpushbodyperpush}

Returns the push body for the given push message.

[Jump to examples ↓](#getpushbodyperpush-examples)

### `GET /api/reports/perpush/pushbody/{push_id}`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Path parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `push_id` | `string` | Required | The `push_id` of the requested push body. |

**Responses**

**`200`** Returned on success.

Response body:

**Content-Type:** `application/json;`

- **`push_body`** `string`

  The push body as a base64 encoded JSON value.

**Examples**

*Example*

```http
GET /api/reports/perpush/pushbody/57ef3728-79dc-46b1-a6b9-20081e561f97 HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
    "push_body": "<Base64-encoded string>"
}

```

---

## Push report {#getpushreport}

Get the number of pushes you have sent within a specified time period.

[Jump to examples ↓](#getpushreport-examples)

### `GET /api/reports/sends`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `start` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for start of report. |
| `end` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for end of report. |
| `precision` | `string` | Required | Granularity of results to return. Defaults to `DAILY`. Possible values: `HOURLY`, `DAILY`, `MONTHLY` Default: `DAILY` |

**Responses**

**`200`** Returned on success, with the JSON representation of the sends in the body of the response.

Response body:

**Content-Type:** `application/json;`

- **`next_page`** `string`

  There might be more than one page of results for this listing. Follow this URL if it is present to the next batch of results.

  Format: `url`

- **`sends`** `array[object]`

  An array of send objects.

**`400`** There was a parsing or validation error in the request. Bad Request errors typically include `path` and `location` in the response to help you find the cause of the error.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`401`** Authentication information (the app key and secret or bearer token) was either incorrect or missing.

Response body:

**Content-Type:** `text/plain`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`403`** Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**Examples**

*Example*

```http
GET /api/reports/sends?start=2020-05-01T10:00&end=2020-05-30T20:00&precision=MONTHLY HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
   "sends": [
      {
         "android": 50,
         "date": "2020-05-01 00:00:00",
         "ios": 500
      }
   ],
   "next_page": "https://go.urbanairship.com/api/reports/..."
}

```

```java
UrbanAirshipClient client = UrbanAirshipClient.newBuilder()
        .setKey("<app key>")
        .setSecret("<master secret>")
        .build();

PlatformStatsRequest request = PlatformStatsRequest.newRequest(PlatformStatsRequestType.SENDS)
        .setStart(DateTime.parse("2020-05-01T10:34:22Z"))
        .setEnd(DateTime.parse("2020-05-30T10:34:22Z"))
        .setPrecision(Precision.MONTHLY);

Response<PlatformStatsResponse> response = client.execute(request);

```

```python
from datetime import datetime
from urbanairship import (
    BasicAuthClient, PushList
)

client = BasicAuthClient(
    key='<app_key>',
    secret='<master_secret>'
)
start_date = datetime(2020, 5, 1)
end_date = datetime(2020, 5, 30)
precision = 'MONTHLY'
listing = PushList(airship=client, start_date=start_date, end_date=end_date, precision=precision)

for resp in listing:
  print(resp.date, resp.android, resp.ios)

```

```ruby
require 'urbanairship'

UA = Urbanairship
airship = UA::Client.new(key: '<app key>', secret: '<master secret>')

listing = UA::PushList.new(
    client: airship,
    start_date: '2020/05/01',
    end_date: '2020/05/30',
    precision: 'MONTHLY'
)
listing.each do |resp|
    puts(resp)
end

```

---

## Response listing {#getresponses}

Get a listing of all pushes, plus basic response information, for a given time period. Start and end date times are required parameters. The time defaults to 00:00 UTC if not specified.

[Jump to examples ↓](#getresponses-examples)

### `GET /api/reports/responses/list`

{{< note >}}
If you don't specify a `start` and `end` time, the system
assumes 00:00 UTC, which will provide results through
the previous day.


Use timestamps to get results for a specific time period. If only using the date, set it in the future to ensure you
will see the most recent listing.

{{< /note >}}

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `start` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for start of report. |
| `end` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for end of report. |
| `limit` | `integer` |  | Number of results to return at one time (for pagination). Min: 1 |

**Responses**

**`200`** Returned on success, with the JSON representation of the listing in the body of the response.

Response body:

**Content-Type:** `application/json;`

- **`next_page`** `string`

  There might be more than one page of results for this listing. Follow this URL if it is present to the next batch of results.

  Format: `url`

- **`pushes`** `array[object]`

  An array of all pushes and its basic response information.

**`400`** There was a parsing or validation error in the request. Bad Request errors typically include `path` and `location` in the response to help you find the cause of the error.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`401`** Authentication information (the app key and secret or bearer token) was either incorrect or missing.

Response body:

**Content-Type:** `text/plain`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`403`** Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**Examples**

*Example*

```http
GET /api/reports/responses/list?start=2020-08-01T10:00&end=2020-08-15T10:00&limit=20 HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
    "next_page": "https://go.urbanairship.com/api/reports/responses/list?start=2020-08-01+10%...",
    "pushes": [
        {
            "push_uuid": "f4db3752-a982-4a2b-994e-7b5fd1c7f02f",
            "push_time": "2020-08-15 02:12:22",
            "push_type": "UNICAST_PUSH",
            "group_id": "4e768dc7-4ebc-4206-890a-60b5627763a7",
            "direct_responses": 0,
            "sends": 1,
            "open_channels_sends": {
                "platforms": []
            }
        },
        {
            "push_uuid": "5a4ade58-fbd3-43a2-ac3c-e834ee190151",
            "push_time": "2020-08-14 19:58:15",
            "push_type": "UNICAST_PUSH",
            "group_id": "c5664e1f-106e-4616-9820-7d9ecce8a3f3",
            "direct_responses": 1,
            "sends": 2,
            "open_channels_sends": {
                "platforms": []
            }
        }
    ]
}

```

```java
UrbanAirshipClient client = UrbanAirshipClient.newBuilder()
        .setKey("<app key>")
        .setSecret("<master secret>")
        .build();

PushListingRequest request = PushListingRequest.newRequest()
        .setStart(DateTime.parse("2020-08-01T10:34:22Z"))
        .setEnd(DateTime.parse("2020-08-15T10:34:22Z"))
        .setLimit(20);

Response<PushListingResponse> response = client.execute(request);

// Get the first item in an array of push info responses. You can use all of the getters
// listed in the "Individual Push Response Statistics" section.
PushInfoResponse pushInfo = response.getBody().get().getPushInfoList().get().get(0);

```

```python
from datetime import datetime
from urbanairship import (
    BasicAuthClient, ResponseList
)

client = BasicAuthClient(
    key='<app_key>',
    secret='<master_secret>'
)
start_date = datetime(2020, 8, 1)
end_date = datetime(2020, 8, 15)
for response in ResponseList(airship=client, start_date=start_date, end_date=end_date):
    print(response)

```

```ruby
require 'urbanairship'

UA = Urbanairship
airship = UA::Client.new(key: '<app key>', secret: '<master secret>')

response_list = UA::ResponseList.new(
    client: airship,
    start_date: '2020-08-01',
    end_date: '2020-08-30',
    limit: 20,
    push_id_start: 'start_id'
)
response_list.each do |resp|
    puts(resp)
end

```

---

## Response report {#getresponsereport}

Get the number of direct and influenced opens of your app.

[Jump to examples ↓](#getresponsereport-examples)

### `GET /api/reports/responses`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `start` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for start of report. |
| `end` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for end of report. |
| `precision` | `string` |  | Granularity of results to return. Defaults to `DAILY`. Possible values: `HOURLY`, `DAILY`, `MONTHLY` Default: `DAILY` |

**Responses**

**`200`** Returned on success, with the JSON representation of the responses in the body of the response.

Response body:

**Content-Type:** `application/json;`

- **`next_page`** `string`

  There might be more than one page of results for this listing. Follow this URL if it is present to the next batch of results.

  Format: `url`

- **`responses`** `array[object]`

  An array of response objects.

**`400`** There was a parsing or validation error in the request. Bad Request errors typically include `path` and `location` in the response to help you find the cause of the error.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`401`** Authentication information (the app key and secret or bearer token) was either incorrect or missing.

Response body:

**Content-Type:** `text/plain`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`403`** Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**Examples**

*Example*

```http
GET /api/reports/responses?start=2020-05-01T10:00&end=2020-05-30T10:00&precision=MONTHLY HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
   "next_page": "https://go.urbanairship.com/api/reports/...",
   "responses": [
      {
         "android": {
            "direct": 25,
            "influenced": 118
         },
         "date": "2020-05-01 00:00:00",
         "ios": {
            "direct": 16,
            "influenced": 87
         }
      }
   ]
}

```

```java
UrbanAirshipClient client = UrbanAirshipClient.newBuilder()
        .setKey("<app key>")
        .setSecret("<master secret>")
        .build();

ResponseReportRequest request = ResponseReportRequest
        .newRequest(DateTime.parse("2020-05-01T10:34:22Z"),
                    DateTime.parse("2020-05-30T10:34:22Z"),
                    Precision.MONTHLY);

Response<ResponseReportResponse> response = client.execute(request);

```

```python
from datetime import datetime
from urbanairship import (
    BasicAuthClient, ResponseReportList
)

client = BasicAuthClient(
    key='<app_key>',
    secret='<master_secret>'
)
start_date = datetime(2020, 5, 1)
end_date = datetime(2020, 5, 30)
for response in ResponseReportList(airship=client, start_date=start_date, end_date=end_date, precision='DAILY'):
    print(response)

```

```ruby
require 'urbanairship'

UA = Urbanairship
airship = UA::Client.new(key: '<app key>', secret: '<master secret>')

listing = UA::ResponseReportList.new(
    client: airship,
    start_date: '2020-05-01',
    end_date: '2020-05-30',
    precision: 'MONTHLY'
)
listing.each do |resp|
    puts(resp)
end

```

---

## Time in app report {#gettimeinappreport}

Get the average amount of time users have spent in your app within the specified time period.

[Jump to examples ↓](#gettimeinappreport-examples)

### `GET /api/reports/timeinapp`

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `start` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for start of report. |
| `end` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for end of report. |
| `precision` | `string` | Required | Granularity of results to return. Defaults to `DAILY`. Possible values: `HOURLY`, `DAILY`, `MONTHLY` Default: `DAILY` |

**Responses**

**`200`** Returned on success, with the JSON representation of the time in app in the body of the response.

Response body:

**Content-Type:** `application/json;`

- **`next_page`** `string`

  There might be more than one page of results for this listing. Follow this URL if it is present to the next batch of results.

  Format: `url`

- **`sends`** `array[object]`

  An array of TimeInApp objects.

**`400`** There was a parsing or validation error in the request. Bad Request errors typically include `path` and `location` in the response to help you find the cause of the error.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`401`** Authentication information (the app key and secret or bearer token) was either incorrect or missing.

Response body:

**Content-Type:** `text/plain`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`403`** Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**Examples**

*Example*

```http
GET /api/reports/timeinapp?start=2020-05-01T10:00&end=2020-05-15T20:00&precision=MONTHLY HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
   "timeinapp": [
      {
         "android": 50,
         "date": "2020-05-01 00:00:00",
         "ios": 500
      }
   ],
   "next_page": "https://go.urbanairship.com/api/reports/..."
}

```

```java
UrbanAirshipClient client = UrbanAirshipClient.newBuilder()
        .setKey("<app key>")
        .setSecret("<master secret>")
        .build();

PlatformStatsRequest request = PlatformStatsRequest.newRequest(PlatformStatsRequestType.TIME_IN_APP)
        .setStart(DateTime.parse("2020-05-01T10:34:22Z"))
        .setEnd(DateTime.parse("2020-05-15T10:34:22Z"))
        .setPrecision(Precision.MONTHLY);

Response<PlatformStatsResponse> response = client.execute(request);

```

```python
from datetime import datetime
from urbanairship import (
    BasicAuthClient, TimeInAppList
)

client = BasicAuthClient(
    key='<app_key>',
    secret='<master_secret>'
)
start_date = datetime(2020, 5, 1)
end_date = datetime(2020, 5, 15)
precision = 'MONTHLY'
listing = TimeInAppList(airship=client, start_date=start_date, end_date=end_date, precision=precision)
for resp in listing:
    print(resp.date, resp.android, resp.ios)

```

```ruby
require 'urbanairship'

UA = Urbanairship
airship = UA::Client.new(key: '<app key>', secret: '<master secret>')

listing = UA::TimeInAppList.new(
    client: airship,
    start_date: '2020-05-01',
    end_date: '2020-05-30',
    precision: 'MONTHLY')
listing.each do |time_in_app|
    puts(time_in_app)
end

```

---

## Web response report {#getwebresponsereport}

Get the web interaction data for the given app key. Accepts a required start time and optional end time and precision parameters.

[Jump to examples ↓](#getwebresponsereport-examples)

### `GET /api/reports/web/interaction`

{{< note >}}
If you don't specify an `end` time, the system assumes 00:00 UTC, which will provide results through the previous day.

{{< /note >}}

**Security:**

- [basicAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-basicAuth)
- [bearerAuth]({{< ref "/developer/rest-api/ua/introduction/" >}}#security-bearerAuth)

**Query parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `app_key` | `string` | Required | The app key for your web project. |
| `start` | `string` | Required | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for start of report. |
| `end` | `string` |  | A [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for end of report. |
| `precision` | `string` |  | The precision of the report. Defaults to `HOURLY`. Possible values: `HOURLY`, `DAILY`, `MONTHLY` |

**Responses**

**`200`** Returned on success, with the JSON representation of the web data in the body of the response.

Response body:

**Content-Type:** `application/json;`

**All of:**

  - **`app_key`** `string`

    The app key for the application.

    Example: `your_app_key`

  - **`end`** `string`

    The end [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for the report.

    Format: `date-time`

    Example: `2018-06-02 10:00:00`

  - **`precision`** `string`

    The precision of the report.

    Possible values: `HOURLY`, `DAILY`, `MONTHLY`

    Example: `HOURLY`

  - **`start`** `string`

    The start [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) for the report.

    Format: `date-time`

    Example: `2018-06-01 10:00:00`

  - **`total_counts`** `array[object]`

    Array of total count objects, each representing counts within the given [date-time](/docs/developer/rest-api/ua/introduction/#date-time-format) range and precision.


**`400`** There was a parsing or validation error in the request. Bad Request errors typically include `path` and `location` in the response to help you find the cause of the error.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`401`** Authentication information (the app key and secret or bearer token) was either incorrect or missing.

Response body:

**Content-Type:** `text/plain`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**`403`** Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.

Response body:

**Content-Type:** `application/json`

[Error response]({{< ref "/developer/rest-api/ua/schemas/responses/" >}}#error)

**Examples**

*Example*

```http
GET /api/reports/web/interaction?app_key=ZGIwZTY3YjEtZTRiMi00ZG&start=2020-05-01T10:00&end=2020-05-03T20:00&precision=HOURLY HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3

```

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
   "app_key": "ZGIwZTY3YjEtZTRiMi00ZG",
   "end": "2020-05-03 00:00:00",
   "precision": "HOURLY",
   "start": "2020-05-01 00:00:00",
   "total_counts": [
      {"counts": {"clicks": 36, "sessions": 55 }, "date": "2020-05-01 10:00:00"},
      {"counts": {"clicks": 50, "sessions": 79 }, "date": "2020-05-01 11:00:00"},
      {"..."},
      {"..."},
      {"counts": {"clicks": 67, "sessions": 75 }, "date": "2020-05-03 20:00:00"}
  ]
}

```

```java
UrbanAirshipClient client = UrbanAirshipClient.newBuilder()
        .setKey("<app key>")
        .setSecret("<master secret>")
        .build();

WebResponseReportRequest webResponseReportRequest = WebResponseReportRequest.newRequest("<app key>", DateTime.parse("2020-08-01T10:34:22Z"));
Response<WebResponseReportResponse> response = client.execute(webResponseReportRequest);

```

```python
from datetime import datetime
from urbanairship import (
    BasicAuthClient, WebResponseReport
)

client = BasicAuthClient(
    key='<app_key>',
    secret='<master_secret>'
)
start_date = datetime(2020, 5, 1)
end_date = datetime(2020, 5, 3)
for web_response in WebResponseReport(airship=client, start_date=start_date, end_date=end_date, precision='DAILY'):
    print(web_response)

```

---

