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

リアクション用の REST API エンドポイント

REST API を使って、GitHub 上のリアクションを操作できます。

リアクションについて

GitHub 上のコメント、Issue、pull request、ディスカッションに対するリアクションを作成および管理できます。 リアクションを作成する際、content パラメーターで利用可能な値は以下の通りです (参考のため、対応する絵文字も掲載します)。

コンテンツ Emoji
+1 👍
-1 👎
laugh 😄
confused 😕
heart ❤️
hooray 🎉
rocket 🚀
eyes 👀

List reactions for a team discussion comment

List the reactions to a team discussion comment.

Note

You can also specify a team by org_id and team_id using the route GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions.

OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

"List reactions for a team discussion comment" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
org string 必須

The organization name. The name is not case sensitive.

team_slug string 必須

The slug of the team name.

discussion_number integer 必須

The number that identifies the discussion.

comment_number integer 必須

The number that identifies the comment.

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

Returns a single reaction type. Omit this parameter to list all reactions to a team discussion comment.

次のいずれかにできます: +1, -1, laugh, confused, heart, hooray, rocket, eyes

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 reactions for a team discussion comment" の HTTP 応答状態コード

状態コード説明
200

OK

"List reactions for a team discussion comment" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

get/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions
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/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBER/comments/COMMENT_NUMBER/reactions

Response

Status: 200
[ { "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" } ]

Create reaction for a team discussion comment

Create a reaction to a team discussion comment.

A response with an HTTP 200 status means that you already added the reaction type to this team discussion comment.

Note

You can also specify a team by org_id and team_id using the route POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions.

OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

"Create reaction for a team discussion comment" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
org string 必須

The organization name. The name is not case sensitive.

team_slug string 必須

The slug of the team name.

discussion_number integer 必須

The number that identifies the discussion.

comment_number integer 必須

The number that identifies the comment.

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

The reaction type to add to the team discussion comment.

次のいずれかにできます: +1, -1, laugh, confused, heart, hooray, rocket, eyes

"Create reaction for a team discussion comment" の HTTP 応答状態コード

状態コード説明
200

Response when the reaction type has already been added to this team discussion comment

201

Created

"Create reaction for a team discussion comment" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

post/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions
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/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBER/comments/COMMENT_NUMBER/reactions \ -d '{"content":"heart"}'

Response when the reaction type has already been added to this team discussion comment

Status: 200
{ "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" }

Delete team discussion comment reaction

Note

You can also specify a team or organization with team_id and org_id using the route DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id.

Delete a reaction to a team discussion comment.

OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

"Delete team discussion comment reaction" のきめ細かいアクセス トークン

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

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Team discussions" organization permissions (write)

"Delete team discussion comment reaction" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
org string 必須

The organization name. The name is not case sensitive.

team_slug string 必須

The slug of the team name.

discussion_number integer 必須

The number that identifies the discussion.

comment_number integer 必須

The number that identifies the comment.

reaction_id integer 必須

The unique identifier of the reaction.

"Delete team discussion comment reaction" の HTTP 応答状態コード

状態コード説明
204

No Content

"Delete team discussion comment reaction" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

delete/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_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/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBER/comments/COMMENT_NUMBER/reactions/REACTION_ID

Response

Status: 204

List reactions for a team discussion

List the reactions to a team discussion.

Note

You can also specify a team by org_id and team_id using the route GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions.

OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

"List reactions for a team discussion" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
org string 必須

The organization name. The name is not case sensitive.

team_slug string 必須

The slug of the team name.

discussion_number integer 必須

The number that identifies the discussion.

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

Returns a single reaction type. Omit this parameter to list all reactions to a team discussion.

次のいずれかにできます: +1, -1, laugh, confused, heart, hooray, rocket, eyes

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 reactions for a team discussion" の HTTP 応答状態コード

状態コード説明
200

OK

"List reactions for a team discussion" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

get/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions
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/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBER/reactions

Response

Status: 200
[ { "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" } ]

Create reaction for a team discussion

Create a reaction to a team discussion.

A response with an HTTP 200 status means that you already added the reaction type to this team discussion.

Note

You can also specify a team by org_id and team_id using the route POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions.

OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

"Create reaction for a team discussion" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
org string 必須

The organization name. The name is not case sensitive.

team_slug string 必須

The slug of the team name.

discussion_number integer 必須

The number that identifies the discussion.

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

The reaction type to add to the team discussion.

次のいずれかにできます: +1, -1, laugh, confused, heart, hooray, rocket, eyes

"Create reaction for a team discussion" の HTTP 応答状態コード

状態コード説明
200

OK

201

Created

"Create reaction for a team discussion" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

post/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions
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/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBER/reactions \ -d '{"content":"heart"}'

Response

Status: 200
{ "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" }

Delete team discussion reaction

Note

You can also specify a team or organization with team_id and org_id using the route DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id.

Delete a reaction to a team discussion.

OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

"Delete team discussion reaction" のきめ細かいアクセス トークン

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

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Team discussions" organization permissions (write)

"Delete team discussion reaction" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
org string 必須

The organization name. The name is not case sensitive.

team_slug string 必須

The slug of the team name.

discussion_number integer 必須

The number that identifies the discussion.

reaction_id integer 必須

The unique identifier of the reaction.

"Delete team discussion reaction" の HTTP 応答状態コード

状態コード説明
204

No Content

"Delete team discussion reaction" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

delete/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_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/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBER/reactions/REACTION_ID

Response

Status: 204

List reactions for a commit comment

List the reactions to a commit comment.

"List reactions for a commit comment" のきめ細かいアクセス トークン

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

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Metadata" repository permissions (read)

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

"List reactions for a commit comment" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
owner string 必須

The account owner of the repository. The name is not case sensitive.

repo string 必須

The name of the repository without the .git extension. The name is not case sensitive.

comment_id integer 必須

The unique identifier of the comment.

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

Returns a single reaction type. Omit this parameter to list all reactions to a commit comment.

次のいずれかにできます: +1, -1, laugh, confused, heart, hooray, rocket, eyes

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 reactions for a commit comment" の HTTP 応答状態コード

状態コード説明
200

OK

404

Resource not found

"List reactions for a commit comment" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

get/repos/{owner}/{repo}/comments/{comment_id}/reactions
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/repos/OWNER/REPO/comments/COMMENT_ID/reactions

Response

Status: 200
[ { "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" } ]

Create reaction for a commit comment

Create a reaction to a commit comment. A response with an HTTP 200 status means that you already added the reaction type to this commit comment.

"Create reaction for a commit comment" のきめ細かいアクセス トークン

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

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Contents" repository permissions (write)

"Create reaction for a commit comment" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
owner string 必須

The account owner of the repository. The name is not case sensitive.

repo string 必須

The name of the repository without the .git extension. The name is not case sensitive.

comment_id integer 必須

The unique identifier of the comment.

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

The reaction type to add to the commit comment.

次のいずれかにできます: +1, -1, laugh, confused, heart, hooray, rocket, eyes

"Create reaction for a commit comment" の HTTP 応答状態コード

状態コード説明
200

Reaction exists

201

Reaction created

422

Validation failed, or the endpoint has been spammed.

"Create reaction for a commit comment" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

post/repos/{owner}/{repo}/comments/{comment_id}/reactions
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/repos/OWNER/REPO/comments/COMMENT_ID/reactions \ -d '{"content":"heart"}'

Reaction exists

Status: 200
{ "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" }

Delete a commit comment reaction

Note

You can also specify a repository by repository_id using the route DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id.

Delete a reaction to a commit comment.

"Delete a commit comment reaction" のきめ細かいアクセス トークン

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

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Contents" repository permissions (write)

"Delete a commit comment reaction" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
owner string 必須

The account owner of the repository. The name is not case sensitive.

repo string 必須

The name of the repository without the .git extension. The name is not case sensitive.

comment_id integer 必須

The unique identifier of the comment.

reaction_id integer 必須

The unique identifier of the reaction.

"Delete a commit comment reaction" の HTTP 応答状態コード

状態コード説明
204

No Content

"Delete a commit comment reaction" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

delete/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_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/repos/OWNER/REPO/comments/COMMENT_ID/reactions/REACTION_ID

Response

Status: 204

List reactions for an issue comment

List the reactions to an issue comment.

"List reactions for an issue comment" のきめ細かいアクセス トークン

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

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Issues" repository permissions (read)

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

"List reactions for an issue comment" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
owner string 必須

The account owner of the repository. The name is not case sensitive.

repo string 必須

The name of the repository without the .git extension. The name is not case sensitive.

comment_id integer 必須

The unique identifier of the comment.

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

Returns a single reaction type. Omit this parameter to list all reactions to an issue comment.

次のいずれかにできます: +1, -1, laugh, confused, heart, hooray, rocket, eyes

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 reactions for an issue comment" の HTTP 応答状態コード

状態コード説明
200

OK

404

Resource not found

"List reactions for an issue comment" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

get/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions
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/repos/OWNER/REPO/issues/comments/COMMENT_ID/reactions

Response

Status: 200
[ { "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" } ]

Create reaction for an issue comment

Create a reaction to an issue comment. A response with an HTTP 200 status means that you already added the reaction type to this issue comment.

"Create reaction for an issue comment" のきめ細かいアクセス トークン

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

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Issues" repository permissions (write)

"Create reaction for an issue comment" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
owner string 必須

The account owner of the repository. The name is not case sensitive.

repo string 必須

The name of the repository without the .git extension. The name is not case sensitive.

comment_id integer 必須

The unique identifier of the comment.

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

The reaction type to add to the issue comment.

次のいずれかにできます: +1, -1, laugh, confused, heart, hooray, rocket, eyes

"Create reaction for an issue comment" の HTTP 応答状態コード

状態コード説明
200

Reaction exists

201

Reaction created

422

Validation failed, or the endpoint has been spammed.

"Create reaction for an issue comment" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

post/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions
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/repos/OWNER/REPO/issues/comments/COMMENT_ID/reactions \ -d '{"content":"heart"}'

Reaction exists

Status: 200
{ "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" }

Delete an issue comment reaction

Note

You can also specify a repository by repository_id using the route DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id.

Delete a reaction to an issue comment.

"Delete an issue comment reaction" のきめ細かいアクセス トークン

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

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Issues" repository permissions (write)

"Delete an issue comment reaction" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
owner string 必須

The account owner of the repository. The name is not case sensitive.

repo string 必須

The name of the repository without the .git extension. The name is not case sensitive.

comment_id integer 必須

The unique identifier of the comment.

reaction_id integer 必須

The unique identifier of the reaction.

"Delete an issue comment reaction" の HTTP 応答状態コード

状態コード説明
204

No Content

"Delete an issue comment reaction" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

delete/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_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/repos/OWNER/REPO/issues/comments/COMMENT_ID/reactions/REACTION_ID

Response

Status: 204

List reactions for an issue

List the reactions to an issue.

"List reactions for an issue" のきめ細かいアクセス トークン

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

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Issues" repository permissions (read)

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

"List reactions for an issue" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
owner string 必須

The account owner of the repository. The name is not case sensitive.

repo string 必須

The name of the repository without the .git extension. The name is not case sensitive.

issue_number integer 必須

The number that identifies the issue.

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

Returns a single reaction type. Omit this parameter to list all reactions to an issue.

次のいずれかにできます: +1, -1, laugh, confused, heart, hooray, rocket, eyes

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 reactions for an issue" の HTTP 応答状態コード

状態コード説明
200

OK

404

Resource not found

410

Gone

"List reactions for an issue" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

get/repos/{owner}/{repo}/issues/{issue_number}/reactions
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/repos/OWNER/REPO/issues/ISSUE_NUMBER/reactions

Response

Status: 200
[ { "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" } ]

Create reaction for an issue

Create a reaction to an issue. A response with an HTTP 200 status means that you already added the reaction type to this issue.

"Create reaction for an issue" のきめ細かいアクセス トークン

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

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Issues" repository permissions (write)

"Create reaction for an issue" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
owner string 必須

The account owner of the repository. The name is not case sensitive.

repo string 必須

The name of the repository without the .git extension. The name is not case sensitive.

issue_number integer 必須

The number that identifies the issue.

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

The reaction type to add to the issue.

次のいずれかにできます: +1, -1, laugh, confused, heart, hooray, rocket, eyes

"Create reaction for an issue" の HTTP 応答状態コード

状態コード説明
200

OK

201

Created

422

Validation failed, or the endpoint has been spammed.

"Create reaction for an issue" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

post/repos/{owner}/{repo}/issues/{issue_number}/reactions
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/repos/OWNER/REPO/issues/ISSUE_NUMBER/reactions \ -d '{"content":"heart"}'

Response

Status: 200
{ "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" }

Delete an issue reaction

Note

You can also specify a repository by repository_id using the route DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id.

Delete a reaction to an issue.

"Delete an issue reaction" のきめ細かいアクセス トークン

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

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Issues" repository permissions (write)

"Delete an issue reaction" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
owner string 必須

The account owner of the repository. The name is not case sensitive.

repo string 必須

The name of the repository without the .git extension. The name is not case sensitive.

issue_number integer 必須

The number that identifies the issue.

reaction_id integer 必須

The unique identifier of the reaction.

"Delete an issue reaction" の HTTP 応答状態コード

状態コード説明
204

No Content

"Delete an issue reaction" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

delete/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_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/repos/OWNER/REPO/issues/ISSUE_NUMBER/reactions/REACTION_ID

Response

Status: 204

List reactions for a pull request review comment

List the reactions to a pull request review comment.

"List reactions for a pull request review comment" のきめ細かいアクセス トークン

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

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Pull requests" repository permissions (read)

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

"List reactions for a pull request review comment" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
owner string 必須

The account owner of the repository. The name is not case sensitive.

repo string 必須

The name of the repository without the .git extension. The name is not case sensitive.

comment_id integer 必須

The unique identifier of the comment.

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

Returns a single reaction type. Omit this parameter to list all reactions to a pull request review comment.

次のいずれかにできます: +1, -1, laugh, confused, heart, hooray, rocket, eyes

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 reactions for a pull request review comment" の HTTP 応答状態コード

状態コード説明
200

OK

404

Resource not found

"List reactions for a pull request review comment" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

get/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions
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/repos/OWNER/REPO/pulls/comments/COMMENT_ID/reactions

Response

Status: 200
[ { "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" } ]

Create reaction for a pull request review comment

Create a reaction to a pull request review comment. A response with an HTTP 200 status means that you already added the reaction type to this pull request review comment.

"Create reaction for a pull request review comment" のきめ細かいアクセス トークン

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

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Pull requests" repository permissions (write)

"Create reaction for a pull request review comment" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
owner string 必須

The account owner of the repository. The name is not case sensitive.

repo string 必須

The name of the repository without the .git extension. The name is not case sensitive.

comment_id integer 必須

The unique identifier of the comment.

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

The reaction type to add to the pull request review comment.

次のいずれかにできます: +1, -1, laugh, confused, heart, hooray, rocket, eyes

"Create reaction for a pull request review comment" の HTTP 応答状態コード

状態コード説明
200

Reaction exists

201

Reaction created

422

Validation failed, or the endpoint has been spammed.

"Create reaction for a pull request review comment" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

post/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions
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/repos/OWNER/REPO/pulls/comments/COMMENT_ID/reactions \ -d '{"content":"heart"}'

Reaction exists

Status: 200
{ "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" }

Delete a pull request comment reaction

Note

You can also specify a repository by repository_id using the route DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.

Delete a reaction to a pull request review comment.

"Delete a pull request comment reaction" のきめ細かいアクセス トークン

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

粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:

  • "Pull requests" repository permissions (write)

"Delete a pull request comment reaction" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
owner string 必須

The account owner of the repository. The name is not case sensitive.

repo string 必須

The name of the repository without the .git extension. The name is not case sensitive.

comment_id integer 必須

The unique identifier of the comment.

reaction_id integer 必須

The unique identifier of the reaction.

"Delete a pull request comment reaction" の HTTP 応答状態コード

状態コード説明
204

No Content

"Delete a pull request comment reaction" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

delete/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_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/repos/OWNER/REPO/pulls/comments/COMMENT_ID/reactions/REACTION_ID

Response

Status: 204

List reactions for a release

List the reactions to a release.

"List reactions for a release" のきめ細かいアクセス トークン

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

粒度の細かいトークンにはアクセス許可が必要ありません。

"List reactions for a release" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
owner string 必須

The account owner of the repository. The name is not case sensitive.

repo string 必須

The name of the repository without the .git extension. The name is not case sensitive.

release_id integer 必須

The unique identifier of the release.

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

Returns a single reaction type. Omit this parameter to list all reactions to a release.

次のいずれかにできます: +1, laugh, heart, hooray, rocket, eyes

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 reactions for a release" の HTTP 応答状態コード

状態コード説明
200

OK

404

Resource not found

"List reactions for a release" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

get/repos/{owner}/{repo}/releases/{release_id}/reactions
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/repos/OWNER/REPO/releases/RELEASE_ID/reactions

Response

Status: 200
[ { "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" } ]

Create reaction for a release

Create a reaction to a release. A response with a Status: 200 OK means that you already added the reaction type to this release.

"Create reaction for a release" のきめ細かいアクセス トークン

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

粒度の細かいトークンにはアクセス許可が必要ありません。

"Create reaction for a release" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
owner string 必須

The account owner of the repository. The name is not case sensitive.

repo string 必須

The name of the repository without the .git extension. The name is not case sensitive.

release_id integer 必須

The unique identifier of the release.

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

The reaction type to add to the release.

次のいずれかにできます: +1, laugh, heart, hooray, rocket, eyes

"Create reaction for a release" の HTTP 応答状態コード

状態コード説明
200

Reaction exists

201

Reaction created

422

Validation failed, or the endpoint has been spammed.

"Create reaction for a release" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

post/repos/{owner}/{repo}/releases/{release_id}/reactions
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/repos/OWNER/REPO/releases/RELEASE_ID/reactions \ -d '{"content":"heart"}'

Reaction exists

Status: 200
{ "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" }

Delete a release reaction

Note

You can also specify a repository by repository_id using the route DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id.

Delete a reaction to a release.

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

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

粒度の細かいトークンにはアクセス許可が必要ありません。

"Delete a release reaction" のパラメーター

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

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

パス パラメーター
名前, Type, 説明
owner string 必須

The account owner of the repository. The name is not case sensitive.

repo string 必須

The name of the repository without the .git extension. The name is not case sensitive.

release_id integer 必須

The unique identifier of the release.

reaction_id integer 必須

The unique identifier of the reaction.

"Delete a release reaction" の HTTP 応答状態コード

状態コード説明
204

No Content

"Delete a release reaction" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

delete/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_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/repos/OWNER/REPO/releases/RELEASE_ID/reactions/REACTION_ID

Response

Status: 204

List reactions for a team discussion comment (Legacy)

Warning

Endpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new List reactions for a team discussion comment endpoint.

List the reactions to a team discussion comment.

OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

"List reactions for a team discussion comment (Legacy)" のパラメーター

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

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

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

The unique identifier of the team.

discussion_number integer 必須

The number that identifies the discussion.

comment_number integer 必須

The number that identifies the comment.

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

Returns a single reaction type. Omit this parameter to list all reactions to a team discussion comment.

次のいずれかにできます: +1, -1, laugh, confused, heart, hooray, rocket, eyes

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 reactions for a team discussion comment (Legacy)" の HTTP 応答状態コード

状態コード説明
200

OK

"List reactions for a team discussion comment (Legacy)" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

get/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions
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/teams/TEAM_ID/discussions/DISCUSSION_NUMBER/comments/COMMENT_NUMBER/reactions

Response

Status: 200
[ { "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" } ]

Create reaction for a team discussion comment (Legacy)

Warning

Endpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new "Create reaction for a team discussion comment" endpoint.

Create a reaction to a team discussion comment.

A response with an HTTP 200 status means that you already added the reaction type to this team discussion comment.

OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

"Create reaction for a team discussion comment (Legacy)" のパラメーター

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

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

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

The unique identifier of the team.

discussion_number integer 必須

The number that identifies the discussion.

comment_number integer 必須

The number that identifies the comment.

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

The reaction type to add to the team discussion comment.

次のいずれかにできます: +1, -1, laugh, confused, heart, hooray, rocket, eyes

"Create reaction for a team discussion comment (Legacy)" の HTTP 応答状態コード

状態コード説明
201

Created

"Create reaction for a team discussion comment (Legacy)" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

post/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions
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/teams/TEAM_ID/discussions/DISCUSSION_NUMBER/comments/COMMENT_NUMBER/reactions \ -d '{"content":"heart"}'

Response

Status: 201
{ "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" }

List reactions for a team discussion (Legacy)

Warning

Endpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new List reactions for a team discussion endpoint.

List the reactions to a team discussion.

OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

"List reactions for a team discussion (Legacy)" のパラメーター

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

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

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

The unique identifier of the team.

discussion_number integer 必須

The number that identifies the discussion.

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

Returns a single reaction type. Omit this parameter to list all reactions to a team discussion.

次のいずれかにできます: +1, -1, laugh, confused, heart, hooray, rocket, eyes

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 reactions for a team discussion (Legacy)" の HTTP 応答状態コード

状態コード説明
200

OK

"List reactions for a team discussion (Legacy)" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

get/teams/{team_id}/discussions/{discussion_number}/reactions
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/teams/TEAM_ID/discussions/DISCUSSION_NUMBER/reactions

Response

Status: 200
[ { "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" } ]

Create reaction for a team discussion (Legacy)

Warning

Endpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Create reaction for a team discussion endpoint.

Create a reaction to a team discussion.

A response with an HTTP 200 status means that you already added the reaction type to this team discussion.

OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

"Create reaction for a team discussion (Legacy)" のパラメーター

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

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

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

The unique identifier of the team.

discussion_number integer 必須

The number that identifies the discussion.

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

The reaction type to add to the team discussion.

次のいずれかにできます: +1, -1, laugh, confused, heart, hooray, rocket, eyes

"Create reaction for a team discussion (Legacy)" の HTTP 応答状態コード

状態コード説明
201

Created

"Create reaction for a team discussion (Legacy)" のコード サンプル

GHE.com で GitHub にアクセスする場合は、api.github.comapi.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。

要求の例

post/teams/{team_id}/discussions/{discussion_number}/reactions
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/teams/TEAM_ID/discussions/DISCUSSION_NUMBER/reactions \ -d '{"content":"heart"}'

Response

Status: 201
{ "id": 1, "node_id": "MDg6UmVhY3Rpb24x", "user": { "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 }, "content": "heart", "created_at": "2016-05-20T20:09:31Z" }