Reports

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

Activity log report

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 ↓

GET /api/reports/activity/details

Security:

Query parameters:

  • start stringREQUIRED
    A date-time for start of report.
  • end stringREQUIRED
    A date-time 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.

    • Content-Type: application/json;

      The activity log data.

      OBJECT PROPERTIES
      • activities array[object]

        An array of activity log data.

      • app_key string

        The app key for the application.

      • end string

        The end date-time for the report.

      • 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.

      • start string

        The start date-time for the report.

Examples

Example (response truncated)

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/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

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

Jump to examples ↓

GET /api/reports/opens

Security:

Query parameters:

  • start stringREQUIRED
    A date-time for start of report.
  • end stringREQUIRED
    A date-time for end of report.
  • precision stringREQUIRED
    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.

    • Content-Type: application/json;

      The response body for app opens report.

      OBJECT PROPERTIES
      • 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.

      • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 401

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

    • Content-Type: text/plain

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

Examples

Example

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/1.1 200 OK
Content-Type: application/vnd.urbanairship+json; version=3

{
    "opens": [
        {
            "date": "2020-08-01 00:00:00",
            "ios": 350,
            "android": 250
        }
    ]
}
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);
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)
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

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

Jump to examples ↓

GET /api/reports/events

Security:

Query parameters:

  • start stringREQUIRED
    A date-time for start of report.
  • end stringREQUIRED
    A date-time 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.

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

      The response body for Custom Events detail listing.

      OBJECT PROPERTIES
      • 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.

      • ok boolean

        Success.

      • prev_page string

        Link to the previous page, if available.

      • total_count integer

        Sum of all the count fields in the above array.

      • total_value integer

        Sum of all the value fields in the above array.

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 401

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

    • Content-Type: text/plain

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

Examples

Example

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/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
        }
    ]
}
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();
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

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 ↓

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

Security:

Query parameters:

  • 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.

Path parameters:

  • group_id stringREQUIRED
    The UUID for the requested group push ID.

Responses

  • 200

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

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

      The response body for Custom Events per group.

      All of
      • OBJECT PROPERTIES
        • group_id string

          The UUID representing a specific group push.

      • The response body for Custom Events per push or per group.

        OBJECT PROPERTIES
        • 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.

        • ok boolean

          Success.

        • prev_page string

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

        • total_count integer

          Sum of all the count fields in the above array.

        • total_value integer

          Sum of all the value fields in the above array.

        • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 401

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

    • Content-Type: text/plain

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

Examples

Example request

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/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

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 ↓

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

Security:

Query parameters:

  • 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.

Path parameters:

  • push_id stringREQUIRED
    The UUID for the requested push.

Responses

  • 200

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

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

      The response body for Custom Events per push.

      All of
      • OBJECT PROPERTIES
        • push_id string

          The UUID representing a specific push.

      • The response body for Custom Events per push or per group.

        OBJECT PROPERTIES
        • 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.

        • ok boolean

          Success.

        • prev_page string

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

        • total_count integer

          Sum of all the count fields in the above array.

        • total_value integer

          Sum of all the value fields in the above array.

        • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 401

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

    • Content-Type: text/plain

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

Examples

Example request

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/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/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

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

Jump to examples ↓

GET /api/reports/devices

Security:

Query parameters:

  • date stringREQUIRED
    All device events counted occurred before this date-time.

Responses

  • 200

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

    • Content-Type: application/json;

      The response body for the device report.

      OBJECT PROPERTIES
      • 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.

          • opted_out integer

            Opted out of receiving push notifications.

          • uninstalled integer

            Devices for which Reports has seen an uninstall event.

          • unique_devices integer

            Devices considered by Airship Reports to have the app installed.

        • android object

          The count object for a device type.

          OBJECT PROPERTIES
          • opted_in integer

            Opted in to receiving push notifications.

          • opted_out integer

            Opted out of receiving push notifications.

          • uninstalled integer

            Devices for which Reports has seen an uninstall event.

          • unique_devices integer

            Devices considered by Airship Reports to have the app installed.

        • ios object

          The count object for a device type.

          OBJECT PROPERTIES
          • opted_in integer

            Opted in to receiving push notifications.

          • opted_out integer

            Opted out of receiving push notifications.

          • uninstalled integer

            Devices for which Reports has seen an uninstall event.

          • unique_devices integer

            Devices considered by Airship Reports to have the app installed.

      • date_closed string

        All device events counted occurred before this date-time.

      • date_computed string

        The date-time the device event data was tallied and stored.

      • total_unique_devices integer

        Sum of the unique devices for every device type.

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 401

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

    • Content-Type: text/plain

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

Examples

Example

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/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
        }
    }
}
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);
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)
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

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

Jump to examples ↓

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

Security:

Path parameters:

  • push_id stringREQUIRED
    The push_id of the requested experiment.

Responses

  • 200

    Returned on success.

    • Content-Type: application/json;

      Type: object

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 401

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

    • Content-Type: text/plain

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

Examples

Example

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/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
   }
}
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);
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

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

Jump to examples ↓

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

Security:

Path parameters:

  • push_id stringREQUIRED
    The push_id of the requested experiment.
  • variant_id integerREQUIRED
    The specific variant you want to return results for.

    Min: 1

    Max: 26

Responses

  • 200

    Returned on success.

    • Content-Type: application/json;

      Type: object

Examples

Example

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/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
        }
    }
}
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);
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

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 ↓

GET /api/reports/responses/{push_id}

Security:

Path parameters:

  • push_id stringREQUIRED
    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.

    • Content-Type: application/json;

      The response body for an individual push response statistics report.

      OBJECT PROPERTIES
      • direct_responses integer

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

      • 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 indicating the time that the push was initially sent.

      • 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

      • push_uuid string

        The UUID for the requested push.

      • 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.

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 401

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

    • Content-Type: text/plain

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 404

    The requested resource doesn’t exist.

    • Content-Type: application/vnd.urbanairship+json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

Examples

Example

GET /api/reports/responses/90f28bc6-6c9b-4c99-b970-973afc266e08 HTTP/1.1
Authorization: Basic <authorization string>
Accept: application/vnd.urbanairship+json; version=3
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
        }
      ]
   }
}
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();
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)
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

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

Jump to examples ↓

GET /api/reports/optins

Security:

Query parameters:

  • start stringREQUIRED
    A date-time for start of report.
  • end stringREQUIRED
    A date-time for end of report.
  • precision stringREQUIRED
    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.

    • Content-Type: application/json;

      The response body for opt-in report.

      OBJECT PROPERTIES
      • 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.

      • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 401

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

    • Content-Type: text/plain

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

Examples

Example

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/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/..."
}
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);
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)
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

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

Jump to examples ↓

GET /api/reports/optouts

Security:

Query parameters:

  • start stringREQUIRED
    A date-time for start of report.
  • end stringREQUIRED
    A date-time for end of report.
  • precision stringREQUIRED
    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.

    • Content-Type: application/json;

      The response body for opt-out report.

      OBJECT PROPERTIES
      • 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.

      • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 401

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

    • Content-Type: text/plain

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

Examples

Example

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/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/..."
}
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);
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)
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

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

Jump to examples ↓

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

Security:

Path parameters:

  • group_id stringREQUIRED
    The group_id of the requested report.

Responses

  • 200

    Returned on success.

    • Content-Type: application/json;

      The response body for detail reporting per push group.

      All of
      • OBJECT PROPERTIES
        • group_id string

          The UUID representing a specific group push.

      • The response body for detail reporting per push or per group.

        OBJECT PROPERTIES
        • alerting_sends integer

          The number of alerting sends.

        • app_key string

          The app key for the given push.

        • created string

          The date-time when the push was created.

        • 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

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/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

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 ↓

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

Security:

Query parameters:

  • precision string
    The precision of the report. Defaults to HOURLY.

    Possible values: HOURLY, DAILY, MONTHLY

  • start string
    A date-time for start of report.
  • end string
    A date-time for end of report.

Path parameters:

  • group_id stringREQUIRED
    The group_id of the requested report.

Responses

  • 200

    Returned on success.

    • Content-Type: application/json;

      The response body for per push time series report.

      All of
      • OBJECT PROPERTIES
        • group_id string

          The UUID representing a specific group push.

      • OBJECT PROPERTIES
        • app_key string

          The app key for the application.

        • end string

          The end date-time for the report.

        • precision string

          The precision of the report.

          Possible values: HOURLY, DAILY, MONTHLY

        • start string

          The start date-time for the report.

      • OBJECT PROPERTIES
        • counts array[object]

          Array of total count objects, each representing counts within the given date-time range and precision.

Examples

Example (response truncated to 2 items)

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/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

Returns statistics and other information for a given push message.

Jump to examples ↓

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

Security:

Path parameters:

  • push_id stringREQUIRED
    The push_id of the requested report.

Responses

  • 200

    Returned on success.

    • Content-Type: application/json;

      The response body for detail reporting per push.

      All of
      • OBJECT PROPERTIES
        • push_id string

          The UUID representing a specific push.

      • The response body for detail reporting per push or per group.

        OBJECT PROPERTIES
        • alerting_sends integer

          The number of alerting sends.

        • app_key string

          The app key for the given push.

        • created string

          The date-time when the push was created.

        • 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

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/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

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 ↓

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

Security:

Query parameters:

  • precision string
    The precision of the report. Defaults to HOURLY.

    Possible values: HOURLY, DAILY, MONTHLY

  • start string
    A date-time for start of report.
  • end string
    A date-time for end of report.

Path parameters:

  • push_id stringREQUIRED
    The push_id of the requested report.

Responses

  • 200

    Returned on success.

    • Content-Type: application/json;

      The response body for per push time series report.

      All of
      • OBJECT PROPERTIES
        • push_id string

          The UUID representing a specific push.

      • OBJECT PROPERTIES
        • app_key string

          The app key for the application.

        • end string

          The end date-time for the report.

        • precision string

          The precision of the report.

          Possible values: HOURLY, DAILY, MONTHLY

        • start string

          The start date-time for the report.

      • OBJECT PROPERTIES
        • counts array[object]

          Array of total count objects, each representing counts within the given date-time range and precision.

Examples

Example (response truncated to 2 items)

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/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

Returns the push body for the given push message.

Jump to examples ↓

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

Security:

Path parameters:

  • push_id stringREQUIRED
    The push_id of the requested push body.

Responses

  • 200

    Returned on success.

    • Content-Type: application/json;

      Type: object

Examples

Example

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/1.1 200 OK
Content-Type: application/json

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

Push report

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

Jump to examples ↓

GET /api/reports/sends

Security:

Query parameters:

  • start stringREQUIRED
    A date-time for start of report.
  • end stringREQUIRED
    A date-time for end of report.
  • precision stringREQUIRED
    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.

    • Content-Type: application/json;

      The response body for push report.

      OBJECT PROPERTIES
      • 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.

      • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 401

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

    • Content-Type: text/plain

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

Examples

Example

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/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/..."
}
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);
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)
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

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 ↓

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.

Security:

Query parameters:

  • start stringREQUIRED
    A date-time for start of report.
  • end stringREQUIRED
    A date-time 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.

    • Content-Type: application/json;

      The response body for response listing.

      OBJECT PROPERTIES
      • 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.

      • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 401

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

    • Content-Type: text/plain

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

Examples

Example

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/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": []
            }
        }
    ]
}
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);
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)
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

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

Jump to examples ↓

GET /api/reports/responses

Security:

Query parameters:

  • start stringREQUIRED
    A date-time for start of report.
  • end stringREQUIRED
    A date-time 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.

    • Content-Type: application/json;

      The response body for response report.

      OBJECT PROPERTIES
      • 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.

      • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 401

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

    • Content-Type: text/plain

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

Examples

Example

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/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
         }
      }
   ]
}
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);
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)
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

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

Jump to examples ↓

GET /api/reports/timeinapp

Security:

Query parameters:

  • start stringREQUIRED
    A date-time for start of report.
  • end stringREQUIRED
    A date-time for end of report.
  • precision stringREQUIRED
    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.

    • Content-Type: application/json;

      The response body for time in app report.

      OBJECT PROPERTIES
      • 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.

      • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 401

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

    • Content-Type: text/plain

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

Examples

Example

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/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/..."
}
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);
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)
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

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 ↓

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.

Security:

Query parameters:

  • app_key stringREQUIRED
    The app key for your web project.
  • start stringREQUIRED
    A date-time for start of report.
  • end string
    A date-time 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.

    • Content-Type: application/json;

      The response body for web response report.

      All of
      • OBJECT PROPERTIES
        • app_key string

          The app key for the application.

        • end string

          The end date-time for the report.

        • precision string

          The precision of the report.

          Possible values: HOURLY, DAILY, MONTHLY

        • start string

          The start date-time for the report.

      • OBJECT PROPERTIES
        • total_counts array[object]

          Array of total count objects, each representing counts within the given date-time 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 401

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

    • Content-Type: text/plain

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

  • 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.

    • Content-Type: application/json

      Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.

Examples

Example

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/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"}
  ]
}
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);
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)