I can read categories from a node with
GET http://MY_SERVER_IP/OTCS/cs.exe/api/v1/nodes/NODE_ID/categories
but I'm not able to add a new one to it. Is it possible?
Can I sent a POST to same URL? How should be the body of that request?
Im working on this myself today. You have the bones of it you just need to change a few things.
If you are using xhr, :
xhr.open("POST", "http://MY_SERVER_IP/OTCS/cs.exe/api/v1/nodes/NODE_ID/categories/?id=NODE_ID&category_id=CATEGORY_ID");
NODE_ID
CATEGORY_ID
so the Node_ID (file,folder etc) is listed twice and this works for me as stated in "parameters" on the API Docs page, take a look HERE