Réactions
Utilisez l’API REST pour interagir avec les réactions sur GitHub.
À propos des réactions
Vous pouvez créer et gérer des réactions aux commentaires, problèmes, demandes de tirage et discussions sur GitHub. Lors de la création d’une réaction, les valeurs autorisées pour le paramètre content sont les suivantes (avec l’emoji correspondant pour référence) :
| contenu | emoji |
|---|---|
+1 |
👍 |
-1 |
👎 |
laugh |
😄 |
confused |
😕 |
heart |
❤️ |
hooray |
🎉 |
rocket |
🚀 |
eyes |
👀 |
List reactions for a team discussion comment
List the reactions to a team discussion comment. OAuth access tokens require the read:discussion scope.
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.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
orgstringObligatoireThe organization name. The name is not case sensitive. |
team_slugstringObligatoireThe slug of the team name. |
discussion_numberintegerObligatoireThe number that identifies the discussion. |
comment_numberintegerObligatoireThe number that identifies the comment. |
| Paramètres de requête |
| Nom, Type, Description |
contentstringReturns a single reaction type. Omit this parameter to list all reactions to a team discussion comment. Peut être: |
per_pageintegerThe number of results per page (max 100). Default: |
pageintegerPage number of the results to fetch. Default: |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
200 | OK |
Exemples de code
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBER/comments/COMMENT_NUMBER/reactionsResponse
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"
}
]Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Create reaction for a team discussion comment
Create a reaction to a team discussion comment. OAuth access tokens require the write:discussion scope. 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.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
orgstringObligatoireThe organization name. The name is not case sensitive. |
team_slugstringObligatoireThe slug of the team name. |
discussion_numberintegerObligatoireThe number that identifies the discussion. |
comment_numberintegerObligatoireThe number that identifies the comment. |
| Paramètres du corps |
| Nom, Type, Description |
contentstringObligatoireThe reaction type to add to the team discussion comment. Peut être: |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
200 | Response when the reaction type has already been added to this team discussion comment |
201 | Created |
Exemples de code
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/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"
}Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
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 access tokens require the write:discussion scope.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
orgstringObligatoireThe organization name. The name is not case sensitive. |
team_slugstringObligatoireThe slug of the team name. |
discussion_numberintegerObligatoireThe number that identifies the discussion. |
comment_numberintegerObligatoireThe number that identifies the comment. |
reaction_idintegerObligatoireThe unique identifier of the reaction. |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
204 | No Content |
Exemples de code
curl \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBER/comments/COMMENT_NUMBER/reactions/REACTION_IDResponse
Status: 204Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List reactions for a team discussion
List the reactions to a team discussion. OAuth access tokens require the read:discussion scope.
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.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
orgstringObligatoireThe organization name. The name is not case sensitive. |
team_slugstringObligatoireThe slug of the team name. |
discussion_numberintegerObligatoireThe number that identifies the discussion. |
| Paramètres de requête |
| Nom, Type, Description |
contentstringReturns a single reaction type. Omit this parameter to list all reactions to a team discussion. Peut être: |
per_pageintegerThe number of results per page (max 100). Default: |
pageintegerPage number of the results to fetch. Default: |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
200 | OK |
Exemples de code
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBER/reactionsResponse
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"
}
]Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Create reaction for a team discussion
Create a reaction to a team discussion. OAuth access tokens require the write:discussion scope. 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.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
orgstringObligatoireThe organization name. The name is not case sensitive. |
team_slugstringObligatoireThe slug of the team name. |
discussion_numberintegerObligatoireThe number that identifies the discussion. |
| Paramètres du corps |
| Nom, Type, Description |
contentstringObligatoireThe reaction type to add to the team discussion. Peut être: |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
200 | OK |
201 | Created |
Exemples de code
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/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"
}Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
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 access tokens require the write:discussion scope.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
orgstringObligatoireThe organization name. The name is not case sensitive. |
team_slugstringObligatoireThe slug of the team name. |
discussion_numberintegerObligatoireThe number that identifies the discussion. |
reaction_idintegerObligatoireThe unique identifier of the reaction. |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
204 | No Content |
Exemples de code
curl \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBER/reactions/REACTION_IDResponse
Status: 204Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List reactions for a commit comment
List the reactions to a commit comment.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
ownerstringObligatoireThe account owner of the repository. The name is not case sensitive. |
repostringObligatoireThe name of the repository. The name is not case sensitive. |
comment_idintegerObligatoireThe unique identifier of the comment. |
| Paramètres de requête |
| Nom, Type, Description |
contentstringReturns a single reaction type. Omit this parameter to list all reactions to a commit comment. Peut être: |
per_pageintegerThe number of results per page (max 100). Default: |
pageintegerPage number of the results to fetch. Default: |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
200 | OK |
404 | Resource not found |
Exemples de code
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/comments/COMMENT_ID/reactionsResponse
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"
}
]Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
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.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
ownerstringObligatoireThe account owner of the repository. The name is not case sensitive. |
repostringObligatoireThe name of the repository. The name is not case sensitive. |
comment_idintegerObligatoireThe unique identifier of the comment. |
| Paramètres du corps |
| Nom, Type, Description |
contentstringObligatoireThe reaction type to add to the commit comment. Peut être: |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
200 | Reaction exists |
201 | Reaction created |
415 | Preview header missing |
422 | Validation failed, or the endpoint has been spammed. |
Exemples de code
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/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"
}Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
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.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
ownerstringObligatoireThe account owner of the repository. The name is not case sensitive. |
repostringObligatoireThe name of the repository. The name is not case sensitive. |
comment_idintegerObligatoireThe unique identifier of the comment. |
reaction_idintegerObligatoireThe unique identifier of the reaction. |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
204 | No Content |
Exemples de code
curl \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/comments/COMMENT_ID/reactions/REACTION_IDResponse
Status: 204Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List reactions for an issue comment
List the reactions to an issue comment.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
ownerstringObligatoireThe account owner of the repository. The name is not case sensitive. |
repostringObligatoireThe name of the repository. The name is not case sensitive. |
comment_idintegerObligatoireThe unique identifier of the comment. |
| Paramètres de requête |
| Nom, Type, Description |
contentstringReturns a single reaction type. Omit this parameter to list all reactions to an issue comment. Peut être: |
per_pageintegerThe number of results per page (max 100). Default: |
pageintegerPage number of the results to fetch. Default: |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
200 | OK |
404 | Resource not found |
Exemples de code
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/issues/comments/COMMENT_ID/reactionsResponse
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"
}
]Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
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.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
ownerstringObligatoireThe account owner of the repository. The name is not case sensitive. |
repostringObligatoireThe name of the repository. The name is not case sensitive. |
comment_idintegerObligatoireThe unique identifier of the comment. |
| Paramètres du corps |
| Nom, Type, Description |
contentstringObligatoireThe reaction type to add to the issue comment. Peut être: |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
200 | Reaction exists |
201 | Reaction created |
422 | Validation failed, or the endpoint has been spammed. |
Exemples de code
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/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"
}Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
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.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
ownerstringObligatoireThe account owner of the repository. The name is not case sensitive. |
repostringObligatoireThe name of the repository. The name is not case sensitive. |
comment_idintegerObligatoireThe unique identifier of the comment. |
reaction_idintegerObligatoireThe unique identifier of the reaction. |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
204 | No Content |
Exemples de code
curl \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/issues/comments/COMMENT_ID/reactions/REACTION_IDResponse
Status: 204Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List reactions for an issue
List the reactions to an issue.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
ownerstringObligatoireThe account owner of the repository. The name is not case sensitive. |
repostringObligatoireThe name of the repository. The name is not case sensitive. |
issue_numberintegerObligatoireThe number that identifies the issue. |
| Paramètres de requête |
| Nom, Type, Description |
contentstringReturns a single reaction type. Omit this parameter to list all reactions to an issue. Peut être: |
per_pageintegerThe number of results per page (max 100). Default: |
pageintegerPage number of the results to fetch. Default: |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
200 | OK |
404 | Resource not found |
410 | Gone |
Exemples de code
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/issues/ISSUE_NUMBER/reactionsResponse
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"
}
]Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
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.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
ownerstringObligatoireThe account owner of the repository. The name is not case sensitive. |
repostringObligatoireThe name of the repository. The name is not case sensitive. |
issue_numberintegerObligatoireThe number that identifies the issue. |
| Paramètres du corps |
| Nom, Type, Description |
contentstringObligatoireThe reaction type to add to the issue. Peut être: |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
200 | OK |
201 | Created |
422 | Validation failed, or the endpoint has been spammed. |
Exemples de code
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/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"
}Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
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.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
ownerstringObligatoireThe account owner of the repository. The name is not case sensitive. |
repostringObligatoireThe name of the repository. The name is not case sensitive. |
issue_numberintegerObligatoireThe number that identifies the issue. |
reaction_idintegerObligatoireThe unique identifier of the reaction. |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
204 | No Content |
Exemples de code
curl \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/issues/ISSUE_NUMBER/reactions/REACTION_IDResponse
Status: 204Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List reactions for a pull request review comment
List the reactions to a pull request review comment.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
ownerstringObligatoireThe account owner of the repository. The name is not case sensitive. |
repostringObligatoireThe name of the repository. The name is not case sensitive. |
comment_idintegerObligatoireThe unique identifier of the comment. |
| Paramètres de requête |
| Nom, Type, Description |
contentstringReturns a single reaction type. Omit this parameter to list all reactions to a pull request review comment. Peut être: |
per_pageintegerThe number of results per page (max 100). Default: |
pageintegerPage number of the results to fetch. Default: |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
200 | OK |
404 | Resource not found |
Exemples de code
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/comments/COMMENT_ID/reactionsResponse
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"
}
]Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
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.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
ownerstringObligatoireThe account owner of the repository. The name is not case sensitive. |
repostringObligatoireThe name of the repository. The name is not case sensitive. |
comment_idintegerObligatoireThe unique identifier of the comment. |
| Paramètres du corps |
| Nom, Type, Description |
contentstringObligatoireThe reaction type to add to the pull request review comment. Peut être: |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
200 | Reaction exists |
201 | Reaction created |
422 | Validation failed, or the endpoint has been spammed. |
Exemples de code
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/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"
}Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
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.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
ownerstringObligatoireThe account owner of the repository. The name is not case sensitive. |
repostringObligatoireThe name of the repository. The name is not case sensitive. |
comment_idintegerObligatoireThe unique identifier of the comment. |
reaction_idintegerObligatoireThe unique identifier of the reaction. |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
204 | No Content |
Exemples de code
curl \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/pulls/comments/COMMENT_ID/reactions/REACTION_IDResponse
Status: 204Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List reactions for a release
List the reactions to a release.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
ownerstringObligatoireThe account owner of the repository. The name is not case sensitive. |
repostringObligatoireThe name of the repository. The name is not case sensitive. |
release_idintegerObligatoireThe unique identifier of the release. |
| Paramètres de requête |
| Nom, Type, Description |
contentstringReturns a single reaction type. Omit this parameter to list all reactions to a release. Peut être: |
per_pageintegerThe number of results per page (max 100). Default: |
pageintegerPage number of the results to fetch. Default: |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
200 | OK |
404 | Resource not found |
415 | Preview header missing |
Exemples de code
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/releases/RELEASE_ID/reactionsResponse
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"
}
]Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
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.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
ownerstringObligatoireThe account owner of the repository. The name is not case sensitive. |
repostringObligatoireThe name of the repository. The name is not case sensitive. |
release_idintegerObligatoireThe unique identifier of the release. |
| Paramètres du corps |
| Nom, Type, Description |
contentstringObligatoireThe reaction type to add to the release. Peut être: |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
200 | Reaction exists |
201 | Reaction created |
422 | Validation failed, or the endpoint has been spammed. |
Exemples de code
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/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"
}Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
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.
Paramètres
| En-têtes |
|---|
| Nom, Type, Description |
acceptstringSetting to |
| Paramètres de chemin d’accès |
| Nom, Type, Description |
ownerstringObligatoireThe account owner of the repository. The name is not case sensitive. |
repostringObligatoireThe name of the repository. The name is not case sensitive. |
release_idintegerObligatoireThe unique identifier of the release. |
reaction_idintegerObligatoireThe unique identifier of the reaction. |
Codes de statut de réponse HTTP
| Code d’état | Description |
|---|---|
204 | No Content |
Exemples de code
curl \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/releases/RELEASE_ID/reactions/REACTION_IDResponse
Status: 204Avis de préversion
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.