Assign and Unassign Group Roles¶
A role can be assigned to a specific group to perform certian functions such as administrator and modifier. Similarly, a role can be unassigned from a group if it does not require the role function.
Assign a Role to a Group¶
-
PUT
/api/v1.2/groups/<qbol_group_id>/roles/<role-id/name>/assign
¶
This API is used to assign a specific role to a group.
Required Role¶
The following users can make this API call:
- Users who belong to the system-admin or system-user group.
- Users who belong to a group associated with a role that allows assigning roles to a group. See Managing Groups and Managing Roles for more information.
Parameters¶
Note
Parameters marked in bold are mandatory. Others are optional and have default values.
Parameter | Description |
---|---|
<qubole_group_id> | Qubole group ID to which a role is to be assigned |
<role-id/name> | ID or name of the role that is to be assigned to a group |
Request API Syntax¶
Here is the syntax of the Request API.
curl -X PUT -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{}' \ "https://gcp.qubole.com/api/v1.2/groups/<qubole-group-id>/roles/<role-id/name>/assign"
Sample Request¶
curl -X PUT -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{}' \ "https://gcp.qubole.com/api/v1.2/groups/105/roles/19/assign"
Sample Response¶
Success
{"status":"done"}
Unassign a Role from a Group¶
When an assinged role is not required by a group, remove it. To remove an assigned role from a group, use this API:
-
PUT
/api/v1.2/groups/<qubole_group_id>/roles/<role-id/name>/unassign
¶
Required Role¶
The following users can make this API call:
- Users who belong to the system-admin or system-user group.
- Users who belong to a group associated with a role that allows unassigning roles from a group. See Managing Groups and Managing Roles for more information.
Parameters¶
Note
Parameters marked in bold are mandatory. Others are optional and have default values.
Parameter | Description |
---|---|
<qubole_group_id> | Qubole group ID from which a specific role must be removed |
<role-id/name> | ID/name of the role that must be unassigned from a group |
Request API Syntax¶
Here is the syntax of the Request API.
curl -X PUT -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{}' \ "https://gcp.qubole.com/api/v1.2/groups/<qubole-group-id>/roles/<role-id/name>/unassign"
Sample Request¶
Here is a sample request.
curl -X PUT -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{}' \ "https://gcp.qubole.com/api/v1.2/groups/105/roles/19/unassign"
Sample Response¶
Success
{"status":"done"}