Skip to main content
The REST API is now versioned. For more information, see "About API versioning".

Colunas de Project (classic)

A API de colunas do project (classic) permite que você crie e gerencie colunas em um classic project.

Observações:

  • Esta API se aplica somente a projects (classic). Os Projects podem ser gerenciados com a API do GraphQL. Para mais informações, confira "Como usar a API para gerenciar projetos".
  • Você só pode criar um classic project para uma organização, usuário ou repositório que já tenha pelo menos um classic project.

Get a project column

Funciona com o GitHub Apps

Parâmetros

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
column_idintegerRequired

The unique identifier of the column.

Códigos de status de resposta HTTP

Código de statusDescrição
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

404

Resource not found

Exemplos de código

get/projects/columns/{column_id}
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://api.github.com/projects/columns/COLUMN_ID

Response

Status: 200
{ "url": "https://api.github.com/projects/columns/367", "project_url": "https://api.github.com/projects/120", "cards_url": "https://api.github.com/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

Funciona com o GitHub Apps

Parâmetros

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
column_idintegerRequired

The unique identifier of the column.

Body parameters
Name, Type, Description
namestringRequired

Name of the project column

Códigos de status de resposta HTTP

Código de statusDescrição
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

Exemplos de código

patch/projects/columns/{column_id}
curl \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://api.github.com/projects/columns/COLUMN_ID \ -d '{"name":"To Do"}'

Response

Status: 200
{ "url": "https://api.github.com/projects/columns/367", "project_url": "https://api.github.com/projects/120", "cards_url": "https://api.github.com/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

Funciona com o GitHub Apps

Parâmetros

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
column_idintegerRequired

The unique identifier of the column.

Códigos de status de resposta HTTP

Código de statusDescrição
204

No Content

304

Not modified

401

Requires authentication

403

Forbidden

Exemplos de código

delete/projects/columns/{column_id}
curl \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://api.github.com/projects/columns/COLUMN_ID

Response

Status: 204

Move a project column

Funciona com o GitHub Apps

Parâmetros

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
column_idintegerRequired

The unique identifier of the column.

Body parameters
Name, Type, Description
positionstringRequired

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

Códigos de status de resposta HTTP

Código de statusDescrição
201

Created

304

Not modified

401

Requires authentication

403

Forbidden

422

Validation failed, or the endpoint has been spammed.

Exemplos de código

post/projects/columns/{column_id}/moves
curl \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://api.github.com/projects/columns/COLUMN_ID/moves \ -d '{"position":"last"}'

Response

List project columns

Funciona com o GitHub Apps

Parâmetros

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
project_idintegerRequired

The unique identifier of the project.

Query parameters
Name, Type, Description
per_pageinteger

The number of results per page (max 100).

Default: 30

pageinteger

Page number of the results to fetch.

Default: 1

Códigos de status de resposta HTTP

Código de statusDescrição
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

Exemplos de código

get/projects/{project_id}/columns
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://api.github.com/projects/PROJECT_ID/columns

Response

Status: 200
[ { "url": "https://api.github.com/projects/columns/367", "project_url": "https://api.github.com/projects/120", "cards_url": "https://api.github.com/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

Funciona com o GitHub Apps

Parâmetros

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
project_idintegerRequired

The unique identifier of the project.

Body parameters
Name, Type, Description
namestringRequired

Name of the project column

Códigos de status de resposta HTTP

Código de statusDescrição
201

Created

304

Not modified

401

Requires authentication

403

Forbidden

422

Validation failed, or the endpoint has been spammed.

Exemplos de código

post/projects/{project_id}/columns
curl \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://api.github.com/projects/PROJECT_ID/columns \ -d '{"name":"Remaining tasks"}'

Response

Status: 201
{ "url": "https://api.github.com/projects/columns/367", "project_url": "https://api.github.com/projects/120", "cards_url": "https://api.github.com/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" }