Skip to main content
REST API はバージョン管理になりました。 詳細については、「API のバージョン管理について」を参照してください。

Project (classic)カード用 REST API エンドポイント

REST API を使って、Project (Classic) でカードを作成し、管理できます。

Note

Projects (classic) が削除されています。 この変更についての詳細は、the GitHub Blogを参照してください。

新しく改善されたプロジェクト エクスペリエンスを利用できます。 詳しくは、「Projects について」を参照してください。

これらのエンドポイントを使って操作されるのは、projects (classic) のみです。 Projects を管理するには、GraphQL API を使います。 詳しくは、「API を使用して Projects を管理する」を参照してください。

projects (classic) を管理する REST API は、personal access token (classic) を使った認証のみをサポートします。 詳しくは、「個人用アクセス トークンを管理する」を参照してください。

Get a project card

Gets information about a project card.

"Get a project card" のきめ細かいアクセス トークン

このエンドポイントは、次の粒度の細かいトークンの種類で動作します:

粒度の細かいトークンには、次のアクセス許可セットの少なくとも 1 つが必要です:

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

このエンドポイントは、パブリック リソースのみが要求される場合は、認証または前述メンションアクセス許可なしで使用できます。

"Get a project card" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
card_id integer 必須

The unique identifier of the card.

"Get a project card" の HTTP 応答状態コード

状態コード説明
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

404

Resource not found

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

要求の例

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

"Update an existing project card" のきめ細かいアクセス トークン

このエンドポイントは、次の粒度の細かいトークンの種類で動作します:

粒度の細かいトークンには、次のアクセス許可セットの少なくとも 1 つが必要です:

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

"Update an existing project card" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
card_id integer 必須

The unique identifier of the card.

本文のパラメーター
名前, Type, 説明
note string or null

The project card's note

archived boolean

Whether or not the card is archived

"Update an existing project card" の HTTP 応答状態コード

状態コード説明
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

404

Resource not found

422

Validation failed, or the endpoint has been spammed.

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

要求の例

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

"Delete a project card" のきめ細かいアクセス トークン

このエンドポイントは、次の粒度の細かいトークンの種類で動作します:

粒度の細かいトークンには、次のアクセス許可セットの少なくとも 1 つが必要です:

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

"Delete a project card" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
card_id integer 必須

The unique identifier of the card.

"Delete a project card" の HTTP 応答状態コード

状態コード説明
204

No Content

304

Not modified

401

Requires authentication

403

Forbidden

404

Resource not found

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

要求の例

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" \ https://api.github.com/projects/columns/cards/CARD_ID

Response

Status: 204

Move a project card

"Move a project card" のきめ細かいアクセス トークン

このエンドポイントは、次の粒度の細かいトークンの種類で動作します:

粒度の細かいトークンには、次のアクセス許可セットの少なくとも 1 つが必要です:

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

"Move a project card" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
card_id integer 必須

The unique identifier of the card.

本文のパラメーター
名前, Type, 説明
position string 必須

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

"Move a project card" の HTTP 応答状態コード

状態コード説明
201

Created

304

Not modified

401

Requires authentication

403

Forbidden

422

Validation failed, or the endpoint has been spammed.

503

Service Unavailable

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

要求の例

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" \ https://api.github.com/projects/columns/cards/CARD_ID/moves \ -d '{"column_id":42,"position":"bottom"}'

Response

List project cards

Lists the project cards in a project.

"List project cards" のきめ細かいアクセス トークン

このエンドポイントは、次の粒度の細かいトークンの種類で動作します:

粒度の細かいトークンには、次のアクセス許可セットの少なくとも 1 つが必要です:

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

このエンドポイントは、パブリック リソースのみが要求される場合は、認証または前述メンションアクセス許可なしで使用できます。

"List project cards" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
column_id integer 必須

The unique identifier of the column.

クエリ パラメーター
名前, Type, 説明
archived_state string

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

Default: not_archived

次のいずれかにできます: 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."

Default: 30

page integer

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

Default: 1

"List project cards" の HTTP 応答状態コード

状態コード説明
200

OK

304

Not modified

401

Requires authentication

403

Forbidden

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

要求の例

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

"Create a project card" のきめ細かいアクセス トークン

このエンドポイントは、次の粒度の細かいトークンの種類で動作します:

粒度の細かいトークンには、次のアクセス許可セットの少なくとも 1 つが必要です:

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

"Create a project card" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
column_id integer 必須

The unique identifier of the column.

本文のパラメーター
名前, Type, 説明
note string or null 必須

The project card's note

content_id integer 必須

The unique identifier of the content associated with the card

content_type string 必須

The piece of content associated with the card

"Create a project card" の HTTP 応答状態コード

状態コード説明
201

Created

304

Not modified

401

Requires authentication

403

Forbidden

422

Validation failed

503

Service Unavailable

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

要求の例

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