Skip to main content
A API REST agora é versionada. Para obter mais informações, confira "Sobre o controle de versão da API".

REST API endpoints for issue types

Use the REST API to manage issue types for a repository.

List issue types for a repository

Lists issue types available for a repository (inherited from its organization owner, with any per-repository overrides applied). OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint. Fine-grained access tokens require the "Metadata" repository permission (read).

Tokens de acesso granulares para "List issue types for a repository"

Este endpoint funciona com os seguintes tipos de token granulares:

O token refinado deve ter os seguintes conjuntos de permissões:

  • "Metadata" repository permissions (read)

Esse endpoint pode ser usado sem autenticação ou permissões mencionadas acima, se apenas recursos públicos forem solicitados.

Parâmetros para "List issue types for a repository"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
owner string Obrigatório

The account owner of the repository. The name is not case sensitive.

repo string Obrigatório

The name of the repository without the .git extension. The name is not case sensitive.

Códigos de status de resposta HTTP para "List issue types for a repository"

Código de statusDescrição
200

OK

404

Resource not found

Exemplos de código para "List issue types for a repository"

Se você acessar GitHub em GHE.com, substitua api.github.com pelo subdomínio dedicado da sua empresa em api.SUBDOMAIN.ghe.com.

Exemplo de solicitação

get/repos/{owner}/{repo}/issue-types
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/repos/OWNER/REPO/issue-types

Response

Status: 200
[ { "id": 410, "node_id": "IT_kwDNAd3NAZo", "name": "Task", "description": "A specific piece of work", "created_at": "2024-12-11T14:39:09Z", "updated_at": "2024-12-11T14:39:09Z" }, { "id": 411, "node_id": "IT_kwDNAd3NAZs", "name": "Bug", "description": "An unexpected problem or behavior", "created_at": "2024-12-11T14:39:09Z", "updated_at": "2024-12-11T14:39:09Z" } ]