REST API CS16 example of how to add category to NodeID

Options

I'm trying to find an example where a category is added to a NodeID, using the following REST API method in CS16.2:
POST api/v1/nodes/{id}/categories
api/v1/nodes/{NodeID}/categories/{category NodeID}

I have tried the following examples, but all end with "Bad Command":
/api/v1/nodes/3119770/categories/561765
/api/v2/nodes/3119770/categories/561765

NodeID=3119770
Category NodeID=561765

Am I missing some parameter or do I have to include category version?
Roger

Comments

  • I am using following to attach a category (103217) and set values into a text field property (103217_2) in 16.0. Should work in 16.2 too.

    POST /api/v1/nodes/271757/categories
    body={"category_id":103217,"103217_2":["12345","12345","abc"]}