Reporting API Reference
The APIs let you programmatically request reports from Atrilyx, for one or several websites and for any given date and period and in any format (CSV, JSON, XML, etc.).
URL
The API follows REST conventions. Perform an HTTPS GET to the URL with the format in which you’d like to receive data. The base URL is https://dashboard.atrilyx.com/index.php?module=API&idSite=33 where 33 is your client id.
The following response formats are supported.
Format | Description | Parameter sent |
---|---|---|
csv | comma-separated values | &format=csv |
tsv | tab-separated values, similar to CSV but loads properly in Excel | &format=tsv |
xml | data is returned in the XML data format | &format=xml |
json | if you want to do cross domain request in ajax and get json data, you can wrap the json data around a function call by using the jsoncallback parameter | &format=json |
html | data is returned as an HTML table | &format=HTML |
Required API parameters
idSite
the integer ID for your account - this can be found in the URL of your atrilyx dashboard
method
This is the report you would like to receive. Available reports are:
AtrilyxAPI.getCampaign your network campaign report
AtrilyxAPI.getAdGroup your adgroup/ ad set report
AtrilyxAPI.getAd your ad report
startDate
The start date for the report. Format is yyyy-mm-dd e.g. 2023-01-01
endDate
The end date for the report. Format is yyyy-mm-dd e.g. 2023-01-01
token_auth
your API KEY
Example:
Sending over these parameters
https://dev.atrilyx.com/index.php?module=API&method=AtrilyxAPI.getAd&startDate=2023-04-15&endDate=2023-04-30&idSite=33&format=html&token_auth=XXXXXXXXXXX
will return a report with the following default columns (All data will be aggregated by the attributes returned):
Default Columns:
Field Name | Type | Report (campaign, ad group, ad, or all) |
Program | attribute | all |
Network | attribute | all |
Campaign | attribute | all |
Campaign_Type | attribute | all |
Ad_Group | attribute | ad group, ad |
Ad | attribute | ad |
Spend | metric | all |
Impressions | metric | all |
Clicks | metric | all |
Conversions | metric | all |
Revenue | metric | all |
Network_Conversions | metric | all |
Network_Revenue | metric | all |
Page_Views | metric | all |
Visits | metric | all |
Optional API parameters:
Attributes
Attributes determine what data points you would like to get a report on. They can be broken into two categories, dates and fields:
Dates: the Following date types are accepted: Date (data by day), Week, and Month
Fields: See Attributes and Metrics for a list of fields supported by the API
You can mix and match your attributes using a comma. For example, adding &attributes=month to your request, you will receive all default columns with the data broken out by month. By adding &attributes=ad to your request, you will only receive the ad attributes column, with the default metrics. Requesting both attributes e.g. &attributes=ad,month will return a report with your ad performance, by month with all default metrics.
Metrics
Metrics are the results of your requested attributes. See Default Columns for the standard metric set
Additional metrics are available, see Attributes and Metrics for a complete list.
Metrics are selecting by passing the &metrics= parameter to the URL. For example, passing &metrics=spend to the request URL will return all your selected attributes, with one metric column of spend.
Like attributes, metrics can be mixed and matched. By passing &metrics=spend,visits to the request you will receive those two metric columns.
Combining attributes and metrics, you can structure your report exactly as you need e.g. &attributes=ad,month&metrics=spend,visits