Skip to content
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
Support

Update a user group

PATCH
/admin/groups/{id}
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.

id
required
integer format: int64

Id of the user group

Media typeapplication/json
EditUserGroupOption contains options for editing a user group.
object
description
string
name
string
parent_id

ParentID is the only parent the group gets, 0 for a top-level group. Sending the parent_id the group returns keeps all of its parents. A group with several parents refuses any other value with 422.

integer format: int64
Examplegenerated
{
"description": "example",
"name": "example",
"parent_id": 1
}

UserGroup

Media typeapplication/json
UserGroup represents a user group in API responses.
object
description
string
id
integer format: int64
name
string
parent_id

ParentID is the lowest of ParentIDs, 0 for a top-level group

integer format: int64
parent_ids

ParentIDs lists every parent of the group in ascending order

Array<integer>
Examplegenerated
{
"description": "example",
"id": 1,
"name": "example",
"parent_id": 1,
"parent_ids": [
1
]
}

APIForbiddenError is a forbidden error response

message
string
url
string

APINotFound is a not found empty response

APIValidationError is error format response related to input validation

message
string
url
string