Edit a team
const url = 'https://gitea.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"},"visibility":"public"}'};
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.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" }, "visibility": "public" }'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"}Team visibility within the organization. When omitted, visibility is left unchanged. public TeamVisibilityPublic limited TeamVisibilityLimited private TeamVisibilityPrivate
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) public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate
The website URL of the organization
object
Team visibility within the organization. “private” teams are only listable by members and org owners; “limited” teams are listable by any organization member; “public” teams are listable by any signed-in user. public TeamVisibilityPublic limited TeamVisibilityLimited private TeamVisibilityPrivate
Example
{ "organization": { "visibility": "public" }, "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" }, "visibility": "public"}APINotFound is a not found empty response