How to add a document to Content Server 16 using REST API V2

ICWICW Roger Hiltpold

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


  • 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

    Content-Disposition: form-data; name="person"

    Content-Disposition: form-data; name="file.xml"; filename="file.xml"
    Content-Type: text/xml

    contents of the xml file

    hope this helps/.

  • 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
    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.

    enter image description here

Sign In or Register to comment.