Manage categories with REST Web API (v4)
The Autonomous REST API allows you to manage categories with a strong service
With The REST API autonomous service and starting with 4.x version, you can manage categories.
The REST API autonomous service is designed to replace all older REST API methods.
Add items in categories ( bulk mode )
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.
List available 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"
}
}
}
Compile a category
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.
Backup your categories
GET http://[server]:[port]/categories/backup
Will export all categories data to the /home/artica/backup-categories folder