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:
{
"measures": [],
"dimensions": [],
"filters": [],
"timeDimensions": [],
"order": [],
"limit": int,
"offset": int
}
Field | Type | Description |
---|---|---|
measures | array | A list of all the measures wanted |
dimensions | array | The breakdown dimensions criteria |
filters | array | Use dimensions filters to drill through data |
dateDimensions | array | A more granular way to use the date dimension |
order | array | To order the result by one of the dimensions or the measures |
limit | int | To 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.
Use the generated key to get access to your reports. Reporting Request The requests to the reporting endpoint has the following stamp:
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:
{
"status": ""
"data": [],
"message": ""
}
status: ready, error
data: The query results
message: To indicate errors
##Examples
Example 1: Get all publisher revenue
JSON Query:
{
"measures": [
"measures.revenue"
],
"timeDimensions": [],
"dimensions": [],
"filters": [],
"order": []
}
Response:
{
"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:
{
"measures": [
"measures.impressions"
],
"timeDimensions": [
{
"dimension": "Date.date",
"granularity": "day",
"dateRange": "Last 7 days"
}
],
"dimensions": [],
"filters": [],
"order": []
}
Response:
{
"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:
{
"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:
{
"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:
{
"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:
{
"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:
{
"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:
{
"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.
{
"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
Measure | In Query JSON | Description |
---|---|---|
Impressions | measures.impressions | Rendered Ads |
Revenue | measures.revenue | Publisher Revenue |
Clicks | measures.clicks | |
eCPM | measures.cpm | Revenue * 100 / Impressions |
CTR | measures.ctr | Clicks * 100 / Impressions |
Available Dimensions
Dimension | In Query JSON | Description |
---|---|---|
Date | Date.date | |
App | App.name | |
App Version | App.app_ver | The chronological sequence of the versions of the app (-1 is unknown, 0 is the first version, then 1,2,…etc) |
Scene | Scene.name | |
Placement | Placement.name | |
Placement ID | Placement.placement_id | |
Country | Country.name | |
Alpha_2 | Country.alpha_2 | 2 letters. For example: US, GB, DE, etc |
Alpha_3 | Country.alpha_3 | 3 letters. For example: USA, GBR, DEU, etc |
Media Type | MediaType.adformat | Banner and Video |
Ad Size | AdSize.adsize | |
Operating System | Os.name | |
Bundle | App.bundle |
The API response codes for HTTP Requests
HTTP Response Code | Reason |
---|---|
400 | Wrong input |
403 | Invalid or missing key |
200 | ok |
API messages
Message | What to DO |
---|---|
query param is required | Make sure of provided query parameter in the URL. |
Invalid Key | Make sure of using authentication headers. Make sure of using a valid key. If the issue persists, contact Account Managers. |
Invalid Query | Make 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 time | Query is running. Try again after a while to get the results. |