Skip to main content
Ahora la API de REST tiene control de versiones. Para obtener más información, consulta "Acerca del control de versiones de la API".

Puntos de conexión de la API de REST para tarjetas Project (classic)

Usa la API de REST para crear y administrar tarjetas en un Proyecto (clásico).

La API de REST para administrar projects (classic) admite únicamente la autenticación mediante un personal access token (classic). Para obtener más información, vea «Administración de tokens de acceso personal».

Get a project card

Gets information about a project card.

Tokens de acceso específicos para "Get a project card"

Este punto de conexión funciona con los siguientes tipos de token pormenorizados:

El token pormenorizado debe tener al menos uno de los siguientes conjuntos de permisos:

  • "Projects" repository permissions (read)
  • "Projects" organization permissions (read)

Este punto de conexión se puede usar sin autenticación o los permisos mencionados anteriormente si solo se solicitan recursos públicos.

Parámetros para "Get a project card"

Encabezados
Nombre, Tipo, Descripción
accept string

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

Parámetros de la ruta de acceso
Nombre, Tipo, Descripción
card_id integer Requerido

The unique identifier of the card.

Códigos de estado de respuesta HTTP para "Get a project card"

status codeDescripción
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

404

Resource not found

Ejemplos de código para "Get a project card"

Ejemplo de solicitud

get/projects/columns/cards/{card_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/cards/CARD_ID

Response

Status: 200
{ "url": "https://HOSTNAME/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://HOSTNAME/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://HOSTNAME/users/octocat/followers", "following_url": "https://HOSTNAME/users/octocat/following{/other_user}", "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}", "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions", "organizations_url": "https://HOSTNAME/users/octocat/orgs", "repos_url": "https://HOSTNAME/users/octocat/repos", "events_url": "https://HOSTNAME/users/octocat/events{/privacy}", "received_events_url": "https://HOSTNAME/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://HOSTNAME/projects/columns/367", "content_url": "https://HOSTNAME/repos/api-playground/projects-test/issues/3", "project_url": "https://HOSTNAME/projects/120" }

Update an existing project card

Tokens de acceso específicos para "Update an existing project card"

Este punto de conexión funciona con los siguientes tipos de token pormenorizados:

El token pormenorizado debe tener al menos uno de los siguientes conjuntos de permisos:

  • "Projects" repository permissions (write)
  • "Projects" organization permissions (write)

Parámetros para "Update an existing project card"

Encabezados
Nombre, Tipo, Descripción
accept string

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

Parámetros de la ruta de acceso
Nombre, Tipo, Descripción
card_id integer Requerido

The unique identifier of the card.

Parámetros del cuerpo
Nombre, Tipo, Descripción
note string or null

The project card's note

archived boolean

Whether or not the card is archived

Códigos de estado de respuesta HTTP para "Update an existing project card"

status codeDescripción
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

404

Resource not found

422

Validation failed, or the endpoint has been spammed.

Ejemplos de código para "Update an existing project card"

Ejemplo de solicitud

patch/projects/columns/cards/{card_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/cards/CARD_ID \ -d '{"note":"Add payload for delete Project column"}'

Response

Status: 200
{ "url": "https://HOSTNAME/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://HOSTNAME/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://HOSTNAME/users/octocat/followers", "following_url": "https://HOSTNAME/users/octocat/following{/other_user}", "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}", "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions", "organizations_url": "https://HOSTNAME/users/octocat/orgs", "repos_url": "https://HOSTNAME/users/octocat/repos", "events_url": "https://HOSTNAME/users/octocat/events{/privacy}", "received_events_url": "https://HOSTNAME/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://HOSTNAME/projects/columns/367", "content_url": "https://HOSTNAME/repos/api-playground/projects-test/issues/3", "project_url": "https://HOSTNAME/projects/120" }

Delete a project card

Deletes a project card

Tokens de acceso específicos para "Delete a project card"

Este punto de conexión funciona con los siguientes tipos de token pormenorizados:

El token pormenorizado debe tener al menos uno de los siguientes conjuntos de permisos:

  • "Projects" repository permissions (write)
  • "Projects" organization permissions (write)

Parámetros para "Delete a project card"

Encabezados
Nombre, Tipo, Descripción
accept string

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

Parámetros de la ruta de acceso
Nombre, Tipo, Descripción
card_id integer Requerido

The unique identifier of the card.

Códigos de estado de respuesta HTTP para "Delete a project card"

status codeDescripción
204

No Content

304

Not modified

401

Requires authentication

403

Forbidden

404

Resource not found

Ejemplos de código para "Delete a project card"

Ejemplo de solicitud

delete/projects/columns/cards/{card_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/cards/CARD_ID

Response

Status: 204

Move a project card

Tokens de acceso específicos para "Move a project card"

Este punto de conexión funciona con los siguientes tipos de token pormenorizados:

El token pormenorizado debe tener al menos uno de los siguientes conjuntos de permisos:

  • "Projects" repository permissions (write)
  • "Projects" organization permissions (write)

Parámetros para "Move a project card"

Encabezados
Nombre, Tipo, Descripción
accept string

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

Parámetros de la ruta de acceso
Nombre, Tipo, Descripción
card_id integer Requerido

The unique identifier of the card.

Parámetros del cuerpo
Nombre, Tipo, Descripción
position string Requerido

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_id integer

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

Códigos de estado de respuesta HTTP para "Move a project card"

status codeDescripción
201

Created

304

Not modified

401

Requires authentication

403

Forbidden

422

Validation failed, or the endpoint has been spammed.

503

Service Unavailable

Ejemplos de código para "Move a project card"

Ejemplo de solicitud

post/projects/columns/cards/{card_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/cards/CARD_ID/moves \ -d '{"column_id":42,"position":"bottom"}'

Response

List project cards

Lists the project cards in a project.

Tokens de acceso específicos para "List project cards"

Este punto de conexión funciona con los siguientes tipos de token pormenorizados:

El token pormenorizado debe tener al menos uno de los siguientes conjuntos de permisos:

  • "Projects" repository permissions (read)
  • "Projects" organization permissions (read)

Este punto de conexión se puede usar sin autenticación o los permisos mencionados anteriormente si solo se solicitan recursos públicos.

Parámetros para "List project cards"

Encabezados
Nombre, Tipo, Descripción
accept string

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

Parámetros de la ruta de acceso
Nombre, Tipo, Descripción
column_id integer Requerido

The unique identifier of the column.

Parámetros de consulta
Nombre, Tipo, Descripción
archived_state string

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

Valor predeterminado: not_archived

Puede ser uno de los siguientes: all, archived, not_archived

per_page integer

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

Valor predeterminado: 30

page integer

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

Valor predeterminado: 1

Códigos de estado de respuesta HTTP para "List project cards"

status codeDescripción
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

Ejemplos de código para "List project cards"

Ejemplo de solicitud

get/projects/columns/{column_id}/cards
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/cards

Response

Status: 200
[ { "url": "https://HOSTNAME/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://HOSTNAME/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://HOSTNAME/users/octocat/followers", "following_url": "https://HOSTNAME/users/octocat/following{/other_user}", "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}", "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions", "organizations_url": "https://HOSTNAME/users/octocat/orgs", "repos_url": "https://HOSTNAME/users/octocat/repos", "events_url": "https://HOSTNAME/users/octocat/events{/privacy}", "received_events_url": "https://HOSTNAME/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://HOSTNAME/projects/columns/367", "content_url": "https://HOSTNAME/repos/api-playground/projects-test/issues/3", "project_url": "https://HOSTNAME/projects/120" } ]

Create a project card

Tokens de acceso específicos para "Create a project card"

Este punto de conexión funciona con los siguientes tipos de token pormenorizados:

El token pormenorizado debe tener al menos uno de los siguientes conjuntos de permisos:

  • "Projects" repository permissions (write)
  • "Projects" organization permissions (write)

Parámetros para "Create a project card"

Encabezados
Nombre, Tipo, Descripción
accept string

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

Parámetros de la ruta de acceso
Nombre, Tipo, Descripción
column_id integer Requerido

The unique identifier of the column.

Parámetros del cuerpo
Nombre, Tipo, Descripción
note string or null Requerido

The project card's note

content_id integer Requerido

The unique identifier of the content associated with the card

content_type string Requerido

The piece of content associated with the card

Códigos de estado de respuesta HTTP para "Create a project card"

status codeDescripción
201

Created

304

Not modified

401

Requires authentication

403

Forbidden

422

Validation failed

503

Service Unavailable

Ejemplos de código para "Create a project card"

Ejemplo de solicitud

post/projects/columns/{column_id}/cards
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/cards \ -d '{"note":"Add payload for delete Project column"}'

Response

Status: 201
{ "url": "https://HOSTNAME/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://HOSTNAME/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://HOSTNAME/users/octocat/followers", "following_url": "https://HOSTNAME/users/octocat/following{/other_user}", "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}", "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions", "organizations_url": "https://HOSTNAME/users/octocat/orgs", "repos_url": "https://HOSTNAME/users/octocat/repos", "events_url": "https://HOSTNAME/users/octocat/events{/privacy}", "received_events_url": "https://HOSTNAME/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://HOSTNAME/projects/columns/367", "content_url": "https://HOSTNAME/repos/api-playground/projects-test/issues/3", "project_url": "https://HOSTNAME/projects/120" }