The Analytics REST API section will guide you through the process of using Epom Ad Server API to obtain analytics data.

  1. Log into your Network Supervisor account.
  2. Click REST APIs Reference in the System Configuration group of the side menu.
  3. Go to the Analytics REST API tab.

To obtain analytics data, a specific URI supported by the server should be called via HTTP POST or HTTP GET request. Depending on the Analytics type, the following requests should be performed:

The server will respond by returning data in the format that was specified by the requesting part, or HTTP Error with a corresponding snippet that explains the error.

Responses might contain the following errors:

Request is obsolete The difference between the timestamp in the URI and the current timestamp in Epom System is more than 5 minutes.
No matching credentials found Password tied to the login specified in the URI is incorrect or empty.
Data fingerprint mismatch Hash received from the user doesn't match the one calculated by Epom System.

note Analytics REST API
Note!

Please find a sample here.


Layout Settings


Get Report Columns

To get reporting layout settings for selected user the following method should be used:

URL: /rest-api/analytics/reports-layout-settings/{login}/{hash}/{timestamp}.do
Method: GET
Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

Response sample:

200 OK
{
"success":true," reports-layout-settings":
 {
 "selectedColumns":
 ["ctr","fill_rate","ecpmNet","conversions","showIds","ecpmGross","ecpmProfit"
,
 "sumGross","requests","sumNet","ccr","i2c","profit"], "allColumns":
  {
   "Base Analytics":
   ["impressions","clicks","ctr","requests","fill_rate","sumNet",
   "sumGross","profit","ecpmNet","ecpmGross","ecpmProfit"]
  }
 }
}

Parameters:

  • statsType – (optional) defines the Analytics report data type. Available values: BROWSER_OS, THIRD_PARTY_FILL_RATE, TARGETING_COOKIE, DSP_FILL_RATE, CLICKS_LOG, HADOOP_ADREQUESTS, CONVERSIONS_LOG, SSP_WIN_RATE. Not passing the parameter will return General Analytics report.
  • login – requestor login in Epom system.
  • timestamp – UNIX timestamp in milliseconds used in hash generation.
  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.

Analytics Report with Predefined Columns

To obtain a report with specific columns, the following method should be used:

URL: /rest-api/analytics/CSV/{login}/{hash}/{timestamp}.do

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used in hash generation.
  • username – a given username.
  • useReportsLayoutSettings – true/false. Defines if reportsLayoutSettings should be used.
  • reportsLayoutSettings – an array or property names.

Example request:

URL: /rest-api/analytics/CSV/network/1/1.do?useReportsLayoutSettings=true
&reportsLayoutSettings=ctr&reportsLayoutSettings=fill_rate

Result:

  • Success: true
  • Report with CTR and Fill Rate columns as a CSV attachment.

Need more help?

Should you require any additional help with our solutions, do not hesitate to contact Epom technical support at support@epom.com. Our support managers are dedicated to resolving any issues and providing you with solutions and support if you face difficulties or have questions.