Search code examples
restapiopentextlivelink

How to pass Category Attribute value from REST API


I am able to upload files or create node through the Content server(16.0.3) REST Api (POST: api/v1/nodes). But How do I pass Category Attribute value while uploading file to opentext Content server..

Because as per DeveloperGuide there are only 3 parameters that I can pass

type,parent_id,name

Solution

  • To add a category to node, need to pass roles with Category, Category Attribute values in Json formate.For example node (20589) has category with name BillingCat(42069) contains ReferenceID (42069_2) then pass parameters as below

      type: 144,
        parent_id: 20589,
        name: file.name,
        roles: {
          categories: {
            {
              '42069': { // category (42069)
                '42069_2': 'ABC23' //attribute value
              }
            }
          }