Update a user group
PATCH
/admin/groups/{id}
const url = 'https://gitea.example.com/api/v1/admin/groups/1';const options = { method: 'PATCH', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"description":"example","name":"example","parent_id":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://gitea.example.com/api/v1/admin/groups/1 \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "description": "example", "name": "example", "parent_id": 1 }'Gitea Enterprise only. This endpoint is not part of the community edition.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer format: int64
Id of the user group
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
EditUserGroupOption contains options for editing a user group.
object
description
string
name
string
parent_id
integer format: int64
Examplegenerated
{ "description": "example", "name": "example", "parent_id": 1}Responses
Section titled “Responses”The updated user group
Media typeapplication/json
UserGroup represents a user group in API responses.
object
description
string
id
integer format: int64
name
string
parent_id
integer format: int64
Examplegenerated
{ "description": "example", "id": 1, "name": "example", "parent_id": 1}APIForbiddenError is a forbidden error response
Headers
Section titled “Headers”message
string
url
string
APINotFound is a not found empty response