• Docs
  • Releases
  • API Reference
  • Login
  • Languages iconEnglish
    • 日本語

›Admix Unity SDK API Reference

Admix Unity SDK API Reference

  • Introduction to the Admix Unity Plugin API
  • Placements Queue Management Events
  • Placement Load Events
  • Gaze events and other event types
  • Reporting API

Reporting API

Admix Reporting API allows getting the reporting data from the development platform.

Admix Reporting API is in beta, but it is still popular among multiple publishers.

This article describes of how to use Admix Reporting API.

Reporting Endpoint

https://api.admixplay.com/report?query=<YOUR_QUERY_JSON> Query JSON: The query should be expressed as a JSON object which has the following schema:

JSON
{
"measures": [],
"dimensions": [],
"filters": [],
"timeDimensions": [],
"order": [],
"limit": int,
"offset": int
}
FieldTypeDescription
measuresarrayA list of all the measures wanted
dimensionsarrayThe breakdown dimensions criteria
filtersarrayUse dimensions filters to drill through data
dateDimensionsarrayA more granular way to use the date dimension
orderarrayTo order the result by one of the dimensions or the measures
limitintTo limit results

Authentication

First, you need to have API access key. You can get it from the Admix developer platform in the Profile -> API keys section. Click on the Create API Key to get your API key for reporting.
Reporting_api

Use the generated key to get access to your reports. Reporting Request The requests to the reporting endpoint has the following stamp:

curl
curl
-H "x-admix-key: <YOUR_KEY>"
"https://api.admixplay.com/report?query=<YOUR_QUERY_JSON>"

Reporting Response

The response for the reporting would have the following structure:

JSON
{
"status": ""
"data": [],
"message": ""
}

status: ready, error
data: The query results
message: To indicate errors

##Examples

Example 1: Get all publisher revenue

JSON Query:

JSON
{
"measures": [
"measures.revenue"
],
"timeDimensions": [],
"dimensions": [],
"filters": [],
"order": []
}

Response:

JSON
{
"status": "ready",
"data": [
{
"measures.revenue": "28,545.55"
}
]
}

Example 2: Get the daily impressions of the last 7 days

If today is the 11th of May:

JSON
{
"measures": [
"measures.impressions"
],
"timeDimensions": [
{
"dimension": "Date.date",
"granularity": "day",
"dateRange": "Last 7 days"
}
],
"dimensions": [],
"filters": [],
"order": []
}

Response:

JSON
{
"status": "ready",
"data": [
{
"Date.date": "2021-05-05T00:00:00.000",
"measures.impressions": "2220653"
},
{
"Date.date": "2021-05-06T00:00:00.000",
"measures.impressions": "2017246"
},
{
"Date.date": "2021-05-07T00:00:00.000",
"measures.impressions": "1909555"
},
{
"Date.date": "2021-05-08T00:00:00.000",
"measures.impressions": "2580667"
},
{
"Date.date": "2021-05-09T00:00:00.000",
"measures.impressions": "24988243"
},
{
"Date.date": "2021-05-10T00:00:00.000",
"measures.impressions": "2139984"
},
{
"Date.date": "2021-05-11T00:00:00.000",
"measures.impressions": "1980590"
}
]
}

Example 3: Using filters

To get the eCPM on 1st of March in the United Kingdom:

JSON
{
"measures": [
"measures.cpm"
],
"timeDimensions": [],
"dimensions": [],
"filters": [
{
"member": "Country.alpha_3",
"operator": "equals",
"values": [
"GBR"
]
},
{
"member": "Date.date",
"operator": "equals",
"values": [
"2021-03-01"
]
}
],
"order": []
}

Response:

JSON
{
"status": "ready",
"data": [
{
"measures.cpm": "2.61"
}
]
}

Example 4: Complex Filtering

Multiple SQL conditions can be applied using "and" and "or" to involve complex filtering criteria:

JSON
{
"measures": ["measures.revenue", "measures.impressions", "measures.clicks", "measures.cpm"],
"dimensions": [],
"filters": [ {
"or": [{
"and": [{
"member": "Date.date",
"operator": "equals",
"values": ["2021-04-01"]
}, {
"member": "Country.alpha_3", "operator": "equals",
"values": ["USA"]
}]
}, {
"and": [{
"member": "Date.date",
"operator": "equals",
"values": ["2021-05-01"]
}, {
"member": "Country.alpha_3", "operator": "equals",
"values": ["GBR"]
}]
}]
}]
}

Example 5: Ordering and Limit

Results can be sorted and limited:

JSON
{
"measures": [
"measures.impressions",
"measures.revenue"
],
"timeDimensions": [],
"dimensions": [
"Date.date"
],
"filters": [],
"order": [
[
"measures.impressions",
"desc"
],
[
"Date.date",
"asc"
]
],
"limit": 1000
}

Example 6: Break down by dimensions, and filter by dimensions

To get the revenue per app and country and filter on a date:

JSON
{
"measures": [
"measures.revenue"
],
"timeDimensions": [],
"dimensions": [
"App.name",
"Country.name"
],
"filters": [
{
"member": "Date.date",
"operator": "equals",
"values": [
"2021-01-01"
]
}
],
"order": {
"measures.revenue": "desc"
}
}

Example 7: Filter on a Date range:

JSON
{
"measures": ["measures.revenue"],
"dimensions": [],
"order": {
"Date.date": "asc"
},
"filters": [],
"timeDimensions": [{
"dimension": "Date.date",
"dateRange": ["2021-06-01", "2021-06-30"], "granularity": null
}]
}

In example 7, setting the granularity to null will query the total within the selected time range. However, to break down the results on a daily basis set the granularity to “day“.

Example for checking data per bundle id.

JSON
{
"measures": [
"measures.impressions"
],
"timeDimensions": [],
"dimensions": [
"App.bundle"
],
"filters": [],
"order": {
"measures.impressions": "desc"
}
}

Feel free to use in filters and get what you like, for example:

"filters": [
{
"member": "App.bundle",
"operator": "equals",
"values": [
"app_bundle"
]
}
],

Available Measures

MeasureIn Query JSONDescription
Impressionsmeasures.impressionsRendered Ads
Revenuemeasures.revenuePublisher Revenue
Clicksmeasures.clicks
eCPMmeasures.cpmRevenue * 100 / Impressions
CTRmeasures.ctrClicks * 100 / Impressions

Available Dimensions

DimensionIn Query JSONDescription
DateDate.date
AppApp.name
App VersionApp.app_verThe chronological sequence of the versions of the app (-1 is unknown, 0 is the first version, then 1,2,…etc)
SceneScene.name
PlacementPlacement.name
Placement IDPlacement.placement_id
CountryCountry.name
Alpha_2Country.alpha_22 letters. For example: US, GB, DE, etc
Alpha_3Country.alpha_33 letters. For example: USA, GBR, DEU, etc
Media TypeMediaType.adformatBanner and Video
Ad SizeAdSize.adsize
Operating SystemOs.name
BundleApp.bundle

The API response codes for HTTP Requests

HTTP Response CodeReason
400Wrong input
403Invalid or missing key
200ok

API messages

MessageWhat to DO
query param is requiredMake sure of provided query parameter in the URL.
Invalid KeyMake sure of using authentication headers.
Make sure of using a valid key.
If the issue persists, contact Account Managers.
Invalid QueryMake sure of the JSON query syntax
Make sure of using the right naming convention.
Your query needs more time. Please try again in a short timeQuery is running. Try again after a while to get the results.
← Gaze events and other event types
  • Reporting Endpoint
  • Authentication
  • Reporting Response
    • Example 1: Get all publisher revenue
    • Example 2: Get the daily impressions of the last 7 days
    • Example 3: Using filters
    • Example 4: Complex Filtering
    • Example 5: Ordering and Limit
    • Example 6: Break down by dimensions, and filter by dimensions
    • Example 7: Filter on a Date range:
    • Example for checking data per bundle id.
  • Available Measures
  • Available Dimensions
  • The API response codes for HTTP Requests
  • API messages
Documentation
TutorialsReleasesAPI Reference
Admix
Admix HomepageLogin
Copyright © 2022 Admix