Jump to: navigation, search

Fuse Reporting API

Revision as of 19:22, 8 March 2016 by Admin (Talk | contribs) (Example Request)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Fuse Reporting API

Introduction

The Fuse Reporting API gives you access to ad data for your apps via a RESTful interface. This includes daily active users (DAU), average revenue per daily active user (ARPDAU), impressions (views), eCPM, and revenue. These metrics can be grouped by date, app, country and mediated ad network.

Requests

All requests must be made over HTTPs. POST requests should include the required request fields in the body of the request. The Base URL for all requests is: https://admin-api.fusepowered.com/v1.0/

Authentication

Authentication is handled by passing an "API_KEY" header. Header format: API_KEY: <your API key> You can get your API key from the Fuse dashboard on the API Key page: https://dashboard.fusepowered.com/account/partner-api-key/ Please remember to keep your key private! If you need to reset your key you can do so on the API key page (URL above). Keep in mind that resetting your key will mean that any server-based applications using it will stop working until they're updated with a new valid key (API key changes have no affect on your apps).

Responses

Responses will be made in JSON format.

HTTP Status Codes

HTTP header status codes are used to indicate the status of the response. In general, the following header codes apply:

HTTP Status Code Description
200 OK The request has succeeded, and the body contains the result of the method
400 Bad Request The request lacked required fields or was not understood for some other reason
401 Unauthorized The request lacked an Authorization header required to authenticate the request
403 Forbidden The request included a valid Authorization header, but that user is not authorized to perform the requested action
404 Not Found The requested method does not exist
500 Internal Server Error The server encountered an unexpected condition which prevented the request from being fulfilled

Methods

Method name: Report

Request Fields

Field Name Description Format Required in Request?
start_date The start date of the reporting period. YYYY-MM-DD

Example: start_date=2015-05-18

No. Default is 30 days before end date.
end_date The end date of the reporting period. YYYY-MM-DD

Example: end_date=2015-05-19

No. Default is yesterday.
group_by The grouping options include:
  • date
  • app
  • country
  • mediation_partner
Comma-separated.

Example: group_by=date,app,country

No. Default grouping is by day.
metrics The metrics options include:
  • dau
  • arpdau
  • views
  • revenue
  • ecpm
Comma-separated

Example: metrics=views,revenue

No. All metrics returned by default.

Example Request

CURL:

curl -i -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'API_KEY: <your API key>' 'https://admin-api.fusepowered.com/v1.0/report?start_date=2016-02-20&end_date=2016-02-21&group_by=date&metrics=views,dau,revenue'


IMPORTANT: when making CURL requests, make sure to use single quotes for the API key header entry. Double quotes can result in 403 (Forbidden) errors. Also always be sure to wrap the URL in single quotes.

Response Fields

Field Name Description Example
start_timestamp The start date of the reported metrics. 2015-04-20 00:00:00
views The number of ad views (impressions) shown for the reporting period. 3114321
dau The number of daily active users for the reporting period. 3224321
revenue The total net revenue for the reporting period. (USD) 9999.112340000000
ecpm The net eCPM (effective cost per thousand) for the reporting period. (USD) 12.34
arpdau The average revenue per daily active user for the reporting period. (Dollars - USD) 0.1234
app_id The app ID of the app. Only returned when group_by includes "app". c1743413-a912-4c76-8d4e-8a7412763174
name The name of the app. Only returned when group_by includes "app". Zoo Toss Lite
os The operating system of the app. Only returned when group_by includes "app". iOS

Example Response

    [
        {
            "start_timestamp":"2015-04-21 00:00:00",
            "views":"3111234",
            "dau":"3221234",
            "revenue":"9999.14321"
        },
        {
            "start_timestamp":"2015-04-20 00:00:00",
            "views":"3114321",
            "dau":"3224321",
            "revenue":"9999.11234"
        }
    ]