Rest Api response with FileName instead of FileId
I would like to know that instead of using the file id in the api get request can I use the filename as (xxxx.xls)
You can specify the import data source or export name in the URL path instead of the numeric ID, although you may need to be careful with certain characters that must be encoded (the tool you use to access the API may handle this).0
To check the response I am using the Postman and in the postman I am using the Get method. In the endpoint I have given https://api.anaplan.com/1/3/workspaces/8a81b0945cdbe1ec015ce678axxxxxxx/models/F54A3C7D6CE54A0F82EE730xxxxxx/Current Page - Headcount Data Master - Report.xls
Under the Header I have given the Authorization. I would like to know what type of content type I need to select.
Use application/octet-stream for the Accept header.
If the file is large then use the /2/0 API or the chunks endpoints instead.0
I tried in the Post man as you suggested , but I am getting not found error.
Please let me know if I missed anything
It looks like you're missing the path component "/files", which should follow the model ID. Test using a numeric identifier first, then substitute the name for the numeric identifier.0
As you suggested in the postman I have given the end url as
But I am getting the response as
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width = 960">
<link rel="shortcut icon" href="lib/anaplan/themes/original/images/favicon.ico">
<div id="pageWrap" class="pageWrap">
<h1>An error has occurred whilst processing your request:</h1>
<pre class="original">Not Found</pre>
<div>Please close your browser window and try again.</div>
<div>If the problem persists then please contact Anaplan Support.</div>
I am getting the response for the .csv files but for the .xls file I am getting the Not found error as mentioned in my previous post
Now you've got /1/4 as a version instead of /1/3 or /2/0. That's not a valid API version, hence the not found error.0
I tried with 2/0 version to get the files https://api.anaplan.com/2/0/workspaces/8a81b0945cdbe1ec015ce678a3f60051/models/420BD91A051443C6ADACCF69D33EBEA0/files
but I am getting response as
"message": "Not Authorized."
When I tried version1/4 I am getting File not found.
Api version 1/3 is only giving response to me.
1/4 is not a valid API version.
2/0 will require a different Authorization: header to 1/3 (see https://anaplanauthentication.docs.apiary.io/)0