Skip to main content
Frecuentemente publicamos actualizaciones de nuestra documentación. Es posible que la traducción de esta página esté en curso. Para conocer la información más actual, visita la documentación en inglés. Si existe un problema con las traducciones en esta página, por favor infórmanos.

Esta versión de GitHub Enterprise se discontinuó el 2022-06-03. No se realizarán lanzamientos de patch, ni siquiera para problemas de seguridad críticos. Para obtener un mejor desempeño, más seguridad y nuevas características, actualiza a la última versión de GitHub Enterprise. Para obtener ayuda con la actualización, contacta al soporte de GitHub Enterprise.

Project board cards

The Project board cards API lets you create and manage cards on a project board.

Get a project card

Funciona con GitHub Apps

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Ver aviso de previsualización
Parámetros de ruta
Nombre, Tipo, Descripción
card_idintegerRequerido

The unique identifier of the card.

Códigos de estado de respuesta HTTP

Código de estadoDescripción
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

404

Resource not found

Ejemplos de código

get/projects/columns/cards/{card_id}
curl \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/projects/columns/cards/CARD_ID

Response

Status: 200
{ "url": "https://api.github.com/projects/columns/cards/1478", "id": 1478, "node_id": "MDExOlByb2plY3RDYXJkMTQ3OA==", "note": "Add payload for delete Project column", "creator": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false }, "created_at": "2016-09-05T14:21:06Z", "updated_at": "2016-09-05T14:20:22Z", "archived": false, "column_url": "https://api.github.com/projects/columns/367", "content_url": "https://api.github.com/repos/api-playground/projects-test/issues/3", "project_url": "https://api.github.com/projects/120" }

Aviso de previsualización

The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the blog post for full details. To access the API during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.inertia-preview+json

Update an existing project card

Funciona con GitHub Apps

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Ver aviso de previsualización
Parámetros de ruta
Nombre, Tipo, Descripción
card_idintegerRequerido

The unique identifier of the card.

Parámetros de cuerpo
Nombre, Tipo, Descripción
notestring or null

The project card's note

archivedboolean

Whether or not the card is archived

Códigos de estado de respuesta HTTP

Código de estadoDescripción
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

404

Resource not found

422

Validation failed

Ejemplos de código

patch/projects/columns/cards/{card_id}
curl \ -X PATCH \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/projects/columns/cards/CARD_ID \ -d '{"note":"Add payload for delete Project column"}'

Response

Status: 200
{ "url": "https://api.github.com/projects/columns/cards/1478", "id": 1478, "node_id": "MDExOlByb2plY3RDYXJkMTQ3OA==", "note": "Add payload for delete Project column", "creator": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false }, "created_at": "2016-09-05T14:21:06Z", "updated_at": "2016-09-05T14:20:22Z", "archived": false, "column_url": "https://api.github.com/projects/columns/367", "content_url": "https://api.github.com/repos/api-playground/projects-test/issues/3", "project_url": "https://api.github.com/projects/120" }

Aviso de previsualización

The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the blog post for full details. To access the API during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.inertia-preview+json

Delete a project card

Funciona con GitHub Apps

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Ver aviso de previsualización
Parámetros de ruta
Nombre, Tipo, Descripción
card_idintegerRequerido

The unique identifier of the card.

Códigos de estado de respuesta HTTP

Código de estadoDescripción
204

No Content

304

Not modified

401

Requires authentication

403

Forbidden

404

Resource not found

Ejemplos de código

delete/projects/columns/cards/{card_id}
curl \ -X DELETE \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/projects/columns/cards/CARD_ID

Response

Status: 204

Aviso de previsualización

The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the blog post for full details. To access the API during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.inertia-preview+json

Move a project card

Funciona con GitHub Apps

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Ver aviso de previsualización
Parámetros de ruta
Nombre, Tipo, Descripción
card_idintegerRequerido

The unique identifier of the card.

Parámetros de cuerpo
Nombre, Tipo, Descripción
positionstringRequerido

The position of the card in a column. Can be one of: top, bottom, or after:<card_id> to place after the specified card.

column_idinteger

The unique identifier of the column the card should be moved to

Códigos de estado de respuesta HTTP

Código de estadoDescripción
201

Created

304

Not modified

401

Requires authentication

403

Forbidden

422

Validation failed

503

Service Unavailable

Ejemplos de código

post/projects/columns/cards/{card_id}/moves
curl \ -X POST \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/projects/columns/cards/CARD_ID/moves \ -d '{"column_id":42,"position":"bottom"}'

Response

Status: 201

Aviso de previsualización

The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the blog post for full details. To access the API during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.inertia-preview+json

List project cards

Funciona con GitHub Apps

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Ver aviso de previsualización
Parámetros de ruta
Nombre, Tipo, Descripción
column_idintegerRequerido

The unique identifier of the column.

Parámetros de consulta
Nombre, Tipo, Descripción
archived_statestring

Filters the project cards that are returned by the card's state.

Predeterminado: not_archived

Puede ser una de las siguientes: all, archived, not_archived

per_pageinteger

The number of results per page (max 100).

Predeterminado: 30

pageinteger

Page number of the results to fetch.

Predeterminado: 1

Códigos de estado de respuesta HTTP

Código de estadoDescripción
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

Ejemplos de código

get/projects/columns/{column_id}/cards
curl \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/projects/columns/COLUMN_ID/cards

Response

Status: 200
[ { "url": "https://api.github.com/projects/columns/cards/1478", "id": 1478, "node_id": "MDExOlByb2plY3RDYXJkMTQ3OA==", "note": "Add payload for delete Project column", "creator": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false }, "created_at": "2016-09-05T14:21:06Z", "updated_at": "2016-09-05T14:20:22Z", "archived": false, "column_url": "https://api.github.com/projects/columns/367", "content_url": "https://api.github.com/repos/api-playground/projects-test/issues/3", "project_url": "https://api.github.com/projects/120" } ]

Aviso de previsualización

The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the blog post for full details. To access the API during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.inertia-preview+json

Create a project card

Funciona con GitHub Apps

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Ver aviso de previsualización
Parámetros de ruta
Nombre, Tipo, Descripción
column_idintegerRequerido

The unique identifier of the column.

Parámetros de cuerpo
Nombre, Tipo, Descripción
notestring or nullRequerido

The project card's note

content_idintegerRequerido

The unique identifier of the content associated with the card

content_typestringRequerido

The piece of content associated with the card

Códigos de estado de respuesta HTTP

Código de estadoDescripción
201

Created

304

Not modified

401

Requires authentication

403

Forbidden

422

Validation failed

503

Service Unavailable

Ejemplos de código

post/projects/columns/{column_id}/cards
curl \ -X POST \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/projects/columns/COLUMN_ID/cards \ -d '{"note":"Add payload for delete Project column"}'

Response

Status: 201
{ "url": "https://api.github.com/projects/columns/cards/1478", "id": 1478, "node_id": "MDExOlByb2plY3RDYXJkMTQ3OA==", "note": "Add payload for delete Project column", "creator": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false }, "created_at": "2016-09-05T14:21:06Z", "updated_at": "2016-09-05T14:20:22Z", "archived": false, "column_url": "https://api.github.com/projects/columns/367", "content_url": "https://api.github.com/repos/api-playground/projects-test/issues/3", "project_url": "https://api.github.com/projects/120" }

Aviso de previsualización

The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the blog post for full details. To access the API during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.inertia-preview+json