This article describes  user_element and group_element API endpoints, which provide information on elements available to users and group members respectively. These endpoints also allow assigning and revoking access to the elements.
Prerequisites:
- Set up API access
- Verify that you have API access and obtain a token via get_token call
Table of contents:
NOTE: In v7.0.1 and 7.0.1a the returned parameter name formats were changed:
- 
user_element:element_id,user_id->element,user
- 
group_element:element_id,group_id->element,group
In v7.0.2:
- 
user_elementsupports both new and old parameter name formats,
- 
group_element: supports only old parameter name format (element_id,group_id).
Beginning v7.0.2a, both user_element and group_element APIs support both new and old parameter name formats.
1. Access Admin > System > API Toolkit
2. Configure User Elements
2.1. Get User Elements
NOTE: The id of each user_element data entry is unique and can be used to create new data entries or delete the existing ones.
GET request to user_element returns all elements available to the user.
- Item: user_element
- Method: GET
- Filter the results with the following parameters:- ID: The ID of the user_element data entry
- user: The ID of the user
- email: The email of the user
- all: If set to 'Y', additionally returns all elements that the user has indirect access to via groups and categories
 
- Enter an API Token
- [Run request]
Example Response
{
  "user_elements": [
    {
      "id": 945,
      "user": 3,
      "element": 688
    },
    {
      "id": 953,
      "user": 3,
      "element": 693
    },
   ]
}Fields Description
2.2. Add Element Access to User
POST request to user_element adds element access to the user.
- Item: user_element
- Method: POST
- Enter ID of an existing user_element data entry- See Get User Elements for details
 
- Modify the request by providing values- See Fields Description for details
 
- Enter an API Token
- [Run request]
2.3. Remove Element Access From User
DELETE request to user_element removes element access from the user.
- Item: user_element
- Method: DELETE
- Enter the ID of user_element data entry that needs to be deleted
- Enter an API Token
- [Run request]
3. Configure Group Elements
3.1. Get Group Elements
NOTE: The id of each group_element data entry is unique and can be used to create new data entries or delete the existing ones.
GET request to group_element returns all elements available to group members.
- Item: group_element
- Method: GET
- Filter the results with the following parameters:- ID: The ID of the group_element data entry
- group: The ID of the group
- all: If set to 'Y', returns all elements that the group members have indirect access to via categories
 
- Enter an API Token
- [Run request]
Example Response
{
  "group_elements": [
    {
      "id": 20,
      "group": 9,
      "element": 10
    },
    {
      "id": 21,
      "group": 9,
      "element": 97
    }
  ]
}Fields Description
3.2. Add Element Access to Group
POST request to group_element adds element access to group members.
- Item: group_element
- Method: POST
- Enter ID of an existing group_element data entry- See Get Group Elements for details
 
- Modify the request by providing values- See Fields Description for details
 
- Enter an API Token
- [Run request]
3.3. Remove Element Access From Group
DELETE request to group_element removes element access from group members.
- Item: group_element
- Method: DELETE
- Enter the ID of group_element data entry that needs to be deleted- See Get Group Elements for details
 
- Enter an API Token
- [Run request]
 
       
       
       
       
      