REST-API-Endpunkte für Project (classic)-Karten
Verwende die REST-API, um Karten in einem Projekt (klassisch) zu erstellen und zu verwalten.
Note
Projects (classic) wurde entfernt. Weitere Informationen zu dieser Änderung finden Sie im Blog the GitHub Blog.
Die neue und verbesserte Projekterfahrung ist jetzt verfügbar. Weitere Informationen findest du unter Informationen zu Projects.
Diese Endpunkte interagieren nur mit projects (classic). Verwende zum Verwalten von Projects die GraphQL-API. Weitere Informationen findest du unter Verwalten von Projects mit der API.
Die REST-API zum Verwalten von projects (classic) unterstützt ausschließlich die Authentifizierung mit einem personal access token (classic). Weitere Informationen findest du unter Verwalten deiner persönlichen Zugriffstoken.
Get a project card
Gets information about a project card.
Differenzierte Zugriffstoken für "Get a project card"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss mindestens einen der folgenden Berechtigungssätze aufweisen.:
- "Projects" repository permissions (read)
- "Projects" organization permissions (read)
Dieser Endpunkt kann ohne Authentifizierung oder die zuvor erwähnten Berechtigungen verwendet werden, wenn nur öffentliche Ressourcen angefordert werden.
Parameter für „Get a project card“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
card_id integer ErforderlichThe unique identifier of the card. |
HTTP-Antwortstatuscodes für „Get a project card“
Statuscode | BESCHREIBUNG |
---|---|
200 | OK |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
Codebeispiele für „Get a project card“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Anforderungsbeispiel
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/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"
}
Update an existing project card
Differenzierte Zugriffstoken für "Update an existing project card"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss mindestens einen der folgenden Berechtigungssätze aufweisen.:
- "Projects" repository permissions (write)
- "Projects" organization permissions (write)
Parameter für „Update an existing project card“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
card_id integer ErforderlichThe unique identifier of the card. |
Name, type, BESCHREIBUNG |
---|
note string or null The project card's note |
archived boolean Whether or not the card is archived |
HTTP-Antwortstatuscodes für „Update an existing project card“
Statuscode | BESCHREIBUNG |
---|---|
200 | OK |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Codebeispiele für „Update an existing project card“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Anforderungsbeispiel
curl -L \
-X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/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"
}
Delete a project card
Deletes a project card
Differenzierte Zugriffstoken für "Delete a project card"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss mindestens einen der folgenden Berechtigungssätze aufweisen.:
- "Projects" repository permissions (write)
- "Projects" organization permissions (write)
Parameter für „Delete a project card“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
card_id integer ErforderlichThe unique identifier of the card. |
HTTP-Antwortstatuscodes für „Delete a project card“
Statuscode | BESCHREIBUNG |
---|---|
204 | No Content |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
Codebeispiele für „Delete a project card“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Anforderungsbeispiel
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/projects/columns/cards/CARD_ID
Response
Status: 204
Move a project card
Differenzierte Zugriffstoken für "Move a project card"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss mindestens einen der folgenden Berechtigungssätze aufweisen.:
- "Projects" repository permissions (write)
- "Projects" organization permissions (write)
Parameter für „Move a project card“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
card_id integer ErforderlichThe unique identifier of the card. |
Name, type, BESCHREIBUNG |
---|
position string ErforderlichThe 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 |
HTTP-Antwortstatuscodes für „Move a project card“
Statuscode | BESCHREIBUNG |
---|---|
201 | Created |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
422 | Validation failed, or the endpoint has been spammed. |
503 | Service Unavailable |
Codebeispiele für „Move a project card“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Anforderungsbeispiel
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/projects/columns/cards/CARD_ID/moves \
-d '{"column_id":42,"position":"bottom"}'
Response
Status: 201
List project cards
Lists the project cards in a project.
Differenzierte Zugriffstoken für "List project cards"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss mindestens einen der folgenden Berechtigungssätze aufweisen.:
- "Projects" repository permissions (read)
- "Projects" organization permissions (read)
Dieser Endpunkt kann ohne Authentifizierung oder die zuvor erwähnten Berechtigungen verwendet werden, wenn nur öffentliche Ressourcen angefordert werden.
Parameter für „List project cards“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
column_id integer ErforderlichThe unique identifier of the column. |
Name, type, BESCHREIBUNG |
---|
archived_state string Filters the project cards that are returned by the card's state. Standard: Kann eine der Folgenden sein: |
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Standard: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Standard: |
HTTP-Antwortstatuscodes für „List project cards“
Statuscode | BESCHREIBUNG |
---|---|
200 | OK |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
Codebeispiele für „List project cards“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Anforderungsbeispiel
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/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"
}
]
Create a project card
Differenzierte Zugriffstoken für "Create a project card"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss mindestens einen der folgenden Berechtigungssätze aufweisen.:
- "Projects" repository permissions (write)
- "Projects" organization permissions (write)
Parameter für „Create a project card“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
column_id integer ErforderlichThe unique identifier of the column. |
Name, type, BESCHREIBUNG |
---|
note string or null ErforderlichThe project card's note |
content_id integer ErforderlichThe unique identifier of the content associated with the card |
content_type string ErforderlichThe piece of content associated with the card |
HTTP-Antwortstatuscodes für „Create a project card“
Statuscode | BESCHREIBUNG |
---|---|
201 | Created |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
422 | Validation failed |
503 | Service Unavailable |
Codebeispiele für „Create a project card“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Anforderungsbeispiel
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/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"
}