Patch Group
This endpoint patches a specific group.
info
This operation requires the group manager role.
note
You can use this endpoint to edit a single field passing only the id and the needed field (without mandatory fields).
For example to change visible
or image_original
etc fields.
HTTP Request
PATCH /api/v2/group/{id}/
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | A unique integer value identifying this group |
body | body | Group | false | The request body(group params) |
Example Body Parameters
- JSON
{
"image_original": "string"
}
Example Request
- JavaScript
- Bash
const inputBody = '{
"image_original": "string"
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};
fetch('/api/v2/group/{id}/',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
# You can also use wget
curl -X PATCH /api/v2/group/{id}/ \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
-H 'Authorization: Bearer {access_token}'
--DATA '{body}'
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Response status code | Group |
Example responses
- 200
{
"id": "integer",
"name": "string",
"description": "string",
"slug": "string",
"color": "string",
"privacy": {},
"visible": "boolean",
"active": "boolean",
"subscription_status": {},
"subscribed": "boolean",
"image_bigger": "string",
"image_big": "string",
"image_medium": "string",
"image_small": "string",
"emotional_image": "string",
"emotional_image_position": "integer",
"subscribers_counter": "integer"
"created_at": "string",
"created_by": {},
"managed_by": {}
}