Return refreshID in the API response to GET /refreshes/<refreshID>
When I call the POST /refreshes API in order to initiate an asynchronous refresh operation it redirects me to GET /refreshes/<refreshID> and the only way to know what refreshID I just initiated is by parsing the Location header or redirected URL. This is very non-standard. It's also not possible to accomplish this with a Web Activity in ADFv2.
Please change the GET /refreshes/<refreshID> API to return the refreshID as a property inside the JSON response. That's a very easy change and would be tremendously helpful.
This is the API I'm talking about:
https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-async-refresh#get-refreshesrefreshid

2 comments
-
Anonymous commented
+1
It seems this is added to the 202 response of the POST request, but not the 200 response.
The 202 contains location header and a JSON response:
{
"statusCode": 202,
"headers": {
"Location": "url",
"Content-Type": "application/json"
},
"body": {
"operationId": "GUID"
}
}But the 200 response contains only non-essential information of the operation:
{
"statusCode": 200,
"headers": {
"Content-Type": "application/json"
},
"body": {
"startTime": "2020-04-19T07:46:33.4570451Z",
"type": "full",
"status": "notStarted",
"currentRefreshType": "full",
"objects": []
}
}We are using a logic app to call POST /refreshes and we are not able to implement this with async pattern since then the operation id would be lost.
Adding the operation id to the body of the 200 response would be VERY helpful.
-
Greg Galloway commented
I wish I could edit the text of this idea to fix some typos. The last 2 paragraphs should say:
Please change the POST /refreshes API to return the refreshID as a property inside the JSON response. That's a very easy change and would be tremendously helpful.
The API I'm talking about:
https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-async-refresh#post-refreshes