Edit a team
const url = 'https://gitea.example.com/api/v1/teams/1';const options = { method: 'PATCH', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"can_create_org_repo":true,"description":"example","includes_all_repositories":true,"name":"example","permission":"read","units":["repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.pulls","repo.releases","repo.projects","repo.ext_wiki"],"units_map":{"repo.code":"read","repo.ext_issues":"none","repo.ext_wiki":"none","repo.issues":"write","repo.projects":"none","repo.pulls":"owner","repo.releases":"none","repo.wiki":"admin"}}'};
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/teams/1 \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "can_create_org_repo": true, "description": "example", "includes_all_repositories": true, "name": "example", "permission": "read", "units": [ "repo.code", "repo.issues", "repo.ext_issues", "repo.wiki", "repo.pulls", "repo.releases", "repo.projects", "repo.ext_wiki" ], "units_map": { "repo.code": "read", "repo.ext_issues": "none", "repo.ext_wiki": "none", "repo.issues": "write", "repo.projects": "none", "repo.pulls": "owner", "repo.releases": "none", "repo.wiki": "admin" } }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Id of the team to edit
Request Body
Section titled “Request Body”EditTeamOption options for editing a team
object
Whether the team can create repositories in the organization
The description of the team
Whether the team has access to all repositories in the organization
Example
[ "repo.code", "repo.issues", "repo.ext_issues", "repo.wiki", "repo.pulls", "repo.releases", "repo.projects", "repo.ext_wiki"]object
Example
{ "repo.code": "read", "repo.ext_issues": "none", "repo.ext_wiki": "none", "repo.issues": "write", "repo.projects": "none", "repo.pulls": "owner", "repo.releases": "none", "repo.wiki": "admin"}Responses
Section titled “Responses”Team
Team represents a team in an organization
object
Whether the team can create repositories in the organization
The description of the team
The unique identifier of the team
Whether the team has access to all repositories in the organization
The name of the team
Organization represents an organization
object
The URL of the organization’s avatar
The description of the organization
The email address of the organization
The full display name of the organization
The unique identifier of the organization
The location of the organization
The name of the organization
Whether repository administrators can change team access
Username of the organization deprecated
The visibility level of the organization (public, limited, private)
The website URL of the organization
object
Example
{ "permission": "none", "units": [ "repo.code", "repo.issues", "repo.ext_issues", "repo.wiki", "repo.pulls", "repo.releases", "repo.projects", "repo.ext_wiki" ], "units_map": { "repo.code": "read", "repo.ext_issues": "none", "repo.ext_wiki": "none", "repo.issues": "write", "repo.projects": "none", "repo.pulls": "owner", "repo.releases": "none", "repo.wiki": "admin" }}APINotFound is a not found empty response