Group Privilege Set API

This article describes API calls available for Group Privilege Set configuration:

  • /api/group_privilege_set: Allows retrieving Privilege Sets assigned to Groups, adding, and removing Privilege Sets from Groups.

Prerequisites:

Table of contents :

  1. Access Admin > System > API Toolkit
  2. Retrieve Privilege Sets Assigned to Groups
  3. Assign Privilege Set to Group
  4. Remove Privilege Set from Group

NOTE: See Privilege and Privilege Set API for information on API calls for Privilege and Privilege Set configuration.

1. Access Admin > System > API Toolkit

2. Retrieve Privilege Sets Assigned to Groups

  • GET request to /api/group_privilege_set returns all Privilege Set to Group mappings.
  • GET request to /api/group_privilege_set/id/<ID> returns a single Privilege Set to Group mapping by its ID.
  1. Item: group_privilege_set
  2. Method: GET
  3. Optionally, apply filtering:
    • group: Return all Privilege Sets assigned to a specified Group.
    • privilege_set: Return all Groups that are assigned a specified Privilege Set.
  4. Enter an API Token.
  5. [Run request]

Example Response

{
  "group_privilege_sets": [
    {
      "id": 1,
      "group": 26,
      "privilege_set": 5
    },
    {
      "id": 2,
      "group": 53,
      "privilege_set": 2
    },
    {
      "id": 3,
      "group": 63,
      "privilege_set": 2
    },
    {
      "id": 4,
      "group": 63,
      "privilege_set": 3
    }
  ]
}

Fields Description

Parameter NameValue TypeDescription
group_privilege_sets
arrayArray containing all Privilege Set to Group mappings.
id
integerID of a single Privilege Set to Group mapping.
group
integerID of the Group.
privilege_set
integerID of the Privilege Set assigned to the Group.

3. Assign Privilege Set to Group

POST request to /api/group_privilege_set assigns a Privilege Set to a Group.

  1. Item: group_privilege_set
  2. Method: POST
  3. ID: Enter the ID of an existing Privilege Set to Group mapping.
  4. Select JSON request and provide the following values:
    • group: The ID of the Group to which you want to assign the Privilege Set.
    • privilege_set: The ID of the Privilege Set you want to assign to the Group.
  5. Enter an API Token.
  6. [Run request]

4. Remove Privilege Set from Group

DELETE request to /api/group_privilege_set/id/<ID> removes a Privilege Set from a Group.

  1. Item: group_privilege_set
  2. Method: DELETE
  3. ID: Enter the ID of an existing Privilege Set to Group mapping that you want to remove.
  4. Enter an API Token.
  5. [Run request]