Skip to main content

Colunas do quadro de projeto

A API de colunas do quadro de projetos permite que você crie e gerencie colunas em um quadro de projeto.

Note: This API only applies to project boards. Projects (beta) can be managed with the GraphQL API. For more information, see "Using the API to manage projects (beta)."

Get a project column

Works with GitHub Apps

Parâmetros

Headers
Nome, Tipo, Descrição
acceptstring

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

Path parameters
Nome, Tipo, Descrição
column_idintegerObrigatório

The unique identifier of the column.

HTTP response status codes

Status codeDescrição
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

404

Resource not found

Amostras de código

get/projects/columns/{column_id}
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <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

Works with GitHub Apps

Parâmetros

Headers
Nome, Tipo, Descrição
acceptstring

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

Path parameters
Nome, Tipo, Descrição
column_idintegerObrigatório

The unique identifier of the column.

Body parameters
Nome, Tipo, Descrição
namestringObrigatório

Name of the project column

HTTP response status codes

Status codeDescrição
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

Amostras de código

patch/projects/columns/{column_id}
curl \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <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

Works with GitHub Apps

Parâmetros

Headers
Nome, Tipo, Descrição
acceptstring

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

Path parameters
Nome, Tipo, Descrição
column_idintegerObrigatório

The unique identifier of the column.

HTTP response status codes

Status codeDescrição
204

No Content

304

Not modified

401

Requires authentication

403

Forbidden

Amostras de código

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

Response

Status: 204

Move a project column

Works with GitHub Apps

Parâmetros

Headers
Nome, Tipo, Descrição
acceptstring

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

Path parameters
Nome, Tipo, Descrição
column_idintegerObrigatório

The unique identifier of the column.

Body parameters
Nome, Tipo, Descrição
positionstringObrigató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 response status codes

Status codeDescrição
201

Created

304

Not modified

401

Requires authentication

403

Forbidden

422

Validation failed

Amostras de código

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

Response

Status: 201

List project columns

Works with GitHub Apps

Parâmetros

Headers
Nome, Tipo, Descrição
acceptstring

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

Path parameters
Nome, Tipo, Descrição
project_idintegerObrigatório

The unique identifier of the project.

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

The number of results per page (max 100).

Padrão: 30

pageinteger

Page number of the results to fetch.

Padrão: 1

HTTP response status codes

Status codeDescrição
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

Amostras de código

get/projects/{project_id}/columns
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <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

Works with GitHub Apps

Parâmetros

Headers
Nome, Tipo, Descrição
acceptstring

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

Path parameters
Nome, Tipo, Descrição
project_idintegerObrigatório

The unique identifier of the project.

Body parameters
Nome, Tipo, Descrição
namestringObrigatório

Name of the project column

HTTP response status codes

Status codeDescrição
201

Created

304

Not modified

401

Requires authentication

403

Forbidden

422

Validation failed

Amostras de código

post/projects/{project_id}/columns
curl \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <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" }