1.4 KiB
1.4 KiB
DELETE user group
This API call deletes a user-group.
Location
/api/v1/portal-management/user-groups/
Permissions required
admin-access-control-user-groups RW.
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_group_uuid | uuid | yes | Unique id of the user-group. |
Example Body (json)
{
"user_group_uuid": "d4cbf41b-6445-11f1-a54b-bc2411125ba4"
}
Example Request
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/user-groups/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $json_payload,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
'X-HTTP-Method-Override: DELETE'
],
]);
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($response === false) {
echo curl_error($curl);
}
curl_close($curl);
Example Response
"Permission deleted successfully."
Known errors or issues.
{
"error":"Cannot delete record: dependent data exists."
}
This means there is still a user linked to the user-group, first make there are no users linked to this group before deleting.