With The REST API autonomous service and starting with 1.190 version, you can manage categories.
The REST API autonomous service is designed to replace all older REST API methods.
POST http://[server]:[port]/categories/[category_id]/add
You need to POST with websites separated by a carriage return inside the “sites” field
curl -X POST http://[server]:[port]/categories/[category_id]/add -H "Content-Type: application/x-www-form-urlencoded" -d "sites=google.com%0Agtoogle.fr%0Agoogle.it%0A192.168.1.3"
Serve returns a json with status field True or False with the number of items added inside the category.
Where category_id is the unique identifier of your personal category ( see list available categories)
With this method, for performance, Artica did not check if the website is already categorized in other categories.
GET http://[server]:[port]/categories/list
return a json with the category list :
example: {
"status": true,
"info": "List of available categories",
"categories": {
"250": {
"table": "category_googlelem",
"items": 4,
"name": "google_lem",
"description": "Google"
}
}
}
GET http://[server]:[port]/categories/[category_id]/compile
Force the Artica server to compile the category [category_id] and make it available on the system.