repository

Check if a team is assigned to a repository

Changed on
get/repos/{owner}/{repo}/teams/{team}

Request

  • Base URL
    https://demo.gitea.com/api/v1
  • Auth
    • HTTP basic
    • or API key in query parameter token
    • or API key in query parameter access_token
    • or API key in header Authorization
    • or API key in query parameter sudo
    • or API key in header Sudo
    • or API key in header X-GITEA-OTP
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Path parameters

ownerstring required

owner of the repo

repostring required

name of the repo

teamstring required

team name

Response

Team

can_create_org_repoboolean

Whether the team can create repositories in the organization

descriptionstring

The description of the team

idinteger

The unique identifier of the team

includes_all_repositoriesboolean

Whether the team has access to all repositories in the organization

namestring

The name of the team

permission'none' | 'read' | 'write' | 'admin' | 'owner'
unitsstring[]

Deprecated: This variable should be replaced by UnitsMap and will be dropped in later versions.

units_mapobject
visibility'public' | 'limited' | 'private'

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.

Example response

{
  "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"
  }
}

Changes

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status