Status: Open
Status: Answered
Status: Closed
Status: Duplicate

REST API CS16 example of how to add category to NodeID

0
Posted Oct 25 by Roger Hiltpold.

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

1 Answer

0
BEST ANSWER: As chosen by the author.

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"]}


 You have subscribed and will receive email notifications of updates to this topic. To unsubscribe, uncheck the checkbox.

Statistics

Related categories

Your answer

To leave an answer, please sign in.