How to add a document to Content Server 16 using REST API V2
http://dc1ecm16llint1/otcs/cs.exe/api/v2/nodes?where=((type=144) AND (parent_id=1852917) AND (file="\ServerName\Folder1\SubFolder\sample.pdf"))
I'm trying to use RestAPI V2, using postman, to add a new document to Content Server 16. I keep getting generic "500 - Internal server error" and "There is a problem with the resource you are looking for, and it cannot be displayed."
Authentication works fine and I can post the following search:
http://dc1ecm16llint1/otcs/cs.exe/api/v2/search?where=((OTLocation:2683972) AND (OTName:Sample*) AND (OTSubType:144))
Any assistance is much appreciated, as I'm unable to find any concrete examples online.
Thanks, Rogere
Comments
-
I've only tried creating a xml file in content server
by adding parameter ContentType = "multipart/form-data;boundary=0987654321e" (note boundary can be random, but it will need to match your data.
then you'll need to put your data in a similar format
--------------------------0987654321e
Content-Disposition: form-data; name="person"anonymous
--------------------------0987654321e
Content-Disposition: form-data; name="file.xml"; filename="file.xml"
Content-Type: text/xmlcontents of the xml file
--------------------------0987654321ehope this helps/.
0 -
First call http://your_content_server/otcs/cs.exe/api/v1/auth and get the ticket. You need to add a header variable named "OTCSTICKET" and set it with the value returned.
Then create a request for pi/v2/nodes and set the following values
type=144
parent_id=object id of node you want to upload to
name=name you want to call it
file=location of file on filesystem. remember to change the parameter type to file.1
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 107 General Questions
- 144 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 119 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management