REST-API-Endpunkte für Reaktionen
Verwende die REST-API, um mit Reaktionen auf GitHub zu interagieren.
Informationen zu Reaktionen
Du kannst Reaktionen auf Kommentare, Issues, Pull Requests und Diskussionen auf GitHub erstellen und verwalten. Beim Erstellen einer Reaktion sind folgende Werte für den content
-Parameter zulässig (mit dem entsprechenden Emoji zur Referenz):
Inhalt | 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.
Parameter für „List reactions for a team discussion comment“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
org string ErforderlichThe organization name. The name is not case sensitive. |
team_slug string ErforderlichThe slug of the team name. |
discussion_number integer ErforderlichThe number that identifies the discussion. |
comment_number integer ErforderlichThe number that identifies the comment. |
Name, type, BESCHREIBUNG |
---|
content string Returns a single reaction type. Omit this parameter to list all reactions to a team discussion comment. 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 reactions for a team discussion comment“
Statuscode | BESCHREIBUNG |
---|---|
200 | OK |
Codebeispiele für „List reactions for a team discussion comment“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/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.
Parameter für „Create reaction for a team discussion comment“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
org string ErforderlichThe organization name. The name is not case sensitive. |
team_slug string ErforderlichThe slug of the team name. |
discussion_number integer ErforderlichThe number that identifies the discussion. |
comment_number integer ErforderlichThe number that identifies the comment. |
Name, type, BESCHREIBUNG |
---|
content string ErforderlichThe reaction type to add to the team discussion comment. Kann eine der Folgenden sein: |
HTTP-Antwortstatuscodes für „Create reaction for a team discussion comment“
Statuscode | BESCHREIBUNG |
---|---|
200 | Response when the reaction type has already been added to this team discussion comment |
201 | Created |
Codebeispiele für „Create reaction for a team discussion comment“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
Beispiele für Anforderungen
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.
Differenzierte Zugriffstoken für "Delete team discussion comment reaction"
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 einen der folgenden Berechtigungssätze aufweisen.:
- "Team discussions" organization permissions (write)
Parameter für „Delete team discussion comment reaction“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
org string ErforderlichThe organization name. The name is not case sensitive. |
team_slug string ErforderlichThe slug of the team name. |
discussion_number integer ErforderlichThe number that identifies the discussion. |
comment_number integer ErforderlichThe number that identifies the comment. |
reaction_id integer ErforderlichThe unique identifier of the reaction. |
HTTP-Antwortstatuscodes für „Delete team discussion comment reaction“
Statuscode | BESCHREIBUNG |
---|---|
204 | No Content |
Codebeispiele für „Delete team discussion comment reaction“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/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.
Parameter für „List reactions for a team discussion“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
org string ErforderlichThe organization name. The name is not case sensitive. |
team_slug string ErforderlichThe slug of the team name. |
discussion_number integer ErforderlichThe number that identifies the discussion. |
Name, type, BESCHREIBUNG |
---|
content string Returns a single reaction type. Omit this parameter to list all reactions to a team discussion. 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 reactions for a team discussion“
Statuscode | BESCHREIBUNG |
---|---|
200 | OK |
Codebeispiele für „List reactions for a team discussion“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/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.
Parameter für „Create reaction for a team discussion“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
org string ErforderlichThe organization name. The name is not case sensitive. |
team_slug string ErforderlichThe slug of the team name. |
discussion_number integer ErforderlichThe number that identifies the discussion. |
Name, type, BESCHREIBUNG |
---|
content string ErforderlichThe reaction type to add to the team discussion. Kann eine der Folgenden sein: |
HTTP-Antwortstatuscodes für „Create reaction for a team discussion“
Statuscode | BESCHREIBUNG |
---|---|
200 | OK |
201 | Created |
Codebeispiele für „Create reaction for a team discussion“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
Beispiele für Anforderungen
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.
Differenzierte Zugriffstoken für "Delete team discussion reaction"
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 einen der folgenden Berechtigungssätze aufweisen.:
- "Team discussions" organization permissions (write)
Parameter für „Delete team discussion reaction“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
org string ErforderlichThe organization name. The name is not case sensitive. |
team_slug string ErforderlichThe slug of the team name. |
discussion_number integer ErforderlichThe number that identifies the discussion. |
reaction_id integer ErforderlichThe unique identifier of the reaction. |
HTTP-Antwortstatuscodes für „Delete team discussion reaction“
Statuscode | BESCHREIBUNG |
---|---|
204 | No Content |
Codebeispiele für „Delete team discussion reaction“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/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.
Differenzierte Zugriffstoken für "List reactions for a commit comment"
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 einen der folgenden Berechtigungssätze aufweisen.:
- "Metadata" repository 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 reactions for a commit comment“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
owner string ErforderlichThe account owner of the repository. The name is not case sensitive. |
repo string ErforderlichThe name of the repository without the |
comment_id integer ErforderlichThe unique identifier of the comment. |
Name, type, BESCHREIBUNG |
---|
content string Returns a single reaction type. Omit this parameter to list all reactions to a commit comment. 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 reactions for a commit comment“
Statuscode | BESCHREIBUNG |
---|---|
200 | OK |
404 | Resource not found |
Codebeispiele für „List reactions for a commit comment“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/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.
Differenzierte Zugriffstoken für "Create reaction for a commit comment"
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 einen der folgenden Berechtigungssätze aufweisen.:
- "Contents" repository permissions (write)
Parameter für „Create reaction for a commit comment“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
owner string ErforderlichThe account owner of the repository. The name is not case sensitive. |
repo string ErforderlichThe name of the repository without the |
comment_id integer ErforderlichThe unique identifier of the comment. |
Name, type, BESCHREIBUNG |
---|
content string ErforderlichThe reaction type to add to the commit comment. Kann eine der Folgenden sein: |
HTTP-Antwortstatuscodes für „Create reaction for a commit comment“
Statuscode | BESCHREIBUNG |
---|---|
200 | Reaction exists |
201 | Reaction created |
422 | Validation failed, or the endpoint has been spammed. |
Codebeispiele für „Create reaction for a commit comment“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
Beispiele für Anforderungen
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.
Differenzierte Zugriffstoken für "Delete a commit comment reaction"
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 einen der folgenden Berechtigungssätze aufweisen.:
- "Contents" repository permissions (write)
Parameter für „Delete a commit comment reaction“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
owner string ErforderlichThe account owner of the repository. The name is not case sensitive. |
repo string ErforderlichThe name of the repository without the |
comment_id integer ErforderlichThe unique identifier of the comment. |
reaction_id integer ErforderlichThe unique identifier of the reaction. |
HTTP-Antwortstatuscodes für „Delete a commit comment reaction“
Statuscode | BESCHREIBUNG |
---|---|
204 | No Content |
Codebeispiele für „Delete a commit comment reaction“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/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.
Differenzierte Zugriffstoken für "List reactions for an issue comment"
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 einen der folgenden Berechtigungssätze aufweisen.:
- "Issues" repository 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 reactions for an issue comment“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
owner string ErforderlichThe account owner of the repository. The name is not case sensitive. |
repo string ErforderlichThe name of the repository without the |
comment_id integer ErforderlichThe unique identifier of the comment. |
Name, type, BESCHREIBUNG |
---|
content string Returns a single reaction type. Omit this parameter to list all reactions to an issue comment. 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 reactions for an issue comment“
Statuscode | BESCHREIBUNG |
---|---|
200 | OK |
404 | Resource not found |
Codebeispiele für „List reactions for an issue comment“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/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.
Differenzierte Zugriffstoken für "Create reaction for an issue comment"
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 einen der folgenden Berechtigungssätze aufweisen.:
- "Issues" repository permissions (write)
Parameter für „Create reaction for an issue comment“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
owner string ErforderlichThe account owner of the repository. The name is not case sensitive. |
repo string ErforderlichThe name of the repository without the |
comment_id integer ErforderlichThe unique identifier of the comment. |
Name, type, BESCHREIBUNG |
---|
content string ErforderlichThe reaction type to add to the issue comment. Kann eine der Folgenden sein: |
HTTP-Antwortstatuscodes für „Create reaction for an issue comment“
Statuscode | BESCHREIBUNG |
---|---|
200 | Reaction exists |
201 | Reaction created |
422 | Validation failed, or the endpoint has been spammed. |
Codebeispiele für „Create reaction for an issue comment“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
Beispiele für Anforderungen
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.
Differenzierte Zugriffstoken für "Delete an issue comment reaction"
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 einen der folgenden Berechtigungssätze aufweisen.:
- "Issues" repository permissions (write)
Parameter für „Delete an issue comment reaction“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
owner string ErforderlichThe account owner of the repository. The name is not case sensitive. |
repo string ErforderlichThe name of the repository without the |
comment_id integer ErforderlichThe unique identifier of the comment. |
reaction_id integer ErforderlichThe unique identifier of the reaction. |
HTTP-Antwortstatuscodes für „Delete an issue comment reaction“
Statuscode | BESCHREIBUNG |
---|---|
204 | No Content |
Codebeispiele für „Delete an issue comment reaction“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/repos/OWNER/REPO/issues/comments/COMMENT_ID/reactions/REACTION_ID
Response
Status: 204
List reactions for an issue
List the reactions to an issue.
Differenzierte Zugriffstoken für "List reactions for an issue"
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 einen der folgenden Berechtigungssätze aufweisen.:
- "Issues" repository 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 reactions for an issue“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
owner string ErforderlichThe account owner of the repository. The name is not case sensitive. |
repo string ErforderlichThe name of the repository without the |
issue_number integer ErforderlichThe number that identifies the issue. |
Name, type, BESCHREIBUNG |
---|
content string Returns a single reaction type. Omit this parameter to list all reactions to an issue. 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 reactions for an issue“
Statuscode | BESCHREIBUNG |
---|---|
200 | OK |
404 | Resource not found |
410 | Gone |
Codebeispiele für „List reactions for an issue“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/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.
Differenzierte Zugriffstoken für "Create reaction for an issue"
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 einen der folgenden Berechtigungssätze aufweisen.:
- "Issues" repository permissions (write)
Parameter für „Create reaction for an issue“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
owner string ErforderlichThe account owner of the repository. The name is not case sensitive. |
repo string ErforderlichThe name of the repository without the |
issue_number integer ErforderlichThe number that identifies the issue. |
Name, type, BESCHREIBUNG |
---|
content string ErforderlichThe reaction type to add to the issue. Kann eine der Folgenden sein: |
HTTP-Antwortstatuscodes für „Create reaction for an issue“
Statuscode | BESCHREIBUNG |
---|---|
200 | OK |
201 | Created |
422 | Validation failed, or the endpoint has been spammed. |
Codebeispiele für „Create reaction for an issue“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
Beispiele für Anforderungen
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.
Differenzierte Zugriffstoken für "Delete an issue reaction"
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 einen der folgenden Berechtigungssätze aufweisen.:
- "Issues" repository permissions (write)
Parameter für „Delete an issue reaction“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
owner string ErforderlichThe account owner of the repository. The name is not case sensitive. |
repo string ErforderlichThe name of the repository without the |
issue_number integer ErforderlichThe number that identifies the issue. |
reaction_id integer ErforderlichThe unique identifier of the reaction. |
HTTP-Antwortstatuscodes für „Delete an issue reaction“
Statuscode | BESCHREIBUNG |
---|---|
204 | No Content |
Codebeispiele für „Delete an issue reaction“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/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.
Differenzierte Zugriffstoken für "List reactions for a pull request review comment"
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 einen der folgenden Berechtigungssätze aufweisen.:
- "Pull requests" repository 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 reactions for a pull request review comment“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
owner string ErforderlichThe account owner of the repository. The name is not case sensitive. |
repo string ErforderlichThe name of the repository without the |
comment_id integer ErforderlichThe unique identifier of the comment. |
Name, type, BESCHREIBUNG |
---|
content string Returns a single reaction type. Omit this parameter to list all reactions to a pull request review comment. 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 reactions for a pull request review comment“
Statuscode | BESCHREIBUNG |
---|---|
200 | OK |
404 | Resource not found |
Codebeispiele für „List reactions for a pull request review comment“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/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.
Differenzierte Zugriffstoken für "Create reaction for a pull request review comment"
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 einen der folgenden Berechtigungssätze aufweisen.:
- "Pull requests" repository permissions (write)
Parameter für „Create reaction for a pull request review comment“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
owner string ErforderlichThe account owner of the repository. The name is not case sensitive. |
repo string ErforderlichThe name of the repository without the |
comment_id integer ErforderlichThe unique identifier of the comment. |
Name, type, BESCHREIBUNG |
---|
content string ErforderlichThe reaction type to add to the pull request review comment. Kann eine der Folgenden sein: |
HTTP-Antwortstatuscodes für „Create reaction for a pull request review comment“
Statuscode | BESCHREIBUNG |
---|---|
200 | Reaction exists |
201 | Reaction created |
422 | Validation failed, or the endpoint has been spammed. |
Codebeispiele für „Create reaction for a pull request review comment“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
Beispiele für Anforderungen
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.
Differenzierte Zugriffstoken für "Delete a pull request comment reaction"
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 einen der folgenden Berechtigungssätze aufweisen.:
- "Pull requests" repository permissions (write)
Parameter für „Delete a pull request comment reaction“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
owner string ErforderlichThe account owner of the repository. The name is not case sensitive. |
repo string ErforderlichThe name of the repository without the |
comment_id integer ErforderlichThe unique identifier of the comment. |
reaction_id integer ErforderlichThe unique identifier of the reaction. |
HTTP-Antwortstatuscodes für „Delete a pull request comment reaction“
Statuscode | BESCHREIBUNG |
---|---|
204 | No Content |
Codebeispiele für „Delete a pull request comment reaction“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/repos/OWNER/REPO/pulls/comments/COMMENT_ID/reactions/REACTION_ID
Response
Status: 204
List reactions for a release
List the reactions to a release.
Differenzierte Zugriffstoken für "List reactions for a release"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token erfordert keine Berechtigungen.
Parameter für „List reactions for a release“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
owner string ErforderlichThe account owner of the repository. The name is not case sensitive. |
repo string ErforderlichThe name of the repository without the |
release_id integer ErforderlichThe unique identifier of the release. |
Name, type, BESCHREIBUNG |
---|
content string Returns a single reaction type. Omit this parameter to list all reactions to a release. 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 reactions for a release“
Statuscode | BESCHREIBUNG |
---|---|
200 | OK |
404 | Resource not found |
Codebeispiele für „List reactions for a release“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/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.
Differenzierte Zugriffstoken für "Create reaction for a release"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token erfordert keine Berechtigungen.
Parameter für „Create reaction for a release“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
owner string ErforderlichThe account owner of the repository. The name is not case sensitive. |
repo string ErforderlichThe name of the repository without the |
release_id integer ErforderlichThe unique identifier of the release. |
Name, type, BESCHREIBUNG |
---|
content string ErforderlichThe reaction type to add to the release. Kann eine der Folgenden sein: |
HTTP-Antwortstatuscodes für „Create reaction for a release“
Statuscode | BESCHREIBUNG |
---|---|
200 | Reaction exists |
201 | Reaction created |
422 | Validation failed, or the endpoint has been spammed. |
Codebeispiele für „Create reaction for a release“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
Beispiele für Anforderungen
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.
Differenzierte Zugriffstoken für "Delete a release reaction"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token erfordert keine Berechtigungen.
Parameter für „Delete a release reaction“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
owner string ErforderlichThe account owner of the repository. The name is not case sensitive. |
repo string ErforderlichThe name of the repository without the |
release_id integer ErforderlichThe unique identifier of the release. |
reaction_id integer ErforderlichThe unique identifier of the reaction. |
HTTP-Antwortstatuscodes für „Delete a release reaction“
Statuscode | BESCHREIBUNG |
---|---|
204 | No Content |
Codebeispiele für „Delete a release reaction“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/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.
Parameter für „List reactions for a team discussion comment (Legacy)“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
team_id integer ErforderlichThe unique identifier of the team. |
discussion_number integer ErforderlichThe number that identifies the discussion. |
comment_number integer ErforderlichThe number that identifies the comment. |
Name, type, BESCHREIBUNG |
---|
content string Returns a single reaction type. Omit this parameter to list all reactions to a team discussion comment. 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 reactions for a team discussion comment (Legacy)“
Statuscode | BESCHREIBUNG |
---|---|
200 | OK |
Codebeispiele für „List reactions for a team discussion comment (Legacy)“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/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.
Parameter für „Create reaction for a team discussion comment (Legacy)“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
team_id integer ErforderlichThe unique identifier of the team. |
discussion_number integer ErforderlichThe number that identifies the discussion. |
comment_number integer ErforderlichThe number that identifies the comment. |
Name, type, BESCHREIBUNG |
---|
content string ErforderlichThe reaction type to add to the team discussion comment. Kann eine der Folgenden sein: |
HTTP-Antwortstatuscodes für „Create reaction for a team discussion comment (Legacy)“
Statuscode | BESCHREIBUNG |
---|---|
201 | Created |
Codebeispiele für „Create reaction for a team discussion comment (Legacy)“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/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.
Parameter für „List reactions for a team discussion (Legacy)“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
team_id integer ErforderlichThe unique identifier of the team. |
discussion_number integer ErforderlichThe number that identifies the discussion. |
Name, type, BESCHREIBUNG |
---|
content string Returns a single reaction type. Omit this parameter to list all reactions to a team discussion. 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 reactions for a team discussion (Legacy)“
Statuscode | BESCHREIBUNG |
---|---|
200 | OK |
Codebeispiele für „List reactions for a team discussion (Legacy)“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/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.
Parameter für „Create reaction for a team discussion (Legacy)“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
team_id integer ErforderlichThe unique identifier of the team. |
discussion_number integer ErforderlichThe number that identifies the discussion. |
Name, type, BESCHREIBUNG |
---|
content string ErforderlichThe reaction type to add to the team discussion. Kann eine der Folgenden sein: |
HTTP-Antwortstatuscodes für „Create reaction for a team discussion (Legacy)“
Statuscode | BESCHREIBUNG |
---|---|
201 | Created |
Codebeispiele für „Create reaction for a team discussion (Legacy)“
Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com
unter api.SUBDOMAIN.ghe.com
mit der dedizierten Unterdomäne deines Unternehmens.
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/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"
}