REST API endpoints for Project (classic) cards
Use the REST API to create and manage cards on a projet (classique).
Get a project card
Warning
Closing down notice: Projects (classic) is being deprecated in favor of the new Projects experience. See the changelog for more information.
Jetons dâaccĂšs affinĂ©s pour « Get a project card »
Ce point de terminaison fonctionne avec les types de jetons précis suivants:
- Jetons dâaccĂšs utilisateur dâapplication GitHub
- Jetons dâaccĂšs dâinstallation dâapplication GitHub
- Jetons dâaccĂšs personnel affinĂ©
Le jeton prĂ©cis doit avoir au moins lâun des ensembles dâautorisations suivants:
- "Projects" repository permissions (read)
- "Projects" organization permissions (read)
Ce point de terminaison peut ĂȘtre utilisĂ© sans authentification ou sans les autorisations mentionnĂ©es ci-dessus si seules les ressources publiques sont demandĂ©es.
ParamÚtres pour « Get a project card »
Nom, Type, Description |
---|
accept string Setting to |
Nom, Type, Description |
---|
card_id integer ObligatoireThe unique identifier of the card. |
Codes dâĂ©tat de la rĂ©ponse HTTP pour « Get a project card »
Code dâĂ©tat | Description |
---|---|
200 | OK |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
Exemples de code pour « Get a project card »
Exemple de requĂȘte
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
Warning
Closing down notice: Projects (classic) is being deprecated in favor of the new Projects experience. See the changelog for more information.
Jetons dâaccĂšs affinĂ©s pour « Update an existing project card »
Ce point de terminaison fonctionne avec les types de jetons précis suivants:
- Jetons dâaccĂšs utilisateur dâapplication GitHub
- Jetons dâaccĂšs dâinstallation dâapplication GitHub
- Jetons dâaccĂšs personnel affinĂ©
Le jeton prĂ©cis doit avoir au moins lâun des ensembles dâautorisations suivants:
- "Projects" repository permissions (write)
- "Projects" organization permissions (write)
ParamÚtres pour « Update an existing project card »
Nom, Type, Description |
---|
accept string Setting to |
Nom, Type, Description |
---|
card_id integer ObligatoireThe unique identifier of the card. |
Nom, Type, Description |
---|
note string or null The project card's note |
archived boolean Whether or not the card is archived |
Codes dâĂ©tat de la rĂ©ponse HTTP pour « Update an existing project card »
Code dâĂ©tat | Description |
---|---|
200 | OK |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Exemples de code pour « Update an existing project card »
Exemple de requĂȘte
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
Warning
Closing down notice: Projects (classic) is being deprecated in favor of the new Projects experience. See the changelog for more information.
Jetons dâaccĂšs affinĂ©s pour « Delete a project card »
Ce point de terminaison fonctionne avec les types de jetons précis suivants:
- Jetons dâaccĂšs utilisateur dâapplication GitHub
- Jetons dâaccĂšs dâinstallation dâapplication GitHub
- Jetons dâaccĂšs personnel affinĂ©
Le jeton prĂ©cis doit avoir au moins lâun des ensembles dâautorisations suivants:
- "Projects" repository permissions (write)
- "Projects" organization permissions (write)
ParamÚtres pour « Delete a project card »
Nom, Type, Description |
---|
accept string Setting to |
Nom, Type, Description |
---|
card_id integer ObligatoireThe unique identifier of the card. |
Codes dâĂ©tat de la rĂ©ponse HTTP pour « Delete a project card »
Code dâĂ©tat | Description |
---|---|
204 | No Content |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
Exemples de code pour « Delete a project card »
Exemple de requĂȘte
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
Warning
Closing down notice: Projects (classic) is being deprecated in favor of the new Projects experience. See the changelog for more information.
Jetons dâaccĂšs affinĂ©s pour « Move a project card »
Ce point de terminaison fonctionne avec les types de jetons précis suivants:
- Jetons dâaccĂšs utilisateur dâapplication GitHub
- Jetons dâaccĂšs dâinstallation dâapplication GitHub
- Jetons dâaccĂšs personnel affinĂ©
Le jeton prĂ©cis doit avoir au moins lâun des ensembles dâautorisations suivants:
- "Projects" repository permissions (write)
- "Projects" organization permissions (write)
ParamÚtres pour « Move a project card »
Nom, Type, Description |
---|
accept string Setting to |
Nom, Type, Description |
---|
card_id integer ObligatoireThe unique identifier of the card. |
Nom, Type, Description |
---|
position string ObligatoireThe position of the card in a column. Can be one of: |
column_id integer The unique identifier of the column the card should be moved to |
Codes dâĂ©tat de la rĂ©ponse HTTP pour « Move a project card »
Code dâĂ©tat | Description |
---|---|
201 | Created |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
422 | Validation failed, or the endpoint has been spammed. |
503 | Service Unavailable |
Exemples de code pour « Move a project card »
Exemple de requĂȘte
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
Status: 201
List project cards
Warning
Closing down notice: Projects (classic) is being deprecated in favor of the new Projects experience. See the changelog for more information.
Jetons dâaccĂšs affinĂ©s pour « List project cards »
Ce point de terminaison fonctionne avec les types de jetons précis suivants:
- Jetons dâaccĂšs utilisateur dâapplication GitHub
- Jetons dâaccĂšs dâinstallation dâapplication GitHub
- Jetons dâaccĂšs personnel affinĂ©
Le jeton prĂ©cis doit avoir au moins lâun des ensembles dâautorisations suivants:
- "Projects" repository permissions (read)
- "Projects" organization permissions (read)
Ce point de terminaison peut ĂȘtre utilisĂ© sans authentification ou sans les autorisations mentionnĂ©es ci-dessus si seules les ressources publiques sont demandĂ©es.
ParamÚtres pour « List project cards »
Nom, Type, Description |
---|
accept string Setting to |
Nom, Type, Description |
---|
column_id integer ObligatoireThe unique identifier of the column. |
Nom, Type, Description |
---|
archived_state string Filters the project cards that are returned by the card's state. Default: Peut ĂȘtre: |
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Default: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Default: |
Codes dâĂ©tat de la rĂ©ponse HTTP pour « List project cards »
Code dâĂ©tat | Description |
---|---|
200 | OK |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
Exemples de code pour « List project cards »
Exemple de requĂȘte
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
Warning
Closing down notice: Projects (classic) is being deprecated in favor of the new Projects experience. See the changelog for more information.
Jetons dâaccĂšs affinĂ©s pour « Create a project card »
Ce point de terminaison fonctionne avec les types de jetons précis suivants:
- Jetons dâaccĂšs utilisateur dâapplication GitHub
- Jetons dâaccĂšs dâinstallation dâapplication GitHub
- Jetons dâaccĂšs personnel affinĂ©
Le jeton prĂ©cis doit avoir au moins lâun des ensembles dâautorisations suivants:
- "Projects" repository permissions (write)
- "Projects" organization permissions (write)
ParamÚtres pour « Create a project card »
Nom, Type, Description |
---|
accept string Setting to |
Nom, Type, Description |
---|
column_id integer ObligatoireThe unique identifier of the column. |
Nom, Type, Description |
---|
note string or null ObligatoireThe project card's note |
content_id integer ObligatoireThe unique identifier of the content associated with the card |
content_type string ObligatoireThe piece of content associated with the card |
Codes dâĂ©tat de la rĂ©ponse HTTP pour « Create a project card »
Code dâĂ©tat | Description |
---|---|
201 | Created |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
422 | Validation failed |
503 | Service Unavailable |
Exemples de code pour « Create a project card »
Exemple de requĂȘte
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"
}