Skip to main content

Esta versão do GitHub Enterprise Server será descontinuada em 2026-06-02. Nenhum lançamento de patch será feito, mesmo para questões críticas de segurança. Para obter melhor desempenho, segurança aprimorada e novos recursos, atualize para a última versão do GitHub Enterprise Server. Para obter ajuda com a atualização, entre em contato com o suporte do GitHub Enterprise.

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

Pontos de extremidade da API REST para colunas do Project (classic)

Use a API REST para criar e gerenciar colunas em um projeto (clássico).

Get a project column

Warning

Closing down notice: Projects (classic) is being deprecated in favor of the new Projects experience. See the changelog for more information.

Parâmetros para "Get a project column"

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

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

Parâmetros de caminho
Nome, Tipo, Descrição
column_id integer Obrigatório

The unique identifier of the column.

http_status_code

status_codeDescrição
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

404

Resource not found

code_samples

request_example

get/projects/columns/{column_id}
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/projects/columns/COLUMN_ID

Response

Status: 200
{ "url": "https://HOSTNAME/projects/columns/367", "project_url": "https://HOSTNAME/projects/120", "cards_url": "https://HOSTNAME/projects/columns/367/cards", "id": 367, "node_id": "MDEzOlByb2plY3RDb2x1bW4zNjc=", "name": "To Do", "created_at": "2016-09-05T14:18:44Z", "updated_at": "2016-09-05T14:22:28Z" }

Update an existing project column

Warning

Closing down notice: Projects (classic) is being deprecated in favor of the new Projects experience. See the changelog for more information.

Parâmetros para "Update an existing project column"

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

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

Parâmetros de caminho
Nome, Tipo, Descrição
column_id integer Obrigatório

The unique identifier of the column.

Parâmetros do corpo
Nome, Tipo, Descrição
name string Obrigatório

Name of the project column

http_status_code

status_codeDescrição
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

code_samples

request_example

patch/projects/columns/{column_id}
curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/projects/columns/COLUMN_ID \ -d '{"name":"To Do"}'

Response

Status: 200
{ "url": "https://HOSTNAME/projects/columns/367", "project_url": "https://HOSTNAME/projects/120", "cards_url": "https://HOSTNAME/projects/columns/367/cards", "id": 367, "node_id": "MDEzOlByb2plY3RDb2x1bW4zNjc=", "name": "To Do", "created_at": "2016-09-05T14:18:44Z", "updated_at": "2016-09-05T14:22:28Z" }

Delete a project column

Warning

Closing down notice: Projects (classic) is being deprecated in favor of the new Projects experience. See the changelog for more information.

Parâmetros para "Delete a project column"

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

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

Parâmetros de caminho
Nome, Tipo, Descrição
column_id integer Obrigatório

The unique identifier of the column.

http_status_code

status_codeDescrição
204

No Content

304

Not modified

401

Requires authentication

403

Forbidden

code_samples

request_example

delete/projects/columns/{column_id}
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/projects/columns/COLUMN_ID

Response

Status: 204

Move a project column

Warning

Closing down notice: Projects (classic) is being deprecated in favor of the new Projects experience. See the changelog for more information.

Parâmetros para "Move a project column"

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

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

Parâmetros de caminho
Nome, Tipo, Descrição
column_id integer Obrigatório

The unique identifier of the column.

Parâmetros do corpo
Nome, Tipo, Descrição
position string Obrigatório

The position of the column in a project. Can be one of: first, last, or after:<column_id> to place after the specified column.

http_status_code

status_codeDescrição
201

Created

304

Not modified

401

Requires authentication

403

Forbidden

422

Validation failed, or the endpoint has been spammed.

code_samples

request_example

post/projects/columns/{column_id}/moves
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/projects/columns/COLUMN_ID/moves \ -d '{"position":"last"}'

Response

Status: 201

List project columns

Warning

Closing down notice: Projects (classic) is being deprecated in favor of the new Projects experience. See the changelog for more information.

Parâmetros para "List project columns"

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

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

Parâmetros de caminho
Nome, Tipo, Descrição
project_id integer Obrigatório

The unique identifier of the project.

Parâmetros de consulta
Nome, Tipo, Descrição
per_page integer

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

Padrão: 30

page integer

The page number of the results to fetch. For more information, see "Using pagination in the REST API."

Padrão: 1

http_status_code

status_codeDescrição
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

code_samples

request_example

get/projects/{project_id}/columns
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/projects/PROJECT_ID/columns

Response

Status: 200
[ { "url": "https://HOSTNAME/projects/columns/367", "project_url": "https://HOSTNAME/projects/120", "cards_url": "https://HOSTNAME/projects/columns/367/cards", "id": 367, "node_id": "MDEzOlByb2plY3RDb2x1bW4zNjc=", "name": "To Do", "created_at": "2016-09-05T14:18:44Z", "updated_at": "2016-09-05T14:22:28Z" } ]

Create a project column

Warning

Closing down notice: Projects (classic) is being deprecated in favor of the new Projects experience. See the changelog for more information.

Parâmetros para "Create a project column"

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

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

Parâmetros de caminho
Nome, Tipo, Descrição
project_id integer Obrigatório

The unique identifier of the project.

Parâmetros do corpo
Nome, Tipo, Descrição
name string Obrigatório

Name of the project column

http_status_code

status_codeDescrição
201

Created

304

Not modified

401

Requires authentication

403

Forbidden

422

Validation failed, or the endpoint has been spammed.

code_samples

request_example

post/projects/{project_id}/columns
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/projects/PROJECT_ID/columns \ -d '{"name":"Remaining tasks"}'

Response

Status: 201
{ "url": "https://HOSTNAME/projects/columns/367", "project_url": "https://HOSTNAME/projects/120", "cards_url": "https://HOSTNAME/projects/columns/367/cards", "id": 367, "node_id": "MDEzOlByb2plY3RDb2x1bW4zNjc=", "name": "To Do", "created_at": "2016-09-05T14:18:44Z", "updated_at": "2016-09-05T14:22:28Z" }