Can't create a Document via Rest API
Hello,
we are using the POST API /v2/nodes to create a Document on our Content Server. The body of our request is:
{
"type": 144,
"parent_id": 5627091,
"name": "example.txt",
"file": "UXVlc3RvIMOoIHVuIGZpbGUgZGkgZXNlbXBpbw=="
}
but we get the following error: "error": "An illegal attempt was made to upload a document".
We tried the base64 encode. The user has full permissions to create documents in the folder.
Can anyone help us? Thank you.
Simone
Answers
-
AFAIK I have not seen a working example of sending a file as base64 you could try posting a file using multipart/form-data that is how Nodes with initial Version and Further adding versions happen
In this post below, I have included how you can use SmartUI and then trace the payload of a File addition.
try to look at this post
There is some stuff being said it was perhaps a few days before
https://forums.opentext.com/forums/developer/discussion/comment/969775#latest
https://forums.opentext.com/forums/developer/discussion/312086/does-create-document-in-v2-nodes-api-support-multipart-form-data#latest
0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 151 General Questions
- 146 Thrust Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 179 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 9 XM Fax
- Follow Categories