Assign a user group to a team
PUT
/teams/{id}/groups/{group_id}
const url = 'https://gitea.example.com/api/v1/teams/1/groups/1';const options = {method: 'PUT', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://gitea.example.com/api/v1/teams/1/groups/1 \ --header 'Authorization: Basic <credentials>'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 team
group_id
required
integer format: int64
Id of the user group to assign
Responses
Section titled “Responses”The assigned 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}APINotFound is a not found empty response