Skip to main content
L’API REST est maintenant versionnée. Pour plus d’informations, consultez « À propos des versions de l’API ».

Points de terminaison de l’API REST relatifs aux colonnes Project (classic)

Utilisez l’API REST pour créer et gérer des colonnes sur un projet (classique).

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.

Paramètres pour « Get a project column »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
column_id integer Requis

The unique identifier of the column.

Codes d’état de la réponse HTTP pour « Get a project column »

Code de statutDescription
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

404

Resource not found

Exemples de code pour « Get a project column »

Exemple de requête

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.

Paramètres pour « Update an existing project column »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
column_id integer Requis

The unique identifier of the column.

Paramètres du corps
Nom, Type, Description
name string Requis

Name of the project column

Codes d’état de la réponse HTTP pour « Update an existing project column »

Code de statutDescription
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

Exemples de code pour « Update an existing project column »

Exemple de requête

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.

Paramètres pour « Delete a project column »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
column_id integer Requis

The unique identifier of the column.

Codes d’état de la réponse HTTP pour « Delete a project column »

Code de statutDescription
204

No Content

304

Not modified

401

Requires authentication

403

Forbidden

Exemples de code pour « Delete a project column »

Exemple de requête

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.

Paramètres pour « Move a project column »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
column_id integer Requis

The unique identifier of the column.

Paramètres du corps
Nom, Type, Description
position string Requis

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

Codes d’état de la réponse HTTP pour « Move a project column »

Code de statutDescription
201

Created

304

Not modified

401

Requires authentication

403

Forbidden

422

Validation failed, or the endpoint has been spammed.

Exemples de code pour « Move a project column »

Exemple de requête

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.

Paramètres pour « List project columns »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
project_id integer Requis

The unique identifier of the project.

Paramètres de requête
Nom, Type, Description
per_page integer

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

Par défaut: 30

page integer

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

Par défaut: 1

Codes d’état de la réponse HTTP pour « List project columns »

Code de statutDescription
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

Exemples de code pour « List project columns »

Exemple de requête

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.

Paramètres pour « Create a project column »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
project_id integer Requis

The unique identifier of the project.

Paramètres du corps
Nom, Type, Description
name string Requis

Name of the project column

Codes d’état de la réponse HTTP pour « Create a project column »

Code de statutDescription
201

Created

304

Not modified

401

Requires authentication

403

Forbidden

422

Validation failed, or the endpoint has been spammed.

Exemples de code pour « Create a project column »

Exemple de requête

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" }