File Download API using name instead of ID
Hi Everyone,
I have an Anaplan ←→Azure integration pipeline where Azure Data Factory pulls some data using an export action via Anaplan APIs.
We were using the name instead of the id when we run the download API. However, today observed that it no longer works. Getting a 404 Not Found.
{ "status": { "code": 404, "message": "Not Found" })
I tried running via Postman and get the same result. But if I replace the name with the ID, the API returns the data.
We had not seen this issue until now while using name in the URL.
Did anything change recently with respect to the export/download APIs (Using API v1.3) ?
Able to run below APIs using the name -
- Get export metadata. (https://api.anaplan.com/1/3/workspaces/<workspaceID>/models/<modelID>/exports/<exportName>/)
- Run export. (https://api.anaplan.com/1/3/workspaces/<workspaceID>/models/<modelID>/exports/<exportName>/tasks/)
- Get task status.(https://api.anaplan.com/1/3/workspaces/<workspaceID>/models/<modelID>/exports/<exportName>/tasks/<taskID>)
- List Files (https://api.anaplan.com/1/3/workspaces/<workspaceID>/models/<modelID>/files/)
- Download File - This step FAILS (https://api.anaplan.com/1/3/workspaces/<workspaceID>/models/<modelID>/files/<fileName/exportName>)
Thanks.
Answers
-
API v1.3 ? With CA auth I assume? The major Anaplan change is basic auth is deprecated as MS is doing so as well. Error 404 - Not Found usually means that the resource is not present. Or the resource endpoint URL could be incorrect? Your Postman suggests that the resource doesn't exist.
There are some good v2.0 tips in these links related to crafting the API requests. It would be good idea to coordinate with your Anaplan BP first to see if there is a reason that you're on v1.3 or risks associated with v2.0 update:
1 -
Thanks @JamesMartinㅤ(ㅤCognizantㅤ) . We were using v1.3 since last year and are very close to going live at this point. We updated the pipelines to use IDs instead of names and it works fine. But will certainly push for upgrading to v2.0.
1