Skip to main content
O controle de versão da API REST já foi feito. Para obter mais informações, confira "Sobre o controle de versão da API".

Custom properties

Use the REST API to list the custom properties assigned to a repository by the organization.

About custom properties

You can use the REST API to view the custom properties that were assigned to a repository by the organization that owns the repository. For more information, see "Como gerenciar propriedades personalizadas para repositórios na sua organização." For more information about the REST API endpoints to manage custom properties, see "Custom properties."

Note: The API endpoints for custom properties are in public beta and subject to change.

Get all custom property values for a repository

Funciona com GitHub Apps

Gets all custom property values that are set for a repository. Users with read access to the repository can use this endpoint.

Parâmetros para "Get all custom property values for a repository"

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

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

Parâmetros de caminho
Nome, Type, 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 "Get all custom property values for a repository"

Código de statusDescrição
200

OK

403

Forbidden

404

Resource not found

Exemplos de código para "Get all custom property values for a repository"

get/repos/{owner}/{repo}/properties/values
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/OWNER/REPO/properties/values

Response

Status: 200
[ { "property_name": "environment", "value": "production" }, { "property_name": "service", "value": "web" }, { "property_name": "team", "value": "octocat" } ]