For those who are looking for aggregate usage by user (perhaps for monetization) - there is a "byUser" endpoint as well. The request is structured like below:
https://{api-service-name}.management.azure-api.net/subscriptions/{subscription}/resourceGroups/{resource-group}/providers/Microsoft.ApiManagement/service/{api-service-name}/reports/byUser?$filter=timestamp ge datetime'2019-12-01T00:00:00' and timestamp le datetime'2019-12-04T00:00:00'&api-version=2017-03-01
The documentation says to make a request to "https://management.azure-api.net/[...]" but I had to prepend the resource name like in the request above.
And the response:
{
"value": [
{
"name": "Administrator",
"userId": "/users/1",
"callCountSuccess": 13,
"callCountBlocked": 1,
"callCountFailed": 0,
"callCountOther": 0,
"callCountTotal": 14,
"bandwidth": 11019,
"cacheHitCount": 0,
"cacheMissCount": 0,
"apiTimeAvg": 1015.7607923076923,
"apiTimeMin": 330.3206,
"apiTimeMax": 1819.2173,
"serviceTimeAvg": 957.094776923077,
"serviceTimeMin": 215.24,
"serviceTimeMax": 1697.3612
},
{
"name": "Samir Solanki",
"userId": "/users/56eaec62baf08b06e46d27fd",
"callCountSuccess": 0,
"callCountBlocked": 0,
"callCountFailed": 0,
"callCountOther": 0,
"callCountTotal": 0,
"bandwidth": 0,
"cacheHitCount": 0,
"cacheMissCount": 0,
"apiTimeAvg": 0,
"apiTimeMin": 0,
"apiTimeMax": 0,
"serviceTimeAvg": 0,
"serviceTimeMin": 0,
"serviceTimeMax": 0
},
{
"name": "Anonymous",
"userId": "/users/54c800b332965a0035030000",
"callCountSuccess": 0,
"callCountBlocked": 0,
"callCountFailed": 0,
"callCountOther": 0,
"callCountTotal": 0,
"bandwidth": 0,
"cacheHitCount": 0,
"cacheMissCount": 0,
"apiTimeAvg": 0,
"apiTimeMin": 0,
"apiTimeMax": 0,
"serviceTimeAvg": 0,
"serviceTimeMin": 0,
"serviceTimeMax": 0
}
],
"count": 3,
"nextLink": ""
}
If you need to filter by type of request or API, you can do that as well - List by User