Understanding the APIs of Anaplan particulary using the Upload API from http client
I am looking to integrate Oracle SOA with Anaplan, specifically my requirement is to feed data from a Oracle SOA BPEL to Anaplan.
I have gone through the Anaplan API documentation and looking to use Upload and Import APIs.Approach I am planning to follow is write the content from Oracle SOA to a file and then upload that file to the Anaplan server.I have created a sample file from the Anaplan UI.
My questions are:
1.Is it possible to use these APIs from http client, to start with I am testing these APIs using Postman.I could call the Get File ID API to get the file Id of the sample file I have created in Anaplan.But I am not successful in executing the Upload API to upload the file from local.
2.How to specify the local file path in the Upload API.As I see the format of the API as 'https://api.anaplan.com/1/3/workspaces/workspaceID/models/modelID/files/fileId --upload-file Tests.txt' , how can the upload file name can be specified like this --upload-file Tests.txt from http client. If I run it, I get error
<div id="pageWrap" class="pageWrap">
<div class="banner">
<h1>An error has occurred whilst processing your request:</h1>
</div>
<div>
<pre class="original">Not Found</pre>
</div>
<div>Please close your browser window and try again.</div>
<div>If the problem persists then please contact Anaplan Support.</div>
</div>
Please help in getting this implemented.
Comments
-
Thanks Nathan for the response.
The link you shared for the incorporated webclient is taking me to the API that lists the workspace ID and not to the information about the webclient.
As I have a little knoweldge about Anaplan and the scripts, I am assuming from your response that when we send the Upload request from Postman, the https://api.anaplan.com/1/3/workspaces/workspaceID/models/modelID/files/fileId has to be called with the content of file added in some format in the body.
I would be great if you can share me a sample script which send the content(in the expected format) as the body of the request
Thanks,
Divya
0 -
I am currently using Postman to try out these APIs.I have the valid workspace Id and Model ID and using which I could call the GetFileID API and I could see the fileID of the file I am looking to upload.
As you mentioned ' The body of the request must contain the content you want to upload', this is what I am not clear with, should the file be send as attchment to the Upload API(PUT operation) or if the content has to be in the body what should be the content type and the format of the content.
As Nathan suggested, I tried to paste the content in body but it threw htpp 415 error, Unsupported Media Type.
Thanks,
Divya
0 -
With binary I got:
404
0 -
Hi,
aah, you are very perspicacious. So the 112's are Imports and 113's are files.
Now I have probably uploaded the file. Next I'll try to import it
0 -
Hi,
Now the whole path works! To document whole path, here is the Import task. That went trough without any complications. Thank you @ben_speight
Import
0
Categories
- All Categories
- 2.3K Anaplan Community
- Academy
- Anaplan Talent Builder
- Model Design Course
- The Anaplan Way
- Archive
- 2 Idea exchange
- 62 Enterprise Scale
- 1.1K Extensibility
- 21 Intelligence
- 1.6K Planning & Modeling
- 331 Security
- Community Connections
- Connections
- Experiences
- Groups
- Personas
- Employees
- CS Toolkit
- Customer Care Center
- Forums
- Academy & Training
- Community Feedback & Updates
- Japan
- Anaplan Community Japan
- Anaplan Community Japan Knowledge Base
- HyperCare Japan
- JP-Central
- Support-Japanese
- Partners
- Partner Leadership Council
- Partner Product Council
- 724 Platform
- Anapedia
- App Hub
- Centers Of Excellence
- Extensions
- Planual
- Platform Updates
- 724 User Experience
- Profile Builder
- Resources
- Anaplan Advocates
- Anaplan Live!
- Community
- Community Advancement
- Community Connections
- Partner Program
- The Official Master Anaplanner Program
- Videos
- Welcome to the Anaplan Community!
- Success Central
- Support
- Case Portal Link
- Common Support Questions
- HyperCare Redirect
- Known Issues and Workarounds
- Support test page
- SupportFAQ
- Survey
- 2 Training Day Takeaways