Category User and Category Group API
Introduced in v7.0.2, category_user
and category_group
API endpoints return information about Categories available to Users and Group members.
Prerequisites:
- Set up API access
- Verify that you have API access and obtain a token via get_token call
Table of contents:
1. Access Admin > System > API Toolkit
2. Configure User Categories
2.1. Get User Categories
NOTE: The id
of each category_user data entry is unique and can be used to create new data entries or delete the existing ones.
- Item: category_user
- Method: GET
- Filter the results with the following parameters:
- ID: The ID of the category_user data entry
- category_id: The ID of the category
- user_id: The ID of the user
- Enter an API Token
- [Run request]
Example Response
{
"category_users": [
{
"id": 76,
"category_id": 111,
"user_id": 100,
"allow_edit_element": "No"
},
{
"id": 77,
"category_id": 123,
"user_id": 66,
"allow_edit_element": "No"
}
]
}
Fields Description
2.2. Add Category Access to User
- Item: category_user
- Method: POST
- Enter the ID of an existing category_user data entry
- See Get User Categories for details
- Modify the request by providing parameter values
- See Fields Description for details
- Enter an API Token
- [Run request]
2.3. Delete Category Access from User
- Item: category_user
- Method: DELETE
- Enter the ID of category_user data entry that needs to be deleted
- See Get User Categories for details
- Enter an API Token
- [Run request]
3. Configure Group Categories
3.1. Get Group Categories
NOTE: The id
of each category_group data entry is unique and can be used to create new data entries or delete the existing ones.
- Item: category_group
- Method: GET
- Filter the results with the following parameters:
- ID: The ID of the category_group data entry
- category_id: The ID of the category
- group_id: The ID of the group
- Enter an API Token
- [Run request]
Example Response
{
"category_groups": [
{
"id": 3,
"category_id": 58,
"group_id": 2,
"allow_edit_element": "No"
},
{
"id": 4,
"category_id": 59,
"group_id": 2,
"allow_edit_element": "No"
}
]
}
Fields Description
3.2. Add Category Access to Group
- Item: group_category
- Method: POST
- Enter ID of an existing category_group data entry
- See Get Group Categories for details
- Modify the request by providing values
- See Fields Description for details
- Enter an API Token
- [Run request]
3.3. Delete Category Access from Group
- Item: category_group
- Method: DELETE
- Enter the ID of category_group data entry that needs to be deleted
- Enter an API Token
- [Run request]