Hi All,
I am working on monetization of API usage in Azure APIM for APIs we have published for customers to consume. I have a requirement to get usage details of API having columns API Id, SubscriptionId and AccountNo. Using the https://docs.microsoft.com/en-us/rest/api/apimanagement/2019-12-01/reports/listbyrequest i am getting all column values except the AcountNo. But the response gives me the requestId as below. Can i get the request header/body information using the requestId or is there any other way i can fetch the details of the actual call/request that was made for an api. Thanks in advance.
{
"value": [
{
"apiId": "/apis/5931a75ae4bbd512a88c680b",
"operationId": "/apis/5931a75ae4bbd512a88c680b/operations/-",
"productId": "/products/-",
"userId": "/users/1",
"method": "GET",
"url": "https://apimService1.azure-api.net/echo/resource?param1=sample",
"ipAddress": "207.xx.155.xx",
"responseCode": 404,
"responseSize": 405,
"timestamp": "2017-06-03T00:17:00.1649134Z",
"cache": "none",
"apiTime": 221.1544,
"serviceTime": 0,
"apiRegion": "East Asia",
"subscriptionId": "/subscriptions/5600b59475ff190048070002",
"requestId": "63e7119c-26aa-433c-96d7-f6f3267ff52f",
"requestSize": 0
},
{
"apiId": "/apis/5931a75ae4bbd512a88c680b",
"operationId": "/apis/5931a75ae4bbd512a88c680b/operations/-",
"productId": "/products/-",
"userId": "/users/1",
"method": "POST",
"url": "https://apimService1.azure-api.net/echo/resource",
"ipAddress": "207.xx.155.xx",
"responseCode": 404,
"responseSize": 403,
"timestamp": "2017-06-03T00:17:20.5255131Z",
"cache": "none",
"apiTime": 6.6754000000000007,
"serviceTime": 0,
"apiRegion": "East Asia",
"subscriptionId": "/subscriptions/5600b59475ff190048070002",
"requestId": "e581b7f7-c9ec-4fc6-8ab9-3855d9b00b04",
"requestSize": 0
}
],
"count": 2
}
The AccountNo is getting set in the Request Header/Request Body.