More API documentation
This commit is contained in:
63
API/v1/portal-management/user-groups/PUT user group.md
Normal file
63
API/v1/portal-management/user-groups/PUT user group.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# PUT user group
|
||||
This PUT request updates user group data.
|
||||
|
||||
#### 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 |
|
||||
| user_group_name | string | yes | The name of the user-group. |
|
||||
| user_group_weight | integer | yes | The group weight of the group. |
|
||||
|
||||
### Example Body (json)
|
||||
```json
|
||||
{
|
||||
"user_group_uuid": "d4cbf41b-6445-11f1-a54b-bc2411125ba4",
|
||||
"user_group_name": "test group",
|
||||
"user_group_weight": 52
|
||||
}
|
||||
```
|
||||
|
||||
### Example Request
|
||||
```php
|
||||
$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: PUT'
|
||||
],
|
||||
]);
|
||||
|
||||
$response = curl_exec($curl);
|
||||
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
|
||||
if ($response === false) {
|
||||
echo curl_error($curl);
|
||||
}
|
||||
|
||||
curl_close($curl);
|
||||
```
|
||||
|
||||
### Example Response
|
||||
```json
|
||||
"User group created updated"
|
||||
```
|
||||
|
||||
#### Known errors or issues.
|
||||
None are known at the time
|
||||
If you do encounter issues and get an http code in return, check the response codes on this page.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user