Returns API usage (hit metrics) information for all or individual applications in your account.
Result limits are as follows:
Note: the oldest information returned will be one year ago from today.
string |
Your API access key. If available for your account type, use your Global Key to get aggregate information on all your applications. | |
string |
'hour', 'day', or 'month'. This is the interval of the results you want (hits per hour, etc). | |
string |
In format of 'YYYY-MM-DD HH:MM:SS' – start of date range for results. | |
string |
In format of 'YYYY-MM-DD HH:MM:SS' – end of date range for results. Optional if period provided. | |
string |
E.g. '2 month', '1 day', '5 hour'. Only 'hour', 'day', and 'month' accepted as time periods. Optional if end_date provided. | |
app_scope | string |
'businessunit' or 'app'. The scope of applications. Not needed if the API key is the Global Key. Otherwise, defaults to 'app' (i.e. results will be for a single application) if not included. |
Sign in with your developer account to use the console, or sign up here
curl -v -X GET "https://api.theappreciationengine.com/v1.1/account/usage?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p&"
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.theappreciationengine.com/v1.1/account/usage?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p&",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://api.theappreciationengine.com/v1.1/account/usage?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p&"
headers = {}
payload = {}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text.encode('utf8'))
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.theappreciationengine.com/v1.1/account/usage?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p&',
'headers': {}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
[
{
"start_date":"2020-02-01 12:00:00",
"end_date":"2020-02-01 13:00:00",
"timezone":"UTC",
"interval":"per hour",
"hits_total":{
"TotalHitsForPeriod":29,
"TotalHitsPerHour":[
{
"hour":"2020-02-01 12:00:00",
"hits":14
},
{
"hour":"2020-02-01 13:00:00",
"hits":15
}
]
},
"hits_per_application":[
{
"ApplicationName":"Jean-Luc's Philosophy Sessions",
"TotalHitsForPeriod":22,
"HitsPerHour":[
{
"hour":"2020-02-01 12:00:00",
"hits":10
},
{
"hour":"2020-02-01 13:00:00",
"hits":12
}
]
},
{
"ApplicationName":"Wesley's Study Group",
"TotalHitsForPeriod":7,
"HitsPerHour":[
{
"hour":"2020-02-01 12:00:00",
"hits":4
},
{
"hour":"2020-02-01 13:00:00",
"hits":3
}
]
}
]
}
]