Content Server REST API Complex JSON

I heard there is a way to create a file with category attribute values in one call by making a complex JSON object to encapsulate all the information. Can someone share with me the structure of this complex JSON?
Referencing this knowledge article:


  • Bit late responding, but you never now. The simplest way to get the structure is to drag and drop a file to a folder in the smart view and check the network tab in your browser. The body element in the form that's sent to api/v1/nodes via POST gives you the structure.

    The category metadata sits under body.roles.categories[][]. Something like:
    { "name": "tester", "type": 144, "parent_id": 48742, "roles": { "categories": { "6286": { "6286_2": "Value 1", "6286_3": "Value 2" } } } }

  • If I may: I used the trick you mentioned but keep getting a Bad Request in Postman:

    Post Url : https://myotcsapiurl/OTCS/CS.exe/api/v1/nodes/
    OTCSTICKET in Headers
    Json in Body (Raw)
    File uploaded through Binary in body

    Every time I receive a Bad Request...

  • @RobCiber - have not done this via postman but have using REST from an HTML page. With HTML you have to create a FORM tag and pass the file as a a file type input tag (ex: ). Also you must have an enctype on your form tag (ex: enctype="multipart/form-data").

    Also if you have access to the log files you should be able to see 1) does it hit my server, and 2) what exactly is content server getting. Then you can compare to the log files when adding manually to see the differences.


  • This is my call, and all the information I have... Hope someone sees what I'm doing wrong..

Sign In or Register to comment.