[ { "verb": "get", "requestPath": "/", "serverUrl": "https://api.github.com", "parameters": [], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/", "html": "
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /')",
"html": "await octokit.request('GET /')\n"
}
],
"summary": "GitHub API Root",
"description": "Get Hypermedia links to resources accessible in GitHub's REST API",
"tags": [
"meta"
],
"operationId": "meta/root",
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "meta"
},
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint"
},
"slug": "github-api-root",
"category": "meta",
"categoryLabel": "Meta",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Get Hypermedia links to resources accessible in GitHub's REST API
" }, { "verb": "get", "requestPath": "/app", "serverUrl": "https://api.github.com", "parameters": [], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /app')",
"html": "await octokit.request('GET /app')\n"
}
],
"summary": "Get the authenticated app",
"description": "Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the \"[List installations for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)\" endpoint.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-authenticated",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#get-the-authenticated-app"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "apps",
"subcategory": null
},
"slug": "get-the-authenticated-app",
"category": "apps",
"categoryLabel": "Apps",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the installations_count in the response. For more details about your app's installations, see the \"List installations for the authenticated app\" endpoint.
You must use a JWT to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n}\n"
}
]
},
{
"verb": "post",
"requestPath": "/app-manifests/{code}/conversions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "code",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app-manifests/CODE/conversions",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app-manifests/CODE/conversions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /app-manifests/{code}/conversions', {\n code: 'code'\n})",
"html": "await octokit.request('POST /app-manifests/{code}/conversions', {\n code: 'code'\n})\n"
}
],
"summary": "Create a GitHub App from a manifest",
"description": "Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`.",
"tags": [
"apps"
],
"operationId": "apps/create-from-manifest",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": null
},
"slug": "create-a-github-app-from-a-manifest",
"category": "apps",
"categoryLabel": "Apps",
"contentType": "application/json",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Use this endpoint to complete the handshake necessary when implementing the GitHub App Manifest flow. When you create a GitHub App with the manifest flow, you receive a temporary code used to retrieve the GitHub App's id, pem (private key), and webhook_secret.
{\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDxOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ],\n \"client_id\": \"Iv1.8a61f9b3a7aba766\",\n \"client_secret\": \"1726be1638095a19edd134c77bde3aa2ece1e5d8\",\n \"webhook_secret\": \"e340154128314309424b7c8e90325147d99fdafa\",\n \"pem\": \"-----BEGIN RSA PRIVATE KEY-----\\nMIIEowIBAAKCAQEAuEPzOUE+kiEH1WLiMeBytTEF856j0hOVcSUSUkZxKvqczkWM\\n9vo1gDyC7ZXhdH9fKh32aapba3RSsp4ke+giSmYTk2mGR538ShSDxh0OgpJmjiKP\\nX0Bj4j5sFqfXuCtl9SkH4iueivv4R53ktqM+n6hk98l6hRwC39GVIblAh2lEM4L/\\n6WvYwuQXPMM5OG2Ryh2tDZ1WS5RKfgq+9ksNJ5Q9UtqtqHkO+E63N5OK9sbzpUUm\\noNaOl3udTlZD3A8iqwMPVxH4SxgATBPAc+bmjk6BMJ0qIzDcVGTrqrzUiywCTLma\\nszdk8GjzXtPDmuBgNn+o6s02qVGpyydgEuqmTQIDAQABAoIBACL6AvkjQVVLn8kJ\\ndBYznJJ4M8ECo+YEgaFwgAHODT0zRQCCgzd+Vxl4YwHmKV2Lr+y2s0drZt8GvYva\\nKOK8NYYZyi15IlwFyRXmvvykF1UBpSXluYFDH7KaVroWMgRreHcIys5LqVSIb6Bo\\ngDmK0yBLPp8qR29s2b7ScZRtLaqGJiX+j55rNzrZwxHkxFHyG9OG+u9IsBElcKCP\\nkYCVE8ZdYexfnKOZbgn2kZB9qu0T/Mdvki8yk3I2bI6xYO24oQmhnT36qnqWoCBX\\nNuCNsBQgpYZeZET8mEAUmo9d+ABmIHIvSs005agK8xRaP4+6jYgy6WwoejJRF5yd\\nNBuF7aECgYEA50nZ4FiZYV0vcJDxFYeY3kYOvVuKn8OyW+2rg7JIQTremIjv8FkE\\nZnwuF9ZRxgqLxUIfKKfzp/5l5LrycNoj2YKfHKnRejxRWXqG+ZETfxxlmlRns0QG\\nJ4+BYL0CoanDSeA4fuyn4Bv7cy/03TDhfg/Uq0Aeg+hhcPE/vx3ebPsCgYEAy/Pv\\neDLssOSdeyIxf0Brtocg6aPXIVaLdus+bXmLg77rJIFytAZmTTW8SkkSczWtucI3\\nFI1I6sei/8FdPzAl62/JDdlf7Wd9K7JIotY4TzT7Tm7QU7xpfLLYIP1bOFjN81rk\\n77oOD4LsXcosB/U6s1blPJMZ6AlO2EKs10UuR1cCgYBipzuJ2ADEaOz9RLWwi0AH\\nPza2Sj+c2epQD9ZivD7Zo/Sid3ZwvGeGF13JyR7kLEdmAkgsHUdu1rI7mAolXMaB\\n1pdrsHureeLxGbRM6za3tzMXWv1Il7FQWoPC8ZwXvMOR1VQDv4nzq7vbbA8z8c+c\\n57+8tALQHOTDOgQIzwK61QKBgERGVc0EJy4Uag+VY8J4m1ZQKBluqo7TfP6DQ7O8\\nM5MX73maB/7yAX8pVO39RjrhJlYACRZNMbK+v/ckEQYdJSSKmGCVe0JrGYDuPtic\\nI9+IGfSorf7KHPoMmMN6bPYQ7Gjh7a++tgRFTMEc8956Hnt4xGahy9NcglNtBpVN\\n6G8jAoGBAMCh028pdzJa/xeBHLLaVB2sc0Fe7993WlsPmnVE779dAz7qMscOtXJK\\nfgtriltLSSD6rTA9hUAsL/X62rY0wdXuNdijjBb/qvrx7CAV6i37NK1CjABNjsfG\\nZM372Ac6zc1EqSrid2IjET1YqyIW2KGLI1R2xbQc98UGlt48OdWu\\n-----END RSA PRIVATE KEY-----\\n\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/app/hook/config",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/hook/config",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/hook/config"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /app/hook/config')",
"html": "await octokit.request('GET /app/hook/config')\n"
}
],
"summary": "Get a webhook configuration for an app",
"description": "Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see \"[Creating a GitHub App](/developers/apps/creating-a-github-app).\"\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-webhook-config-for-app",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "webhooks"
},
"slug": "get-a-webhook-configuration-for-an-app",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see \"Creating a GitHub App.\"
\nYou must use a JWT to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"content_type\": \"json\",\n \"insecure_ssl\": \"0\",\n \"secret\": \"********\",\n \"url\": \"https://example.com/webhook\"\n}\n"
}
]
},
{
"verb": "patch",
"requestPath": "/app/hook/config",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/hook/config \\\n -d '{\"url\":\"url\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/hook/config \\\n -d '{\"url\":\"url\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /app/hook/config', {\n url: 'url'\n})",
"html": "await octokit.request('PATCH /app/hook/config', {\n url: 'url'\n})\n"
}
],
"summary": "Update a webhook configuration for an app",
"description": "Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see \"[Creating a GitHub App](/developers/apps/creating-a-github-app).\"\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/update-webhook-config-for-app",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, "content_type": { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see \"Creating a GitHub App.\"
\nYou must use a JWT to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"content_type\": \"json\",\n \"insecure_ssl\": \"0\",\n \"secret\": \"********\",\n \"url\": \"https://example.com/webhook\"\n}\n"
}
],
"bodyParameters": [
{
"type": "string",
"description": "The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Results per page (max 100)
" }, { "name": "cursor", "description": "Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors.", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the link header for the next and previous page cursors.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/hook/deliveries"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /app/hook/deliveries')",
"html": "await octokit.request('GET /app/hook/deliveries')\n"
}
],
"summary": "List deliveries for an app webhook",
"description": "Returns a list of webhook deliveries for the webhook configured for a GitHub App.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/list-webhook-deliveries",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "webhooks"
},
"slug": "list-deliveries-for-an-app-webhook",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns a list of webhook deliveries for the webhook configured for a GitHub App.
\nYou must use a JWT to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 12345678,\n \"guid\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"delivered_at\": \"2019-06-03T00:57:16Z\",\n \"redelivery\": false,\n \"duration\": 0.27,\n \"status\": \"OK\",\n \"status_code\": 200,\n \"event\": \"issues\",\n \"action\": \"opened\",\n \"installation_id\": 123,\n \"repository_id\": 456\n },\n {\n \"id\": 123456789,\n \"guid\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"delivered_at\": \"2019-06-04T00:57:16Z\",\n \"redelivery\": true,\n \"duration\": 0.28,\n \"status\": \"OK\",\n \"status_code\": 200,\n \"event\": \"issues\",\n \"action\": \"opened\",\n \"installation_id\": 123,\n \"repository_id\": 456\n }\n]\n"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Bad Request"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/app/hook/deliveries/{delivery_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "delivery_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/hook/deliveries/42",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/hook/deliveries/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /app/hook/deliveries/{delivery_id}', {\n delivery_id: 42\n})",
"html": "await octokit.request('GET /app/hook/deliveries/{delivery_id}', {\n delivery_id: 42\n})\n"
}
],
"summary": "Get a delivery for an app webhook",
"description": "Returns a delivery for the webhook configured for a GitHub App.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-webhook-delivery",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "webhooks"
},
"slug": "get-a-delivery-for-an-app-webhook",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns a delivery for the webhook configured for a GitHub App.
\nYou must use a JWT to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 12345678,\n \"guid\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"delivered_at\": \"2019-06-03T00:57:16Z\",\n \"redelivery\": false,\n \"duration\": 0.27,\n \"status\": \"OK\",\n \"status_code\": 200,\n \"event\": \"issues\",\n \"action\": \"opened\",\n \"installation_id\": 123,\n \"repository_id\": 456,\n \"url\": \"https://www.example.com\",\n \"request\": {\n \"headers\": {\n \"X-GitHub-Delivery\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"X-Hub-Signature-256\": \"sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"Accept\": \"*/*\",\n \"X-GitHub-Hook-ID\": \"42\",\n \"User-Agent\": \"GitHub-Hookshot/b8c71d8\",\n \"X-GitHub-Event\": \"issues\",\n \"X-GitHub-Hook-Installation-Target-ID\": \"123\",\n \"X-GitHub-Hook-Installation-Target-Type\": \"repository\",\n \"content-type\": \"application/json\",\n \"X-Hub-Signature\": \"sha1=a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\"\n },\n \"payload\": {\n \"action\": \"opened\",\n \"issue\": {\n \"body\": \"foo\"\n },\n \"repository\": {\n \"id\": 123\n }\n }\n },\n \"response\": {\n \"headers\": {\n \"Content-Type\": \"text/html;charset=utf-8\"\n },\n \"payload\": \"ok\"\n }\n}\n"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Bad Request"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "post",
"requestPath": "/app/hook/deliveries/{delivery_id}/attempts",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "delivery_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/hook/deliveries/42/attempts",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/hook/deliveries/42/attempts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /app/hook/deliveries/{delivery_id}/attempts', {\n delivery_id: 42\n})",
"html": "await octokit.request('POST /app/hook/deliveries/{delivery_id}/attempts', {\n delivery_id: 42\n})\n"
}
],
"summary": "Redeliver a delivery for an app webhook",
"description": "Redeliver a delivery for the webhook configured for a GitHub App.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/redeliver-webhook-delivery",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "webhooks"
},
"slug": "redeliver-a-delivery-for-an-app-webhook",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"responses": [
{
"httpStatusCode": "202",
"httpStatusMessage": "Accepted",
"description": "Accepted"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Bad Request"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [],
"descriptionHTML": "Redeliver a delivery for the webhook configured for a GitHub App.
\nYou must use a JWT to access this endpoint.
" }, { "verb": "get", "requestPath": "/app/installations", "serverUrl": "https://api.github.com", "parameters": [ { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" }, { "name": "since", "description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", "in": "query", "required": false, "schema": { "type": "string", "format": "date-time" }, "descriptionHTML": "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/installations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /app/installations')",
"html": "await octokit.request('GET /app/installations')\n"
}
],
"summary": "List installations for the authenticated app",
"description": "You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.\n\nThe permissions the installation has are included under the `permissions` key.",
"tags": [
"apps"
],
"operationId": "apps/list-installations",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "apps",
"subcategory": null
},
"slug": "list-installations-for-the-authenticated-app",
"category": "apps",
"categoryLabel": "Apps",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "You must use a JWT to access this endpoint.
\nThe permissions the installation has are included under the permissions key.
[\n {\n \"id\": 1,\n \"account\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n \"repositories_url\": \"https://api.github.com/installation/repositories\",\n \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n \"app_id\": 1,\n \"target_id\": 1,\n \"target_type\": \"Organization\",\n \"permissions\": {\n \"checks\": \"write\",\n \"metadata\": \"read\",\n \"contents\": \"read\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ],\n \"single_file_name\": \"config.yaml\",\n \"has_multiple_single_files\": true,\n \"single_file_paths\": [\n \"config.yml\",\n \".github/issue_TEMPLATE.md\"\n ],\n \"repository_selection\": \"selected\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"app_slug\": \"github-actions\",\n \"suspended_at\": null,\n \"suspended_by\": null\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/app/installations/{installation_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "installation_id",
"description": "installation_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "installation_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/installations/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/installations/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /app/installations/{installation_id}', {\n installation_id: 42\n})",
"html": "await octokit.request('GET /app/installations/{installation_id}', {\n installation_id: 42\n})\n"
}
],
"summary": "Get an installation for the authenticated app",
"description": "Enables an authenticated GitHub App to find an installation's information using the installation id. The installation's account type (`target_type`) will be either an organization or a user account, depending which account the repository belongs to.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-installation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "apps",
"subcategory": null
},
"slug": "get-an-installation-for-the-authenticated-app",
"category": "apps",
"categoryLabel": "Apps",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Enables an authenticated GitHub App to find an installation's information using the installation id. The installation's account type (target_type) will be either an organization or a user account, depending which account the repository belongs to.
You must use a JWT to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"account\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n \"repositories_url\": \"https://api.github.com/installation/repositories\",\n \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n \"app_id\": 1,\n \"target_id\": 1,\n \"target_type\": \"Organization\",\n \"permissions\": {\n \"checks\": \"write\",\n \"metadata\": \"read\",\n \"contents\": \"read\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ],\n \"single_file_name\": \"config.yaml\",\n \"has_multiple_single_files\": true,\n \"single_file_paths\": [\n \"config.yml\",\n \".github/issue_TEMPLATE.md\"\n ],\n \"repository_selection\": \"selected\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"app_slug\": \"github-actions\",\n \"suspended_at\": null,\n \"suspended_by\": null\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "415",
"httpStatusMessage": "Unsupported Media Type",
"description": "Preview header missing"
}
]
},
{
"verb": "delete",
"requestPath": "/app/installations/{installation_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "installation_id",
"description": "installation_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "installation_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/installations/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/installations/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /app/installations/{installation_id}', {\n installation_id: 42\n})",
"html": "await octokit.request('DELETE /app/installations/{installation_id}', {\n installation_id: 42\n})\n"
}
],
"summary": "Delete an installation for the authenticated app",
"description": "Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the \"[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)\" endpoint.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/delete-installation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": null
},
"slug": "delete-an-installation-for-the-authenticated-app",
"category": "apps",
"categoryLabel": "Apps",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the \"Suspend an app installation\" endpoint.
\nYou must use a JWT to access this endpoint.
" }, { "verb": "post", "requestPath": "/app/installations/{installation_id}/access_tokens", "serverUrl": "https://api.github.com", "parameters": [ { "name": "installation_id", "description": "installation_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "installation_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/installations/42/access_tokens \\\n -d '{\"repositories\":[\"repositories\"]}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/installations/42/access_tokens \\\n -d '{\"repositories\":[\"repositories\"]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /app/installations/{installation_id}/access_tokens', {\n installation_id: 42,\n repositories: [\n 'repositories'\n ]\n})",
"html": "await octokit.request('POST /app/installations/{installation_id}/access_tokens', {\n installation_id: 42,\n repositories: [\n 'repositories'\n ]\n})\n"
}
],
"summary": "Create an installation access token for an app",
"description": "Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/create-installation-access-token",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"repositories": {
"description": "List of repository names that the token should have access to
", "type": "array of strings", "items": { "type": "string", "example": "rails" }, "name": "repositories", "in": "body", "rawType": "array", "rawDescription": "List of repository names that the token should have access to", "childParamsGroups": [] }, "repository_ids": { "description": "List of repository IDs that the token should have access to
", "example": [ 1 ], "type": "array of integers", "items": { "type": "integer" }, "name": "repository_ids", "in": "body", "rawType": "array", "rawDescription": "List of repository IDs that the token should have access to", "childParamsGroups": [] }, "permissions": { "title": "App Permissions", "type": "object", "description": "The permissions granted to the user-to-server access token.
", "properties": { "actions": { "type": "string", "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: read or write.
The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: read or write.
The level of permission to grant the access token for checks on code. Can be one of: read or write.
The level of permission to grant the access token for notification of content references and creation content attachments. Can be one of: read or write.
The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: read or write.
The level of permission to grant the access token for deployments and deployment statuses. Can be one of: read or write.
The level of permission to grant the access token for managing repository environments. Can be one of: read or write.
The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: read or write.
The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: read or write.
The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: read or write.
The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: read or write.
The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: read or write.
The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: read or write.
The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: read, write, or admin.
The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: read or write.
The level of permission to grant the access token to manage repository secrets. Can be one of: read or write.
The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: read or write.
The level of permission to grant the access token to manage just a single file. Can be one of: read or write.
The level of permission to grant the access token for commit statuses. Can be one of: read or write.
The level of permission to grant the access token to retrieve Dependabot alerts. Can be one of: read.
The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: write.
The level of permission to grant the access token for organization teams and members. Can be one of: read or write.
The level of permission to grant the access token to manage access to an organization. Can be one of: read or write.
The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: read or write.
The level of permission to grant the access token for viewing an organization's plan. Can be one of: read.
The level of permission to grant the access token to manage organization projects and projects beta (where available). Can be one of: read, write, or admin.
The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: read or write.
The level of permission to grant the access token to manage organization secrets. Can be one of: read or write.
The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: read or write.
The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: read or write.
The level of permission to grant the access token to manage team discussions and related comments. Can be one of: read or write.
The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: read or write.
The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: read or write.
The level of permission to grant the access token for checks on code. Can be one of: read or write.
The level of permission to grant the access token for notification of content references and creation content attachments. Can be one of: read or write.
The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: read or write.
The level of permission to grant the access token for deployments and deployment statuses. Can be one of: read or write.
The level of permission to grant the access token for managing repository environments. Can be one of: read or write.
The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: read or write.
The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: read or write.
The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: read or write.
The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: read or write.
The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: read or write.
The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: read or write.
The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: read, write, or admin.
The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: read or write.
The level of permission to grant the access token to manage repository secrets. Can be one of: read or write.
The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: read or write.
The level of permission to grant the access token to manage just a single file. Can be one of: read or write.
The level of permission to grant the access token for commit statuses. Can be one of: read or write.
The level of permission to grant the access token to retrieve Dependabot alerts. Can be one of: read.
The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: write.
The level of permission to grant the access token for organization teams and members. Can be one of: read or write.
The level of permission to grant the access token to manage access to an organization. Can be one of: read or write.
The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: read or write.
The level of permission to grant the access token for viewing an organization's plan. Can be one of: read.
The level of permission to grant the access token to manage organization projects and projects beta (where available). Can be one of: read, write, or admin.
The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: read or write.
The level of permission to grant the access token to manage organization secrets. Can be one of: read or write.
The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: read or write.
The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: read or write.
The level of permission to grant the access token to manage team discussions and related comments. Can be one of: read or write.
Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of 401 - Unauthorized, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the repository_ids when creating the token. When you omit repository_ids, the response does not contain the repositories key.
You must use a JWT to access this endpoint.
", "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"token\": \"ghs_16C7e42F292c6912E7710c838347Ae178B4a\",\n \"expires_at\": \"2016-07-11T22:14:10Z\",\n \"permissions\": {\n \"issues\": \"write\",\n \"contents\": \"read\"\n },\n \"repository_selection\": \"selected\",\n \"repositories\": [\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n ]\n}\n"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "415",
"httpStatusMessage": "Unsupported Media Type",
"description": "Preview header missing"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"description": "List of repository names that the token should have access to
", "type": "array of strings", "items": { "type": "string", "example": "rails" }, "name": "repositories", "in": "body", "rawType": "array", "rawDescription": "List of repository names that the token should have access to", "childParamsGroups": [] }, { "description": "List of repository IDs that the token should have access to
", "example": [ 1 ], "type": "array of integers", "items": { "type": "integer" }, "name": "repository_ids", "in": "body", "rawType": "array", "rawDescription": "List of repository IDs that the token should have access to", "childParamsGroups": [] }, { "title": "App Permissions", "type": "object", "description": "The permissions granted to the user-to-server access token.
", "properties": { "actions": { "type": "string", "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: read or write.
The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: read or write.
The level of permission to grant the access token for checks on code. Can be one of: read or write.
The level of permission to grant the access token for notification of content references and creation content attachments. Can be one of: read or write.
The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: read or write.
The level of permission to grant the access token for deployments and deployment statuses. Can be one of: read or write.
The level of permission to grant the access token for managing repository environments. Can be one of: read or write.
The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: read or write.
The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: read or write.
The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: read or write.
The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: read or write.
The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: read or write.
The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: read or write.
The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: read, write, or admin.
The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: read or write.
The level of permission to grant the access token to manage repository secrets. Can be one of: read or write.
The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: read or write.
The level of permission to grant the access token to manage just a single file. Can be one of: read or write.
The level of permission to grant the access token for commit statuses. Can be one of: read or write.
The level of permission to grant the access token to retrieve Dependabot alerts. Can be one of: read.
The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: write.
The level of permission to grant the access token for organization teams and members. Can be one of: read or write.
The level of permission to grant the access token to manage access to an organization. Can be one of: read or write.
The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: read or write.
The level of permission to grant the access token for viewing an organization's plan. Can be one of: read.
The level of permission to grant the access token to manage organization projects and projects beta (where available). Can be one of: read, write, or admin.
The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: read or write.
The level of permission to grant the access token to manage organization secrets. Can be one of: read or write.
The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: read or write.
The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: read or write.
The level of permission to grant the access token to manage team discussions and related comments. Can be one of: read or write.
The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: read or write.
The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: read or write.
The level of permission to grant the access token for checks on code. Can be one of: read or write.
The level of permission to grant the access token for notification of content references and creation content attachments. Can be one of: read or write.
The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: read or write.
The level of permission to grant the access token for deployments and deployment statuses. Can be one of: read or write.
The level of permission to grant the access token for managing repository environments. Can be one of: read or write.
The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: read or write.
The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: read or write.
The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: read or write.
The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: read or write.
The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: read or write.
The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: read or write.
The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: read, write, or admin.
The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: read or write.
The level of permission to grant the access token to manage repository secrets. Can be one of: read or write.
The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: read or write.
The level of permission to grant the access token to manage just a single file. Can be one of: read or write.
The level of permission to grant the access token for commit statuses. Can be one of: read or write.
The level of permission to grant the access token to retrieve Dependabot alerts. Can be one of: read.
The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: write.
The level of permission to grant the access token for organization teams and members. Can be one of: read or write.
The level of permission to grant the access token to manage access to an organization. Can be one of: read or write.
The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: read or write.
The level of permission to grant the access token for viewing an organization's plan. Can be one of: read.
The level of permission to grant the access token to manage organization projects and projects beta (where available). Can be one of: read, write, or admin.
The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: read or write.
The level of permission to grant the access token to manage organization secrets. Can be one of: read or write.
The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: read or write.
The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: read or write.
The level of permission to grant the access token to manage team discussions and related comments. Can be one of: read or write.
installation_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/installations/42/suspended", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/installations/42/suspended"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /app/installations/{installation_id}/suspended', {\n installation_id: 42\n})",
"html": "await octokit.request('PUT /app/installations/{installation_id}/suspended', {\n installation_id: 42\n})\n"
}
],
"summary": "Suspend an app installation",
"description": "Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/suspend-installation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#suspend-an-app-installation"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": null
},
"slug": "suspend-an-app-installation",
"category": "apps",
"categoryLabel": "Apps",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account.
\nYou must use a JWT to access this endpoint.
" }, { "verb": "delete", "requestPath": "/app/installations/{installation_id}/suspended", "serverUrl": "https://api.github.com", "parameters": [ { "name": "installation_id", "description": "installation_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "installation_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/installations/42/suspended", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/app/installations/42/suspended"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /app/installations/{installation_id}/suspended', {\n installation_id: 42\n})",
"html": "await octokit.request('DELETE /app/installations/{installation_id}/suspended', {\n installation_id: 42\n})\n"
}
],
"summary": "Unsuspend an app installation",
"description": "Removes a GitHub App installation suspension.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/unsuspend-installation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": null
},
"slug": "unsuspend-an-app-installation",
"category": "apps",
"categoryLabel": "Apps",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Removes a GitHub App installation suspension.
\nYou must use a JWT to access this endpoint.
" }, { "verb": "get", "requestPath": "/applications/grants", "serverUrl": "https://api.github.com", "parameters": [ { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" }, { "name": "client_id", "in": "query", "required": false, "description": "The client ID of your GitHub app.", "schema": { "type": "string" }, "descriptionHTML": "The client ID of your GitHub app.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/grants", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/grants"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /applications/grants')",
"html": "await octokit.request('GET /applications/grants')\n"
}
],
"summary": "List your grants",
"description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\nYou can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://docs.github.com/rest/reference/oauth-authorizations#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `[\"repo\", \"user\"]`.",
"tags": [
"oauth-authorizations"
],
"operationId": "oauth-authorizations/list-grants",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/oauth-authorizations#list-your-grants"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"removalDate": "2020-11-13",
"deprecationDate": "2020-02-14",
"category": "oauth-authorizations",
"subcategory": null
},
"deprecated": true,
"slug": "list-your-grants",
"category": "oauth-authorizations",
"categoryLabel": "Oauth authorizations",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nYou can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the list your authorizations API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on the application authorizations settings screen within GitHub. The scopes returned are the union of scopes authorized for the application. For example, if an application has one token with repo scope and another token with user scope, the grant will return [\"repo\", \"user\"].
[\n {\n \"id\": 1,\n \"url\": \"https://api.github.com/applications/grants/1\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"scopes\": [\n \"public_repo\"\n ]\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/applications/grants/{grant_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "grant_id",
"description": "grant_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "grant_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/grants/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/grants/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /applications/grants/{grant_id}', {\n grant_id: 42\n})",
"html": "await octokit.request('GET /applications/grants/{grant_id}', {\n grant_id: 42\n})\n"
}
],
"summary": "Get a single grant",
"description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).",
"tags": [
"oauth-authorizations"
],
"operationId": "oauth-authorizations/get-grant",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/oauth-authorizations#get-a-single-grant"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"removalDate": "2020-11-13",
"deprecationDate": "2020-02-14",
"category": "oauth-authorizations",
"subcategory": null
},
"deprecated": true,
"slug": "get-a-single-grant",
"category": "oauth-authorizations",
"categoryLabel": "Oauth authorizations",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"url\": \"https://api.github.com/applications/grants/1\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"scopes\": [\n \"public_repo\"\n ]\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "delete",
"requestPath": "/applications/grants/{grant_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "grant_id",
"description": "grant_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "grant_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/grants/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/grants/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /applications/grants/{grant_id}', {\n grant_id: 42\n})",
"html": "await octokit.request('DELETE /applications/grants/{grant_id}', {\n grant_id: 42\n})\n"
}
],
"summary": "Delete a grant",
"description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\nDeleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).",
"tags": [
"oauth-authorizations"
],
"operationId": "oauth-authorizations/delete-grant",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/oauth-authorizations#delete-a-grant"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"removalDate": "2020-11-13",
"deprecationDate": "2020-02-14",
"category": "oauth-authorizations",
"subcategory": null
},
"deprecated": true,
"slug": "delete-a-grant",
"category": "oauth-authorizations",
"categoryLabel": "Oauth authorizations",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nDeleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on the application authorizations settings screen within GitHub.
" }, { "verb": "delete", "requestPath": "/applications/{client_id}/grant", "serverUrl": "https://api.github.com", "parameters": [ { "name": "client_id", "in": "path", "required": true, "description": "The client ID of your GitHub app.", "schema": { "type": "string" }, "descriptionHTML": "The client ID of your GitHub app.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/grant \\\n -d '{\"access_token\":\"access_token\"}'", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/grant \\\n -d '{\"access_token\":\"access_token\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /applications/{client_id}/grant', {\n client_id: 'client_id',\n access_token: 'access_token'\n})",
"html": "await octokit.request('DELETE /applications/{client_id}/grant', {\n client_id: 'client_id',\n access_token: 'access_token'\n})\n"
}
],
"summary": "Delete an app authorization",
"description": "OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.\nDeleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).",
"operationId": "apps/delete-authorization",
"tags": [
"apps"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#delete-an-app-authorization"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string",
"description": "Required. The OAuth access token used to authenticate to the GitHub API.
", "name": "access_token", "in": "body", "rawType": "string", "rawDescription": "The OAuth access token used to authenticate to the GitHub API.", "childParamsGroups": [] } }, "required": [ "access_token" ] }, "example": { "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "apps", "subcategory": "oauth-applications" }, "slug": "delete-an-app-authorization", "category": "apps", "categoryLabel": "Apps", "subcategory": "oauth-applications", "subcategoryLabel": "Oauth applications", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "204", "httpStatusMessage": "No Content", "description": "Response" }, { "httpStatusCode": "422", "httpStatusMessage": "Unprocessable Entity", "description": "Validation failed" } ], "descriptionHTML": "OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. You must also provide a valid OAuth access_token as an input parameter and the grant for the token's owner will be deleted.\nDeleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on the application authorizations settings screen within GitHub.
Required. The OAuth access token used to authenticate to the GitHub API.
", "name": "access_token", "in": "body", "rawType": "string", "rawDescription": "The OAuth access token used to authenticate to the GitHub API.", "childParamsGroups": [] } ] }, { "verb": "post", "requestPath": "/applications/{client_id}/token", "serverUrl": "https://api.github.com", "parameters": [ { "name": "client_id", "in": "path", "required": true, "description": "The client ID of your GitHub app.", "schema": { "type": "string" }, "descriptionHTML": "The client ID of your GitHub app.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/token \\\n -d '{\"access_token\":\"access_token\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/token \\\n -d '{\"access_token\":\"access_token\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /applications/{client_id}/token', {\n client_id: 'client_id',\n access_token: 'access_token'\n})",
"html": "await octokit.request('POST /applications/{client_id}/token', {\n client_id: 'client_id',\n access_token: 'access_token'\n})\n"
}
],
"summary": "Check a token",
"description": "OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`.",
"tags": [
"apps"
],
"operationId": "apps/check-token",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#check-a-token"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"access_token": {
"description": "Required. The access_token of the OAuth application.
", "type": "string", "name": "access_token", "in": "body", "rawType": "string", "rawDescription": "The access_token of the OAuth application.", "childParamsGroups": [] } }, "required": [ "access_token" ], "type": "object" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "apps", "subcategory": "oauth-applications" }, "slug": "check-a-token", "category": "apps", "categoryLabel": "Apps", "subcategory": "oauth-applications", "subcategoryLabel": "Oauth applications", "contentType": "application/json", "notes": [], "descriptionHTML": "OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use Basic Authentication to use this endpoint, where the username is the OAuth application client_id and the password is its client_secret. Invalid tokens will return 404 NOT FOUND.
Required. The access_token of the OAuth application.
", "type": "string", "name": "access_token", "in": "body", "rawType": "string", "rawDescription": "The access_token of the OAuth application.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"url\": \"https://api.github.com/authorizations/1\",\n \"scopes\": [\n \"public_repo\",\n \"user\"\n ],\n \"token\": \"ghu_16C7e42F292c6912E7710c838347Ae178B4a\",\n \"token_last_eight\": \"Ae178B4a\",\n \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"note\": \"optional note\",\n \"note_url\": \"http://optional/note/url\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"fingerprint\": \"jklmnop12345678\",\n \"expires_at\": \"2011-09-08T17:26:27Z\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "patch",
"requestPath": "/applications/{client_id}/token",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "client_id",
"in": "path",
"required": true,
"description": "The client ID of your GitHub app.",
"schema": {
"type": "string"
},
"descriptionHTML": "The client ID of your GitHub app.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/token \\\n -d '{\"access_token\":\"access_token\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/token \\\n -d '{\"access_token\":\"access_token\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /applications/{client_id}/token', {\n client_id: 'client_id',\n access_token: 'access_token'\n})",
"html": "await octokit.request('PATCH /applications/{client_id}/token', {\n client_id: 'client_id',\n access_token: 'access_token'\n})\n"
}
],
"summary": "Reset a token",
"description": "OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the \"token\" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.",
"tags": [
"apps"
],
"operationId": "apps/reset-token",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#reset-a-token"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"access_token": {
"description": "Required. The access_token of the OAuth application.
", "type": "string", "name": "access_token", "in": "body", "rawType": "string", "rawDescription": "The access_token of the OAuth application.", "childParamsGroups": [] } }, "required": [ "access_token" ], "type": "object" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "apps", "subcategory": "oauth-applications" }, "slug": "reset-a-token", "category": "apps", "categoryLabel": "Apps", "subcategory": "oauth-applications", "subcategoryLabel": "Oauth applications", "contentType": "application/json", "notes": [], "descriptionHTML": "OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the \"token\" property in the response because changes take effect immediately. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
Required. The access_token of the OAuth application.
", "type": "string", "name": "access_token", "in": "body", "rawType": "string", "rawDescription": "The access_token of the OAuth application.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"url\": \"https://api.github.com/authorizations/1\",\n \"scopes\": [\n \"public_repo\",\n \"user\"\n ],\n \"token\": \"ghu_16C7e42F292c6912E7710c838347Ae178B4a\",\n \"token_last_eight\": \"Ae178B4a\",\n \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"note\": \"optional note\",\n \"note_url\": \"http://optional/note/url\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"fingerprint\": \"jklmnop12345678\",\n \"expires_at\": \"2011-09-08T17:26:27Z\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/applications/{client_id}/token",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "client_id",
"in": "path",
"required": true,
"description": "The client ID of your GitHub app.",
"schema": {
"type": "string"
},
"descriptionHTML": "The client ID of your GitHub app.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/token \\\n -d '{\"access_token\":\"access_token\"}'", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/token \\\n -d '{\"access_token\":\"access_token\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /applications/{client_id}/token', {\n client_id: 'client_id',\n access_token: 'access_token'\n})",
"html": "await octokit.request('DELETE /applications/{client_id}/token', {\n client_id: 'client_id',\n access_token: 'access_token'\n})\n"
}
],
"summary": "Delete an app token",
"description": "OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password.",
"tags": [
"apps"
],
"operationId": "apps/delete-token",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#delete-an-app-token"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string",
"description": "Required. The OAuth access token used to authenticate to the GitHub API.
", "name": "access_token", "in": "body", "rawType": "string", "rawDescription": "The OAuth access token used to authenticate to the GitHub API.", "childParamsGroups": [] } }, "required": [ "access_token" ] }, "example": { "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "apps", "subcategory": "oauth-applications" }, "slug": "delete-an-app-token", "category": "apps", "categoryLabel": "Apps", "subcategory": "oauth-applications", "subcategoryLabel": "Oauth applications", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "204", "httpStatusMessage": "No Content", "description": "Response" }, { "httpStatusCode": "422", "httpStatusMessage": "Unprocessable Entity", "description": "Validation failed" } ], "descriptionHTML": "OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password.
Required. The OAuth access token used to authenticate to the GitHub API.
", "name": "access_token", "in": "body", "rawType": "string", "rawDescription": "The OAuth access token used to authenticate to the GitHub API.", "childParamsGroups": [] } ] }, { "verb": "post", "requestPath": "/applications/{client_id}/token/scoped", "serverUrl": "https://api.github.com", "parameters": [ { "name": "client_id", "in": "path", "required": true, "description": "The client ID of your GitHub app.", "schema": { "type": "string" }, "descriptionHTML": "The client ID of your GitHub app.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/token/scoped \\\n -d '{\"access_token\":\"access_token\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/token/scoped \\\n -d '{\"access_token\":\"access_token\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /applications/{client_id}/token/scoped', {\n client_id: 'client_id',\n access_token: 'access_token'\n})",
"html": "await octokit.request('POST /applications/{client_id}/token/scoped', {\n client_id: 'client_id',\n access_token: 'access_token'\n})\n"
}
],
"summary": "Create a scoped access token",
"description": "Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.",
"tags": [
"apps"
],
"operationId": "apps/scope-token",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#create-a-scoped-access-token"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string",
"description": "Required. The OAuth access token used to authenticate to the GitHub API.
", "example": "e72e16c7e42f292c6912e7710c838347ae178b4a", "name": "access_token", "in": "body", "rawType": "string", "rawDescription": "The OAuth access token used to authenticate to the GitHub API.", "childParamsGroups": [] }, "target": { "description": "The name of the user or organization to scope the user-to-server access token to. Required unless target_id is specified.
The ID of the user or organization to scope the user-to-server access token to. Required unless target is specified.
The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified.
The list of repository IDs to scope the user-to-server access token to. repository_ids may not be specified if repositories is specified.
The permissions granted to the user-to-server access token.
", "properties": { "actions": { "type": "string", "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: read or write.
The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: read or write.
The level of permission to grant the access token for checks on code. Can be one of: read or write.
The level of permission to grant the access token for notification of content references and creation content attachments. Can be one of: read or write.
The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: read or write.
The level of permission to grant the access token for deployments and deployment statuses. Can be one of: read or write.
The level of permission to grant the access token for managing repository environments. Can be one of: read or write.
The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: read or write.
The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: read or write.
The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: read or write.
The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: read or write.
The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: read or write.
The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: read or write.
The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: read, write, or admin.
The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: read or write.
The level of permission to grant the access token to manage repository secrets. Can be one of: read or write.
The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: read or write.
The level of permission to grant the access token to manage just a single file. Can be one of: read or write.
The level of permission to grant the access token for commit statuses. Can be one of: read or write.
The level of permission to grant the access token to retrieve Dependabot alerts. Can be one of: read.
The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: write.
The level of permission to grant the access token for organization teams and members. Can be one of: read or write.
The level of permission to grant the access token to manage access to an organization. Can be one of: read or write.
The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: read or write.
The level of permission to grant the access token for viewing an organization's plan. Can be one of: read.
The level of permission to grant the access token to manage organization projects and projects beta (where available). Can be one of: read, write, or admin.
The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: read or write.
The level of permission to grant the access token to manage organization secrets. Can be one of: read or write.
The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: read or write.
The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: read or write.
The level of permission to grant the access token to manage team discussions and related comments. Can be one of: read or write.
The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: read or write.
The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: read or write.
The level of permission to grant the access token for checks on code. Can be one of: read or write.
The level of permission to grant the access token for notification of content references and creation content attachments. Can be one of: read or write.
The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: read or write.
The level of permission to grant the access token for deployments and deployment statuses. Can be one of: read or write.
The level of permission to grant the access token for managing repository environments. Can be one of: read or write.
The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: read or write.
The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: read or write.
The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: read or write.
The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: read or write.
The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: read or write.
The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: read or write.
The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: read, write, or admin.
The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: read or write.
The level of permission to grant the access token to manage repository secrets. Can be one of: read or write.
The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: read or write.
The level of permission to grant the access token to manage just a single file. Can be one of: read or write.
The level of permission to grant the access token for commit statuses. Can be one of: read or write.
The level of permission to grant the access token to retrieve Dependabot alerts. Can be one of: read.
The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: write.
The level of permission to grant the access token for organization teams and members. Can be one of: read or write.
The level of permission to grant the access token to manage access to an organization. Can be one of: read or write.
The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: read or write.
The level of permission to grant the access token for viewing an organization's plan. Can be one of: read.
The level of permission to grant the access token to manage organization projects and projects beta (where available). Can be one of: read, write, or admin.
The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: read or write.
The level of permission to grant the access token to manage organization secrets. Can be one of: read or write.
The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: read or write.
The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: read or write.
The level of permission to grant the access token to manage team discussions and related comments. Can be one of: read or write.
Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
{\n \"id\": 1,\n \"url\": \"https://api.github.com/authorizations/1\",\n \"scopes\": [],\n \"token\": \"ghu_16C7e42F292c6912E7710c838347Ae178B4a\",\n \"token_last_eight\": \"Ae178B4a\",\n \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"note\": \"optional note\",\n \"note_url\": \"http://optional/note/url\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"fingerprint\": \"jklmnop12345678\",\n \"expires_at\": \"2011-09-08T17:26:27Z\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"installation\": {\n \"permissions\": {\n \"metadata\": \"read\",\n \"issues\": \"write\",\n \"contents\": \"read\"\n },\n \"repository_selection\": \"selected\",\n \"single_file_name\": \".github/workflow.yml\",\n \"repositories_url\": \"https://api.github.com/user/repos\",\n \"account\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"has_multiple_single_files\": false,\n \"single_file_paths\": []\n }\n}\n"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"type": "string",
"description": "Required. The OAuth access token used to authenticate to the GitHub API.
", "example": "e72e16c7e42f292c6912e7710c838347ae178b4a", "name": "access_token", "in": "body", "rawType": "string", "rawDescription": "The OAuth access token used to authenticate to the GitHub API.", "childParamsGroups": [] }, { "description": "The name of the user or organization to scope the user-to-server access token to. Required unless target_id is specified.
The ID of the user or organization to scope the user-to-server access token to. Required unless target is specified.
The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified.
The list of repository IDs to scope the user-to-server access token to. repository_ids may not be specified if repositories is specified.
The permissions granted to the user-to-server access token.
", "properties": { "actions": { "type": "string", "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: read or write.
The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: read or write.
The level of permission to grant the access token for checks on code. Can be one of: read or write.
The level of permission to grant the access token for notification of content references and creation content attachments. Can be one of: read or write.
The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: read or write.
The level of permission to grant the access token for deployments and deployment statuses. Can be one of: read or write.
The level of permission to grant the access token for managing repository environments. Can be one of: read or write.
The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: read or write.
The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: read or write.
The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: read or write.
The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: read or write.
The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: read or write.
The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: read or write.
The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: read, write, or admin.
The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: read or write.
The level of permission to grant the access token to manage repository secrets. Can be one of: read or write.
The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: read or write.
The level of permission to grant the access token to manage just a single file. Can be one of: read or write.
The level of permission to grant the access token for commit statuses. Can be one of: read or write.
The level of permission to grant the access token to retrieve Dependabot alerts. Can be one of: read.
The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: write.
The level of permission to grant the access token for organization teams and members. Can be one of: read or write.
The level of permission to grant the access token to manage access to an organization. Can be one of: read or write.
The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: read or write.
The level of permission to grant the access token for viewing an organization's plan. Can be one of: read.
The level of permission to grant the access token to manage organization projects and projects beta (where available). Can be one of: read, write, or admin.
The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: read or write.
The level of permission to grant the access token to manage organization secrets. Can be one of: read or write.
The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: read or write.
The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: read or write.
The level of permission to grant the access token to manage team discussions and related comments. Can be one of: read or write.
The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: read or write.
The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: read or write.
The level of permission to grant the access token for checks on code. Can be one of: read or write.
The level of permission to grant the access token for notification of content references and creation content attachments. Can be one of: read or write.
The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: read or write.
The level of permission to grant the access token for deployments and deployment statuses. Can be one of: read or write.
The level of permission to grant the access token for managing repository environments. Can be one of: read or write.
The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: read or write.
The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: read or write.
The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: read or write.
The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: read or write.
The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: read or write.
The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: read or write.
The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: read, write, or admin.
The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: read or write.
The level of permission to grant the access token to manage repository secrets. Can be one of: read or write.
The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: read or write.
The level of permission to grant the access token to manage just a single file. Can be one of: read or write.
The level of permission to grant the access token for commit statuses. Can be one of: read or write.
The level of permission to grant the access token to retrieve Dependabot alerts. Can be one of: read.
The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: write.
The level of permission to grant the access token for organization teams and members. Can be one of: read or write.
The level of permission to grant the access token to manage access to an organization. Can be one of: read or write.
The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: read or write.
The level of permission to grant the access token for viewing an organization's plan. Can be one of: read.
The level of permission to grant the access token to manage organization projects and projects beta (where available). Can be one of: read, write, or admin.
The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: read or write.
The level of permission to grant the access token to manage organization secrets. Can be one of: read or write.
The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: read or write.
The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: read or write.
The level of permission to grant the access token to manage team discussions and related comments. Can be one of: read or write.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/apps/APP_SLUG"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /apps/{app_slug}', {\n app_slug: 'app_slug'\n})",
"html": "await octokit.request('GET /apps/{app_slug}', {\n app_slug: 'app_slug'\n})\n"
}
],
"summary": "Get an app",
"description": "**Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`).\n\nIf the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-by-slug",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps/#get-an-app"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "apps",
"subcategory": null
},
"slug": "get-an-app",
"category": "apps",
"categoryLabel": "Apps",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Note: The :app_slug is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., https://github.com/settings/apps/:app_slug).
If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a personal access token or an installation access token to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "415",
"httpStatusMessage": "Unsupported Media Type",
"description": "Preview header missing"
}
]
},
{
"verb": "get",
"requestPath": "/authorizations",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" }, { "name": "client_id", "in": "query", "required": false, "description": "The client ID of your GitHub app.", "schema": { "type": "string" }, "descriptionHTML": "The client ID of your GitHub app.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /authorizations')",
"html": "await octokit.request('GET /authorizations')\n"
}
],
"summary": "List your authorizations",
"description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).",
"tags": [
"oauth-authorizations"
],
"operationId": "oauth-authorizations/list-authorizations",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/oauth-authorizations#list-your-authorizations"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"removalDate": "2020-11-13",
"deprecationDate": "2020-02-14",
"category": "oauth-authorizations",
"subcategory": null
},
"deprecated": true,
"slug": "list-your-authorizations",
"category": "oauth-authorizations",
"categoryLabel": "Oauth authorizations",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"url\": \"https://api.github.com/authorizations/1\",\n \"scopes\": [\n \"public_repo\"\n ],\n \"token\": \"ghu_16C7e42F292c6912E7710c838347Ae178B4a\",\n \"token_last_eight\": \"Ae178B4a\",\n \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"note\": \"optional note\",\n \"note_url\": \"http://optional/note/url\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"expires_at\": \"2011-09-08T17:26:27Z\",\n \"fingerprint\": \"jklmnop12345678\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/authorizations",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations \\\n -d '{\"scopes\":[\"scopes\"]}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations \\\n -d '{\"scopes\":[\"scopes\"]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /authorizations', {\n scopes: [\n 'scopes'\n ]\n})",
"html": "await octokit.request('POST /authorizations', {\n scopes: [\n 'scopes'\n ]\n})\n"
}
],
"summary": "Create a new authorization",
"description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\n**Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).\n\nCreates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication).\"\n\nTo create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them.\n\nYou can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://help.github.com/articles/creating-an-access-token-for-command-line-use).\n\nOrganizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://help.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on).",
"tags": [
"oauth-authorizations"
],
"operationId": "oauth-authorizations/create-authorization",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/oauth-authorizations#create-a-new-authorization"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"scopes": {
"description": "A list of scopes that this authorization is in.
", "type": "array of strings or nullable", "items": { "type": "string" }, "example": [ "public_repo", "user" ], "nullable": true, "name": "scopes", "in": "body", "rawType": "array", "rawDescription": "A list of scopes that this authorization is in.", "childParamsGroups": [] }, "note": { "description": "A note to remind you what the OAuth token is for.
", "type": "string", "example": "Update all gems", "name": "note", "in": "body", "rawType": "string", "rawDescription": "A note to remind you what the OAuth token is for.", "childParamsGroups": [] }, "note_url": { "description": "A URL to remind you what app the OAuth token is for.
", "type": "string", "name": "note_url", "in": "body", "rawType": "string", "rawDescription": "A URL to remind you what app the OAuth token is for.", "childParamsGroups": [] }, "client_id": { "description": "The OAuth app client key for which to create the token.
", "maxLength": 20, "type": "string", "name": "client_id", "in": "body", "rawType": "string", "rawDescription": "The OAuth app client key for which to create the token.", "childParamsGroups": [] }, "client_secret": { "description": "The OAuth app client secret for which to create the token.
", "maxLength": 40, "type": "string", "name": "client_secret", "in": "body", "rawType": "string", "rawDescription": "The OAuth app client secret for which to create the token.", "childParamsGroups": [] }, "fingerprint": { "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", "type": "string", "name": "fingerprint", "in": "body", "rawType": "string", "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", "childParamsGroups": [] } } } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "removalDate": "2020-11-13", "deprecationDate": "2020-02-14", "category": "oauth-authorizations", "subcategory": null }, "deprecated": true, "slug": "create-a-new-authorization", "category": "oauth-authorizations", "categoryLabel": "Oauth authorizations", "contentType": "application/json", "notes": [], "descriptionHTML": "Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nWarning: Apps must use the web application flow to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the blog post.
\nCreates OAuth tokens using Basic Authentication. If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"Working with two-factor authentication.\"
\nTo create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use fingerprint to differentiate between them.
You can also create tokens on GitHub from the personal access tokens settings page. Read more about these tokens in the GitHub Help documentation.
\nOrganizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in the GitHub Help documentation.
", "bodyParameters": [ { "description": "A list of scopes that this authorization is in.
", "type": "array of strings or nullable", "items": { "type": "string" }, "example": [ "public_repo", "user" ], "nullable": true, "name": "scopes", "in": "body", "rawType": "array", "rawDescription": "A list of scopes that this authorization is in.", "childParamsGroups": [] }, { "description": "A note to remind you what the OAuth token is for.
", "type": "string", "example": "Update all gems", "name": "note", "in": "body", "rawType": "string", "rawDescription": "A note to remind you what the OAuth token is for.", "childParamsGroups": [] }, { "description": "A URL to remind you what app the OAuth token is for.
", "type": "string", "name": "note_url", "in": "body", "rawType": "string", "rawDescription": "A URL to remind you what app the OAuth token is for.", "childParamsGroups": [] }, { "description": "The OAuth app client key for which to create the token.
", "maxLength": 20, "type": "string", "name": "client_id", "in": "body", "rawType": "string", "rawDescription": "The OAuth app client key for which to create the token.", "childParamsGroups": [] }, { "description": "The OAuth app client secret for which to create the token.
", "maxLength": 40, "type": "string", "name": "client_secret", "in": "body", "rawType": "string", "rawDescription": "The OAuth app client secret for which to create the token.", "childParamsGroups": [] }, { "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", "type": "string", "name": "fingerprint", "in": "body", "rawType": "string", "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 1,\n \"url\": \"https://api.github.com/authorizations/1\",\n \"scopes\": [\n \"public_repo\"\n ],\n \"token\": \"ghu_16C7e42F292c6912E7710c838347Ae178B4a\",\n \"token_last_eight\": \"Ae178B4a\",\n \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"note\": \"optional note\",\n \"note_url\": \"http://optional/note/url\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"expires_at\": \"2011-10-06T17:26:27Z\",\n \"fingerprint\": \"\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "put",
"requestPath": "/authorizations/clients/{client_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "client_id",
"in": "path",
"required": true,
"description": "The client ID of your GitHub app.",
"schema": {
"type": "string"
},
"descriptionHTML": "The client ID of your GitHub app.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/clients/CLIENT_ID \\\n -d '{\"client_secret\":\"client_secret\"}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/clients/CLIENT_ID \\\n -d '{\"client_secret\":\"client_secret\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /authorizations/clients/{client_id}', {\n client_id: 'client_id',\n client_secret: 'client_secret'\n})",
"html": "await octokit.request('PUT /authorizations/clients/{client_id}', {\n client_id: 'client_id',\n client_secret: 'client_secret'\n})\n"
}
],
"summary": "Get-or-create an authorization for a specific app",
"description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\n**Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).\n\nCreates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.\n\nIf you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication).\"\n\n**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).",
"tags": [
"oauth-authorizations"
],
"operationId": "oauth-authorizations/get-or-create-authorization-for-app",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"client_secret": {
"description": "Required. The OAuth app client secret for which to create the token.
", "maxLength": 40, "type": "string", "name": "client_secret", "in": "body", "rawType": "string", "rawDescription": "The OAuth app client secret for which to create the token.", "childParamsGroups": [] }, "scopes": { "description": "A list of scopes that this authorization is in.
", "type": "array of strings or nullable", "items": { "type": "string" }, "example": [ "public_repo", "user" ], "nullable": true, "name": "scopes", "in": "body", "rawType": "array", "rawDescription": "A list of scopes that this authorization is in.", "childParamsGroups": [] }, "note": { "description": "A note to remind you what the OAuth token is for.
", "type": "string", "example": "Update all gems", "name": "note", "in": "body", "rawType": "string", "rawDescription": "A note to remind you what the OAuth token is for.", "childParamsGroups": [] }, "note_url": { "description": "A URL to remind you what app the OAuth token is for.
", "type": "string", "name": "note_url", "in": "body", "rawType": "string", "rawDescription": "A URL to remind you what app the OAuth token is for.", "childParamsGroups": [] }, "fingerprint": { "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", "type": "string", "name": "fingerprint", "in": "body", "rawType": "string", "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", "childParamsGroups": [] } }, "required": [ "client_secret" ], "type": "object" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "removalDate": "2020-11-13", "deprecationDate": "2020-02-14", "category": "oauth-authorizations", "subcategory": null }, "deprecated": true, "slug": "get-or-create-an-authorization-for-a-specific-app", "category": "oauth-authorizations", "categoryLabel": "Oauth authorizations", "contentType": "application/json", "notes": [], "descriptionHTML": "Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nWarning: Apps must use the web application flow to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the blog post.
\nCreates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.
\nIf you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"Working with two-factor authentication.\"
\nDeprecation Notice: GitHub will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
", "bodyParameters": [ { "description": "Required. The OAuth app client secret for which to create the token.
", "maxLength": 40, "type": "string", "name": "client_secret", "in": "body", "rawType": "string", "rawDescription": "The OAuth app client secret for which to create the token.", "childParamsGroups": [] }, { "description": "A list of scopes that this authorization is in.
", "type": "array of strings or nullable", "items": { "type": "string" }, "example": [ "public_repo", "user" ], "nullable": true, "name": "scopes", "in": "body", "rawType": "array", "rawDescription": "A list of scopes that this authorization is in.", "childParamsGroups": [] }, { "description": "A note to remind you what the OAuth token is for.
", "type": "string", "example": "Update all gems", "name": "note", "in": "body", "rawType": "string", "rawDescription": "A note to remind you what the OAuth token is for.", "childParamsGroups": [] }, { "description": "A URL to remind you what app the OAuth token is for.
", "type": "string", "name": "note_url", "in": "body", "rawType": "string", "rawDescription": "A URL to remind you what app the OAuth token is for.", "childParamsGroups": [] }, { "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", "type": "string", "name": "fingerprint", "in": "body", "rawType": "string", "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "if returning an existing token", "payload": "{\n \"id\": 1,\n \"url\": \"https://api.github.com/authorizations/1\",\n \"scopes\": [\n \"public_repo\"\n ],\n \"token\": \"ghu_16C7e42F292c6912E7710c838347Ae178B4a\",\n \"token_last_eight\": \"Ae178B4a\",\n \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"note\": \"optional note\",\n \"note_url\": \"http://optional/note/url\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"expires_at\": \"2011-10-06T17:26:27Z\",\n \"fingerprint\": \"\"\n}\n"
},
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).",
"payload": "{\n \"id\": 1,\n \"url\": \"https://api.github.com/authorizations/1\",\n \"scopes\": [\n \"public_repo\"\n ],\n \"token\": \"ghu_16C7e42F292c6912E7710c838347Ae178B4a\",\n \"token_last_eight\": \"Ae178B4a\",\n \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"note\": \"optional note\",\n \"note_url\": \"http://optional/note/url\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"expires_at\": \"2011-10-06T17:26:27Z\",\n \"fingerprint\": \"\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "put",
"requestPath": "/authorizations/clients/{client_id}/{fingerprint}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "client_id",
"in": "path",
"required": true,
"description": "The client ID of your GitHub app.",
"schema": {
"type": "string"
},
"descriptionHTML": "The client ID of your GitHub app.
" }, { "name": "fingerprint", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/clients/CLIENT_ID/FINGERPRINT \\\n -d '{\"client_secret\":\"client_secret\"}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/clients/CLIENT_ID/FINGERPRINT \\\n -d '{\"client_secret\":\"client_secret\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /authorizations/clients/{client_id}/{fingerprint}', {\n client_id: 'client_id',\n fingerprint: 'fingerprint',\n client_secret: 'client_secret'\n})",
"html": "await octokit.request('PUT /authorizations/clients/{client_id}/{fingerprint}', {\n client_id: 'client_id',\n fingerprint: 'fingerprint',\n client_secret: 'client_secret'\n})\n"
}
],
"summary": "Get-or-create an authorization for a specific app and fingerprint",
"description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\n**Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).\n\nThis method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.\n\nIf you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication).\"",
"tags": [
"oauth-authorizations"
],
"operationId": "oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app-and-fingerprint"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"client_secret": {
"description": "Required. The OAuth app client secret for which to create the token.
", "maxLength": 40, "type": "string", "name": "client_secret", "in": "body", "rawType": "string", "rawDescription": "The OAuth app client secret for which to create the token.", "childParamsGroups": [] }, "scopes": { "description": "A list of scopes that this authorization is in.
", "type": "array of strings or nullable", "items": { "type": "string" }, "example": [ "public_repo", "user" ], "nullable": true, "name": "scopes", "in": "body", "rawType": "array", "rawDescription": "A list of scopes that this authorization is in.", "childParamsGroups": [] }, "note": { "description": "A note to remind you what the OAuth token is for.
", "type": "string", "example": "Update all gems", "name": "note", "in": "body", "rawType": "string", "rawDescription": "A note to remind you what the OAuth token is for.", "childParamsGroups": [] }, "note_url": { "description": "A URL to remind you what app the OAuth token is for.
", "type": "string", "name": "note_url", "in": "body", "rawType": "string", "rawDescription": "A URL to remind you what app the OAuth token is for.", "childParamsGroups": [] } }, "required": [ "client_secret" ], "type": "object" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "removalDate": "2020-11-13", "deprecationDate": "2020-02-14", "category": "oauth-authorizations", "subcategory": null }, "deprecated": true, "slug": "get-or-create-an-authorization-for-a-specific-app-and-fingerprint", "category": "oauth-authorizations", "categoryLabel": "Oauth authorizations", "contentType": "application/json", "notes": [], "descriptionHTML": "Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nWarning: Apps must use the web application flow to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the blog post.
\nThis method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. fingerprint is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.
If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"Working with two-factor authentication.\"
", "bodyParameters": [ { "description": "Required. The OAuth app client secret for which to create the token.
", "maxLength": 40, "type": "string", "name": "client_secret", "in": "body", "rawType": "string", "rawDescription": "The OAuth app client secret for which to create the token.", "childParamsGroups": [] }, { "description": "A list of scopes that this authorization is in.
", "type": "array of strings or nullable", "items": { "type": "string" }, "example": [ "public_repo", "user" ], "nullable": true, "name": "scopes", "in": "body", "rawType": "array", "rawDescription": "A list of scopes that this authorization is in.", "childParamsGroups": [] }, { "description": "A note to remind you what the OAuth token is for.
", "type": "string", "example": "Update all gems", "name": "note", "in": "body", "rawType": "string", "rawDescription": "A note to remind you what the OAuth token is for.", "childParamsGroups": [] }, { "description": "A URL to remind you what app the OAuth token is for.
", "type": "string", "name": "note_url", "in": "body", "rawType": "string", "rawDescription": "A URL to remind you what app the OAuth token is for.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "if returning an existing token", "payload": "{\n \"id\": 1,\n \"url\": \"https://api.github.com/authorizations/1\",\n \"scopes\": [\n \"public_repo\"\n ],\n \"token\": \"ghu_16C7e42F292c6912E7710c838347Ae178B4a\",\n \"token_last_eight\": \"Ae178B4a\",\n \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"note\": \"optional note\",\n \"note_url\": \"http://optional/note/url\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"expires_at\": \"2011-10-06T17:26:27Z\",\n \"fingerprint\": \"jklmnop12345678\"\n}\n"
},
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response if returning a new token",
"payload": "{\n \"id\": 1,\n \"url\": \"https://api.github.com/authorizations/1\",\n \"scopes\": [\n \"public_repo\"\n ],\n \"token\": \"ghu_16C7e42F292c6912E7710c838347Ae178B4a\",\n \"token_last_eight\": \"Ae178B4a\",\n \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"note\": \"optional note\",\n \"note_url\": \"http://optional/note/url\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"expires_at\": \"2012-10-06T17:26:27Z\",\n \"fingerprint\": \"jklmnop12345678\"\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/authorizations/{authorization_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "authorization_id",
"description": "authorization_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "authorization_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /authorizations/{authorization_id}', {\n authorization_id: 42\n})",
"html": "await octokit.request('GET /authorizations/{authorization_id}', {\n authorization_id: 42\n})\n"
}
],
"summary": "Get a single authorization",
"description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).",
"tags": [
"oauth-authorizations"
],
"operationId": "oauth-authorizations/get-authorization",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/oauth-authorizations#get-a-single-authorization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"removalDate": "2020-11-13",
"deprecationDate": "2020-02-14",
"category": "oauth-authorizations",
"subcategory": null
},
"deprecated": true,
"slug": "get-a-single-authorization",
"category": "oauth-authorizations",
"categoryLabel": "Oauth authorizations",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"url\": \"https://api.github.com/authorizations/1\",\n \"scopes\": [\n \"public_repo\"\n ],\n \"token\": \"ghu_16C7e42F292c6912E7710c838347Ae178B4a\",\n \"token_last_eight\": \"Ae178B4a\",\n \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"note\": \"optional note\",\n \"note_url\": \"http://optional/note/url\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"expires_at\": \"2011-10-06T17:26:27Z\",\n \"fingerprint\": \"jklmnop12345678\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "patch",
"requestPath": "/authorizations/{authorization_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "authorization_id",
"description": "authorization_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "authorization_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/42 \\\n -d '{\"scopes\":[\"scopes\"]}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/42 \\\n -d '{\"scopes\":[\"scopes\"]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /authorizations/{authorization_id}', {\n authorization_id: 42,\n scopes: [\n 'scopes'\n ]\n})",
"html": "await octokit.request('PATCH /authorizations/{authorization_id}', {\n authorization_id: 42,\n scopes: [\n 'scopes'\n ]\n})\n"
}
],
"summary": "Update an existing authorization",
"description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\nIf you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication).\"\n\nYou can only send one of these scope keys at a time.",
"tags": [
"oauth-authorizations"
],
"operationId": "oauth-authorizations/update-authorization",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/oauth-authorizations#update-an-existing-authorization"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"scopes": {
"description": "A list of scopes that this authorization is in.
", "type": "array of strings or nullable", "items": { "type": "string" }, "example": [ "public_repo", "user" ], "nullable": true, "name": "scopes", "in": "body", "rawType": "array", "rawDescription": "A list of scopes that this authorization is in.", "childParamsGroups": [] }, "add_scopes": { "description": "A list of scopes to add to this authorization.
", "type": "array of strings", "items": { "type": "string" }, "name": "add_scopes", "in": "body", "rawType": "array", "rawDescription": "A list of scopes to add to this authorization.", "childParamsGroups": [] }, "remove_scopes": { "description": "A list of scopes to remove from this authorization.
", "type": "array of strings", "items": { "type": "string" }, "name": "remove_scopes", "in": "body", "rawType": "array", "rawDescription": "A list of scopes to remove from this authorization.", "childParamsGroups": [] }, "note": { "description": "A note to remind you what the OAuth token is for.
", "type": "string", "example": "Update all gems", "name": "note", "in": "body", "rawType": "string", "rawDescription": "A note to remind you what the OAuth token is for.", "childParamsGroups": [] }, "note_url": { "description": "A URL to remind you what app the OAuth token is for.
", "type": "string", "name": "note_url", "in": "body", "rawType": "string", "rawDescription": "A URL to remind you what app the OAuth token is for.", "childParamsGroups": [] }, "fingerprint": { "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", "type": "string", "name": "fingerprint", "in": "body", "rawType": "string", "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", "childParamsGroups": [] } } } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "removalDate": "2020-11-13", "deprecationDate": "2020-02-14", "category": "oauth-authorizations", "subcategory": null }, "deprecated": true, "slug": "update-an-existing-authorization", "category": "oauth-authorizations", "categoryLabel": "Oauth authorizations", "contentType": "application/json", "notes": [], "descriptionHTML": "Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nIf you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"Working with two-factor authentication.\"
\nYou can only send one of these scope keys at a time.
", "bodyParameters": [ { "description": "A list of scopes that this authorization is in.
", "type": "array of strings or nullable", "items": { "type": "string" }, "example": [ "public_repo", "user" ], "nullable": true, "name": "scopes", "in": "body", "rawType": "array", "rawDescription": "A list of scopes that this authorization is in.", "childParamsGroups": [] }, { "description": "A list of scopes to add to this authorization.
", "type": "array of strings", "items": { "type": "string" }, "name": "add_scopes", "in": "body", "rawType": "array", "rawDescription": "A list of scopes to add to this authorization.", "childParamsGroups": [] }, { "description": "A list of scopes to remove from this authorization.
", "type": "array of strings", "items": { "type": "string" }, "name": "remove_scopes", "in": "body", "rawType": "array", "rawDescription": "A list of scopes to remove from this authorization.", "childParamsGroups": [] }, { "description": "A note to remind you what the OAuth token is for.
", "type": "string", "example": "Update all gems", "name": "note", "in": "body", "rawType": "string", "rawDescription": "A note to remind you what the OAuth token is for.", "childParamsGroups": [] }, { "description": "A URL to remind you what app the OAuth token is for.
", "type": "string", "name": "note_url", "in": "body", "rawType": "string", "rawDescription": "A URL to remind you what app the OAuth token is for.", "childParamsGroups": [] }, { "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", "type": "string", "name": "fingerprint", "in": "body", "rawType": "string", "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"url\": \"https://api.github.com/authorizations/1\",\n \"scopes\": [\n \"public_repo\"\n ],\n \"token\": \"ghu_16C7e42F292c6912E7710c838347Ae178B4a\",\n \"token_last_eight\": \"Ae178B4a\",\n \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"note\": \"optional note\",\n \"note_url\": \"http://optional/note/url\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"expires_at\": \"2011-10-06T17:26:27Z\",\n \"fingerprint\": \"jklmnop12345678\"\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/authorizations/{authorization_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "authorization_id",
"description": "authorization_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "authorization_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /authorizations/{authorization_id}', {\n authorization_id: 42\n})",
"html": "await octokit.request('DELETE /authorizations/{authorization_id}', {\n authorization_id: 42\n})\n"
}
],
"summary": "Delete an authorization",
"description": "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).",
"tags": [
"oauth-authorizations"
],
"operationId": "oauth-authorizations/delete-authorization",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/oauth-authorizations#delete-an-authorization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"removalDate": "2020-11-13",
"deprecationDate": "2020-02-14",
"category": "oauth-authorizations",
"subcategory": null
},
"deprecated": true,
"slug": "delete-an-authorization",
"category": "oauth-authorizations",
"categoryLabel": "Oauth authorizations",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: GitHub will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
" }, { "verb": "get", "requestPath": "/codes_of_conduct", "serverUrl": "https://api.github.com", "parameters": [], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/codes_of_conduct", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/codes_of_conduct"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /codes_of_conduct')",
"html": "await octokit.request('GET /codes_of_conduct')\n"
}
],
"summary": "Get all codes of conduct",
"description": "",
"tags": [
"codes-of-conduct"
],
"operationId": "codes-of-conduct/get-all-codes-of-conduct",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "codes-of-conduct",
"subcategory": null
},
"slug": "get-all-codes-of-conduct",
"category": "codes-of-conduct",
"categoryLabel": "Codes of conduct",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"key\": \"citizen_code_of_conduct\",\n \"name\": \"Citizen Code of Conduct\",\n \"url\": \"https://api.github.com/codes_of_conduct/citizen_code_of_conduct\",\n \"html_url\": \"http://citizencodeofconduct.org/\"\n },\n {\n \"key\": \"contributor_covenant\",\n \"name\": \"Contributor Covenant\",\n \"url\": \"https://api.github.com/codes_of_conduct/contributor_covenant\",\n \"html_url\": \"https://www.contributor-covenant.org/version/2/0/code_of_conduct/\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
}
]
},
{
"verb": "get",
"requestPath": "/codes_of_conduct/{key}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "key",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/codes_of_conduct/KEY",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/codes_of_conduct/KEY"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /codes_of_conduct/{key}', {\n key: 'key'\n})",
"html": "await octokit.request('GET /codes_of_conduct/{key}', {\n key: 'key'\n})\n"
}
],
"summary": "Get a code of conduct",
"description": "",
"tags": [
"codes-of-conduct"
],
"operationId": "codes-of-conduct/get-conduct-code",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "codes-of-conduct",
"subcategory": null
},
"slug": "get-a-code-of-conduct",
"category": "codes-of-conduct",
"categoryLabel": "Codes of conduct",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"key\": \"contributor_covenant\",\n \"name\": \"Contributor Covenant\",\n \"url\": \"https://api.github.com/codes_of_conduct/contributor_covenant\",\n \"body\": \"# Contributor Covenant Code of Conduct\\n\\n## Our Pledge\\n\\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\\n\\n## Our Standards\\n\\nExamples of behavior that contributes to creating a positive environment include:\\n\\n* Using welcoming and inclusive language\\n* Being respectful of differing viewpoints and experiences\\n* Gracefully accepting constructive criticism\\n* Focusing on what is best for the community\\n* Showing empathy towards other community members\\n\\nExamples of unacceptable behavior by participants include:\\n\\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\\n* Trolling, insulting/derogatory comments, and personal or political attacks\\n* Public or private harassment\\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\\n* Other conduct which could reasonably be considered inappropriate in a professional setting\\n\\n## Our Responsibilities\\n\\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response\\n to any instances of unacceptable behavior.\\n\\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\\n\\n## Scope\\n\\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address,\\n posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\\n\\n## Enforcement\\n\\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\\n\\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\\n\\n## Attribution\\n\\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\\n\\n[homepage]: http://contributor-covenant.org\\n[version]: http://contributor-covenant.org/version/1/4/\\n\",\n \"html_url\": \"http://contributor-covenant.org/version/1/4/\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/emojis",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/emojis",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/emojis"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /emojis')",
"html": "await octokit.request('GET /emojis')\n"
}
],
"summary": "Get emojis",
"description": "Lists all the emojis available to use on GitHub.",
"operationId": "emojis/get",
"tags": [
"emojis"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/emojis#get-emojis"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "emojis",
"subcategory": null
},
"slug": "get-emojis",
"category": "emojis",
"categoryLabel": "Emojis",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
}
],
"bodyParameters": [],
"descriptionHTML": "Lists all the emojis available to use on GitHub.
" }, { "verb": "get", "requestPath": "/enterprises/{enterprise}/actions/permissions", "serverUrl": "https://api.github.com", "parameters": [ { "name": "enterprise", "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/permissions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/permissions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /enterprises/{enterprise}/actions/permissions', {\n enterprise: 'enterprise'\n})",
"html": "await octokit.request('GET /enterprises/{enterprise}/actions/permissions', {\n enterprise: 'enterprise'\n})\n"
}
],
"summary": "Get GitHub Actions permissions for an enterprise",
"description": "Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise.\n\nYou must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/get-github-actions-permissions-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#get-github-actions-permissions-for-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "get-github-actions-permissions-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise.
\nYou must authenticate using an access token with the admin:enterprise scope to use this endpoint.
{\n \"enabled_organizations\": \"all\",\n \"allowed_actions\": \"selected\",\n \"selected_actions_url\": \"https://api.github.com/enterprises/2/actions/permissions/selected-actions\"\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/enterprises/{enterprise}/actions/permissions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/permissions \\\n -d '{\"enabled_organizations\":\"enabled_organizations\"}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/permissions \\\n -d '{\"enabled_organizations\":\"enabled_organizations\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /enterprises/{enterprise}/actions/permissions', {\n enterprise: 'enterprise',\n enabled_organizations: 'enabled_organizations'\n})",
"html": "await octokit.request('PUT /enterprises/{enterprise}/actions/permissions', {\n enterprise: 'enterprise',\n enabled_organizations: 'enabled_organizations'\n})\n"
}
],
"summary": "Set GitHub Actions permissions for an enterprise",
"description": "Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise.\n\nYou must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/set-github-actions-permissions-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#set-github-actions-permissions-for-an-enterprise"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"enabled_organizations": {
"type": "string",
"description": "Required. The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. Can be one of: all, none, or selected.
The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.
Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise.
\nYou must authenticate using an access token with the admin:enterprise scope to use this endpoint.
Required. The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. Can be one of: all, none, or selected.
The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.
The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/permissions/organizations", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/permissions/organizations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /enterprises/{enterprise}/actions/permissions/organizations', {\n enterprise: 'enterprise'\n})",
"html": "await octokit.request('GET /enterprises/{enterprise}/actions/permissions/organizations', {\n enterprise: 'enterprise'\n})\n"
}
],
"summary": "List selected organizations enabled for GitHub Actions in an enterprise",
"description": "Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise).\"\n\nYou must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#list-selected-organizations-enabled-for-github-actions-in-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "list-selected-organizations-enabled-for-github-actions-in-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for enabled_organizations must be configured to selected. For more information, see \"Set GitHub Actions permissions for an enterprise.\"
You must authenticate using an access token with the admin:enterprise scope to use this endpoint.
{\n \"total_count\": 1,\n \"organizations\": [\n {\n \"login\": \"octocat\",\n \"id\": 161335,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"url\": \"https://api.github.com/orgs/octo-org\",\n \"repos_url\": \"https://api.github.com/orgs/octo-org/repos\",\n \"events_url\": \"https://api.github.com/orgs/octo-org/events\",\n \"hooks_url\": \"https://api.github.com/orgs/octo-org/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/octo-org/issues\",\n \"members_url\": \"https://api.github.com/orgs/octo-org/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/octo-org/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\"\n }\n ]\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/enterprises/{enterprise}/actions/permissions/organizations",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/permissions/organizations \\\n -d '{\"selected_organization_ids\":[42]}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/permissions/organizations \\\n -d '{\"selected_organization_ids\":[42]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /enterprises/{enterprise}/actions/permissions/organizations', {\n enterprise: 'enterprise',\n selected_organization_ids: [\n 42\n ]\n})",
"html": "await octokit.request('PUT /enterprises/{enterprise}/actions/permissions/organizations', {\n enterprise: 'enterprise',\n selected_organization_ids: [\n 42\n ]\n})\n"
}
],
"summary": "Set selected organizations enabled for GitHub Actions in an enterprise",
"description": "Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise).\"\n\nYou must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#set-selected-organizations-enabled-for-github-actions-in-an-enterprise"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"selected_organization_ids": {
"description": "Required. List of organization IDs to enable for GitHub Actions.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the organization." }, "name": "selected_organization_ids", "in": "body", "rawType": "array", "rawDescription": "List of organization IDs to enable for GitHub Actions.", "childParamsGroups": [] } }, "required": [ "selected_organization_ids" ] }, "example": { "selected_organization_ids": [ 32, 91 ] } } } }, "x-github": { "enabledForGitHubApps": false, "githubCloudOnly": false, "category": "enterprise-admin", "subcategory": "actions" }, "slug": "set-selected-organizations-enabled-for-github-actions-in-an-enterprise", "category": "enterprise-admin", "categoryLabel": "Enterprise admin", "subcategory": "actions", "subcategoryLabel": "Actions", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "204", "httpStatusMessage": "No Content", "description": "Response" } ], "descriptionHTML": "Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for enabled_organizations must be configured to selected. For more information, see \"Set GitHub Actions permissions for an enterprise.\"
You must authenticate using an access token with the admin:enterprise scope to use this endpoint.
Required. List of organization IDs to enable for GitHub Actions.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the organization." }, "name": "selected_organization_ids", "in": "body", "rawType": "array", "rawDescription": "List of organization IDs to enable for GitHub Actions.", "childParamsGroups": [] } ] }, { "verb": "put", "requestPath": "/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "enterprise", "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "org_id", "description": "Unique identifier of an organization.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of an organization.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/permissions/organizations/42", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/permissions/organizations/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}', {\n enterprise: 'enterprise',\n org_id: 42\n})",
"html": "await octokit.request('PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}', {\n enterprise: 'enterprise',\n org_id: 42\n})\n"
}
],
"summary": "Enable a selected organization for GitHub Actions in an enterprise",
"description": "Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise).\"\n\nYou must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/enable-selected-organization-github-actions-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#enable-a-selected-organization-for-github-actions-in-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "enable-a-selected-organization-for-github-actions-in-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for enabled_organizations must be configured to selected. For more information, see \"Set GitHub Actions permissions for an enterprise.\"
You must authenticate using an access token with the admin:enterprise scope to use this endpoint.
The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "org_id", "description": "Unique identifier of an organization.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of an organization.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/permissions/organizations/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/permissions/organizations/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}', {\n enterprise: 'enterprise',\n org_id: 42\n})",
"html": "await octokit.request('DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}', {\n enterprise: 'enterprise',\n org_id: 42\n})\n"
}
],
"summary": "Disable a selected organization for GitHub Actions in an enterprise",
"description": "Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise).\"\n\nYou must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/disable-selected-organization-github-actions-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#disable-a-selected-organization-for-github-actions-in-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "disable-a-selected-organization-for-github-actions-in-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for enabled_organizations must be configured to selected. For more information, see \"Set GitHub Actions permissions for an enterprise.\"
You must authenticate using an access token with the admin:enterprise scope to use this endpoint.
The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/permissions/selected-actions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/permissions/selected-actions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /enterprises/{enterprise}/actions/permissions/selected-actions', {\n enterprise: 'enterprise'\n})",
"html": "await octokit.request('GET /enterprises/{enterprise}/actions/permissions/selected-actions', {\n enterprise: 'enterprise'\n})\n"
}
],
"summary": "Get allowed actions for an enterprise",
"description": "Gets the selected actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise).\"\n\nYou must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/get-allowed-actions-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#get-allowed-actions-for-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "get-allowed-actions-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the selected actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for allowed_actions must be configured to selected. For more information, see \"Set GitHub Actions permissions for an enterprise.\"
You must authenticate using an access token with the admin:enterprise scope to use this endpoint.
{\n \"github_owned_allowed\": true,\n \"verified_allowed\": false,\n \"patterns_allowed\": [\n \"monalisa/octocat@*\",\n \"docker/*\"\n ]\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/enterprises/{enterprise}/actions/permissions/selected-actions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/permissions/selected-actions \\\n -d '{\"github_owned_allowed\":true}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/permissions/selected-actions \\\n -d '{\"github_owned_allowed\":true}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /enterprises/{enterprise}/actions/permissions/selected-actions', {\n enterprise: 'enterprise',\n github_owned_allowed: true\n})",
"html": "await octokit.request('PUT /enterprises/{enterprise}/actions/permissions/selected-actions', {\n enterprise: 'enterprise',\n github_owned_allowed: true\n})\n"
}
],
"summary": "Set allowed actions for an enterprise",
"description": "Sets the actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise).\"\n\nYou must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/set-allowed-actions-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#set-allowed-actions-for-an-enterprise"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"github_owned_allowed": {
"type": "boolean",
"description": "Whether GitHub-owned actions are allowed. For example, this includes the actions in the actions organization.
Whether actions in GitHub Marketplace from verified creators are allowed. Set to true to allow all GitHub Marketplace actions by verified creators.
Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@*, monalisa/octocat@v2, monalisa/*.\"
Sets the actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for allowed_actions must be configured to selected. For more information, see \"Set GitHub Actions permissions for an enterprise.\"
You must authenticate using an access token with the admin:enterprise scope to use this endpoint.
Whether GitHub-owned actions are allowed. For example, this includes the actions in the actions organization.
Whether actions in GitHub Marketplace from verified creators are allowed. Set to true to allow all GitHub Marketplace actions by verified creators.
Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@*, monalisa/octocat@v2, monalisa/*.\"
The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /enterprises/{enterprise}/actions/runner-groups', {\n enterprise: 'enterprise'\n})",
"html": "await octokit.request('GET /enterprises/{enterprise}/actions/runner-groups', {\n enterprise: 'enterprise'\n})\n"
}
],
"summary": "List self-hosted runner groups for an enterprise",
"description": "Lists all self-hosted runner groups for an enterprise.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/list-self-hosted-runner-groups-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#list-self-hosted-runner-groups-for-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "list-self-hosted-runner-groups-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all self-hosted runner groups for an enterprise.
\nYou must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
{\n \"total_count\": 3,\n \"runner_groups\": [\n {\n \"id\": 1,\n \"name\": \"Default\",\n \"visibility\": \"all\",\n \"default\": true,\n \"runners_url\": \"https://api.github.com/enterprises/octo-corp/actions/runner_groups/1/runners\",\n \"allows_public_repositories\": false\n },\n {\n \"id\": 2,\n \"name\": \"octo-runner-group\",\n \"visibility\": \"selected\",\n \"default\": false,\n \"selected_organizations_url\": \"https://api.github.com/enterprises/octo-corp/actions/runner_groups/2/organizations\",\n \"runners_url\": \"https://api.github.com/enterprises/octo-corp/actions/runner_groups/2/runners\",\n \"allows_public_repositories\": true\n },\n {\n \"id\": 3,\n \"name\": \"expensive-hardware\",\n \"visibility\": \"private\",\n \"default\": false,\n \"runners_url\": \"https://api.github.com/enterprises/octo-corp/actions/runner_groups/3/runners\",\n \"allows_public_repositories\": true\n }\n ]\n}\n"
}
]
},
{
"verb": "post",
"requestPath": "/enterprises/{enterprise}/actions/runner-groups",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups \\\n -d '{\"name\":\"name\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /enterprises/{enterprise}/actions/runner-groups', {\n enterprise: 'enterprise',\n name: 'name'\n})",
"html": "await octokit.request('POST /enterprises/{enterprise}/actions/runner-groups', {\n enterprise: 'enterprise',\n name: 'name'\n})\n"
}
],
"summary": "Create a self-hosted runner group for an enterprise",
"description": "Creates a new self-hosted runner group for an enterprise.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/create-self-hosted-runner-group-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#create-self-hosted-runner-group-for-an-enterprise"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"description": "Required. Name of the runner group.
", "type": "string", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Name of the runner group.", "childParamsGroups": [] }, "visibility": { "description": "Visibility of a runner group. You can select all organizations or select individual organization. Can be one of: all or selected
List of organization IDs that can access the runner group.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the organization." }, "name": "selected_organization_ids", "in": "body", "rawType": "array", "rawDescription": "List of organization IDs that can access the runner group.", "childParamsGroups": [] }, "runners": { "description": "List of runner IDs to add to the runner group.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the runner." }, "name": "runners", "in": "body", "rawType": "array", "rawDescription": "List of runner IDs to add to the runner group.", "childParamsGroups": [] } }, "required": [ "name" ] }, "example": { "name": "Expensive hardware runners", "visibility": "selected", "selected_organization_ids": [ 32, 91 ], "runners": [ 9, 2 ] } } } }, "x-github": { "enabledForGitHubApps": false, "githubCloudOnly": false, "category": "enterprise-admin", "subcategory": "actions" }, "slug": "create-a-self-hosted-runner-group-for-an-enterprise", "category": "enterprise-admin", "categoryLabel": "Enterprise admin", "subcategory": "actions", "subcategoryLabel": "Actions", "contentType": "application/json", "notes": [], "descriptionHTML": "Creates a new self-hosted runner group for an enterprise.
\nYou must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
Required. Name of the runner group.
", "type": "string", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Name of the runner group.", "childParamsGroups": [] }, { "description": "Visibility of a runner group. You can select all organizations or select individual organization. Can be one of: all or selected
List of organization IDs that can access the runner group.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the organization." }, "name": "selected_organization_ids", "in": "body", "rawType": "array", "rawDescription": "List of organization IDs that can access the runner group.", "childParamsGroups": [] }, { "description": "List of runner IDs to add to the runner group.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the runner." }, "name": "runners", "in": "body", "rawType": "array", "rawDescription": "List of runner IDs to add to the runner group.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 2,\n \"name\": \"octo-runner-group\",\n \"visibility\": \"selected\",\n \"default\": false,\n \"selected_organizations_url\": \"https://api.github.com/enterprises/octo-corp/actions/runner-groups/2/organizations\",\n \"runners_url\": \"https://api.github.com/enterprises/octo-corp/actions/runner-groups/2/runners\",\n \"allows_public_repositories\": false\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "runner_group_id", "description": "Unique identifier of the self-hosted runner group.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner group.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}', {\n enterprise: 'enterprise',\n runner_group_id: 42\n})",
"html": "await octokit.request('GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}', {\n enterprise: 'enterprise',\n runner_group_id: 42\n})\n"
}
],
"summary": "Get a self-hosted runner group for an enterprise",
"description": "Gets a specific self-hosted runner group for an enterprise.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/get-self-hosted-runner-group-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#get-a-self-hosted-runner-group-for-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "get-a-self-hosted-runner-group-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a specific self-hosted runner group for an enterprise.
\nYou must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
{\n \"id\": 2,\n \"name\": \"octo-runner-group\",\n \"visibility\": \"selected\",\n \"default\": false,\n \"selected_organizations_url\": \"https://api.github.com/enterprises/octo-corp/actions/runner-groups/2/organizations\",\n \"runners_url\": \"https://api.github.com/enterprises/octo-corp/actions/runner-groups/2/runners\",\n \"allows_public_repositories\": false\n}\n"
}
]
},
{
"verb": "patch",
"requestPath": "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "runner_group_id", "description": "Unique identifier of the self-hosted runner group.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner group.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42 \\\n -d '{\"name\":\"name\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42 \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}', {\n enterprise: 'enterprise',\n runner_group_id: 42,\n name: 'name'\n})",
"html": "await octokit.request('PATCH /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}', {\n enterprise: 'enterprise',\n runner_group_id: 42,\n name: 'name'\n})\n"
}
],
"summary": "Update a self-hosted runner group for an enterprise",
"description": "Updates the `name` and `visibility` of a self-hosted runner group in an enterprise.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/update-self-hosted-runner-group-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#update-a-self-hosted-runner-group-for-an-enterprise"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"description": "Name of the runner group.
", "type": "string", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Name of the runner group.", "childParamsGroups": [] }, "visibility": { "description": "Visibility of a runner group. You can select all organizations or select individual organizations. Can be one of: all or selected
Updates the name and visibility of a self-hosted runner group in an enterprise.
You must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
Name of the runner group.
", "type": "string", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Name of the runner group.", "childParamsGroups": [] }, { "description": "Visibility of a runner group. You can select all organizations or select individual organizations. Can be one of: all or selected
{\n \"id\": 2,\n \"name\": \"Expensive hardware runners\",\n \"visibility\": \"selected\",\n \"default\": false,\n \"selected_organizations_url\": \"https://api.github.com/enterprises/octo-corp/actions/runner-groups/2/organizations\",\n \"runners_url\": \"https://api.github.com/enterprises/octo-corp/actions/runner-groups/2/runners\",\n \"allows_public_repositories\": true\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "runner_group_id", "description": "Unique identifier of the self-hosted runner group.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner group.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}', {\n enterprise: 'enterprise',\n runner_group_id: 42\n})",
"html": "await octokit.request('DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}', {\n enterprise: 'enterprise',\n runner_group_id: 42\n})\n"
}
],
"summary": "Delete a self-hosted runner group from an enterprise",
"description": "Deletes a self-hosted runner group for an enterprise.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/delete-self-hosted-runner-group-from-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#delete-a-self-hosted-runner-group-from-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "delete-a-self-hosted-runner-group-from-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes a self-hosted runner group for an enterprise.
\nYou must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "runner_group_id", "description": "Unique identifier of the self-hosted runner group.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner group.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42/organizations", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42/organizations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations', {\n enterprise: 'enterprise',\n runner_group_id: 42\n})",
"html": "await octokit.request('GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations', {\n enterprise: 'enterprise',\n runner_group_id: 42\n})\n"
}
],
"summary": "List organization access to a self-hosted runner group in an enterprise",
"description": "Lists the organizations with access to a self-hosted runner group.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#list-organization-access-to-a-self-hosted-runner-group-in-a-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "list-organization-access-to-a-self-hosted-runner-group-in-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the organizations with access to a self-hosted runner group.
\nYou must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
{\n \"total_count\": 1,\n \"organizations\": [\n {\n \"login\": \"octocat\",\n \"id\": 161335,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"url\": \"https://api.github.com/orgs/octo-org\",\n \"repos_url\": \"https://api.github.com/orgs/octo-org/repos\",\n \"events_url\": \"https://api.github.com/orgs/octo-org/events\",\n \"hooks_url\": \"https://api.github.com/orgs/octo-org/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/octo-org/issues\",\n \"members_url\": \"https://api.github.com/orgs/octo-org/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/octo-org/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\"\n }\n ]\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "runner_group_id", "description": "Unique identifier of the self-hosted runner group.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner group.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42/organizations \\\n -d '{\"selected_organization_ids\":[42]}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42/organizations \\\n -d '{\"selected_organization_ids\":[42]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations', {\n enterprise: 'enterprise',\n runner_group_id: 42,\n selected_organization_ids: [\n 42\n ]\n})",
"html": "await octokit.request('PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations', {\n enterprise: 'enterprise',\n runner_group_id: 42,\n selected_organization_ids: [\n 42\n ]\n})\n"
}
],
"summary": "Set organization access for a self-hosted runner group in an enterprise",
"description": "Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#set-organization-access-to-a-self-hosted-runner-group-in-an-enterprise"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"selected_organization_ids": {
"description": "Required. List of organization IDs that can access the runner group.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the organization." }, "name": "selected_organization_ids", "in": "body", "rawType": "array", "rawDescription": "List of organization IDs that can access the runner group.", "childParamsGroups": [] } }, "required": [ "selected_organization_ids" ] }, "example": { "selected_organization_ids": [ 32, 91 ] } } } }, "x-github": { "enabledForGitHubApps": false, "githubCloudOnly": false, "category": "enterprise-admin", "subcategory": "actions" }, "slug": "set-organization-access-for-a-self-hosted-runner-group-in-an-enterprise", "category": "enterprise-admin", "categoryLabel": "Enterprise admin", "subcategory": "actions", "subcategoryLabel": "Actions", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "204", "httpStatusMessage": "No Content", "description": "Response" } ], "descriptionHTML": "Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise.
\nYou must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
Required. List of organization IDs that can access the runner group.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the organization." }, "name": "selected_organization_ids", "in": "body", "rawType": "array", "rawDescription": "List of organization IDs that can access the runner group.", "childParamsGroups": [] } ] }, { "verb": "put", "requestPath": "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "enterprise", "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "runner_group_id", "description": "Unique identifier of the self-hosted runner group.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner group.
" }, { "name": "org_id", "description": "Unique identifier of an organization.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of an organization.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42/organizations/42", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42/organizations/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}', {\n enterprise: 'enterprise',\n runner_group_id: 42,\n org_id: 42\n})",
"html": "await octokit.request('PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}', {\n enterprise: 'enterprise',\n runner_group_id: 42,\n org_id: 42\n})\n"
}
],
"summary": "Add organization access to a self-hosted runner group in an enterprise",
"description": "Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see \"[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise).\"\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have visibility set to selected. For more information, see \"Create a self-hosted runner group for an enterprise.\"
You must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "runner_group_id", "description": "Unique identifier of the self-hosted runner group.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner group.
" }, { "name": "org_id", "description": "Unique identifier of an organization.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of an organization.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42/organizations/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42/organizations/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}', {\n enterprise: 'enterprise',\n runner_group_id: 42,\n org_id: 42\n})",
"html": "await octokit.request('DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}', {\n enterprise: 'enterprise',\n runner_group_id: 42,\n org_id: 42\n})\n"
}
],
"summary": "Remove organization access to a self-hosted runner group in an enterprise",
"description": "Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see \"[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise).\"\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#remove-organization-access-to-a-self-hosted-runner-group-in-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "remove-organization-access-to-a-self-hosted-runner-group-in-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have visibility set to selected. For more information, see \"Create a self-hosted runner group for an enterprise.\"
You must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "runner_group_id", "description": "Unique identifier of the self-hosted runner group.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner group.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42/runners", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42/runners"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners', {\n enterprise: 'enterprise',\n runner_group_id: 42\n})",
"html": "await octokit.request('GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners', {\n enterprise: 'enterprise',\n runner_group_id: 42\n})\n"
}
],
"summary": "List self-hosted runners in a group for an enterprise",
"description": "Lists the self-hosted runners that are in a specific enterprise group.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/list-self-hosted-runners-in-group-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#list-self-hosted-runners-in-a-group-for-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "list-self-hosted-runners-in-a-group-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the self-hosted runners that are in a specific enterprise group.
\nYou must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
{\n \"total_count\": 2,\n \"runners\": [\n {\n \"id\": 23,\n \"name\": \"linux_runner\",\n \"os\": \"linux\",\n \"status\": \"online\",\n \"busy\": true,\n \"labels\": [\n {\n \"id\": 5,\n \"name\": \"self-hosted\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 7,\n \"name\": \"X64\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 11,\n \"name\": \"Linux\",\n \"type\": \"read-only\"\n }\n ]\n },\n {\n \"id\": 24,\n \"name\": \"mac_runner\",\n \"os\": \"macos\",\n \"status\": \"offline\",\n \"busy\": false,\n \"labels\": [\n {\n \"id\": 5,\n \"name\": \"self-hosted\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 7,\n \"name\": \"X64\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 20,\n \"name\": \"macOS\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 21,\n \"name\": \"no-gpu\",\n \"type\": \"custom\"\n }\n ]\n }\n ]\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "runner_group_id", "description": "Unique identifier of the self-hosted runner group.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner group.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42/runners \\\n -d '{\"runners\":[42]}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42/runners \\\n -d '{\"runners\":[42]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners', {\n enterprise: 'enterprise',\n runner_group_id: 42,\n runners: [\n 42\n ]\n})",
"html": "await octokit.request('PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners', {\n enterprise: 'enterprise',\n runner_group_id: 42,\n runners: [\n 42\n ]\n})\n"
}
],
"summary": "Set self-hosted runners in a group for an enterprise",
"description": "Replaces the list of self-hosted runners that are part of an enterprise runner group.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/set-self-hosted-runners-in-group-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#set-self-hosted-runners-in-a-group-for-an-enterprise"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"runners": {
"description": "Required. List of runner IDs to add to the runner group.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the runner." }, "name": "runners", "in": "body", "rawType": "array", "rawDescription": "List of runner IDs to add to the runner group.", "childParamsGroups": [] } }, "required": [ "runners" ] }, "example": { "runners": [ 9, 2 ] } } } }, "x-github": { "enabledForGitHubApps": false, "githubCloudOnly": false, "category": "enterprise-admin", "subcategory": "actions" }, "slug": "set-self-hosted-runners-in-a-group-for-an-enterprise", "category": "enterprise-admin", "categoryLabel": "Enterprise admin", "subcategory": "actions", "subcategoryLabel": "Actions", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "204", "httpStatusMessage": "No Content", "description": "Response" } ], "descriptionHTML": "Replaces the list of self-hosted runners that are part of an enterprise runner group.
\nYou must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
Required. List of runner IDs to add to the runner group.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the runner." }, "name": "runners", "in": "body", "rawType": "array", "rawDescription": "List of runner IDs to add to the runner group.", "childParamsGroups": [] } ] }, { "verb": "put", "requestPath": "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "enterprise", "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "runner_group_id", "description": "Unique identifier of the self-hosted runner group.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner group.
" }, { "name": "runner_id", "description": "Unique identifier of the self-hosted runner.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42/runners/42", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42/runners/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}', {\n enterprise: 'enterprise',\n runner_group_id: 42,\n runner_id: 42\n})",
"html": "await octokit.request('PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}', {\n enterprise: 'enterprise',\n runner_group_id: 42,\n runner_id: 42\n})\n"
}
],
"summary": "Add a self-hosted runner to a group for an enterprise",
"description": "Adds a self-hosted runner to a runner group configured in an enterprise.\n\nYou must authenticate using an access token with the `manage_runners:enterprise`\nscope to use this endpoint.",
"operationId": "enterprise-admin/add-self-hosted-runner-to-group-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#add-a-self-hosted-runner-to-a-group-for-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "add-a-self-hosted-runner-to-a-group-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Adds a self-hosted runner to a runner group configured in an enterprise.
\nYou must authenticate using an access token with the manage_runners:enterprise\nscope to use this endpoint.
The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "runner_group_id", "description": "Unique identifier of the self-hosted runner group.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner group.
" }, { "name": "runner_id", "description": "Unique identifier of the self-hosted runner.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42/runners/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runner-groups/42/runners/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}', {\n enterprise: 'enterprise',\n runner_group_id: 42,\n runner_id: 42\n})",
"html": "await octokit.request('DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}', {\n enterprise: 'enterprise',\n runner_group_id: 42,\n runner_id: 42\n})\n"
}
],
"summary": "Remove a self-hosted runner from a group for an enterprise",
"description": "Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#remove-a-self-hosted-runner-from-a-group-for-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "remove-a-self-hosted-runner-from-a-group-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group.
\nYou must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runners", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runners"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /enterprises/{enterprise}/actions/runners', {\n enterprise: 'enterprise'\n})",
"html": "await octokit.request('GET /enterprises/{enterprise}/actions/runners', {\n enterprise: 'enterprise'\n})\n"
}
],
"summary": "List self-hosted runners for an enterprise",
"description": "Lists all self-hosted runners configured for an enterprise.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/list-self-hosted-runners-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#list-self-hosted-runners-for-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "list-self-hosted-runners-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all self-hosted runners configured for an enterprise.
\nYou must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
{\n \"total_count\": 2,\n \"runners\": [\n {\n \"id\": 23,\n \"name\": \"linux_runner\",\n \"os\": \"linux\",\n \"status\": \"online\",\n \"busy\": true,\n \"labels\": [\n {\n \"id\": 5,\n \"name\": \"self-hosted\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 7,\n \"name\": \"X64\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 11,\n \"name\": \"Linux\",\n \"type\": \"read-only\"\n }\n ]\n },\n {\n \"id\": 24,\n \"name\": \"mac_runner\",\n \"os\": \"macos\",\n \"status\": \"offline\",\n \"busy\": false,\n \"labels\": [\n {\n \"id\": 5,\n \"name\": \"self-hosted\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 7,\n \"name\": \"X64\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 20,\n \"name\": \"macOS\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 21,\n \"name\": \"no-gpu\",\n \"type\": \"custom\"\n }\n ]\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/enterprises/{enterprise}/actions/runners/downloads",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runners/downloads", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runners/downloads"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /enterprises/{enterprise}/actions/runners/downloads', {\n enterprise: 'enterprise'\n})",
"html": "await octokit.request('GET /enterprises/{enterprise}/actions/runners/downloads', {\n enterprise: 'enterprise'\n})\n"
}
],
"summary": "List runner applications for an enterprise",
"description": "Lists binaries for the runner application that you can download and run.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/list-runner-applications-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#list-runner-applications-for-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "list-runner-applications-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists binaries for the runner application that you can download and run.
\nYou must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
[\n {\n \"os\": \"osx\",\n \"architecture\": \"x64\",\n \"download_url\": \"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-osx-x64-2.164.0.tar.gz\",\n \"filename\": \"actions-runner-osx-x64-2.164.0.tar.gz\"\n },\n {\n \"os\": \"linux\",\n \"architecture\": \"x64\",\n \"download_url\": \"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-x64-2.164.0.tar.gz\",\n \"filename\": \"actions-runner-linux-x64-2.164.0.tar.gz\"\n },\n {\n \"os\": \"linux\",\n \"architecture\": \"arm\",\n \"download_url\": \"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm-2.164.0.tar.gz\",\n \"filename\": \"actions-runner-linux-arm-2.164.0.tar.gz\"\n },\n {\n \"os\": \"win\",\n \"architecture\": \"x64\",\n \"download_url\": \"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-win-x64-2.164.0.zip\",\n \"filename\": \"actions-runner-win-x64-2.164.0.zip\"\n },\n {\n \"os\": \"linux\",\n \"architecture\": \"arm64\",\n \"download_url\": \"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm64-2.164.0.tar.gz\",\n \"filename\": \"actions-runner-linux-arm64-2.164.0.tar.gz\"\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/enterprises/{enterprise}/actions/runners/registration-token",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runners/registration-token", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runners/registration-token"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /enterprises/{enterprise}/actions/runners/registration-token', {\n enterprise: 'enterprise'\n})",
"html": "await octokit.request('POST /enterprises/{enterprise}/actions/runners/registration-token', {\n enterprise: 'enterprise'\n})\n"
}
],
"summary": "Create a registration token for an enterprise",
"description": "Returns a token that you can pass to the `config` script. The token expires after one hour.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.\n\n#### Example using registration token\n\nConfigure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.\n\n```\n./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN\n```",
"operationId": "enterprise-admin/create-registration-token-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#create-a-registration-token-for-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "create-a-registration-token-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns a token that you can pass to the config script. The token expires after one hour.
You must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
Configure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint.
./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN\n",
"responses": [
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response",
"payload": "{\n \"token\": \"LLBF3JGZDX3P5PMEXLND6TS6FCWO6\",\n \"expires_at\": \"2020-01-22T12:13:35.123-08:00\"\n}\n"
}
]
},
{
"verb": "post",
"requestPath": "/enterprises/{enterprise}/actions/runners/remove-token",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runners/remove-token", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runners/remove-token"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /enterprises/{enterprise}/actions/runners/remove-token', {\n enterprise: 'enterprise'\n})",
"html": "await octokit.request('POST /enterprises/{enterprise}/actions/runners/remove-token', {\n enterprise: 'enterprise'\n})\n"
}
],
"summary": "Create a remove token for an enterprise",
"description": "Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.\n\n#### Example using remove token\n\nTo remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this\nendpoint.\n\n```\n./config.sh remove --token TOKEN\n```",
"operationId": "enterprise-admin/create-remove-token-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#create-a-remove-token-for-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "create-a-remove-token-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns a token that you can pass to the config script to remove a self-hosted runner from an enterprise. The token expires after one hour.
You must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
To remove your self-hosted runner from an enterprise, replace TOKEN with the remove token provided by this\nendpoint.
./config.sh remove --token TOKEN\n",
"responses": [
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response",
"payload": "{\n \"token\": \"AABF3JGZDX3P5PMEXLND6TS6FCWO6\",\n \"expires_at\": \"2020-01-29T12:13:35.123-08:00\"\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/enterprises/{enterprise}/actions/runners/{runner_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "runner_id", "description": "Unique identifier of the self-hosted runner.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runners/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runners/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /enterprises/{enterprise}/actions/runners/{runner_id}', {\n enterprise: 'enterprise',\n runner_id: 42\n})",
"html": "await octokit.request('GET /enterprises/{enterprise}/actions/runners/{runner_id}', {\n enterprise: 'enterprise',\n runner_id: 42\n})\n"
}
],
"summary": "Get a self-hosted runner for an enterprise",
"description": "Gets a specific self-hosted runner configured in an enterprise.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/get-self-hosted-runner-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#get-a-self-hosted-runner-for-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "get-a-self-hosted-runner-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a specific self-hosted runner configured in an enterprise.
\nYou must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
{\n \"id\": 23,\n \"name\": \"MBP\",\n \"os\": \"macos\",\n \"status\": \"online\",\n \"busy\": true,\n \"labels\": [\n {\n \"id\": 5,\n \"name\": \"self-hosted\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 7,\n \"name\": \"X64\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 20,\n \"name\": \"macOS\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 21,\n \"name\": \"no-gpu\",\n \"type\": \"custom\"\n }\n ]\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/enterprises/{enterprise}/actions/runners/{runner_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "runner_id", "description": "Unique identifier of the self-hosted runner.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runners/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/actions/runners/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /enterprises/{enterprise}/actions/runners/{runner_id}', {\n enterprise: 'enterprise',\n runner_id: 42\n})",
"html": "await octokit.request('DELETE /enterprises/{enterprise}/actions/runners/{runner_id}', {\n enterprise: 'enterprise',\n runner_id: 42\n})\n"
}
],
"summary": "Delete a self-hosted runner from an enterprise",
"description": "Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/delete-self-hosted-runner-from-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#delete-self-hosted-runner-from-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "enterprise-admin",
"subcategory": "actions"
},
"slug": "delete-a-self-hosted-runner-from-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "actions",
"subcategoryLabel": "Actions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
\nYou must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "phrase", "description": "A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log).", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "A search phrase. For more information, see Searching the audit log.
" }, { "name": "include", "description": "The event types to include:\n\n- `web` - returns web (non-Git) events\n- `git` - returns Git events\n- `all` - returns both web and Git events\n\nThe default is `web`.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "web", "git", "all" ] }, "descriptionHTML": "The event types to include:
\nweb - returns web (non-Git) eventsgit - returns Git eventsall - returns both web and Git eventsThe default is web.
A cursor, as given in the Link header. If specified, the query only searches for events after this cursor.
" }, { "name": "before", "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor.", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "A cursor, as given in the Link header. If specified, the query only searches for events before this cursor.
" }, { "name": "order", "description": "The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`.\n\nThe default is `desc`.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "desc", "asc" ] }, "descriptionHTML": "The order of audit log events. To list newest events first, specify desc. To list oldest events first, specify asc.
The default is desc.
Page number of the results to fetch.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/audit-log", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/audit-log"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /enterprises/{enterprise}/audit-log', {\n enterprise: 'enterprise'\n})",
"html": "await octokit.request('GET /enterprises/{enterprise}/audit-log', {\n enterprise: 'enterprise'\n})\n"
}
],
"summary": "Get the audit log for an enterprise",
"operationId": "enterprise-admin/get-audit-log",
"description": "Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope.",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#get-the-audit-log-for-an-enterprise"
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": false,
"category": "enterprise-admin",
"subcategory": "audit-log"
},
"slug": "get-the-audit-log-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "audit-log",
"subcategoryLabel": "Audit log",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the admin:enterprise scope.
[\n {\n \"@timestamp\": 1606929874512,\n \"action\": \"team.add_member\",\n \"actor\": \"octocat\",\n \"created_at\": 1606929874512,\n \"_document_id\": \"xJJFlFOhQ6b-5vaAFy9Rjw\",\n \"org\": \"octo-corp\",\n \"team\": \"octo-corp/example-team\",\n \"user\": \"monalisa\"\n },\n {\n \"@timestamp\": 1606507117008,\n \"action\": \"org.create\",\n \"actor\": \"octocat\",\n \"created_at\": 1606507117008,\n \"_document_id\": \"Vqvg6kZ4MYqwWRKFDzlMoQ\",\n \"org\": \"octocat-test-org\"\n },\n {\n \"@timestamp\": 1605719148837,\n \"action\": \"repo.destroy\",\n \"actor\": \"monalisa\",\n \"created_at\": 1605719148837,\n \"_document_id\": \"LwW2vpJZCDS-WUmo9Z-ifw\",\n \"org\": \"mona-org\",\n \"repo\": \"mona-org/mona-test-repo\",\n \"visibility\": \"private\"\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/enterprises/{enterprise}/settings/billing/actions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/settings/billing/actions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/settings/billing/actions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /enterprises/{enterprise}/settings/billing/actions', {\n enterprise: 'enterprise'\n})",
"html": "await octokit.request('GET /enterprises/{enterprise}/settings/billing/actions', {\n enterprise: 'enterprise'\n})\n"
}
],
"summary": "Get GitHub Actions billing for an enterprise",
"description": "Gets the summary of the free and paid GitHub Actions minutes used.\n\nPaid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see \"[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)\".\n\nThe authenticated user must be an enterprise admin.",
"operationId": "billing/get-github-actions-billing-ghe",
"tags": [
"billing"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-enterprise"
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": false,
"category": "enterprise-admin",
"subcategory": "billing"
},
"slug": "get-github-actions-billing-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "billing",
"subcategoryLabel": "Billing",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the summary of the free and paid GitHub Actions minutes used.
\nPaid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see \"Managing billing for GitHub Actions\".
\nThe authenticated user must be an enterprise admin.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"total_minutes_used\": 305,\n \"total_paid_minutes_used\": 0,\n \"included_minutes\": 3000,\n \"minutes_used_breakdown\": {\n \"UBUNTU\": 205,\n \"MACOS\": 10,\n \"WINDOWS\": 90\n }\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/enterprises/{enterprise}/settings/billing/packages",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/settings/billing/packages", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/settings/billing/packages"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /enterprises/{enterprise}/settings/billing/packages', {\n enterprise: 'enterprise'\n})",
"html": "await octokit.request('GET /enterprises/{enterprise}/settings/billing/packages', {\n enterprise: 'enterprise'\n})\n"
}
],
"summary": "Get GitHub Packages billing for an enterprise",
"description": "Gets the free and paid storage used for GitHub Packages in gigabytes.\n\nPaid minutes only apply to packages stored for private repositories. For more information, see \"[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages).\"\n\nThe authenticated user must be an enterprise admin.",
"operationId": "billing/get-github-packages-billing-ghe",
"tags": [
"billing"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-enterprise"
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": false,
"category": "enterprise-admin",
"subcategory": "billing"
},
"slug": "get-github-packages-billing-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "billing",
"subcategoryLabel": "Billing",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the free and paid storage used for GitHub Packages in gigabytes.
\nPaid minutes only apply to packages stored for private repositories. For more information, see \"Managing billing for GitHub Packages.\"
\nThe authenticated user must be an enterprise admin.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"total_gigabytes_bandwidth_used\": 50,\n \"total_paid_gigabytes_bandwidth_used\": 40,\n \"included_gigabytes_bandwidth\": 10\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/enterprises/{enterprise}/settings/billing/shared-storage",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/settings/billing/shared-storage", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprises/ENTERPRISE/settings/billing/shared-storage"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /enterprises/{enterprise}/settings/billing/shared-storage', {\n enterprise: 'enterprise'\n})",
"html": "await octokit.request('GET /enterprises/{enterprise}/settings/billing/shared-storage', {\n enterprise: 'enterprise'\n})\n"
}
],
"summary": "Get shared storage billing for an enterprise",
"description": "Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages.\n\nPaid minutes only apply to packages stored for private repositories. For more information, see \"[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages).\"\n\nThe authenticated user must be an enterprise admin.",
"operationId": "billing/get-shared-storage-billing-ghe",
"tags": [
"billing"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-enterprise"
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": false,
"category": "enterprise-admin",
"subcategory": "billing"
},
"slug": "get-shared-storage-billing-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "billing",
"subcategoryLabel": "Billing",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages.
\nPaid minutes only apply to packages stored for private repositories. For more information, see \"Managing billing for GitHub Packages.\"
\nThe authenticated user must be an enterprise admin.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"days_left_in_billing_cycle\": 20,\n \"estimated_paid_storage_for_month\": 15,\n \"estimated_storage_for_month\": 40\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/events",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/events", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/events"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /events')",
"html": "await octokit.request('GET /events')\n"
}
],
"summary": "List public events",
"description": "We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago.",
"tags": [
"activity"
],
"operationId": "activity/list-public-events",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-public-events"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "events"
},
"slug": "list-public-events",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "events",
"subcategoryLabel": "Events",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
],
"bodyParameters": [],
"descriptionHTML": "We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago.
" }, { "verb": "get", "requestPath": "/feeds", "serverUrl": "https://api.github.com", "parameters": [], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/feeds", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/feeds"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /feeds')",
"html": "await octokit.request('GET /feeds')\n"
}
],
"summary": "Get feeds",
"description": "GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user:\n\n* **Timeline**: The GitHub global public timeline\n* **User**: The public timeline for any user, using [URI template](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia)\n* **Current user public**: The public timeline for the authenticated user\n* **Current user**: The private timeline for the authenticated user\n* **Current user actor**: The private timeline for activity created by the authenticated user\n* **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.\n* **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.\n\n**Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens.",
"tags": [
"activity"
],
"operationId": "activity/get-feeds",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#get-feeds"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "feeds"
},
"slug": "get-feeds",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "feeds",
"subcategoryLabel": "Feeds",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "GitHub provides several timeline resources in Atom format. The Feeds API lists all the feeds available to the authenticated user:
\nNote: Private feeds are only returned when authenticating via Basic Auth since current feed URIs use the older, non revocable auth tokens.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"timeline_url\": \"https://github.com/timeline\",\n \"user_url\": \"https://github.com/{user}\",\n \"current_user_public_url\": \"https://github.com/octocat\",\n \"current_user_url\": \"https://github.com/octocat.private?token=abc123\",\n \"current_user_actor_url\": \"https://github.com/octocat.private.actor?token=abc123\",\n \"current_user_organization_url\": \"\",\n \"current_user_organization_urls\": [\n \"https://github.com/organizations/github/octocat.private.atom?token=abc123\"\n ],\n \"security_advisories_url\": \"https://github.com/security-advisories\",\n \"_links\": {\n \"timeline\": {\n \"href\": \"https://github.com/timeline\",\n \"type\": \"application/atom+xml\"\n },\n \"user\": {\n \"href\": \"https://github.com/{user}\",\n \"type\": \"application/atom+xml\"\n },\n \"current_user_public\": {\n \"href\": \"https://github.com/octocat\",\n \"type\": \"application/atom+xml\"\n },\n \"current_user\": {\n \"href\": \"https://github.com/octocat.private?token=abc123\",\n \"type\": \"application/atom+xml\"\n },\n \"current_user_actor\": {\n \"href\": \"https://github.com/octocat.private.actor?token=abc123\",\n \"type\": \"application/atom+xml\"\n },\n \"current_user_organization\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"current_user_organizations\": [\n {\n \"href\": \"https://github.com/organizations/github/octocat.private.atom?token=abc123\",\n \"type\": \"application/atom+xml\"\n }\n ],\n \"security_advisories\": {\n \"href\": \"https://github.com/security-advisories\",\n \"type\": \"application/atom+xml\"\n }\n }\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/gists",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "since",
"description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
},
"descriptionHTML": "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /gists')",
"html": "await octokit.request('GET /gists')\n"
}
],
"summary": "List gists for the authenticated user",
"description": "Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists:",
"tags": [
"gists"
],
"operationId": "gists/list",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
},
"slug": "list-gists-for-the-authenticated-user",
"category": "gists",
"categoryLabel": "Gists",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists:
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n \"id\": \"aa5a315d61ae9438b18d\",\n \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n \"files\": {\n \"hello_world.rb\": {\n \"filename\": \"hello_world.rb\",\n \"type\": \"application/x-ruby\",\n \"language\": \"Ruby\",\n \"raw_url\": \"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\n \"size\": 167\n }\n },\n \"public\": true,\n \"created_at\": \"2010-04-14T02:15:15Z\",\n \"updated_at\": \"2011-06-20T11:34:15Z\",\n \"description\": \"Hello World Examples\",\n \"comments\": 0,\n \"user\": null,\n \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"truncated\": false\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "post",
"requestPath": "/gists",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists \\\n -d '{\"files\":{}}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists \\\n -d '{\"files\":{}}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /gists', {\n files: {}\n})",
"html": "await octokit.request('POST /gists', {\n files: {}\n})\n"
}
],
"summary": "Create a gist",
"description": "Allows you to add a new gist with one or more files.\n\n**Note:** Don't name your files \"gistfile\" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally.",
"operationId": "gists/create",
"tags": [
"gists"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#create-a-gist"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"description": {
"description": "Description of the gist
", "example": "Example Ruby script", "type": "string", "name": "description", "in": "body", "rawType": "string", "rawDescription": "Description of the gist", "childParamsGroups": [] }, "files": { "description": "Required. Names and content for the files that make up the gist
", "example": { "hello.rb": { "content": "puts \"Hello, World!\"" } }, "type": "object", "additionalProperties": { "type": "object", "properties": { "content": { "description": "Content of the file", "readOnly": false, "type": "string" } }, "required": [ "content" ] }, "name": "files", "in": "body", "rawType": "object", "rawDescription": "Names and content for the files that make up the gist", "childParamsGroups": [] }, "public": { "oneOf": [ { "description": "Flag indicating whether the gist is public", "example": true, "type": "boolean", "default": false }, { "type": "string", "example": "true", "default": "false", "enum": [ "true", "false" ] } ], "name": "public", "in": "body", "description": "Flag indicating whether the gist is public
", "type": "boolean or string", "childParamsGroups": [] } }, "required": [ "files" ], "type": "object" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "gists", "subcategory": null }, "slug": "create-a-gist", "category": "gists", "categoryLabel": "Gists", "contentType": "application/json", "notes": [], "descriptionHTML": "Allows you to add a new gist with one or more files.
\nNote: Don't name your files \"gistfile\" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally.
", "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n \"id\": \"aa5a315d61ae9438b18d\",\n \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n \"created_at\": \"2010-04-14T02:15:15Z\",\n \"updated_at\": \"2011-06-20T11:34:15Z\",\n \"description\": \"Hello World Examples\",\n \"comments\": 0,\n \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"description": "Description of the gist
", "example": "Example Ruby script", "type": "string", "name": "description", "in": "body", "rawType": "string", "rawDescription": "Description of the gist", "childParamsGroups": [] }, { "description": "Required. Names and content for the files that make up the gist
", "example": { "hello.rb": { "content": "puts \"Hello, World!\"" } }, "type": "object", "additionalProperties": { "type": "object", "properties": { "content": { "description": "Content of the file", "readOnly": false, "type": "string" } }, "required": [ "content" ] }, "name": "files", "in": "body", "rawType": "object", "rawDescription": "Names and content for the files that make up the gist", "childParamsGroups": [] }, { "oneOf": [ { "description": "Flag indicating whether the gist is public", "example": true, "type": "boolean", "default": false }, { "type": "string", "example": "true", "default": "false", "enum": [ "true", "false" ] } ], "name": "public", "in": "body", "description": "Flag indicating whether the gist is public
", "type": "boolean or string", "childParamsGroups": [] } ] }, { "verb": "get", "requestPath": "/gists/public", "serverUrl": "https://api.github.com", "parameters": [ { "name": "since", "description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", "in": "query", "required": false, "schema": { "type": "string", "format": "date-time" }, "descriptionHTML": "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/public", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/public"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /gists/public')",
"html": "await octokit.request('GET /gists/public')\n"
}
],
"summary": "List public gists",
"description": "List public gists sorted by most recently updated to least recently updated.\n\nNote: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page.",
"tags": [
"gists"
],
"operationId": "gists/list-public",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#list-public-gists"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
},
"slug": "list-public-gists",
"category": "gists",
"categoryLabel": "Gists",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List public gists sorted by most recently updated to least recently updated.
\nNote: With pagination, you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n \"id\": \"aa5a315d61ae9438b18d\",\n \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n \"files\": {\n \"hello_world.rb\": {\n \"filename\": \"hello_world.rb\",\n \"type\": \"application/x-ruby\",\n \"language\": \"Ruby\",\n \"raw_url\": \"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\n \"size\": 167\n }\n },\n \"public\": true,\n \"created_at\": \"2010-04-14T02:15:15Z\",\n \"updated_at\": \"2011-06-20T11:34:15Z\",\n \"description\": \"Hello World Examples\",\n \"comments\": 0,\n \"user\": null,\n \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"truncated\": false\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/gists/starred",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "since",
"description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
},
"descriptionHTML": "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/starred", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/starred"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /gists/starred')",
"html": "await octokit.request('GET /gists/starred')\n"
}
],
"summary": "List starred gists",
"description": "List the authenticated user's starred gists:",
"tags": [
"gists"
],
"operationId": "gists/list-starred",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#list-starred-gists"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
},
"slug": "list-starred-gists",
"category": "gists",
"categoryLabel": "Gists",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List the authenticated user's starred gists:
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n \"id\": \"aa5a315d61ae9438b18d\",\n \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n \"files\": {\n \"hello_world.rb\": {\n \"filename\": \"hello_world.rb\",\n \"type\": \"application/x-ruby\",\n \"language\": \"Ruby\",\n \"raw_url\": \"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\n \"size\": 167\n }\n },\n \"public\": true,\n \"created_at\": \"2010-04-14T02:15:15Z\",\n \"updated_at\": \"2011-06-20T11:34:15Z\",\n \"description\": \"Hello World Examples\",\n \"comments\": 0,\n \"user\": null,\n \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"truncated\": false\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "get",
"requestPath": "/gists/{gist_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "gist_id",
"description": "gist_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "gist_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /gists/{gist_id}', {\n gist_id: 'gist_id'\n})",
"html": "await octokit.request('GET /gists/{gist_id}', {\n gist_id: 'gist_id'\n})\n"
}
],
"summary": "Get a gist",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#get-a-gist"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
},
"slug": "get-a-gist",
"category": "gists",
"categoryLabel": "Gists",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n \"id\": \"aa5a315d61ae9438b18d\",\n \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n \"created_at\": \"2010-04-14T02:15:15Z\",\n \"updated_at\": \"2011-06-20T11:34:15Z\",\n \"description\": \"Hello World Examples\",\n \"comments\": 0,\n \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden Gist"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/gists/{gist_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "gist_id",
"description": "gist_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "gist_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID \\\n -d '{\"description\":\"description\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID \\\n -d '{\"description\":\"description\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /gists/{gist_id}', {\n gist_id: 'gist_id',\n description: 'description'\n})",
"html": "await octokit.request('PATCH /gists/{gist_id}', {\n gist_id: 'gist_id',\n description: 'description'\n})\n"
}
],
"summary": "Update a gist",
"description": "Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged.",
"tags": [
"gists"
],
"operationId": "gists/update",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists/#update-a-gist"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"description": {
"description": "Description of the gist
", "example": "Example Ruby script", "type": "string", "name": "description", "in": "body", "rawType": "string", "rawDescription": "Description of the gist", "childParamsGroups": [] }, "files": { "description": "Names of files to be updated
", "example": { "hello.rb": { "content": "blah", "filename": "goodbye.rb" } }, "type": "object", "additionalProperties": { "type": "object", "nullable": true, "properties": { "content": { "description": "The new content of the file", "type": "string" }, "filename": { "description": "The new filename for the file", "type": "string", "nullable": true } }, "anyOf": [ { "required": [ "content" ] }, { "required": [ "filename" ] }, { "type": "object", "maxProperties": 0 } ] }, "name": "files", "in": "body", "rawType": "object", "rawDescription": "Names of files to be updated", "childParamsGroups": [] } }, "anyOf": [ { "required": [ "description" ] }, { "required": [ "files" ] } ], "type": "object", "nullable": true } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "gists", "subcategory": null }, "slug": "update-a-gist", "category": "gists", "categoryLabel": "Gists", "contentType": "application/json", "notes": [], "descriptionHTML": "Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n \"id\": \"aa5a315d61ae9438b18d\",\n \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n \"created_at\": \"2010-04-14T02:15:15Z\",\n \"updated_at\": \"2011-06-20T11:34:15Z\",\n \"description\": \"Hello World Examples\",\n \"comments\": 0,\n \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"description": "Description of the gist
", "example": "Example Ruby script", "type": "string", "name": "description", "in": "body", "rawType": "string", "rawDescription": "Description of the gist", "childParamsGroups": [] }, { "description": "Names of files to be updated
", "example": { "hello.rb": { "content": "blah", "filename": "goodbye.rb" } }, "type": "object", "additionalProperties": { "type": "object", "nullable": true, "properties": { "content": { "description": "The new content of the file", "type": "string" }, "filename": { "description": "The new filename for the file", "type": "string", "nullable": true } }, "anyOf": [ { "required": [ "content" ] }, { "required": [ "filename" ] }, { "type": "object", "maxProperties": 0 } ] }, "name": "files", "in": "body", "rawType": "object", "rawDescription": "Names of files to be updated", "childParamsGroups": [] } ] }, { "verb": "delete", "requestPath": "/gists/{gist_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "gist_id", "description": "gist_id parameter", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "gist_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /gists/{gist_id}', {\n gist_id: 'gist_id'\n})",
"html": "await octokit.request('DELETE /gists/{gist_id}', {\n gist_id: 'gist_id'\n})\n"
}
],
"summary": "Delete a gist",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/delete",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#delete-a-gist"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
},
"slug": "delete-a-gist",
"category": "gists",
"categoryLabel": "Gists",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/gists/{gist_id}/comments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "gist_id",
"description": "gist_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "gist_id parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /gists/{gist_id}/comments', {\n gist_id: 'gist_id'\n})",
"html": "await octokit.request('GET /gists/{gist_id}/comments', {\n gist_id: 'gist_id'\n})\n"
}
],
"summary": "List gist comments",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/list-comments",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#list-gist-comments"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": "comments"
},
"slug": "list-gist-comments",
"category": "gists",
"categoryLabel": "Gists",
"subcategory": "comments",
"subcategoryLabel": "Comments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"id\": 1,\n \"node_id\": \"MDExOkdpc3RDb21tZW50MQ==\",\n \"url\": \"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1\",\n \"body\": \"Just commenting for the sake of commenting\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-18T23:23:56Z\",\n \"updated_at\": \"2011-04-18T23:23:56Z\",\n \"author_association\": \"COLLABORATOR\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/gists/{gist_id}/comments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "gist_id",
"description": "gist_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "gist_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments \\\n -d '{\"body\":\"body\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments \\\n -d '{\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /gists/{gist_id}/comments', {\n gist_id: 'gist_id',\n body: 'body'\n})",
"html": "await octokit.request('POST /gists/{gist_id}/comments', {\n gist_id: 'gist_id',\n body: 'body'\n})\n"
}
],
"summary": "Create a gist comment",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/create-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#create-a-gist-comment"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"body": {
"description": "Required. The comment text.
", "type": "string", "maxLength": 65535, "example": "Body of the attachment", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The comment text.", "childParamsGroups": [] } }, "type": "object", "required": [ "body" ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "gists", "subcategory": "comments" }, "slug": "create-a-gist-comment", "category": "gists", "categoryLabel": "Gists", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", "notes": [], "descriptionHTML": "", "bodyParameters": [ { "description": "Required. The comment text.
", "type": "string", "maxLength": 65535, "example": "Body of the attachment", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The comment text.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDExOkdpc3RDb21tZW50MQ==\",\n \"url\": \"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1\",\n \"body\": \"Just commenting for the sake of commenting\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-18T23:23:56Z\",\n \"updated_at\": \"2011-04-18T23:23:56Z\",\n \"author_association\": \"COLLABORATOR\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/gists/{gist_id}/comments/{comment_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "gist_id",
"description": "gist_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "gist_id parameter
" }, { "name": "comment_id", "description": "comment_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "comment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /gists/{gist_id}/comments/{comment_id}', {\n gist_id: 'gist_id',\n comment_id: 42\n})",
"html": "await octokit.request('GET /gists/{gist_id}/comments/{comment_id}', {\n gist_id: 'gist_id',\n comment_id: 42\n})\n"
}
],
"summary": "Get a gist comment",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/get-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#get-a-gist-comment"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": "comments"
},
"slug": "get-a-gist-comment",
"category": "gists",
"categoryLabel": "Gists",
"subcategory": "comments",
"subcategoryLabel": "Comments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"id\": 1,\n \"node_id\": \"MDExOkdpc3RDb21tZW50MQ==\",\n \"url\": \"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1\",\n \"body\": \"Just commenting for the sake of commenting\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-18T23:23:56Z\",\n \"updated_at\": \"2011-04-18T23:23:56Z\",\n \"author_association\": \"COLLABORATOR\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden Gist"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/gists/{gist_id}/comments/{comment_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "gist_id",
"description": "gist_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "gist_id parameter
" }, { "name": "comment_id", "description": "comment_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "comment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments/42 \\\n -d '{\"body\":\"body\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments/42 \\\n -d '{\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /gists/{gist_id}/comments/{comment_id}', {\n gist_id: 'gist_id',\n comment_id: 42,\n body: 'body'\n})",
"html": "await octokit.request('PATCH /gists/{gist_id}/comments/{comment_id}', {\n gist_id: 'gist_id',\n comment_id: 42,\n body: 'body'\n})\n"
}
],
"summary": "Update a gist comment",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/update-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#update-a-gist-comment"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"body": {
"description": "Required. The comment text.
", "type": "string", "maxLength": 65535, "example": "Body of the attachment", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The comment text.", "childParamsGroups": [] } }, "type": "object", "required": [ "body" ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "gists", "subcategory": "comments" }, "slug": "update-a-gist-comment", "category": "gists", "categoryLabel": "Gists", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", "notes": [], "descriptionHTML": "", "bodyParameters": [ { "description": "Required. The comment text.
", "type": "string", "maxLength": 65535, "example": "Body of the attachment", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The comment text.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDExOkdpc3RDb21tZW50MQ==\",\n \"url\": \"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1\",\n \"body\": \"Just commenting for the sake of commenting\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-18T23:23:56Z\",\n \"updated_at\": \"2011-04-18T23:23:56Z\",\n \"author_association\": \"COLLABORATOR\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "delete",
"requestPath": "/gists/{gist_id}/comments/{comment_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "gist_id",
"description": "gist_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "gist_id parameter
" }, { "name": "comment_id", "description": "comment_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "comment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /gists/{gist_id}/comments/{comment_id}', {\n gist_id: 'gist_id',\n comment_id: 42\n})",
"html": "await octokit.request('DELETE /gists/{gist_id}/comments/{comment_id}', {\n gist_id: 'gist_id',\n comment_id: 42\n})\n"
}
],
"summary": "Delete a gist comment",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/delete-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#delete-a-gist-comment"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": "comments"
},
"slug": "delete-a-gist-comment",
"category": "gists",
"categoryLabel": "Gists",
"subcategory": "comments",
"subcategoryLabel": "Comments",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/gists/{gist_id}/commits",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "gist_id",
"description": "gist_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "gist_id parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/commits", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/commits"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /gists/{gist_id}/commits', {\n gist_id: 'gist_id'\n})",
"html": "await octokit.request('GET /gists/{gist_id}/commits', {\n gist_id: 'gist_id'\n})\n"
}
],
"summary": "List gist commits",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/list-commits",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#list-gist-commits"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
},
"slug": "list-gist-commits",
"category": "gists",
"categoryLabel": "Gists",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f\",\n \"version\": \"57a7f021a713b1c5a6a199b54cc514735d2d462f\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"change_status\": {\n \"deletions\": 0,\n \"additions\": 180,\n \"total\": 180\n },\n \"committed_at\": \"2010-04-14T02:15:15Z\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/gists/{gist_id}/forks",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "gist_id",
"description": "gist_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "gist_id parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/forks", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/forks"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /gists/{gist_id}/forks', {\n gist_id: 'gist_id'\n})",
"html": "await octokit.request('GET /gists/{gist_id}/forks', {\n gist_id: 'gist_id'\n})\n"
}
],
"summary": "List gist forks",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/list-forks",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#list-gist-forks"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
},
"slug": "list-gist-forks",
"category": "gists",
"categoryLabel": "Gists",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n \"id\": \"aa5a315d61ae9438b18d\",\n \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n \"files\": {\n \"hello_world.rb\": {\n \"filename\": \"hello_world.rb\",\n \"type\": \"application/x-ruby\",\n \"language\": \"Ruby\",\n \"raw_url\": \"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\n \"size\": 167\n }\n },\n \"public\": true,\n \"created_at\": \"2010-04-14T02:15:15Z\",\n \"updated_at\": \"2011-06-20T11:34:15Z\",\n \"description\": \"Hello World Examples\",\n \"comments\": 1,\n \"user\": null,\n \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/gists/{gist_id}/forks",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "gist_id",
"description": "gist_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "gist_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/forks", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/forks"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /gists/{gist_id}/forks', {\n gist_id: 'gist_id'\n})",
"html": "await octokit.request('POST /gists/{gist_id}/forks', {\n gist_id: 'gist_id'\n})\n"
}
],
"summary": "Fork a gist",
"description": "**Note**: This was previously `/gists/:gist_id/fork`.",
"tags": [
"gists"
],
"operationId": "gists/fork",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#fork-a-gist"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
},
"slug": "fork-a-gist",
"category": "gists",
"categoryLabel": "Gists",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Note: This was previously /gists/:gist_id/fork.
{\n \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n \"id\": \"aa5a315d61ae9438b18d\",\n \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n \"files\": {\n \"hello_world.rb\": {\n \"filename\": \"hello_world.rb\",\n \"type\": \"application/x-ruby\",\n \"language\": \"Ruby\",\n \"raw_url\": \"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\n \"size\": 167\n }\n },\n \"public\": true,\n \"created_at\": \"2010-04-14T02:15:15Z\",\n \"updated_at\": \"2011-06-20T11:34:15Z\",\n \"description\": \"Hello World Examples\",\n \"comments\": 0,\n \"user\": null,\n \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"truncated\": false\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/gists/{gist_id}/star",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "gist_id",
"description": "gist_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "gist_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/star", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/star"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /gists/{gist_id}/star', {\n gist_id: 'gist_id'\n})",
"html": "await octokit.request('GET /gists/{gist_id}/star', {\n gist_id: 'gist_id'\n})\n"
}
],
"summary": "Check if a gist is starred",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/check-is-starred",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
},
"slug": "check-if-a-gist-is-starred",
"category": "gists",
"categoryLabel": "Gists",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response if gist is starred"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if gist is not starred"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "put",
"requestPath": "/gists/{gist_id}/star",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "gist_id",
"description": "gist_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "gist_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/star", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/star"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /gists/{gist_id}/star', {\n gist_id: 'gist_id'\n})",
"html": "await octokit.request('PUT /gists/{gist_id}/star', {\n gist_id: 'gist_id'\n})\n"
}
],
"summary": "Star a gist",
"description": "Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"",
"tags": [
"gists"
],
"operationId": "gists/star",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#star-a-gist"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
},
"slug": "star-a-gist",
"category": "gists",
"categoryLabel": "Gists",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Note that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
gist_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/star", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/star"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /gists/{gist_id}/star', {\n gist_id: 'gist_id'\n})",
"html": "await octokit.request('DELETE /gists/{gist_id}/star', {\n gist_id: 'gist_id'\n})\n"
}
],
"summary": "Unstar a gist",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/unstar",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#unstar-a-gist"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
},
"slug": "unstar-a-gist",
"category": "gists",
"categoryLabel": "Gists",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/gists/{gist_id}/{sha}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "gist_id",
"description": "gist_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "gist_id parameter
" }, { "name": "sha", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/SHA", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/SHA"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /gists/{gist_id}/{sha}', {\n gist_id: 'gist_id',\n sha: 'sha'\n})",
"html": "await octokit.request('GET /gists/{gist_id}/{sha}', {\n gist_id: 'gist_id',\n sha: 'sha'\n})\n"
}
],
"summary": "Get a gist revision",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/get-revision",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#get-a-gist-revision"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
},
"slug": "get-a-gist-revision",
"category": "gists",
"categoryLabel": "Gists",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n \"id\": \"aa5a315d61ae9438b18d\",\n \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n \"created_at\": \"2010-04-14T02:15:15Z\",\n \"updated_at\": \"2011-06-20T11:34:15Z\",\n \"description\": \"Hello World Examples\",\n \"comments\": 0,\n \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/gitignore/templates",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gitignore/templates",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gitignore/templates"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /gitignore/templates')",
"html": "await octokit.request('GET /gitignore/templates')\n"
}
],
"summary": "Get all gitignore templates",
"description": "List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user).",
"operationId": "gitignore/get-all-templates",
"tags": [
"gitignore"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "gitignore",
"subcategory": null
},
"slug": "get-all-gitignore-templates",
"category": "gitignore",
"categoryLabel": "Gitignore",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List all templates available to pass as an option when creating a repository.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n \"Actionscript\",\n \"Android\",\n \"AppceleratorTitanium\",\n \"Autotools\",\n \"Bancha\",\n \"C\",\n \"C++\"\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
}
]
},
{
"verb": "get",
"requestPath": "/gitignore/templates/{name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "name",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gitignore/templates/NAME",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gitignore/templates/NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /gitignore/templates/{name}', {\n name: 'name'\n})",
"html": "await octokit.request('GET /gitignore/templates/{name}', {\n name: 'name'\n})\n"
}
],
"summary": "Get a gitignore template",
"description": "The API also allows fetching the source of a single template.\nUse the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents.",
"operationId": "gitignore/get-template",
"tags": [
"gitignore"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "gitignore",
"subcategory": null
},
"slug": "get-a-gitignore-template",
"category": "gitignore",
"categoryLabel": "Gitignore",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "The API also allows fetching the source of a single template.\nUse the raw media type to get the raw contents.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"name\": \"C\",\n \"source\": \"# Object files\\n*.o\\n\\n# Libraries\\n*.lib\\n*.a\\n\\n# Shared objects (inc. Windows DLLs)\\n*.dll\\n*.so\\n*.so.*\\n*.dylib\\n\\n# Executables\\n*.exe\\n*.out\\n*.app\\n\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
}
]
},
{
"verb": "get",
"requestPath": "/installation/repositories",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/installation/repositories", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/installation/repositories"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /installation/repositories')",
"html": "await octokit.request('GET /installation/repositories')\n"
}
],
"summary": "List repositories accessible to the app installation",
"description": "List repositories that an app installation can access.\n\nYou must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/list-repos-accessible-to-installation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "apps",
"subcategory": "installations"
},
"slug": "list-repositories-accessible-to-the-app-installation",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "installations",
"subcategoryLabel": "Installations",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List repositories that an app installation can access.
\nYou must use an installation access token to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"total_count\": 1,\n \"repositories\": [\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n ]\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "delete",
"requestPath": "/installation/token",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/installation/token",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/installation/token"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /installation/token')",
"html": "await octokit.request('DELETE /installation/token')\n"
}
],
"summary": "Revoke an installation access token",
"description": "Revokes the installation token you're using to authenticate as an installation and access this endpoint.\n\nOnce an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the \"[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)\" endpoint.\n\nYou must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/revoke-installation-access-token",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "apps",
"subcategory": "installations"
},
"slug": "revoke-an-installation-access-token",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "installations",
"subcategoryLabel": "Installations",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Revokes the installation token you're using to authenticate as an installation and access this endpoint.
\nOnce an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the \"Create an installation access token for an app\" endpoint.
\nYou must use an installation access token to access this endpoint.
" }, { "verb": "get", "requestPath": "/issues", "serverUrl": "https://api.github.com", "parameters": [ { "name": "filter", "description": "Indicates which sorts of issues to return. Can be one of: \n\\* `assigned`: Issues assigned to you \n\\* `created`: Issues created by you \n\\* `mentioned`: Issues mentioning you \n\\* `subscribed`: Issues you're subscribed to updates for \n\\* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "assigned", "created", "mentioned", "subscribed", "repos", "all" ], "default": "assigned" }, "descriptionHTML": "Indicates which sorts of issues to return. Can be one of:
\n* assigned: Issues assigned to you
\n* created: Issues created by you
\n* mentioned: Issues mentioning you
\n* subscribed: Issues you're subscribed to updates for
\n* all or repos: All issues the authenticated user can see, regardless of participation or creation
Indicates the state of the issues to return. Can be either open, closed, or all.
A list of comma separated label names. Example: bug,ui,@high
What to sort results by. Can be either created, updated, comments.
One of asc (ascending) or desc (descending).
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/issues", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/issues"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /issues')",
"html": "await octokit.request('GET /issues')\n"
}
],
"summary": "List issues assigned to the authenticated user",
"description": "List issues assigned to the authenticated user across all visible repositories including owned repositories, member\nrepositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not\nnecessarily assigned to you.\n\n\n**Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe `pull_request` key. Be aware that the `id` of a pull request returned from \"Issues\" endpoints will be an _issue id_. To find out the pull\nrequest id, use the \"[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)\" endpoint.",
"tags": [
"issues"
],
"operationId": "issues/list",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "issues",
"subcategory": null
},
"slug": "list-issues-assigned-to-the-authenticated-user",
"category": "issues",
"categoryLabel": "Issues",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List issues assigned to the authenticated user across all visible repositories including owned repositories, member\nrepositories, and organization repositories. You can use the filter query parameter to fetch issues that are not\nnecessarily assigned to you.
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe pull_request key. Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull\nrequest id, use the \"List pull requests\" endpoint.
[\n {\n \"id\": 1,\n \"node_id\": \"MDU6SXNzdWUx\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n \"number\": 1347,\n \"state\": \"open\",\n \"title\": \"Found a bug\",\n \"body\": \"I'm having a problem with this.\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"locked\": true,\n \"active_lock_reason\": \"too heated\",\n \"comments\": 0,\n \"pull_request\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n },\n \"closed_at\": null,\n \"created_at\": \"2011-04-22T13:33:48Z\",\n \"updated_at\": \"2011-04-22T13:33:48Z\",\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n },\n \"author_association\": \"COLLABORATOR\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/licenses",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "featured",
"in": "query",
"required": false,
"schema": {
"type": "boolean"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/licenses", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/licenses"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /licenses')",
"html": "await octokit.request('GET /licenses')\n"
}
],
"summary": "Get all commonly used licenses",
"description": "",
"tags": [
"licenses"
],
"operationId": "licenses/get-all-commonly-used",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "licenses",
"subcategory": null
},
"slug": "get-all-commonly-used-licenses",
"category": "licenses",
"categoryLabel": "Licenses",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"spdx_id\": \"MIT\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n },\n {\n \"key\": \"lgpl-3.0\",\n \"name\": \"GNU Lesser General Public License v3.0\",\n \"spdx_id\": \"LGPL-3.0\",\n \"url\": \"https://api.github.com/licenses/lgpl-3.0\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n },\n {\n \"key\": \"mpl-2.0\",\n \"name\": \"Mozilla Public License 2.0\",\n \"spdx_id\": \"MPL-2.0\",\n \"url\": \"https://api.github.com/licenses/mpl-2.0\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n },\n {\n \"key\": \"agpl-3.0\",\n \"name\": \"GNU Affero General Public License v3.0\",\n \"spdx_id\": \"AGPL-3.0\",\n \"url\": \"https://api.github.com/licenses/agpl-3.0\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n },\n {\n \"key\": \"unlicense\",\n \"name\": \"The Unlicense\",\n \"spdx_id\": \"Unlicense\",\n \"url\": \"https://api.github.com/licenses/unlicense\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n },\n {\n \"key\": \"apache-2.0\",\n \"name\": \"Apache License 2.0\",\n \"spdx_id\": \"Apache-2.0\",\n \"url\": \"https://api.github.com/licenses/apache-2.0\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n },\n {\n \"key\": \"gpl-3.0\",\n \"name\": \"GNU General Public License v3.0\",\n \"spdx_id\": \"GPL-3.0\",\n \"url\": \"https://api.github.com/licenses/gpl-3.0\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
}
]
},
{
"verb": "get",
"requestPath": "/licenses/{license}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "license",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/licenses/LICENSE",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/licenses/LICENSE"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /licenses/{license}', {\n license: 'license'\n})",
"html": "await octokit.request('GET /licenses/{license}', {\n license: 'license'\n})\n"
}
],
"summary": "Get a license",
"description": "",
"tags": [
"licenses"
],
"operationId": "licenses/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/licenses#get-a-license"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "licenses",
"subcategory": null
},
"slug": "get-a-license",
"category": "licenses",
"categoryLabel": "Licenses",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"spdx_id\": \"MIT\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"http://choosealicense.com/licenses/mit/\",\n \"description\": \"A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty.\",\n \"implementation\": \"Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders.\",\n \"permissions\": [\n \"commercial-use\",\n \"modifications\",\n \"distribution\",\n \"sublicense\",\n \"private-use\"\n ],\n \"conditions\": [\n \"include-copyright\"\n ],\n \"limitations\": [\n \"no-liability\"\n ],\n \"body\": \"\\n\\nThe MIT License (MIT)\\n\\nCopyright (c) [year] [fullname]\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\\"Software\\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\nSOFTWARE.\\n\",\n \"featured\": true\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/markdown",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/markdown \\\n -d '{\"text\":\"text\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/markdown \\\n -d '{\"text\":\"text\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /markdown', {\n text: 'text'\n})",
"html": "await octokit.request('POST /markdown', {\n text: 'text'\n})\n"
}
],
"summary": "Render a Markdown document",
"description": "",
"operationId": "markdown/render",
"tags": [
"markdown"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/markdown#render-a-markdown-document"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"text": {
"description": "Required. The Markdown text to render in HTML.
", "type": "string", "name": "text", "in": "body", "rawType": "string", "rawDescription": "The Markdown text to render in HTML.", "childParamsGroups": [] }, "mode": { "description": "The rendering mode.
", "enum": [ "markdown", "gfm" ], "default": "markdown", "example": "markdown", "type": "string", "name": "mode", "in": "body", "rawType": "string", "rawDescription": "The rendering mode.", "childParamsGroups": [] }, "context": { "description": "The repository context to use when creating references in gfm mode.
Required. The Markdown text to render in HTML.
", "type": "string", "name": "text", "in": "body", "rawType": "string", "rawDescription": "The Markdown text to render in HTML.", "childParamsGroups": [] }, { "description": "The rendering mode.
", "enum": [ "markdown", "gfm" ], "default": "markdown", "example": "markdown", "type": "string", "name": "mode", "in": "body", "rawType": "string", "rawDescription": "The rendering mode.", "childParamsGroups": [] }, { "description": "The repository context to use when creating references in gfm mode.
curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/markdown/raw"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /markdown/raw')",
"html": "await octokit.request('POST /markdown/raw')\n"
}
],
"summary": "Render a Markdown document in raw mode",
"description": "You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less.",
"operationId": "markdown/render-raw",
"tags": [
"markdown"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode"
},
"requestBody": {
"required": false,
"content": {
"text/plain": {
"schema": {
"type": "string"
}
},
"text/x-markdown": {
"schema": {
"type": "string"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "markdown",
"subcategory": null
},
"slug": "render-a-markdown-document-in-raw-mode",
"category": "markdown",
"categoryLabel": "Markdown",
"contentType": "text/plain",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
}
],
"bodyParameters": [],
"descriptionHTML": "You must send Markdown as plain text (using a Content-Type header of text/plain or text/x-markdown) to this endpoint, rather than using JSON format. In raw mode, GitHub Flavored Markdown is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less.
account_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/accounts/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/accounts/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /marketplace_listing/accounts/{account_id}', {\n account_id: 42\n})",
"html": "await octokit.request('GET /marketplace_listing/accounts/{account_id}', {\n account_id: 42\n})\n"
}
],
"summary": "Get a subscription plan for an account",
"description": "Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.\n\nGitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-subscription-plan-for-account",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "marketplace"
},
"slug": "get-a-subscription-plan-for-an-account",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "marketplace",
"subcategoryLabel": "Marketplace",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
\nGitHub Apps must use a JWT to access this endpoint. OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/orgs/github\",\n \"type\": \"Organization\",\n \"id\": 4,\n \"login\": \"github\",\n \"organization_billing_email\": \"billing@github.com\",\n \"email\": \"billing@github.com\",\n \"marketplace_pending_change\": {\n \"effective_date\": \"2017-11-11T00:00:00Z\",\n \"unit_count\": null,\n \"id\": 77,\n \"plan\": {\n \"url\": \"https://api.github.com/marketplace_listing/plans/1111\",\n \"accounts_url\": \"https://api.github.com/marketplace_listing/plans/1111/accounts\",\n \"id\": 1111,\n \"number\": 2,\n \"name\": \"Startup\",\n \"description\": \"A professional-grade CI solution\",\n \"monthly_price_in_cents\": 699,\n \"yearly_price_in_cents\": 7870,\n \"price_model\": \"flat-rate\",\n \"has_free_trial\": true,\n \"state\": \"published\",\n \"unit_name\": null,\n \"bullets\": [\n \"Up to 10 private repositories\",\n \"3 concurrent builds\"\n ]\n }\n },\n \"marketplace_purchase\": {\n \"billing_cycle\": \"monthly\",\n \"next_billing_date\": \"2017-11-11T00:00:00Z\",\n \"unit_count\": null,\n \"on_free_trial\": true,\n \"free_trial_ends_on\": \"2017-11-11T00:00:00Z\",\n \"updated_at\": \"2017-11-02T01:12:12Z\",\n \"plan\": {\n \"url\": \"https://api.github.com/marketplace_listing/plans/1313\",\n \"accounts_url\": \"https://api.github.com/marketplace_listing/plans/1313/accounts\",\n \"id\": 1313,\n \"number\": 3,\n \"name\": \"Pro\",\n \"description\": \"A professional-grade CI solution\",\n \"monthly_price_in_cents\": 1099,\n \"yearly_price_in_cents\": 11870,\n \"price_model\": \"flat-rate\",\n \"has_free_trial\": true,\n \"unit_name\": null,\n \"state\": \"published\",\n \"bullets\": [\n \"Up to 25 private repositories\",\n \"11 concurrent builds\"\n ]\n }\n }\n}\n"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found when the account has not purchased the listing"
}
]
},
{
"verb": "get",
"requestPath": "/marketplace_listing/plans",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/plans", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/plans"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /marketplace_listing/plans')",
"html": "await octokit.request('GET /marketplace_listing/plans')\n"
}
],
"summary": "List plans",
"description": "Lists all plans that are part of your GitHub Marketplace listing.\n\nGitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/list-plans",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-plans"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "marketplace"
},
"slug": "list-plans",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "marketplace",
"subcategoryLabel": "Marketplace",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all plans that are part of your GitHub Marketplace listing.
\nGitHub Apps must use a JWT to access this endpoint. OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/marketplace_listing/plans/1313\",\n \"accounts_url\": \"https://api.github.com/marketplace_listing/plans/1313/accounts\",\n \"id\": 1313,\n \"number\": 3,\n \"name\": \"Pro\",\n \"description\": \"A professional-grade CI solution\",\n \"monthly_price_in_cents\": 1099,\n \"yearly_price_in_cents\": 11870,\n \"price_model\": \"flat-rate\",\n \"has_free_trial\": true,\n \"unit_name\": null,\n \"state\": \"published\",\n \"bullets\": [\n \"Up to 25 private repositories\",\n \"11 concurrent builds\"\n ]\n }\n]\n"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/marketplace_listing/plans/{plan_id}/accounts",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "plan_id",
"description": "plan_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "plan_id parameter
" }, { "name": "sort", "description": "One of `created` (when the repository was starred) or `updated` (when it was last pushed to).", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "created", "updated" ], "default": "created" }, "descriptionHTML": "One of created (when the repository was starred) or updated (when it was last pushed to).
To return the oldest accounts first, set to asc. Can be one of asc or desc. Ignored without the sort parameter.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/plans/42/accounts", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/plans/42/accounts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /marketplace_listing/plans/{plan_id}/accounts', {\n plan_id: 42\n})",
"html": "await octokit.request('GET /marketplace_listing/plans/{plan_id}/accounts', {\n plan_id: 42\n})\n"
}
],
"summary": "List accounts for a plan",
"description": "Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.\n\nGitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/list-accounts-for-plan",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "marketplace"
},
"slug": "list-accounts-for-a-plan",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "marketplace",
"subcategoryLabel": "Marketplace",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
\nGitHub Apps must use a JWT to access this endpoint. OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/orgs/github\",\n \"type\": \"Organization\",\n \"id\": 4,\n \"login\": \"github\",\n \"organization_billing_email\": \"billing@github.com\",\n \"marketplace_pending_change\": {\n \"effective_date\": \"2017-11-11T00:00:00Z\",\n \"unit_count\": null,\n \"id\": 77,\n \"plan\": {\n \"url\": \"https://api.github.com/marketplace_listing/plans/1111\",\n \"accounts_url\": \"https://api.github.com/marketplace_listing/plans/1111/accounts\",\n \"id\": 1111,\n \"number\": 2,\n \"name\": \"Startup\",\n \"description\": \"A professional-grade CI solution\",\n \"monthly_price_in_cents\": 699,\n \"yearly_price_in_cents\": 7870,\n \"price_model\": \"flat-rate\",\n \"has_free_trial\": true,\n \"state\": \"published\",\n \"unit_name\": null,\n \"bullets\": [\n \"Up to 10 private repositories\",\n \"3 concurrent builds\"\n ]\n }\n },\n \"marketplace_purchase\": {\n \"billing_cycle\": \"monthly\",\n \"next_billing_date\": \"2017-11-11T00:00:00Z\",\n \"unit_count\": null,\n \"on_free_trial\": true,\n \"free_trial_ends_on\": \"2017-11-11T00:00:00Z\",\n \"updated_at\": \"2017-11-02T01:12:12Z\",\n \"plan\": {\n \"url\": \"https://api.github.com/marketplace_listing/plans/1313\",\n \"accounts_url\": \"https://api.github.com/marketplace_listing/plans/1313/accounts\",\n \"id\": 1313,\n \"number\": 3,\n \"name\": \"Pro\",\n \"description\": \"A professional-grade CI solution\",\n \"monthly_price_in_cents\": 1099,\n \"yearly_price_in_cents\": 11870,\n \"price_model\": \"flat-rate\",\n \"has_free_trial\": true,\n \"unit_name\": null,\n \"state\": \"published\",\n \"bullets\": [\n \"Up to 25 private repositories\",\n \"11 concurrent builds\"\n ]\n }\n }\n }\n]\n"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/marketplace_listing/stubbed/accounts/{account_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "account_id",
"description": "account_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "account_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/stubbed/accounts/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/stubbed/accounts/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /marketplace_listing/stubbed/accounts/{account_id}', {\n account_id: 42\n})",
"html": "await octokit.request('GET /marketplace_listing/stubbed/accounts/{account_id}', {\n account_id: 42\n})\n"
}
],
"summary": "Get a subscription plan for an account (stubbed)",
"description": "Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.\n\nGitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-subscription-plan-for-account-stubbed",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "marketplace"
},
"slug": "get-a-subscription-plan-for-an-account-stubbed",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "marketplace",
"subcategoryLabel": "Marketplace",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
\nGitHub Apps must use a JWT to access this endpoint. OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/orgs/github\",\n \"type\": \"Organization\",\n \"id\": 4,\n \"login\": \"github\",\n \"organization_billing_email\": \"billing@github.com\",\n \"email\": \"billing@github.com\",\n \"marketplace_pending_change\": {\n \"effective_date\": \"2017-11-11T00:00:00Z\",\n \"unit_count\": null,\n \"id\": 77,\n \"plan\": {\n \"url\": \"https://api.github.com/marketplace_listing/plans/1111\",\n \"accounts_url\": \"https://api.github.com/marketplace_listing/plans/1111/accounts\",\n \"id\": 1111,\n \"number\": 2,\n \"name\": \"Startup\",\n \"description\": \"A professional-grade CI solution\",\n \"monthly_price_in_cents\": 699,\n \"yearly_price_in_cents\": 7870,\n \"price_model\": \"flat-rate\",\n \"has_free_trial\": true,\n \"state\": \"published\",\n \"unit_name\": null,\n \"bullets\": [\n \"Up to 10 private repositories\",\n \"3 concurrent builds\"\n ]\n }\n },\n \"marketplace_purchase\": {\n \"billing_cycle\": \"monthly\",\n \"next_billing_date\": \"2017-11-11T00:00:00Z\",\n \"unit_count\": null,\n \"on_free_trial\": true,\n \"free_trial_ends_on\": \"2017-11-11T00:00:00Z\",\n \"updated_at\": \"2017-11-02T01:12:12Z\",\n \"plan\": {\n \"url\": \"https://api.github.com/marketplace_listing/plans/1313\",\n \"accounts_url\": \"https://api.github.com/marketplace_listing/plans/1313/accounts\",\n \"id\": 1313,\n \"number\": 3,\n \"name\": \"Pro\",\n \"description\": \"A professional-grade CI solution\",\n \"monthly_price_in_cents\": 1099,\n \"yearly_price_in_cents\": 11870,\n \"price_model\": \"flat-rate\",\n \"has_free_trial\": true,\n \"unit_name\": null,\n \"state\": \"published\",\n \"bullets\": [\n \"Up to 25 private repositories\",\n \"11 concurrent builds\"\n ]\n }\n }\n}\n"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found when the account has not purchased the listing"
}
]
},
{
"verb": "get",
"requestPath": "/marketplace_listing/stubbed/plans",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/stubbed/plans", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/stubbed/plans"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /marketplace_listing/stubbed/plans')",
"html": "await octokit.request('GET /marketplace_listing/stubbed/plans')\n"
}
],
"summary": "List plans (stubbed)",
"description": "Lists all plans that are part of your GitHub Marketplace listing.\n\nGitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/list-plans-stubbed",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-plans-stubbed"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "marketplace"
},
"slug": "list-plans-stubbed",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "marketplace",
"subcategoryLabel": "Marketplace",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all plans that are part of your GitHub Marketplace listing.
\nGitHub Apps must use a JWT to access this endpoint. OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/marketplace_listing/plans/1313\",\n \"accounts_url\": \"https://api.github.com/marketplace_listing/plans/1313/accounts\",\n \"id\": 1313,\n \"number\": 3,\n \"name\": \"Pro\",\n \"description\": \"A professional-grade CI solution\",\n \"monthly_price_in_cents\": 1099,\n \"yearly_price_in_cents\": 11870,\n \"price_model\": \"flat-rate\",\n \"has_free_trial\": true,\n \"unit_name\": null,\n \"state\": \"published\",\n \"bullets\": [\n \"Up to 25 private repositories\",\n \"11 concurrent builds\"\n ]\n }\n]\n"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
}
]
},
{
"verb": "get",
"requestPath": "/marketplace_listing/stubbed/plans/{plan_id}/accounts",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "plan_id",
"description": "plan_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "plan_id parameter
" }, { "name": "sort", "description": "One of `created` (when the repository was starred) or `updated` (when it was last pushed to).", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "created", "updated" ], "default": "created" }, "descriptionHTML": "One of created (when the repository was starred) or updated (when it was last pushed to).
To return the oldest accounts first, set to asc. Can be one of asc or desc. Ignored without the sort parameter.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/stubbed/plans/42/accounts", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/marketplace_listing/stubbed/plans/42/accounts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /marketplace_listing/stubbed/plans/{plan_id}/accounts', {\n plan_id: 42\n})",
"html": "await octokit.request('GET /marketplace_listing/stubbed/plans/{plan_id}/accounts', {\n plan_id: 42\n})\n"
}
],
"summary": "List accounts for a plan (stubbed)",
"description": "Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.\n\nGitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/list-accounts-for-plan-stubbed",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "marketplace"
},
"slug": "list-accounts-for-a-plan-stubbed",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "marketplace",
"subcategoryLabel": "Marketplace",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
\nGitHub Apps must use a JWT to access this endpoint. OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/orgs/github\",\n \"type\": \"Organization\",\n \"id\": 4,\n \"login\": \"github\",\n \"organization_billing_email\": \"billing@github.com\",\n \"marketplace_pending_change\": {\n \"effective_date\": \"2017-11-11T00:00:00Z\",\n \"unit_count\": null,\n \"id\": 77,\n \"plan\": {\n \"url\": \"https://api.github.com/marketplace_listing/plans/1111\",\n \"accounts_url\": \"https://api.github.com/marketplace_listing/plans/1111/accounts\",\n \"id\": 1111,\n \"number\": 2,\n \"name\": \"Startup\",\n \"description\": \"A professional-grade CI solution\",\n \"monthly_price_in_cents\": 699,\n \"yearly_price_in_cents\": 7870,\n \"price_model\": \"flat-rate\",\n \"has_free_trial\": true,\n \"state\": \"published\",\n \"unit_name\": null,\n \"bullets\": [\n \"Up to 10 private repositories\",\n \"3 concurrent builds\"\n ]\n }\n },\n \"marketplace_purchase\": {\n \"billing_cycle\": \"monthly\",\n \"next_billing_date\": \"2017-11-11T00:00:00Z\",\n \"unit_count\": null,\n \"on_free_trial\": true,\n \"free_trial_ends_on\": \"2017-11-11T00:00:00Z\",\n \"updated_at\": \"2017-11-02T01:12:12Z\",\n \"plan\": {\n \"url\": \"https://api.github.com/marketplace_listing/plans/1313\",\n \"accounts_url\": \"https://api.github.com/marketplace_listing/plans/1313/accounts\",\n \"id\": 1313,\n \"number\": 3,\n \"name\": \"Pro\",\n \"description\": \"A professional-grade CI solution\",\n \"monthly_price_in_cents\": 1099,\n \"yearly_price_in_cents\": 11870,\n \"price_model\": \"flat-rate\",\n \"has_free_trial\": true,\n \"unit_name\": null,\n \"state\": \"published\",\n \"bullets\": [\n \"Up to 25 private repositories\",\n \"11 concurrent builds\"\n ]\n }\n }\n }\n]\n"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
}
]
},
{
"verb": "get",
"requestPath": "/meta",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/meta",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/meta"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /meta')",
"html": "await octokit.request('GET /meta')\n"
}
],
"summary": "Get GitHub meta information",
"description": "Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see \"[About GitHub's IP addresses](https://help.github.com/articles/about-github-s-ip-addresses/).\"\n\n**Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses.",
"tags": [
"meta"
],
"operationId": "meta/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/meta#get-github-meta-information"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "meta",
"subcategory": null
},
"slug": "get-github-meta-information",
"category": "meta",
"categoryLabel": "Meta",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see \"About GitHub's IP addresses.\"
\nNote: The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"verifiable_password_authentication\": true,\n \"ssh_key_fingerprints\": {\n \"SHA256_RSA\": \"nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8\",\n \"SHA256_DSA\": \"br9IjFspm1vxR3iA35FWE+4VTyz1hYVLIE2t1/CeyWQ\",\n \"SHA256_ECDSA\": \"p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM\",\n \"SHA256_ED25519\": \"+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU\"\n },\n \"hooks\": [\n \"192.30.252.0/22\"\n ],\n \"web\": [\n \"192.30.252.0/22\",\n \"185.199.108.0/22\"\n ],\n \"api\": [\n \"192.30.252.0/22\",\n \"185.199.108.0/22\"\n ],\n \"git\": [\n \"192.30.252.0/22\"\n ],\n \"packages\": [\n \"192.30.252.0/22\"\n ],\n \"pages\": [\n \"192.30.252.153/32\",\n \"192.30.252.154/32\"\n ],\n \"importer\": [\n \"54.158.161.132\",\n \"54.226.70.38\"\n ],\n \"actions\": [\n \"13.64.0.0/16\",\n \"13.65.0.0/16\"\n ],\n \"dependabot\": [\n \"54.158.161.132\"\n ]\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
}
]
},
{
"verb": "get",
"requestPath": "/networks/{owner}/{repo}/events",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/networks/octocat/hello-world/events", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/networks/octocat/hello-world/events"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /networks/{owner}/{repo}/events', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /networks/{owner}/{repo}/events', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List public events for a network of repositories",
"description": "",
"tags": [
"activity"
],
"operationId": "activity/list-public-events-for-repo-network",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "events"
},
"slug": "list-public-events-for-a-network-of-repositories",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "events",
"subcategoryLabel": "Events",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
},
{
"httpStatusCode": "301",
"httpStatusMessage": "Moved Permanently",
"description": "Moved permanently"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/notifications",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "all",
"description": "If `true`, show notifications marked as read.",
"in": "query",
"required": false,
"schema": {
"type": "boolean",
"default": false
},
"descriptionHTML": "If true, show notifications marked as read.
If true, only shows notifications in which the user is directly participating or mentioned.
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /notifications')",
"html": "await octokit.request('GET /notifications')\n"
}
],
"summary": "List notifications for the authenticated user",
"description": "List all notifications for the current user, sorted by most recently updated.",
"tags": [
"activity"
],
"operationId": "activity/list-notifications-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "notifications"
},
"slug": "list-notifications-for-the-authenticated-user",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "notifications",
"subcategoryLabel": "Notifications",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List all notifications for the current user, sorted by most recently updated.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": \"1\",\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n },\n \"subject\": {\n \"title\": \"Greetings\",\n \"url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/123\",\n \"latest_comment_url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/comments/123\",\n \"type\": \"Issue\"\n },\n \"reason\": \"subscribed\",\n \"unread\": true,\n \"updated_at\": \"2014-11-07T22:01:45Z\",\n \"last_read_at\": \"2014-11-07T22:01:45Z\",\n \"url\": \"https://api.github.com/notifications/threads/1\",\n \"subscription_url\": \"https://api.github.com/notifications/threads/1/subscription\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "put",
"requestPath": "/notifications",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications \\\n -d '{\"last_read_at\":\"last_read_at\"}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications \\\n -d '{\"last_read_at\":\"last_read_at\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /notifications', {\n last_read_at: 'last_read_at'\n})",
"html": "await octokit.request('PUT /notifications', {\n last_read_at: 'last_read_at'\n})\n"
}
],
"summary": "Mark notifications as read",
"description": "Marks all notifications as \"read\" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as \"read.\" To check whether any \"unread\" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`.",
"tags": [
"activity"
],
"operationId": "activity/mark-notifications-as-read",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#mark-notifications-as-read"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"last_read_at": {
"description": "Describes the last point that notifications were checked.
", "type": "string", "format": "date-time", "name": "last_read_at", "in": "body", "rawType": "string", "rawDescription": "Describes the last point that notifications were checked.", "childParamsGroups": [] }, "read": { "description": "Whether the notification has been read.
", "type": "boolean", "name": "read", "in": "body", "rawType": "boolean", "rawDescription": "Whether the notification has been read.", "childParamsGroups": [] } } } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "activity", "subcategory": "notifications" }, "slug": "mark-notifications-as-read", "category": "activity", "categoryLabel": "Activity", "subcategory": "notifications", "subcategoryLabel": "Notifications", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "202", "httpStatusMessage": "Accepted", "description": "Response" }, { "httpStatusCode": "205", "httpStatusMessage": "Reset Content", "description": "Reset Content" }, { "httpStatusCode": "304", "httpStatusMessage": "Not Modified", "description": "Not modified" }, { "httpStatusCode": "401", "httpStatusMessage": "Unauthorized", "description": "Requires authentication" }, { "httpStatusCode": "403", "httpStatusMessage": "Forbidden", "description": "Forbidden" } ], "descriptionHTML": "Marks all notifications as \"read\" removes it from the default view on GitHub. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub will run an asynchronous process to mark notifications as \"read.\" To check whether any \"unread\" notifications remain, you can use the List notifications for the authenticated user endpoint and pass the query parameter all=false.
Describes the last point that notifications were checked.
", "type": "string", "format": "date-time", "name": "last_read_at", "in": "body", "rawType": "string", "rawDescription": "Describes the last point that notifications were checked.", "childParamsGroups": [] }, { "description": "Whether the notification has been read.
", "type": "boolean", "name": "read", "in": "body", "rawType": "boolean", "rawDescription": "Whether the notification has been read.", "childParamsGroups": [] } ] }, { "verb": "get", "requestPath": "/notifications/threads/{thread_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "thread_id", "description": "thread_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "thread_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /notifications/threads/{thread_id}', {\n thread_id: 42\n})",
"html": "await octokit.request('GET /notifications/threads/{thread_id}', {\n thread_id: 42\n})\n"
}
],
"summary": "Get a thread",
"description": "",
"tags": [
"activity"
],
"operationId": "activity/get-thread",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#get-a-thread"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "notifications"
},
"slug": "get-a-thread",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "notifications",
"subcategoryLabel": "Notifications",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"id\": \"1\",\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n },\n \"subject\": {\n \"title\": \"Greetings\",\n \"url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/123\",\n \"latest_comment_url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/comments/123\",\n \"type\": \"Issue\"\n },\n \"reason\": \"subscribed\",\n \"unread\": true,\n \"updated_at\": \"2014-11-07T22:01:45Z\",\n \"last_read_at\": \"2014-11-07T22:01:45Z\",\n \"url\": \"https://api.github.com/notifications/threads/1\",\n \"subscription_url\": \"https://api.github.com/notifications/threads/1/subscription\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "patch",
"requestPath": "/notifications/threads/{thread_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "thread_id",
"description": "thread_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "thread_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /notifications/threads/{thread_id}', {\n thread_id: 42\n})",
"html": "await octokit.request('PATCH /notifications/threads/{thread_id}', {\n thread_id: 42\n})\n"
}
],
"summary": "Mark a thread as read",
"description": "",
"tags": [
"activity"
],
"operationId": "activity/mark-thread-as-read",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#mark-a-thread-as-read"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "notifications"
},
"slug": "mark-a-thread-as-read",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "notifications",
"subcategoryLabel": "Notifications",
"notes": [],
"responses": [
{
"httpStatusCode": "205",
"httpStatusMessage": "Reset Content",
"description": "Reset Content"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/notifications/threads/{thread_id}/subscription",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "thread_id",
"description": "thread_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "thread_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42/subscription", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42/subscription"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /notifications/threads/{thread_id}/subscription', {\n thread_id: 42\n})",
"html": "await octokit.request('GET /notifications/threads/{thread_id}/subscription', {\n thread_id: 42\n})\n"
}
],
"summary": "Get a thread subscription for the authenticated user",
"description": "This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#get-a-repository-subscription).\n\nNote that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread.",
"tags": [
"activity"
],
"operationId": "activity/get-thread-subscription-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "notifications"
},
"slug": "get-a-thread-subscription-for-the-authenticated-user",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "notifications",
"subcategoryLabel": "Notifications",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "This checks to see if the current user is subscribed to a thread. You can also get a repository subscription.
\nNote that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were @mentioned, or manually subscribe to a thread.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"subscribed\": true,\n \"ignored\": false,\n \"reason\": null,\n \"created_at\": \"2012-10-06T21:34:12Z\",\n \"url\": \"https://api.github.com/notifications/threads/1/subscription\",\n \"thread_url\": \"https://api.github.com/notifications/threads/1\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "put",
"requestPath": "/notifications/threads/{thread_id}/subscription",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "thread_id",
"description": "thread_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "thread_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42/subscription \\\n -d '{\"ignored\":true}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42/subscription \\\n -d '{\"ignored\":true}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /notifications/threads/{thread_id}/subscription', {\n thread_id: 42,\n ignored: true\n})",
"html": "await octokit.request('PUT /notifications/threads/{thread_id}/subscription', {\n thread_id: 42,\n ignored: true\n})\n"
}
],
"summary": "Set a thread subscription",
"description": "If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**.\n\nYou can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.\n\nUnsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint.",
"tags": [
"activity"
],
"operationId": "activity/set-thread-subscription",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#set-a-thread-subscription"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"properties": {
"ignored": {
"description": "Whether to block all notifications from a thread.
", "default": false, "type": "boolean", "name": "ignored", "in": "body", "rawType": "boolean", "rawDescription": "Whether to block all notifications from a thread.", "childParamsGroups": [] } }, "type": "object" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "activity", "subcategory": "notifications" }, "slug": "set-a-thread-subscription", "category": "activity", "categoryLabel": "Activity", "subcategory": "notifications", "subcategoryLabel": "Notifications", "contentType": "application/json", "notes": [], "descriptionHTML": "If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an @mention.
\nYou can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.
\nUnsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the Delete a thread subscription endpoint.
", "bodyParameters": [ { "description": "Whether to block all notifications from a thread.
", "default": false, "type": "boolean", "name": "ignored", "in": "body", "rawType": "boolean", "rawDescription": "Whether to block all notifications from a thread.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"subscribed\": true,\n \"ignored\": false,\n \"reason\": null,\n \"created_at\": \"2012-10-06T21:34:12Z\",\n \"url\": \"https://api.github.com/notifications/threads/1/subscription\",\n \"thread_url\": \"https://api.github.com/notifications/threads/1\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "delete",
"requestPath": "/notifications/threads/{thread_id}/subscription",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "thread_id",
"description": "thread_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "thread_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42/subscription", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42/subscription"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /notifications/threads/{thread_id}/subscription', {\n thread_id: 42\n})",
"html": "await octokit.request('DELETE /notifications/threads/{thread_id}/subscription', {\n thread_id: 42\n})\n"
}
],
"summary": "Delete a thread subscription",
"description": "Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`.",
"tags": [
"activity"
],
"operationId": "activity/delete-thread-subscription",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#delete-a-thread-subscription"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "notifications"
},
"slug": "delete-a-thread-subscription",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "notifications",
"subcategoryLabel": "Notifications",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
],
"bodyParameters": [],
"descriptionHTML": "Mutes all future notifications for a conversation until you comment on the thread or get an @mention. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the Set a thread subscription endpoint and set ignore to true.
The words to show in Octocat's speech bubble
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/octocat", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/octocat"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /octocat')",
"html": "await octokit.request('GET /octocat')\n"
}
],
"summary": "Get Octocat",
"description": "Get the octocat as ASCII art",
"tags": [
"meta"
],
"operationId": "meta/get-octocat",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/meta#get-octocat"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "meta"
},
"slug": "get-octocat",
"category": "meta",
"categoryLabel": "Meta",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Get the octocat as ASCII art
" }, { "verb": "get", "requestPath": "/organizations", "serverUrl": "https://api.github.com", "parameters": [ { "name": "since", "description": "An organization ID. Only return organizations with an ID greater than this ID.", "in": "query", "required": false, "schema": { "type": "integer" }, "descriptionHTML": "An organization ID. Only return organizations with an ID greater than this ID.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/organizations", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/organizations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /organizations')",
"html": "await octokit.request('GET /organizations')\n"
}
],
"summary": "List organizations",
"description": "Lists all organizations, in the order that they were created on GitHub.\n\n**Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations.",
"tags": [
"orgs"
],
"operationId": "orgs/list",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-organizations"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": null
},
"slug": "list-organizations",
"category": "orgs",
"categoryLabel": "Orgs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all organizations, in the order that they were created on GitHub.
\nNote: Pagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of organizations.
[\n {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}', {\n org: 'org'\n})\n"
}
],
"summary": "Get an organization",
"description": "To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).\n\nGitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See \"[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)\" for details. For an example response, see 'Response with GitHub plan information' below.\"",
"tags": [
"orgs"
],
"operationId": "orgs/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#get-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": null
},
"slug": "get-an-organization",
"category": "orgs",
"categoryLabel": "Orgs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "To see many of the organization response values, you need to be an authenticated organization owner with the admin:org scope. When the value of two_factor_requirement_enabled is true, the organization requires all members, billing managers, and outside collaborators to enable two-factor authentication.
GitHub Apps with the Organization plan permission can use this endpoint to retrieve information about an organization's GitHub plan. See \"Authenticating with GitHub Apps\" for details. For an example response, see 'Response with GitHub plan information' below.\"
{\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\",\n \"name\": \"github\",\n \"company\": \"GitHub\",\n \"blog\": \"https://github.com/blog\",\n \"location\": \"San Francisco\",\n \"email\": \"octocat@github.com\",\n \"twitter_username\": \"github\",\n \"is_verified\": true,\n \"has_organization_projects\": true,\n \"has_repository_projects\": true,\n \"public_repos\": 2,\n \"public_gists\": 1,\n \"followers\": 20,\n \"following\": 0,\n \"html_url\": \"https://github.com/octocat\",\n \"created_at\": \"2008-01-14T04:33:35Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"type\": \"Organization\",\n \"total_private_repos\": 100,\n \"owned_private_repos\": 100,\n \"private_gists\": 81,\n \"disk_usage\": 10000,\n \"collaborators\": 8,\n \"billing_email\": \"mona@github.com\",\n \"plan\": {\n \"name\": \"Medium\",\n \"space\": 400,\n \"private_repos\": 20,\n \"filled_seats\": 4,\n \"seats\": 5\n },\n \"default_repository_permission\": \"read\",\n \"members_can_create_repositories\": true,\n \"two_factor_requirement_enabled\": true,\n \"members_allowed_repository_creation_type\": \"all\",\n \"members_can_create_public_repositories\": false,\n \"members_can_create_private_repositories\": false,\n \"members_can_create_internal_repositories\": false,\n \"members_can_create_pages\": true\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/orgs/{org}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG \\\n -d '{\"billing_email\":\"billing_email\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG \\\n -d '{\"billing_email\":\"billing_email\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /orgs/{org}', {\n org: 'org',\n billing_email: 'billing_email'\n})",
"html": "await octokit.request('PATCH /orgs/{org}', {\n org: 'org',\n billing_email: 'billing_email'\n})\n"
}
],
"summary": "Update an organization",
"description": "**Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes).\n\nEnables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges.",
"tags": [
"orgs"
],
"operationId": "orgs/update",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs/#update-an-organization"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"billing_email": {
"type": "string",
"description": "Billing email address. This address is not publicized.
", "name": "billing_email", "in": "body", "rawType": "string", "rawDescription": "Billing email address. This address is not publicized.", "childParamsGroups": [] }, "company": { "type": "string", "description": "The company name.
", "name": "company", "in": "body", "rawType": "string", "rawDescription": "The company name.", "childParamsGroups": [] }, "email": { "type": "string", "description": "The publicly visible email address.
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The publicly visible email address.", "childParamsGroups": [] }, "twitter_username": { "type": "string", "description": "The Twitter username of the company.
", "name": "twitter_username", "in": "body", "rawType": "string", "rawDescription": "The Twitter username of the company.", "childParamsGroups": [] }, "location": { "type": "string", "description": "The location.
", "name": "location", "in": "body", "rawType": "string", "rawDescription": "The location.", "childParamsGroups": [] }, "name": { "type": "string", "description": "The shorthand name of the company.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The shorthand name of the company.", "childParamsGroups": [] }, "description": { "type": "string", "description": "The description of the company.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "The description of the company.", "childParamsGroups": [] }, "has_organization_projects": { "type": "boolean", "description": "Toggles whether an organization can use organization projects.
", "name": "has_organization_projects", "in": "body", "rawType": "boolean", "rawDescription": "Toggles whether an organization can use organization projects.", "childParamsGroups": [] }, "has_repository_projects": { "type": "boolean", "description": "Toggles whether repositories that belong to the organization can use repository projects.
", "name": "has_repository_projects", "in": "body", "rawType": "boolean", "rawDescription": "Toggles whether repositories that belong to the organization can use repository projects.", "childParamsGroups": [] }, "default_repository_permission": { "type": "string", "description": "Default permission level members have for organization repositories:
\n* read - can pull, but not push to or administer this repository.
\n* write - can pull and push, but not administer this repository.
\n* admin - can pull, push, and administer this repository.
\n* none - no permissions granted by default.
Toggles the ability of non-admin organization members to create repositories. Can be one of:
\n* true - all organization members can create repositories.
\n* false - only organization owners can create repositories.
\nDefault: true
\nNote: A parameter can override this parameter. See members_allowed_repository_creation_type in this table for details. Note: A parameter can override this parameter. See members_allowed_repository_creation_type in this table for details.
Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one of:
\n* true - all organization members can create internal repositories.
\n* false - only organization owners can create internal repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of:
\n* true - all organization members can create private repositories.
\n* false - only organization owners can create private repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of:
\n* true - all organization members can create public repositories.
\n* false - only organization owners can create public repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Specifies which types of repositories non-admin organization members can create. Can be one of:
\n* all - all organization members can create public and private repositories.
\n* private - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud.
\n* none - only admin members can create repositories.
\nNote: This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in members_can_create_repositories. See the parameter deprecation notice in the operation description for details.
Toggles whether organization members can create GitHub Pages sites. Can be one of:
\n* true - all organization members can create GitHub Pages sites.
\n* false - no organization members can create GitHub Pages sites. Existing published sites will not be impacted.
Toggles whether organization members can create public GitHub Pages sites. Can be one of:
\n* true - all organization members can create public GitHub Pages sites.
\n* false - no organization members can create public GitHub Pages sites. Existing published sites will not be impacted.
Toggles whether organization members can create private GitHub Pages sites. Can be one of:
\n* true - all organization members can create private GitHub Pages sites.
\n* false - no organization members can create private GitHub Pages sites. Existing published sites will not be impacted.
Parameter Deprecation Notice: GitHub will replace and discontinue members_allowed_repository_creation_type in favor of more granular permissions. The new input parameters are members_can_create_public_repositories, members_can_create_private_repositories for all organizations and members_can_create_internal_repositories for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the blog post.
Enables an authenticated organization owner with the admin:org scope to update the organization's profile and member privileges.
Billing email address. This address is not publicized.
", "name": "billing_email", "in": "body", "rawType": "string", "rawDescription": "Billing email address. This address is not publicized.", "childParamsGroups": [] }, { "type": "string", "description": "The company name.
", "name": "company", "in": "body", "rawType": "string", "rawDescription": "The company name.", "childParamsGroups": [] }, { "type": "string", "description": "The publicly visible email address.
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The publicly visible email address.", "childParamsGroups": [] }, { "type": "string", "description": "The Twitter username of the company.
", "name": "twitter_username", "in": "body", "rawType": "string", "rawDescription": "The Twitter username of the company.", "childParamsGroups": [] }, { "type": "string", "description": "The location.
", "name": "location", "in": "body", "rawType": "string", "rawDescription": "The location.", "childParamsGroups": [] }, { "type": "string", "description": "The shorthand name of the company.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The shorthand name of the company.", "childParamsGroups": [] }, { "type": "string", "description": "The description of the company.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "The description of the company.", "childParamsGroups": [] }, { "type": "boolean", "description": "Toggles whether an organization can use organization projects.
", "name": "has_organization_projects", "in": "body", "rawType": "boolean", "rawDescription": "Toggles whether an organization can use organization projects.", "childParamsGroups": [] }, { "type": "boolean", "description": "Toggles whether repositories that belong to the organization can use repository projects.
", "name": "has_repository_projects", "in": "body", "rawType": "boolean", "rawDescription": "Toggles whether repositories that belong to the organization can use repository projects.", "childParamsGroups": [] }, { "type": "string", "description": "Default permission level members have for organization repositories:
\n* read - can pull, but not push to or administer this repository.
\n* write - can pull and push, but not administer this repository.
\n* admin - can pull, push, and administer this repository.
\n* none - no permissions granted by default.
Toggles the ability of non-admin organization members to create repositories. Can be one of:
\n* true - all organization members can create repositories.
\n* false - only organization owners can create repositories.
\nDefault: true
\nNote: A parameter can override this parameter. See members_allowed_repository_creation_type in this table for details. Note: A parameter can override this parameter. See members_allowed_repository_creation_type in this table for details.
Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one of:
\n* true - all organization members can create internal repositories.
\n* false - only organization owners can create internal repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of:
\n* true - all organization members can create private repositories.
\n* false - only organization owners can create private repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of:
\n* true - all organization members can create public repositories.
\n* false - only organization owners can create public repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Specifies which types of repositories non-admin organization members can create. Can be one of:
\n* all - all organization members can create public and private repositories.
\n* private - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud.
\n* none - only admin members can create repositories.
\nNote: This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in members_can_create_repositories. See the parameter deprecation notice in the operation description for details.
Toggles whether organization members can create GitHub Pages sites. Can be one of:
\n* true - all organization members can create GitHub Pages sites.
\n* false - no organization members can create GitHub Pages sites. Existing published sites will not be impacted.
Toggles whether organization members can create public GitHub Pages sites. Can be one of:
\n* true - all organization members can create public GitHub Pages sites.
\n* false - no organization members can create public GitHub Pages sites. Existing published sites will not be impacted.
Toggles whether organization members can create private GitHub Pages sites. Can be one of:
\n* true - all organization members can create private GitHub Pages sites.
\n* false - no organization members can create private GitHub Pages sites. Existing published sites will not be impacted.
{\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\",\n \"name\": \"github\",\n \"company\": \"GitHub\",\n \"blog\": \"https://github.com/blog\",\n \"location\": \"San Francisco\",\n \"email\": \"octocat@github.com\",\n \"twitter_username\": \"github\",\n \"is_verified\": true,\n \"has_organization_projects\": true,\n \"has_repository_projects\": true,\n \"public_repos\": 2,\n \"public_gists\": 1,\n \"followers\": 20,\n \"following\": 0,\n \"html_url\": \"https://github.com/octocat\",\n \"created_at\": \"2008-01-14T04:33:35Z\",\n \"type\": \"Organization\",\n \"total_private_repos\": 100,\n \"owned_private_repos\": 100,\n \"private_gists\": 81,\n \"disk_usage\": 10000,\n \"collaborators\": 8,\n \"billing_email\": \"mona@github.com\",\n \"plan\": {\n \"name\": \"Medium\",\n \"space\": 400,\n \"private_repos\": 20\n },\n \"default_repository_permission\": \"read\",\n \"members_can_create_repositories\": true,\n \"two_factor_requirement_enabled\": true,\n \"members_allowed_repository_creation_type\": \"all\",\n \"members_can_create_public_repositories\": false,\n \"members_can_create_private_repositories\": false,\n \"members_can_create_internal_repositories\": false,\n \"members_can_create_pages\": true,\n \"members_can_create_public_pages\": true,\n \"members_can_create_private_pages\": true,\n \"updated_at\": \"2014-03-03T18:58:10Z\"\n}\n"
},
{
"httpStatusCode": "409",
"httpStatusMessage": "Conflict",
"description": "Conflict"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/actions/permissions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/permissions",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/permissions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/actions/permissions', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/actions/permissions', {\n org: 'org'\n})\n"
}
],
"summary": "Get GitHub Actions permissions for an organization",
"description": "Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"operationId": "actions/get-github-actions-permissions-organization",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
},
"slug": "get-github-actions-permissions-for-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "permissions",
"subcategoryLabel": "Permissions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization.
\nYou must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the administration organization permission to use this API.
{\n \"enabled_repositories\": \"all\",\n \"allowed_actions\": \"selected\",\n \"selected_actions_url\": \"https://api.github.com/organizations/42/actions/permissions/selected-actions\"\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/orgs/{org}/actions/permissions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/permissions \\\n -d '{\"enabled_repositories\":\"enabled_repositories\"}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/permissions \\\n -d '{\"enabled_repositories\":\"enabled_repositories\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/actions/permissions', {\n org: 'org',\n enabled_repositories: 'enabled_repositories'\n})",
"html": "await octokit.request('PUT /orgs/{org}/actions/permissions', {\n org: 'org',\n enabled_repositories: 'enabled_repositories'\n})\n"
}
],
"summary": "Set GitHub Actions permissions for an organization",
"description": "Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization.\n\nIf the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions, then you cannot override them for the organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"operationId": "actions/set-github-actions-permissions-organization",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"enabled_repositories": {
"type": "string",
"description": "Required. The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all, none, or selected.
The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.
Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization.
\nIf the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as allowed_actions to selected actions, then you cannot override them for the organization.
You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the administration organization permission to use this API.
Required. The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all, none, or selected.
The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/permissions/repositories", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/permissions/repositories"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/actions/permissions/repositories', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/actions/permissions/repositories', {\n org: 'org'\n})\n"
}
],
"summary": "List selected repositories enabled for GitHub Actions in an organization",
"description": "Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).\"\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"operationId": "actions/list-selected-repositories-enabled-github-actions-organization",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
},
"slug": "list-selected-repositories-enabled-for-github-actions-in-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "permissions",
"subcategoryLabel": "Permissions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for enabled_repositories must be configured to selected. For more information, see \"Set GitHub Actions permissions for an organization.\"
You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the administration organization permission to use this API.
{\n \"total_count\": 1,\n \"repositories\": [\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n ]\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/orgs/{org}/actions/permissions/repositories",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/permissions/repositories \\\n -d '{\"selected_repository_ids\":[42]}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/permissions/repositories \\\n -d '{\"selected_repository_ids\":[42]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/actions/permissions/repositories', {\n org: 'org',\n selected_repository_ids: [\n 42\n ]\n})",
"html": "await octokit.request('PUT /orgs/{org}/actions/permissions/repositories', {\n org: 'org',\n selected_repository_ids: [\n 42\n ]\n})\n"
}
],
"summary": "Set selected repositories enabled for GitHub Actions in an organization",
"description": "Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).\"\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"operationId": "actions/set-selected-repositories-enabled-github-actions-organization",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"selected_repository_ids": {
"description": "Required. List of repository IDs to enable for GitHub Actions.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the repository." }, "name": "selected_repository_ids", "in": "body", "rawType": "array", "rawDescription": "List of repository IDs to enable for GitHub Actions.", "childParamsGroups": [] } }, "required": [ "selected_repository_ids" ] }, "example": { "selected_repository_ids": [ 32, 42 ] } } } }, "x-github": { "enabledForGitHubApps": true, "githubCloudOnly": false, "category": "actions", "subcategory": "permissions" }, "slug": "set-selected-repositories-enabled-for-github-actions-in-an-organization", "category": "actions", "categoryLabel": "Actions", "subcategory": "permissions", "subcategoryLabel": "Permissions", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "204", "httpStatusMessage": "No Content", "description": "Response" } ], "descriptionHTML": "Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for enabled_repositories must be configured to selected. For more information, see \"Set GitHub Actions permissions for an organization.\"
You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the administration organization permission to use this API.
Required. List of repository IDs to enable for GitHub Actions.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the repository." }, "name": "selected_repository_ids", "in": "body", "rawType": "array", "rawDescription": "List of repository IDs to enable for GitHub Actions.", "childParamsGroups": [] } ] }, { "verb": "put", "requestPath": "/orgs/{org}/actions/permissions/repositories/{repository_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repository_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/permissions/repositories/42", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/permissions/repositories/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/actions/permissions/repositories/{repository_id}', {\n org: 'org',\n repository_id: 42\n})",
"html": "await octokit.request('PUT /orgs/{org}/actions/permissions/repositories/{repository_id}', {\n org: 'org',\n repository_id: 42\n})\n"
}
],
"summary": "Enable a selected repository for GitHub Actions in an organization",
"description": "Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).\"\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"operationId": "actions/enable-selected-repository-github-actions-organization",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
},
"slug": "enable-a-selected-repository-for-github-actions-in-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "permissions",
"subcategoryLabel": "Permissions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for enabled_repositories must be must be configured to selected. For more information, see \"Set GitHub Actions permissions for an organization.\"
You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the administration organization permission to use this API.
curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/permissions/repositories/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}', {\n org: 'org',\n repository_id: 42\n})",
"html": "await octokit.request('DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}', {\n org: 'org',\n repository_id: 42\n})\n"
}
],
"summary": "Disable a selected repository for GitHub Actions in an organization",
"description": "Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).\"\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"operationId": "actions/disable-selected-repository-github-actions-organization",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
},
"slug": "disable-a-selected-repository-for-github-actions-in-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "permissions",
"subcategoryLabel": "Permissions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for enabled_repositories must be configured to selected. For more information, see \"Set GitHub Actions permissions for an organization.\"
You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the administration organization permission to use this API.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/permissions/selected-actions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/actions/permissions/selected-actions', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/actions/permissions/selected-actions', {\n org: 'org'\n})\n"
}
],
"summary": "Get allowed actions for an organization",
"description": "Gets the selected actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).\"\"\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"operationId": "actions/get-allowed-actions-organization",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
},
"slug": "get-allowed-actions-for-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "permissions",
"subcategoryLabel": "Permissions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the selected actions that are allowed in an organization. To use this endpoint, the organization permission policy for allowed_actions must be configured to selected. For more information, see \"Set GitHub Actions permissions for an organization.\"\"
You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the administration organization permission to use this API.
{\n \"github_owned_allowed\": true,\n \"verified_allowed\": false,\n \"patterns_allowed\": [\n \"monalisa/octocat@*\",\n \"docker/*\"\n ]\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/orgs/{org}/actions/permissions/selected-actions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/permissions/selected-actions \\\n -d '{\"github_owned_allowed\":true}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/permissions/selected-actions \\\n -d '{\"github_owned_allowed\":true}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/actions/permissions/selected-actions', {\n org: 'org',\n github_owned_allowed: true\n})",
"html": "await octokit.request('PUT /orgs/{org}/actions/permissions/selected-actions', {\n org: 'org',\n github_owned_allowed: true\n})\n"
}
],
"summary": "Set allowed actions for an organization",
"description": "Sets the actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).\"\n\nIf the organization belongs to an enterprise that has `selected` actions set at the enterprise level, then you cannot override any of the enterprise's allowed actions settings.\n\nTo use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"operationId": "actions/set-allowed-actions-organization",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"github_owned_allowed": {
"type": "boolean",
"description": "Whether GitHub-owned actions are allowed. For example, this includes the actions in the actions organization.
Whether actions in GitHub Marketplace from verified creators are allowed. Set to true to allow all GitHub Marketplace actions by verified creators.
Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@*, monalisa/octocat@v2, monalisa/*.\"
Sets the actions that are allowed in an organization. To use this endpoint, the organization permission policy for allowed_actions must be configured to selected. For more information, see \"Set GitHub Actions permissions for an organization.\"
If the organization belongs to an enterprise that has selected actions set at the enterprise level, then you cannot override any of the enterprise's allowed actions settings.
To use the patterns_allowed setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the patterns_allowed setting only applies to public repositories in the organization.
You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the administration organization permission to use this API.
Whether GitHub-owned actions are allowed. For example, this includes the actions in the actions organization.
Whether actions in GitHub Marketplace from verified creators are allowed. Set to true to allow all GitHub Marketplace actions by verified creators.
Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@*, monalisa/octocat@v2, monalisa/*.\"
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/actions/runner-groups', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/actions/runner-groups', {\n org: 'org'\n})\n"
}
],
"summary": "List self-hosted runner groups for an organization",
"description": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products).\"\n\nLists all self-hosted runner groups configured in an organization and inherited from an enterprise.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/list-self-hosted-runner-groups-for-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
},
"slug": "list-self-hosted-runner-groups-for-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runner-groups",
"subcategoryLabel": "Self hosted runner groups",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"GitHub's products.\"
\nLists all self-hosted runner groups configured in an organization and inherited from an enterprise.
\nYou must authenticate using an access token with the admin:org scope to use this endpoint.
{\n \"total_count\": 3,\n \"runner_groups\": [\n {\n \"id\": 1,\n \"name\": \"Default\",\n \"visibility\": \"all\",\n \"default\": true,\n \"runners_url\": \"https://api.github.com/orgs/octo-org/actions/runner_groups/1/runners\",\n \"inherited\": false,\n \"allows_public_repositories\": true\n },\n {\n \"id\": 2,\n \"name\": \"octo-runner-group\",\n \"visibility\": \"selected\",\n \"default\": false,\n \"selected_repositories_url\": \"https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories\",\n \"runners_url\": \"https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners\",\n \"inherited\": true,\n \"allows_public_repositories\": true\n },\n {\n \"id\": 3,\n \"name\": \"expensive-hardware\",\n \"visibility\": \"private\",\n \"default\": false,\n \"runners_url\": \"https://api.github.com/orgs/octo-org/actions/runner_groups/3/runners\",\n \"inherited\": false,\n \"allows_public_repositories\": true\n }\n ]\n}\n"
}
]
},
{
"verb": "post",
"requestPath": "/orgs/{org}/actions/runner-groups",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups \\\n -d '{\"name\":\"name\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/actions/runner-groups', {\n org: 'org',\n name: 'name'\n})",
"html": "await octokit.request('POST /orgs/{org}/actions/runner-groups', {\n org: 'org',\n name: 'name'\n})\n"
}
],
"summary": "Create a self-hosted runner group for an organization",
"description": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see \"[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products).\"\n\nCreates a new self-hosted runner group for an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/create-self-hosted-runner-group-for-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"description": "Required. Name of the runner group.
", "type": "string", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Name of the runner group.", "childParamsGroups": [] }, "visibility": { "description": "Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. Can be one of: all, selected, or private.
List of repository IDs that can access the runner group.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the repository." }, "name": "selected_repository_ids", "in": "body", "rawType": "array", "rawDescription": "List of repository IDs that can access the runner group.", "childParamsGroups": [] }, "runners": { "description": "List of runner IDs to add to the runner group.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the runner." }, "name": "runners", "in": "body", "rawType": "array", "rawDescription": "List of runner IDs to add to the runner group.", "childParamsGroups": [] } }, "required": [ "name" ] }, "example": { "name": "Expensive hardware runners", "visibility": "selected", "selected_repository_ids": [ 32, 91 ], "runners": [ 9, 2 ] } } } }, "x-github": { "enabledForGitHubApps": true, "githubCloudOnly": false, "category": "actions", "subcategory": "self-hosted-runner-groups" }, "slug": "create-a-self-hosted-runner-group-for-an-organization", "category": "actions", "categoryLabel": "Actions", "subcategory": "self-hosted-runner-groups", "subcategoryLabel": "Self hosted runner groups", "contentType": "application/json", "notes": [], "descriptionHTML": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see \"GitHub's products.\"
\nCreates a new self-hosted runner group for an organization.
\nYou must authenticate using an access token with the admin:org scope to use this endpoint.
Required. Name of the runner group.
", "type": "string", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Name of the runner group.", "childParamsGroups": [] }, { "description": "Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. Can be one of: all, selected, or private.
List of repository IDs that can access the runner group.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the repository." }, "name": "selected_repository_ids", "in": "body", "rawType": "array", "rawDescription": "List of repository IDs that can access the runner group.", "childParamsGroups": [] }, { "description": "List of runner IDs to add to the runner group.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the runner." }, "name": "runners", "in": "body", "rawType": "array", "rawDescription": "List of runner IDs to add to the runner group.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 2,\n \"name\": \"octo-runner-group\",\n \"visibility\": \"selected\",\n \"default\": false,\n \"selected_repositories_url\": \"https://api.github.com/orgs/octo-org/actions/runner-groups/2/repositories\",\n \"runners_url\": \"https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners\",\n \"inherited\": false,\n \"allows_public_repositories\": true\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/actions/runner-groups/{runner_group_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "runner_group_id",
"description": "Unique identifier of the self-hosted runner group.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "Unique identifier of the self-hosted runner group.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/actions/runner-groups/{runner_group_id}', {\n org: 'org',\n runner_group_id: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/actions/runner-groups/{runner_group_id}', {\n org: 'org',\n runner_group_id: 42\n})\n"
}
],
"summary": "Get a self-hosted runner group for an organization",
"description": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products).\"\n\nGets a specific self-hosted runner group for an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/get-self-hosted-runner-group-for-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
},
"slug": "get-a-self-hosted-runner-group-for-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runner-groups",
"subcategoryLabel": "Self hosted runner groups",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"GitHub's products.\"
\nGets a specific self-hosted runner group for an organization.
\nYou must authenticate using an access token with the admin:org scope to use this endpoint.
{\n \"id\": 2,\n \"name\": \"octo-runner-group\",\n \"visibility\": \"selected\",\n \"default\": false,\n \"selected_repositories_url\": \"https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories\",\n \"runners_url\": \"https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners\",\n \"inherited\": false,\n \"allows_public_repositories\": true\n}\n"
}
]
},
{
"verb": "patch",
"requestPath": "/orgs/{org}/actions/runner-groups/{runner_group_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "runner_group_id",
"description": "Unique identifier of the self-hosted runner group.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "Unique identifier of the self-hosted runner group.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42 \\\n -d '{\"name\":\"name\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42 \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}', {\n org: 'org',\n runner_group_id: 42,\n name: 'name'\n})",
"html": "await octokit.request('PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}', {\n org: 'org',\n runner_group_id: 42,\n name: 'name'\n})\n"
}
],
"summary": "Update a self-hosted runner group for an organization",
"description": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products).\"\n\nUpdates the `name` and `visibility` of a self-hosted runner group in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/update-self-hosted-runner-group-for-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"description": "Required. Name of the runner group.
", "type": "string", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Name of the runner group.", "childParamsGroups": [] }, "visibility": { "description": "Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. Can be one of: all, selected, or private.
The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"GitHub's products.\"
\nUpdates the name and visibility of a self-hosted runner group in an organization.
You must authenticate using an access token with the admin:org scope to use this endpoint.
Required. Name of the runner group.
", "type": "string", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Name of the runner group.", "childParamsGroups": [] }, { "description": "Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. Can be one of: all, selected, or private.
{\n \"id\": 2,\n \"name\": \"octo-runner-group\",\n \"visibility\": \"selected\",\n \"default\": false,\n \"selected_repositories_url\": \"https://api.github.com/orgs/octo-org/actions/runner-groups/2/repositories\",\n \"runners_url\": \"https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners\",\n \"inherited\": false,\n \"allows_public_repositories\": true\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/actions/runner-groups/{runner_group_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "runner_group_id",
"description": "Unique identifier of the self-hosted runner group.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "Unique identifier of the self-hosted runner group.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}', {\n org: 'org',\n runner_group_id: 42\n})",
"html": "await octokit.request('DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}', {\n org: 'org',\n runner_group_id: 42\n})\n"
}
],
"summary": "Delete a self-hosted runner group from an organization",
"description": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products).\"\n\nDeletes a self-hosted runner group for an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/delete-self-hosted-runner-group-from-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
},
"slug": "delete-a-self-hosted-runner-group-from-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runner-groups",
"subcategoryLabel": "Self hosted runner groups",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"GitHub's products.\"
\nDeletes a self-hosted runner group for an organization.
\nYou must authenticate using an access token with the admin:org scope to use this endpoint.
Unique identifier of the self-hosted runner group.
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42/repositories", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42/repositories"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories', {\n org: 'org',\n runner_group_id: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories', {\n org: 'org',\n runner_group_id: 42\n})\n"
}
],
"summary": "List repository access to a self-hosted runner group in an organization",
"description": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see \"[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products).\"\n\nLists the repositories with access to a self-hosted runner group configured in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/list-repo-access-to-self-hosted-runner-group-in-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
},
"slug": "list-repository-access-to-a-self-hosted-runner-group-in-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runner-groups",
"subcategoryLabel": "Self hosted runner groups",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see \"GitHub's products.\"
\nLists the repositories with access to a self-hosted runner group configured in an organization.
\nYou must authenticate using an access token with the admin:org scope to use this endpoint.
{\n \"total_count\": 1,\n \"repositories\": [\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"organization\": null,\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n },\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"delete_branch_on_merge\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n ]\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "runner_group_id",
"description": "Unique identifier of the self-hosted runner group.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "Unique identifier of the self-hosted runner group.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42/repositories \\\n -d '{\"selected_repository_ids\":[42]}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42/repositories \\\n -d '{\"selected_repository_ids\":[42]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories', {\n org: 'org',\n runner_group_id: 42,\n selected_repository_ids: [\n 42\n ]\n})",
"html": "await octokit.request('PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories', {\n org: 'org',\n runner_group_id: 42,\n selected_repository_ids: [\n 42\n ]\n})\n"
}
],
"summary": "Set repository access for a self-hosted runner group in an organization",
"description": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products).\"\n\nReplaces the list of repositories that have access to a self-hosted runner group configured in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/set-repo-access-to-self-hosted-runner-group-in-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"selected_repository_ids": {
"description": "Required. List of repository IDs that can access the runner group.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the repository." }, "name": "selected_repository_ids", "in": "body", "rawType": "array", "rawDescription": "List of repository IDs that can access the runner group.", "childParamsGroups": [] } }, "required": [ "selected_repository_ids" ] }, "example": { "selected_repository_ids": [ 32, 91 ] } } } }, "x-github": { "enabledForGitHubApps": true, "githubCloudOnly": false, "category": "actions", "subcategory": "self-hosted-runner-groups" }, "slug": "set-repository-access-for-a-self-hosted-runner-group-in-an-organization", "category": "actions", "categoryLabel": "Actions", "subcategory": "self-hosted-runner-groups", "subcategoryLabel": "Self hosted runner groups", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "204", "httpStatusMessage": "No Content", "description": "Response" } ], "descriptionHTML": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"GitHub's products.\"
\nReplaces the list of repositories that have access to a self-hosted runner group configured in an organization.
\nYou must authenticate using an access token with the admin:org scope to use this endpoint.
Required. List of repository IDs that can access the runner group.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the repository." }, "name": "selected_repository_ids", "in": "body", "rawType": "array", "rawDescription": "List of repository IDs that can access the runner group.", "childParamsGroups": [] } ] }, { "verb": "put", "requestPath": "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "runner_group_id", "description": "Unique identifier of the self-hosted runner group.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner group.
" }, { "name": "repository_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42/repositories/42", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42/repositories/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}', {\n org: 'org',\n runner_group_id: 42,\n repository_id: 42\n})",
"html": "await octokit.request('PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}', {\n org: 'org',\n runner_group_id: 42,\n repository_id: 42\n})\n"
}
],
"summary": "Add repository access to a self-hosted runner group in an organization",
"description": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products).\"\n\n\nAdds a repository to the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see \"[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization).\"\n\nYou must authenticate using an access token with the `admin:org`\nscope to use this endpoint.",
"operationId": "actions/add-repo-access-to-self-hosted-runner-group-in-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#add-repository-acess-to-a-self-hosted-runner-group-in-an-organization"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": true,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
},
"slug": "add-repository-access-to-a-self-hosted-runner-group-in-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runner-groups",
"subcategoryLabel": "Self hosted runner groups",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"GitHub's products.\"
\nAdds a repository to the list of selected repositories that can access a self-hosted runner group. The runner group must have visibility set to selected. For more information, see \"Create a self-hosted runner group for an organization.\"
You must authenticate using an access token with the admin:org\nscope to use this endpoint.
Unique identifier of the self-hosted runner group.
" }, { "name": "repository_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42/repositories/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42/repositories/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}', {\n org: 'org',\n runner_group_id: 42,\n repository_id: 42\n})",
"html": "await octokit.request('DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}', {\n org: 'org',\n runner_group_id: 42,\n repository_id: 42\n})\n"
}
],
"summary": "Remove repository access to a self-hosted runner group in an organization",
"description": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products).\"\n\n\nRemoves a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see \"[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization).\"\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/remove-repo-access-to-self-hosted-runner-group-in-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
},
"slug": "remove-repository-access-to-a-self-hosted-runner-group-in-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runner-groups",
"subcategoryLabel": "Self hosted runner groups",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"GitHub's products.\"
\nRemoves a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have visibility set to selected. For more information, see \"Create a self-hosted runner group for an organization.\"
You must authenticate using an access token with the admin:org scope to use this endpoint.
Unique identifier of the self-hosted runner group.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42/runners", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42/runners"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners', {\n org: 'org',\n runner_group_id: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners', {\n org: 'org',\n runner_group_id: 42\n})\n"
}
],
"summary": "List self-hosted runners in a group for an organization",
"description": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products).\"\n\nLists self-hosted runners that are in a specific organization group.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/list-self-hosted-runners-in-group-for-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
},
"slug": "list-self-hosted-runners-in-a-group-for-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runner-groups",
"subcategoryLabel": "Self hosted runner groups",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"GitHub's products.\"
\nLists self-hosted runners that are in a specific organization group.
\nYou must authenticate using an access token with the admin:org scope to use this endpoint.
{\n \"total_count\": 2,\n \"runners\": [\n {\n \"id\": 23,\n \"name\": \"linux_runner\",\n \"os\": \"linux\",\n \"status\": \"online\",\n \"busy\": true,\n \"labels\": [\n {\n \"id\": 5,\n \"name\": \"self-hosted\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 7,\n \"name\": \"X64\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 11,\n \"name\": \"Linux\",\n \"type\": \"read-only\"\n }\n ]\n },\n {\n \"id\": 24,\n \"name\": \"mac_runner\",\n \"os\": \"macos\",\n \"status\": \"offline\",\n \"busy\": false,\n \"labels\": [\n {\n \"id\": 5,\n \"name\": \"self-hosted\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 7,\n \"name\": \"X64\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 20,\n \"name\": \"macOS\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 21,\n \"name\": \"no-gpu\",\n \"type\": \"custom\"\n }\n ]\n }\n ]\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "runner_group_id",
"description": "Unique identifier of the self-hosted runner group.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "Unique identifier of the self-hosted runner group.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42/runners \\\n -d '{\"runners\":[42]}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42/runners \\\n -d '{\"runners\":[42]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners', {\n org: 'org',\n runner_group_id: 42,\n runners: [\n 42\n ]\n})",
"html": "await octokit.request('PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners', {\n org: 'org',\n runner_group_id: 42,\n runners: [\n 42\n ]\n})\n"
}
],
"summary": "Set self-hosted runners in a group for an organization",
"description": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products).\"\n\nReplaces the list of self-hosted runners that are part of an organization runner group.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/set-self-hosted-runners-in-group-for-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"runners": {
"description": "Required. List of runner IDs to add to the runner group.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the runner." }, "name": "runners", "in": "body", "rawType": "array", "rawDescription": "List of runner IDs to add to the runner group.", "childParamsGroups": [] } }, "required": [ "runners" ] }, "example": { "runners": [ 9, 2 ] } } } }, "x-github": { "enabledForGitHubApps": true, "githubCloudOnly": false, "category": "actions", "subcategory": "self-hosted-runner-groups" }, "slug": "set-self-hosted-runners-in-a-group-for-an-organization", "category": "actions", "categoryLabel": "Actions", "subcategory": "self-hosted-runner-groups", "subcategoryLabel": "Self hosted runner groups", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "204", "httpStatusMessage": "No Content", "description": "Response" } ], "descriptionHTML": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"GitHub's products.\"
\nReplaces the list of self-hosted runners that are part of an organization runner group.
\nYou must authenticate using an access token with the admin:org scope to use this endpoint.
Required. List of runner IDs to add to the runner group.
", "type": "array of integers", "items": { "type": "integer", "description": "Unique identifier of the runner." }, "name": "runners", "in": "body", "rawType": "array", "rawDescription": "List of runner IDs to add to the runner group.", "childParamsGroups": [] } ] }, { "verb": "put", "requestPath": "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "runner_group_id", "description": "Unique identifier of the self-hosted runner group.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner group.
" }, { "name": "runner_id", "description": "Unique identifier of the self-hosted runner.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42/runners/42", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42/runners/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}', {\n org: 'org',\n runner_group_id: 42,\n runner_id: 42\n})",
"html": "await octokit.request('PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}', {\n org: 'org',\n runner_group_id: 42,\n runner_id: 42\n})\n"
}
],
"summary": "Add a self-hosted runner to a group for an organization",
"description": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products).\"\n\n\nAdds a self-hosted runner to a runner group configured in an organization.\n\nYou must authenticate using an access token with the `admin:org`\nscope to use this endpoint.",
"operationId": "actions/add-self-hosted-runner-to-group-for-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
},
"slug": "add-a-self-hosted-runner-to-a-group-for-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runner-groups",
"subcategoryLabel": "Self hosted runner groups",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"GitHub's products.\"
\nAdds a self-hosted runner to a runner group configured in an organization.
\nYou must authenticate using an access token with the admin:org\nscope to use this endpoint.
Unique identifier of the self-hosted runner group.
" }, { "name": "runner_id", "description": "Unique identifier of the self-hosted runner.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the self-hosted runner.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42/runners/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runner-groups/42/runners/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}', {\n org: 'org',\n runner_group_id: 42,\n runner_id: 42\n})",
"html": "await octokit.request('DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}', {\n org: 'org',\n runner_group_id: 42,\n runner_id: 42\n})\n"
}
],
"summary": "Remove a self-hosted runner from a group for an organization",
"description": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products).\"\n\n\nRemoves a self-hosted runner from a group configured in an organization. The runner is then returned to the default group.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/remove-self-hosted-runner-from-group-for-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
},
"slug": "remove-a-self-hosted-runner-from-a-group-for-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runner-groups",
"subcategoryLabel": "Self hosted runner groups",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see \"GitHub's products.\"
\nRemoves a self-hosted runner from a group configured in an organization. The runner is then returned to the default group.
\nYou must authenticate using an access token with the admin:org scope to use this endpoint.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runners", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runners"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/actions/runners', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/actions/runners', {\n org: 'org'\n})\n"
}
],
"summary": "List self-hosted runners for an organization",
"description": "Lists all self-hosted runners configured in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-self-hosted-runners-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
},
"slug": "list-self-hosted-runners-for-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runners",
"subcategoryLabel": "Self hosted runners",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all self-hosted runners configured in an organization.
\nYou must authenticate using an access token with the admin:org scope to use this endpoint.
{\n \"total_count\": 2,\n \"runners\": [\n {\n \"id\": 23,\n \"name\": \"linux_runner\",\n \"os\": \"linux\",\n \"status\": \"online\",\n \"busy\": true,\n \"labels\": [\n {\n \"id\": 5,\n \"name\": \"self-hosted\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 7,\n \"name\": \"X64\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 11,\n \"name\": \"Linux\",\n \"type\": \"read-only\"\n }\n ]\n },\n {\n \"id\": 24,\n \"name\": \"mac_runner\",\n \"os\": \"macos\",\n \"status\": \"offline\",\n \"busy\": false,\n \"labels\": [\n {\n \"id\": 5,\n \"name\": \"self-hosted\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 7,\n \"name\": \"X64\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 20,\n \"name\": \"macOS\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 21,\n \"name\": \"no-gpu\",\n \"type\": \"custom\"\n }\n ]\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/actions/runners/downloads",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runners/downloads",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runners/downloads"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/actions/runners/downloads', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/actions/runners/downloads', {\n org: 'org'\n})\n"
}
],
"summary": "List runner applications for an organization",
"description": "Lists binaries for the runner application that you can download and run.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-runner-applications-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
},
"slug": "list-runner-applications-for-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runners",
"subcategoryLabel": "Self hosted runners",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists binaries for the runner application that you can download and run.
\nYou must authenticate using an access token with the admin:org scope to use this endpoint.
[\n {\n \"os\": \"osx\",\n \"architecture\": \"x64\",\n \"download_url\": \"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-osx-x64-2.164.0.tar.gz\",\n \"filename\": \"actions-runner-osx-x64-2.164.0.tar.gz\"\n },\n {\n \"os\": \"linux\",\n \"architecture\": \"x64\",\n \"download_url\": \"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-x64-2.164.0.tar.gz\",\n \"filename\": \"actions-runner-linux-x64-2.164.0.tar.gz\"\n },\n {\n \"os\": \"linux\",\n \"architecture\": \"arm\",\n \"download_url\": \"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm-2.164.0.tar.gz\",\n \"filename\": \"actions-runner-linux-arm-2.164.0.tar.gz\"\n },\n {\n \"os\": \"win\",\n \"architecture\": \"x64\",\n \"download_url\": \"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-win-x64-2.164.0.zip\",\n \"filename\": \"actions-runner-win-x64-2.164.0.zip\"\n },\n {\n \"os\": \"linux\",\n \"architecture\": \"arm64\",\n \"download_url\": \"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm64-2.164.0.tar.gz\",\n \"filename\": \"actions-runner-linux-arm64-2.164.0.tar.gz\"\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/orgs/{org}/actions/runners/registration-token",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runners/registration-token",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runners/registration-token"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/actions/runners/registration-token', {\n org: 'org'\n})",
"html": "await octokit.request('POST /orgs/{org}/actions/runners/registration-token', {\n org: 'org'\n})\n"
}
],
"summary": "Create a registration token for an organization",
"description": "Returns a token that you can pass to the `config` script. The token expires after one hour.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.\n\n#### Example using registration token\n\nConfigure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.\n\n```\n./config.sh --url https://github.com/octo-org --token TOKEN\n```",
"tags": [
"actions"
],
"operationId": "actions/create-registration-token-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
},
"slug": "create-a-registration-token-for-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runners",
"subcategoryLabel": "Self hosted runners",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns a token that you can pass to the config script. The token expires after one hour.
You must authenticate using an access token with the admin:org scope to use this endpoint.
Configure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint.
./config.sh --url https://github.com/octo-org --token TOKEN\n",
"responses": [
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response",
"payload": "{\n \"token\": \"LLBF3JGZDX3P5PMEXLND6TS6FCWO6\",\n \"expires_at\": \"2020-01-22T12:13:35.123-08:00\"\n}\n"
}
]
},
{
"verb": "post",
"requestPath": "/orgs/{org}/actions/runners/remove-token",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runners/remove-token",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runners/remove-token"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/actions/runners/remove-token', {\n org: 'org'\n})",
"html": "await octokit.request('POST /orgs/{org}/actions/runners/remove-token', {\n org: 'org'\n})\n"
}
],
"summary": "Create a remove token for an organization",
"description": "Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.\n\n#### Example using remove token\n\nTo remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this\nendpoint.\n\n```\n./config.sh remove --token TOKEN\n```",
"tags": [
"actions"
],
"operationId": "actions/create-remove-token-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
},
"slug": "create-a-remove-token-for-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runners",
"subcategoryLabel": "Self hosted runners",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns a token that you can pass to the config script to remove a self-hosted runner from an organization. The token expires after one hour.
You must authenticate using an access token with the admin:org scope to use this endpoint.
To remove your self-hosted runner from an organization, replace TOKEN with the remove token provided by this\nendpoint.
./config.sh remove --token TOKEN\n",
"responses": [
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response",
"payload": "{\n \"token\": \"AABF3JGZDX3P5PMEXLND6TS6FCWO6\",\n \"expires_at\": \"2020-01-29T12:13:35.123-08:00\"\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/actions/runners/{runner_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "runner_id",
"description": "Unique identifier of the self-hosted runner.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "Unique identifier of the self-hosted runner.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runners/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runners/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/actions/runners/{runner_id}', {\n org: 'org',\n runner_id: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/actions/runners/{runner_id}', {\n org: 'org',\n runner_id: 42\n})\n"
}
],
"summary": "Get a self-hosted runner for an organization",
"description": "Gets a specific self-hosted runner configured in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-self-hosted-runner-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
},
"slug": "get-a-self-hosted-runner-for-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runners",
"subcategoryLabel": "Self hosted runners",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a specific self-hosted runner configured in an organization.
\nYou must authenticate using an access token with the admin:org scope to use this endpoint.
{\n \"id\": 23,\n \"name\": \"MBP\",\n \"os\": \"macos\",\n \"status\": \"online\",\n \"busy\": true,\n \"labels\": [\n {\n \"id\": 5,\n \"name\": \"self-hosted\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 7,\n \"name\": \"X64\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 20,\n \"name\": \"macOS\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 21,\n \"name\": \"no-gpu\",\n \"type\": \"custom\"\n }\n ]\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/actions/runners/{runner_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "runner_id",
"description": "Unique identifier of the self-hosted runner.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "Unique identifier of the self-hosted runner.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runners/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/runners/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/actions/runners/{runner_id}', {\n org: 'org',\n runner_id: 42\n})",
"html": "await octokit.request('DELETE /orgs/{org}/actions/runners/{runner_id}', {\n org: 'org',\n runner_id: 42\n})\n"
}
],
"summary": "Delete a self-hosted runner from an organization",
"description": "Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-self-hosted-runner-from-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
},
"slug": "delete-a-self-hosted-runner-from-an-organization",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runners",
"subcategoryLabel": "Self hosted runners",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
\nYou must authenticate using an access token with the admin:org scope to use this endpoint.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/actions/secrets', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/actions/secrets', {\n org: 'org'\n})\n"
}
],
"summary": "List organization secrets",
"description": "Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-org-secrets",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-organization-secrets"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
},
"slug": "list-organization-secrets",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "secrets",
"subcategoryLabel": "Secrets",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the secrets organization permission to use this endpoint.
{\n \"total_count\": 3,\n \"secrets\": [\n {\n \"name\": \"GIST_ID\",\n \"created_at\": \"2019-08-10T14:59:22Z\",\n \"updated_at\": \"2020-01-10T14:59:22Z\",\n \"visibility\": \"private\"\n },\n {\n \"name\": \"DEPLOY_TOKEN\",\n \"created_at\": \"2019-08-10T14:59:22Z\",\n \"updated_at\": \"2020-01-10T14:59:22Z\",\n \"visibility\": \"all\"\n },\n {\n \"name\": \"GH_TOKEN\",\n \"created_at\": \"2019-08-10T14:59:22Z\",\n \"updated_at\": \"2020-01-10T14:59:22Z\",\n \"visibility\": \"selected\",\n \"selected_repositories_url\": \"https://api.github.com/orgs/octo-org/actions/secrets/SUPER_SECRET/repositories\"\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/actions/secrets/public-key",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets/public-key",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets/public-key"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/actions/secrets/public-key', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/actions/secrets/public-key', {\n org: 'org'\n})\n"
}
],
"summary": "Get an organization public key",
"description": "Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-org-public-key",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-an-organization-public-key"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
},
"slug": "get-an-organization-public-key",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "secrets",
"subcategoryLabel": "Secrets",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the secrets organization permission to use this endpoint.
{\n \"key_id\": \"012345678912345678\",\n \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\"\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/actions/secrets/{secret_name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "secret_name",
"description": "secret_name parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "secret_name parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets/SECRET_NAME", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets/SECRET_NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/actions/secrets/{secret_name}', {\n org: 'org',\n secret_name: 'secret_name'\n})",
"html": "await octokit.request('GET /orgs/{org}/actions/secrets/{secret_name}', {\n org: 'org',\n secret_name: 'secret_name'\n})\n"
}
],
"summary": "Get an organization secret",
"description": "Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-an-organization-secret"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
},
"slug": "get-an-organization-secret",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "secrets",
"subcategoryLabel": "Secrets",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the secrets organization permission to use this endpoint.
{\n \"name\": \"GH_TOKEN\",\n \"created_at\": \"2019-08-10T14:59:22Z\",\n \"updated_at\": \"2020-01-10T14:59:22Z\",\n \"visibility\": \"selected\",\n \"selected_repositories_url\": \"https://api.github.com/orgs/octo-org/actions/secrets/SUPER_SECRET/repositories\"\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/orgs/{org}/actions/secrets/{secret_name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "secret_name",
"description": "secret_name parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "secret_name parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets/SECRET_NAME \\\n -d '{\"visibility\":\"visibility\"}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets/SECRET_NAME \\\n -d '{\"visibility\":\"visibility\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/actions/secrets/{secret_name}', {\n org: 'org',\n secret_name: 'secret_name',\n visibility: 'visibility'\n})",
"html": "await octokit.request('PUT /orgs/{org}/actions/secrets/{secret_name}', {\n org: 'org',\n secret_name: 'secret_name',\n visibility: 'visibility'\n})\n"
}
],
"summary": "Create or update an organization secret",
"description": "Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access\ntoken with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to\nuse this endpoint.\n\n#### Example encrypting a secret using Node.js\n\nEncrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.\n\n```\nconst sodium = require('tweetsodium');\n\nconst key = \"base64-encoded-public-key\";\nconst value = \"plain-text-secret\";\n\n// Convert the message and key to Uint8Array's (Buffer implements that interface)\nconst messageBytes = Buffer.from(value);\nconst keyBytes = Buffer.from(key, 'base64');\n\n// Encrypt using LibSodium.\nconst encryptedBytes = sodium.seal(messageBytes, keyBytes);\n\n// Base64 the encrypted secret\nconst encrypted = Buffer.from(encryptedBytes).toString('base64');\n\nconsole.log(encrypted);\n```\n\n\n#### Example encrypting a secret using Python\n\nEncrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3.\n\n```\nfrom base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n```\n\n#### Example encrypting a secret using C#\n\nEncrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.\n\n```\nvar secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n```\n\n#### Example encrypting a secret using Ruby\n\nEncrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.\n\n```ruby\nrequire \"rbnacl\"\nrequire \"base64\"\n\nkey = Base64.decode64(\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\")\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(\"my_secret\")\n\n# Print the base64 encoded secret\nputs Base64.strict_encode64(encrypted_secret)\n```",
"tags": [
"actions"
],
"operationId": "actions/create-or-update-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"encrypted_value": {
"type": "string",
"description": "Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an organization public key endpoint.
", "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", "rawDescription": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint.", "childParamsGroups": [] }, "key_id": { "type": "string", "description": "ID of the key you used to encrypt the secret.
", "name": "key_id", "in": "body", "rawType": "string", "rawDescription": "ID of the key you used to encrypt the secret.", "childParamsGroups": [] }, "visibility": { "type": "string", "description": "Required. Configures the access that repositories have to the organization secret. Can be one of:
\n- all - All repositories in an organization can access the secret.
\n- private - Private repositories in an organization can access the secret.
\n- selected - Only specific repositories can access the secret.
An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the visibility is set to selected. You can manage the list of selected repositories using the List selected repositories for an organization secret, Set selected repositories for an organization secret, and Remove selected repository from an organization secret endpoints.
Creates or updates an organization secret with an encrypted value. Encrypt your secret using\nLibSodium. You must authenticate using an access\ntoken with the admin:org scope to use this endpoint. GitHub Apps must have the secrets organization permission to\nuse this endpoint.
Encrypt your secret using the tweetsodium library.
\nconst sodium = require('tweetsodium');\n\nconst key = \"base64-encoded-public-key\";\nconst value = \"plain-text-secret\";\n\n// Convert the message and key to Uint8Array's (Buffer implements that interface)\nconst messageBytes = Buffer.from(value);\nconst keyBytes = Buffer.from(key, 'base64');\n\n// Encrypt using LibSodium.\nconst encryptedBytes = sodium.seal(messageBytes, keyBytes);\n\n// Base64 the encrypted secret\nconst encrypted = Buffer.from(encryptedBytes).toString('base64');\n\nconsole.log(encrypted);\n\nEncrypt your secret using pynacl with Python 3.
\nfrom base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n\nEncrypt your secret using the Sodium.Core package.
\nvar secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n\nEncrypt your secret using the rbnacl gem.
\nrequire \"rbnacl\"\nrequire \"base64\"\n\nkey = Base64.decode64(\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\")\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(\"my_secret\")\n\n# Print the base64 encoded secret\nputs Base64.strict_encode64(encrypted_secret)\n",
"bodyParameters": [
{
"type": "string",
"description": "Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an organization public key endpoint.
", "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", "rawDescription": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint.", "childParamsGroups": [] }, { "type": "string", "description": "ID of the key you used to encrypt the secret.
", "name": "key_id", "in": "body", "rawType": "string", "rawDescription": "ID of the key you used to encrypt the secret.", "childParamsGroups": [] }, { "type": "string", "description": "Required. Configures the access that repositories have to the organization secret. Can be one of:
\n- all - All repositories in an organization can access the secret.
\n- private - Private repositories in an organization can access the secret.
\n- selected - Only specific repositories can access the secret.
An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the visibility is set to selected. You can manage the list of selected repositories using the List selected repositories for an organization secret, Set selected repositories for an organization secret, and Remove selected repository from an organization secret endpoints.
secret_name parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets/SECRET_NAME", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets/SECRET_NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/actions/secrets/{secret_name}', {\n org: 'org',\n secret_name: 'secret_name'\n})",
"html": "await octokit.request('DELETE /orgs/{org}/actions/secrets/{secret_name}', {\n org: 'org',\n secret_name: 'secret_name'\n})\n"
}
],
"summary": "Delete an organization secret",
"description": "Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-an-organization-secret"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
},
"slug": "delete-an-organization-secret",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "secrets",
"subcategoryLabel": "Secrets",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes a secret in an organization using the secret name. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the secrets organization permission to use this endpoint.
secret_name parameter
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets/SECRET_NAME/repositories", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets/SECRET_NAME/repositories"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/actions/secrets/{secret_name}/repositories', {\n org: 'org',\n secret_name: 'secret_name'\n})",
"html": "await octokit.request('GET /orgs/{org}/actions/secrets/{secret_name}/repositories', {\n org: 'org',\n secret_name: 'secret_name'\n})\n"
}
],
"summary": "List selected repositories for an organization secret",
"description": "Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-selected-repos-for-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
},
"slug": "list-selected-repositories-for-an-organization-secret",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "secrets",
"subcategoryLabel": "Secrets",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all repositories that have been selected when the visibility for repository access to a secret is set to selected. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the secrets organization permission to use this endpoint.
{\n \"total_count\": 1,\n \"repositories\": [\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n }\n ]\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/orgs/{org}/actions/secrets/{secret_name}/repositories",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "secret_name",
"description": "secret_name parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "secret_name parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets/SECRET_NAME/repositories \\\n -d '{\"selected_repository_ids\":[42]}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets/SECRET_NAME/repositories \\\n -d '{\"selected_repository_ids\":[42]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/actions/secrets/{secret_name}/repositories', {\n org: 'org',\n secret_name: 'secret_name',\n selected_repository_ids: [\n 42\n ]\n})",
"html": "await octokit.request('PUT /orgs/{org}/actions/secrets/{secret_name}/repositories', {\n org: 'org',\n secret_name: 'secret_name',\n selected_repository_ids: [\n 42\n ]\n})\n"
}
],
"summary": "Set selected repositories for an organization secret",
"description": "Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/set-selected-repos-for-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"selected_repository_ids": {
"type": "array of integers",
"description": "Required. An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the visibility is set to selected. You can add and remove individual repositories using the Set selected repositories for an organization secret and Remove selected repository from an organization secret endpoints.
Replaces all repositories for an organization secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the secrets organization permission to use this endpoint.
Required. An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the visibility is set to selected. You can add and remove individual repositories using the Set selected repositories for an organization secret and Remove selected repository from an organization secret endpoints.
secret_name parameter
" }, { "name": "repository_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets/SECRET_NAME/repositories/42", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets/SECRET_NAME/repositories/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}', {\n org: 'org',\n secret_name: 'secret_name',\n repository_id: 42\n})",
"html": "await octokit.request('PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}', {\n org: 'org',\n secret_name: 'secret_name',\n repository_id: 42\n})\n"
}
],
"summary": "Add selected repository to an organization secret",
"description": "Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/add-selected-repo-to-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
},
"slug": "add-selected-repository-to-an-organization-secret",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "secrets",
"subcategoryLabel": "Secrets",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "No Content when repository was added to the selected list"
},
{
"httpStatusCode": "409",
"httpStatusMessage": "Conflict",
"description": "Conflict when visibility type is not set to selected"
}
],
"bodyParameters": [],
"descriptionHTML": "Adds a repository to an organization secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the secrets organization permission to use this endpoint.
secret_name parameter
" }, { "name": "repository_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets/SECRET_NAME/repositories/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/actions/secrets/SECRET_NAME/repositories/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}', {\n org: 'org',\n secret_name: 'secret_name',\n repository_id: 42\n})",
"html": "await octokit.request('DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}', {\n org: 'org',\n secret_name: 'secret_name',\n repository_id: 42\n})\n"
}
],
"summary": "Remove selected repository from an organization secret",
"description": "Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/remove-selected-repo-from-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
},
"slug": "remove-selected-repository-from-an-organization-secret",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "secrets",
"subcategoryLabel": "Secrets",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response when repository was removed from the selected list"
},
{
"httpStatusCode": "409",
"httpStatusMessage": "Conflict",
"description": "Conflict when visibility type not set to selected"
}
],
"bodyParameters": [],
"descriptionHTML": "Removes a repository from an organization secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the secrets organization permission to use this endpoint.
A search phrase. For more information, see Searching the audit log.
" }, { "name": "include", "description": "The event types to include:\n\n- `web` - returns web (non-Git) events\n- `git` - returns Git events\n- `all` - returns both web and Git events\n\nThe default is `web`.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "web", "git", "all" ] }, "descriptionHTML": "The event types to include:
\nweb - returns web (non-Git) eventsgit - returns Git eventsall - returns both web and Git eventsThe default is web.
A cursor, as given in the Link header. If specified, the query only searches for events after this cursor.
" }, { "name": "before", "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor.", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "A cursor, as given in the Link header. If specified, the query only searches for events before this cursor.
" }, { "name": "order", "description": "The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`.\n\nThe default is `desc`.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "desc", "asc" ] }, "descriptionHTML": "The order of audit log events. To list newest events first, specify desc. To list oldest events first, specify asc.
The default is desc.
Results per page (max 100)
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/audit-log", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/audit-log"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/audit-log', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/audit-log', {\n org: 'org'\n})\n"
}
],
"summary": "Get the audit log for an organization",
"description": "Gets the audit log for an organization. For more information, see \"[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization).\"\n\nTo use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint.",
"operationId": "orgs/get-audit-log",
"tags": [
"orgs"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#get-audit-log"
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": null
},
"slug": "get-the-audit-log-for-an-organization",
"category": "orgs",
"categoryLabel": "Orgs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the audit log for an organization. For more information, see \"Reviewing the audit log for your organization.\"
\nTo use this endpoint, you must be an organization owner, and you must use an access token with the admin:org scope. GitHub Apps must have the organization_administration read permission to use this endpoint.
[\n {\n \"@timestamp\": 1606929874512,\n \"action\": \"team.add_member\",\n \"actor\": \"octocat\",\n \"created_at\": 1606929874512,\n \"_document_id\": \"xJJFlFOhQ6b-5vaAFy9Rjw\",\n \"org\": \"octo-corp\",\n \"team\": \"octo-corp/example-team\",\n \"user\": \"monalisa\"\n },\n {\n \"@timestamp\": 1606507117008,\n \"action\": \"org.create\",\n \"actor\": \"octocat\",\n \"created_at\": 1606507117008,\n \"_document_id\": \"Vqvg6kZ4MYqwWRKFDzlMoQ\",\n \"org\": \"octocat-test-org\"\n },\n {\n \"@timestamp\": 1605719148837,\n \"action\": \"repo.destroy\",\n \"actor\": \"monalisa\",\n \"created_at\": 1605719148837,\n \"_document_id\": \"LwW2vpJZCDS-WUmo9Z-ifw\",\n \"org\": \"mona-org\",\n \"repo\": \"mona-org/mona-test-repo\",\n \"visibility\": \"private\"\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/blocks",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/blocks",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/blocks"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/blocks', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/blocks', {\n org: 'org'\n})\n"
}
],
"summary": "List users blocked by an organization",
"description": "List the users blocked by an organization.",
"tags": [
"orgs"
],
"operationId": "orgs/list-blocked-users",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "blocking"
},
"slug": "list-users-blocked-by-an-organization",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "blocking",
"subcategoryLabel": "Blocking",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List the users blocked by an organization.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
},
{
"httpStatusCode": "415",
"httpStatusMessage": "Unsupported Media Type",
"description": "Preview header missing"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/blocks/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/blocks/USERNAME",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/blocks/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/blocks/{username}', {\n org: 'org',\n username: 'username'\n})",
"html": "await octokit.request('GET /orgs/{org}/blocks/{username}', {\n org: 'org',\n username: 'username'\n})\n"
}
],
"summary": "Check if a user is blocked by an organization",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/check-blocked-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "blocking"
},
"slug": "check-if-a-user-is-blocked-by-an-organization",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "blocking",
"subcategoryLabel": "Blocking",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "If the user is blocked:"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "If the user is not blocked:"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "put",
"requestPath": "/orgs/{org}/blocks/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/blocks/USERNAME",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/blocks/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/blocks/{username}', {\n org: 'org',\n username: 'username'\n})",
"html": "await octokit.request('PUT /orgs/{org}/blocks/{username}', {\n org: 'org',\n username: 'username'\n})\n"
}
],
"summary": "Block a user from an organization",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/block-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "blocking"
},
"slug": "block-a-user-from-an-organization",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "blocking",
"subcategoryLabel": "Blocking",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/blocks/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/blocks/USERNAME",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/blocks/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/blocks/{username}', {\n org: 'org',\n username: 'username'\n})",
"html": "await octokit.request('DELETE /orgs/{org}/blocks/{username}', {\n org: 'org',\n username: 'username'\n})\n"
}
],
"summary": "Unblock a user from an organization",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/unblock-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "blocking"
},
"slug": "unblock-a-user-from-an-organization",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "blocking",
"subcategoryLabel": "Blocking",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/orgs/{org}/credential-authorizations",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/credential-authorizations",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/credential-authorizations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/credential-authorizations', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/credential-authorizations', {\n org: 'org'\n})\n"
}
],
"summary": "List SAML SSO authorizations for an organization",
"description": "Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products).\n\nAn authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://help.github.com/en/articles/about-authentication-with-saml-single-sign-on).",
"tags": [
"orgs"
],
"operationId": "orgs/list-saml-sso-authorizations",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-saml-sso-authorizations-for-an-organization"
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": null
},
"slug": "list-saml-sso-authorizations-for-an-organization",
"category": "orgs",
"categoryLabel": "Orgs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see GitHub's products.
\nAn authenticated organization owner with the read:org scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see About authentication with SAML single sign-on.
[\n {\n \"login\": \"octocat\",\n \"credential_id\": 161195,\n \"credential_type\": \"personal access token\",\n \"token_last_eight\": \"71c3fc11\",\n \"credential_authorized_at\": \"2011-01-26T19:06:43Z\",\n \"scopes\": [\n \"user\",\n \"repo\"\n ]\n },\n {\n \"login\": \"hubot\",\n \"credential_id\": 161196,\n \"credential_type\": \"personal access token\",\n \"token_last_eight\": \"Ae178B4a\",\n \"credential_authorized_at\": \"2019-03-29T19:06:43Z\",\n \"scopes\": [\n \"repo\"\n ]\n }\n]\n"
}
]
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/credential-authorizations/{credential_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "credential_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/credential-authorizations/42",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/credential-authorizations/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/credential-authorizations/{credential_id}', {\n org: 'org',\n credential_id: 42\n})",
"html": "await octokit.request('DELETE /orgs/{org}/credential-authorizations/{credential_id}', {\n org: 'org',\n credential_id: 42\n})\n"
}
],
"summary": "Remove a SAML SSO authorization for an organization",
"description": "Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products).\n\nAn authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access.",
"tags": [
"orgs"
],
"operationId": "orgs/remove-saml-sso-authorization",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#remove-a-saml-sso-authorization-for-an-organization"
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": null
},
"slug": "remove-a-saml-sso-authorization-for-an-organization",
"category": "orgs",
"categoryLabel": "Orgs",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see GitHub's products.
\nAn authenticated organization owner with the admin:org scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/events", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/events"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/events', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/events', {\n org: 'org'\n})\n"
}
],
"summary": "List public organization events",
"description": "",
"tags": [
"activity"
],
"operationId": "activity/list-public-org-events",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-public-organization-events"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "events"
},
"slug": "list-public-organization-events",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "events",
"subcategoryLabel": "Events",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/orgs/{org}/external-group/{group_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "group_id",
"description": "group_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "group_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/external-group/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/external-group/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/external-group/{group_id}', {\n org: 'org',\n group_id: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/external-group/{group_id}', {\n org: 'org',\n group_id: 42\n})\n"
}
],
"summary": "Get an external group",
"description": "Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to.\n\nYou can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see \"[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)\" in the GitHub Help documentation.",
"tags": [
"teams"
],
"operationId": "teams/external-idp-group-info-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#external-idp-group-info-for-an-organization"
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "external-groups"
},
"slug": "get-an-external-group",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "external-groups",
"subcategoryLabel": "External groups",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to.
\nYou can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see \"GitHub's products\" in the GitHub Help documentation.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"group_id\": \"123\",\n \"group_name\": \"Octocat admins\",\n \"updated_at\": \"2021-01-24T11:31:04-06:00\",\n \"teams\": [\n {\n \"team_id\": 1,\n \"team_name\": \"team-test\"\n },\n {\n \"team_id\": 2,\n \"team_name\": \"team-test2\"\n }\n ],\n \"members\": [\n {\n \"member_id\": 1,\n \"member_login\": \"mona-lisa_eocsaxrs\",\n \"member_name\": \"Mona Lisa\",\n \"member_email\": \"mona_lisa@github.com\"\n },\n {\n \"member_id\": 2,\n \"member_login\": \"octo-lisa_eocsaxrs\",\n \"member_name\": \"Octo Lisa\",\n \"member_email\": \"octo_lisa@github.com\"\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/external-groups",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page token", "in": "query", "schema": { "type": "integer" }, "descriptionHTML": "Page token
" }, { "name": "display_name", "description": "Limits the list to groups containing the text in the group name", "in": "query", "schema": { "type": "string" }, "descriptionHTML": "Limits the list to groups containing the text in the group name
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/external-groups", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/external-groups"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/external-groups', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/external-groups', {\n org: 'org'\n})\n"
}
],
"summary": "List external groups in an organization",
"description": "Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see \"[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89).\"\n\nYou can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see \"[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)\" in the GitHub Help documentation.",
"tags": [
"teams"
],
"operationId": "teams/list-external-idp-groups-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-external-idp-groups-for-an-organization"
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "external-groups"
},
"slug": "list-external-groups-in-an-organization",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "external-groups",
"subcategoryLabel": "External groups",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists external groups available in an organization. You can query the groups using the display_name parameter, only groups with a group_name containing the text provided in the display_name parameter will be returned. You can also limit your page results using the per_page parameter. GitHub generates a url-encoded page token using a cursor value for where the next page begins. For more information on cursor pagination, see \"Offset and Cursor Pagination explained.\"
You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see \"GitHub's products\" in the GitHub Help documentation.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"groups\": [\n {\n \"group_id\": \"123\",\n \"group_name\": \"Octocat admins\",\n \"updated_at\": \"2021-01-24T11:31:04-06:00\"\n },\n {\n \"group_id\": \"456\",\n \"group_name\": \"Octocat docs members\",\n \"updated_at\": \"2021-03-24T11:31:04-06:00\"\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/failed_invitations",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/failed_invitations", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/failed_invitations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/failed_invitations', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/failed_invitations', {\n org: 'org'\n})\n"
}
],
"summary": "List failed organization invitations",
"description": "The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure.",
"tags": [
"orgs"
],
"operationId": "orgs/list-failed-invitations",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
},
"slug": "list-failed-organization-invitations",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "The return hash contains failed_at and failed_reason fields which represent the time at which the invitation failed and the reason for the failure.
[\n {\n \"id\": 1,\n \"login\": \"monalisa\",\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"email\": \"octocat@github.com\",\n \"role\": \"direct_member\",\n \"created_at\": \"2016-11-30T06:46:10-08:00\",\n \"failed_at\": \"\",\n \"failed_reason\": \"\",\n \"inviter\": {\n \"login\": \"other_user\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/other_user\",\n \"html_url\": \"https://github.com/other_user\",\n \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"team_count\": 2,\n \"invitation_teams_url\": \"https://api.github.com/organizations/2/invitations/1/teams\"\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/hooks",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/hooks', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/hooks', {\n org: 'org'\n})\n"
}
],
"summary": "List organization webhooks",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/list-webhooks",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-organization-webhooks"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
},
"slug": "list-organization-webhooks",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"id\": 1,\n \"url\": \"https://api.github.com/orgs/octocat/hooks/1\",\n \"ping_url\": \"https://api.github.com/orgs/octocat/hooks/1/pings\",\n \"deliveries_url\": \"https://api.github.com/orgs/octocat/hooks/1/deliveries\",\n \"name\": \"web\",\n \"events\": [\n \"push\",\n \"pull_request\"\n ],\n \"active\": true,\n \"config\": {\n \"url\": \"http://example.com\",\n \"content_type\": \"json\"\n },\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"type\": \"Organization\"\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/orgs/{org}/hooks",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks \\\n -d '{\"name\":\"name\",\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\",\"username\":\"username\",\"password\":\"password\"}}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks \\\n -d '{\"name\":\"name\",\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\",\"username\":\"username\",\"password\":\"password\"}}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/hooks', {\n org: 'org',\n name: 'name',\n config: {\n url: 'url',\n content_type: 'content_type',\n secret: 'secret',\n insecure_ssl: 'insecure_ssl',\n username: 'username',\n password: 'password'\n }\n})",
"html": "await octokit.request('POST /orgs/{org}/hooks', {\n org: 'org',\n name: 'name',\n config: {\n url: 'url',\n content_type: 'content_type',\n secret: 'secret',\n insecure_ssl: 'insecure_ssl',\n username: 'username',\n password: 'password'\n }\n})\n"
}
],
"summary": "Create an organization webhook",
"description": "Here's how you can create a hook that posts payloads in JSON format:",
"tags": [
"orgs"
],
"operationId": "orgs/create-webhook",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#create-an-organization-webhook"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Required. Must be passed as \"web\".
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Must be passed as \"web\".", "childParamsGroups": [] }, "config": { "type": "object", "description": "Required. Key/value pairs to provide settings for this webhook. These are defined below.
", "properties": { "url": { "type": "string", "description": "Required. The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, "content_type": { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Required. The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Determines what events the hook is triggered for.
", "default": [ "push" ], "items": { "type": "string" }, "name": "events", "in": "body", "rawType": "array", "rawDescription": "Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for.", "childParamsGroups": [] }, "active": { "type": "boolean", "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
Here's how you can create a hook that posts payloads in JSON format:
", "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 1,\n \"url\": \"https://api.github.com/orgs/octocat/hooks/1\",\n \"ping_url\": \"https://api.github.com/orgs/octocat/hooks/1/pings\",\n \"deliveries_url\": \"https://api.github.com/orgs/octocat/hooks/1/deliveries\",\n \"name\": \"web\",\n \"events\": [\n \"push\",\n \"pull_request\"\n ],\n \"active\": true,\n \"config\": {\n \"url\": \"http://example.com\",\n \"content_type\": \"json\"\n },\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"type\": \"Organization\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"type": "string",
"description": "Required. Must be passed as \"web\".
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Must be passed as \"web\".", "childParamsGroups": [] }, { "type": "object", "description": "Required. Key/value pairs to provide settings for this webhook. These are defined below.
", "properties": { "url": { "type": "string", "description": "Required. The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, "content_type": { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Required. The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Determines what events the hook is triggered for.
", "default": [ "push" ], "items": { "type": "string" }, "name": "events", "in": "body", "rawType": "array", "rawDescription": "Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for.", "childParamsGroups": [] }, { "type": "boolean", "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/hooks/{hook_id}', {\n org: 'org',\n hook_id: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/hooks/{hook_id}', {\n org: 'org',\n hook_id: 42\n})\n"
}
],
"summary": "Get an organization webhook",
"description": "Returns a webhook configured in an organization. To get only the webhook `config` properties, see \"[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization).\"",
"tags": [
"orgs"
],
"operationId": "orgs/get-webhook",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#get-an-organization-webhook"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
},
"slug": "get-an-organization-webhook",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns a webhook configured in an organization. To get only the webhook config properties, see \"Get a webhook configuration for an organization.\"
{\n \"id\": 1,\n \"url\": \"https://api.github.com/orgs/octocat/hooks/1\",\n \"ping_url\": \"https://api.github.com/orgs/octocat/hooks/1/pings\",\n \"deliveries_url\": \"https://api.github.com/orgs/octocat/hooks/1/deliveries\",\n \"name\": \"web\",\n \"events\": [\n \"push\",\n \"pull_request\"\n ],\n \"active\": true,\n \"config\": {\n \"url\": \"http://example.com\",\n \"content_type\": \"json\"\n },\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"type\": \"Organization\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/orgs/{org}/hooks/{hook_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "hook_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42 \\\n -d '{\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\"}}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42 \\\n -d '{\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\"}}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /orgs/{org}/hooks/{hook_id}', {\n org: 'org',\n hook_id: 42,\n config: {\n url: 'url',\n content_type: 'content_type',\n secret: 'secret',\n insecure_ssl: 'insecure_ssl'\n }\n})",
"html": "await octokit.request('PATCH /orgs/{org}/hooks/{hook_id}', {\n org: 'org',\n hook_id: 42,\n config: {\n url: 'url',\n content_type: 'content_type',\n secret: 'secret',\n insecure_ssl: 'insecure_ssl'\n }\n})\n"
}
],
"summary": "Update an organization webhook",
"description": "Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use \"[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization).\"",
"tags": [
"orgs"
],
"operationId": "orgs/update-webhook",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#update-an-organization-webhook"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"config": {
"type": "object",
"description": "Key/value pairs to provide settings for this webhook. These are defined below.
", "properties": { "url": { "type": "string", "description": "Required. The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, "content_type": { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Required. The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Determines what events the hook is triggered for.
", "default": [ "push" ], "items": { "type": "string" }, "name": "events", "in": "body", "rawType": "array", "rawDescription": "Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for.", "childParamsGroups": [] }, "active": { "type": "boolean", "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
Updates a webhook configured in an organization. When you update a webhook, the secret will be overwritten. If you previously had a secret set, you must provide the same secret or set a new secret or the secret will be removed. If you are only updating individual webhook config properties, use \"Update a webhook configuration for an organization.\"
{\n \"id\": 1,\n \"url\": \"https://api.github.com/orgs/octocat/hooks/1\",\n \"ping_url\": \"https://api.github.com/orgs/octocat/hooks/1/pings\",\n \"deliveries_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/deliveries\",\n \"name\": \"web\",\n \"events\": [\n \"pull_request\"\n ],\n \"active\": true,\n \"config\": {\n \"url\": \"http://example.com\",\n \"content_type\": \"json\"\n },\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"type\": \"Organization\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"type": "object",
"description": "Key/value pairs to provide settings for this webhook. These are defined below.
", "properties": { "url": { "type": "string", "description": "Required. The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, "content_type": { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Required. The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Determines what events the hook is triggered for.
", "default": [ "push" ], "items": { "type": "string" }, "name": "events", "in": "body", "rawType": "array", "rawDescription": "Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for.", "childParamsGroups": [] }, { "type": "boolean", "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/hooks/{hook_id}', {\n org: 'org',\n hook_id: 42\n})",
"html": "await octokit.request('DELETE /orgs/{org}/hooks/{hook_id}', {\n org: 'org',\n hook_id: 42\n})\n"
}
],
"summary": "Delete an organization webhook",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/delete-webhook",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
},
"slug": "delete-an-organization-webhook",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/orgs/{org}/hooks/{hook_id}/config",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "hook_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42/config",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42/config"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/hooks/{hook_id}/config', {\n org: 'org',\n hook_id: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/hooks/{hook_id}/config', {\n org: 'org',\n hook_id: 42\n})\n"
}
],
"summary": "Get a webhook configuration for an organization",
"description": "Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use \"[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook).\"\n\nAccess tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission.",
"tags": [
"orgs"
],
"operationId": "orgs/get-webhook-config-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
},
"slug": "get-a-webhook-configuration-for-an-organization",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns the webhook configuration for an organization. To get more information about the webhook, including the active state and events, use \"Get an organization webhook .\"
Access tokens must have the admin:org_hook scope, and GitHub Apps must have the organization_hooks:read permission.
{\n \"content_type\": \"json\",\n \"insecure_ssl\": \"0\",\n \"secret\": \"********\",\n \"url\": \"https://example.com/webhook\"\n}\n"
}
]
},
{
"verb": "patch",
"requestPath": "/orgs/{org}/hooks/{hook_id}/config",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "hook_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42/config \\\n -d '{\"url\":\"url\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42/config \\\n -d '{\"url\":\"url\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /orgs/{org}/hooks/{hook_id}/config', {\n org: 'org',\n hook_id: 42,\n url: 'url'\n})",
"html": "await octokit.request('PATCH /orgs/{org}/hooks/{hook_id}/config', {\n org: 'org',\n hook_id: 42,\n url: 'url'\n})\n"
}
],
"summary": "Update a webhook configuration for an organization",
"description": "Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use \"[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook).\"\n\nAccess tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission.",
"tags": [
"orgs"
],
"operationId": "orgs/update-webhook-config-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, "content_type": { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Updates the webhook configuration for an organization. To update more information about the webhook, including the active state and events, use \"Update an organization webhook .\"
Access tokens must have the admin:org_hook scope, and GitHub Apps must have the organization_hooks:write permission.
{\n \"content_type\": \"json\",\n \"insecure_ssl\": \"0\",\n \"secret\": \"********\",\n \"url\": \"https://example.com/webhook\"\n}\n"
}
],
"bodyParameters": [
{
"type": "string",
"description": "The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Results per page (max 100)
" }, { "name": "cursor", "description": "Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors.", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the link header for the next and previous page cursors.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42/deliveries"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/hooks/{hook_id}/deliveries', {\n org: 'org',\n hook_id: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/hooks/{hook_id}/deliveries', {\n org: 'org',\n hook_id: 42\n})\n"
}
],
"summary": "List deliveries for an organization webhook",
"description": "Returns a list of webhook deliveries for a webhook configured in an organization.",
"tags": [
"orgs"
],
"operationId": "orgs/list-webhook-deliveries",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
},
"slug": "list-deliveries-for-an-organization-webhook",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns a list of webhook deliveries for a webhook configured in an organization.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 12345678,\n \"guid\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"delivered_at\": \"2019-06-03T00:57:16Z\",\n \"redelivery\": false,\n \"duration\": 0.27,\n \"status\": \"OK\",\n \"status_code\": 200,\n \"event\": \"issues\",\n \"action\": \"opened\",\n \"installation_id\": 123,\n \"repository_id\": 456\n },\n {\n \"id\": 123456789,\n \"guid\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"delivered_at\": \"2019-06-04T00:57:16Z\",\n \"redelivery\": true,\n \"duration\": 0.28,\n \"status\": \"OK\",\n \"status_code\": 200,\n \"event\": \"issues\",\n \"action\": \"opened\",\n \"installation_id\": 123,\n \"repository_id\": 456\n }\n]\n"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Bad Request"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "hook_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "delivery_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42/deliveries/42",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42/deliveries/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}', {\n org: 'org',\n hook_id: 42,\n delivery_id: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}', {\n org: 'org',\n hook_id: 42,\n delivery_id: 42\n})\n"
}
],
"summary": "Get a webhook delivery for an organization webhook",
"description": "Returns a delivery for a webhook configured in an organization.",
"tags": [
"orgs"
],
"operationId": "orgs/get-webhook-delivery",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
},
"slug": "get-a-webhook-delivery-for-an-organization-webhook",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns a delivery for a webhook configured in an organization.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 12345678,\n \"guid\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"delivered_at\": \"2019-06-03T00:57:16Z\",\n \"redelivery\": false,\n \"duration\": 0.27,\n \"status\": \"OK\",\n \"status_code\": 200,\n \"event\": \"issues\",\n \"action\": \"opened\",\n \"installation_id\": 123,\n \"repository_id\": 456,\n \"url\": \"https://www.example.com\",\n \"request\": {\n \"headers\": {\n \"X-GitHub-Delivery\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"X-Hub-Signature-256\": \"sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"Accept\": \"*/*\",\n \"X-GitHub-Hook-ID\": \"42\",\n \"User-Agent\": \"GitHub-Hookshot/b8c71d8\",\n \"X-GitHub-Event\": \"issues\",\n \"X-GitHub-Hook-Installation-Target-ID\": \"123\",\n \"X-GitHub-Hook-Installation-Target-Type\": \"repository\",\n \"content-type\": \"application/json\",\n \"X-Hub-Signature\": \"sha1=a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\"\n },\n \"payload\": {\n \"action\": \"opened\",\n \"issue\": {\n \"body\": \"foo\"\n },\n \"repository\": {\n \"id\": 123\n }\n }\n },\n \"response\": {\n \"headers\": {\n \"Content-Type\": \"text/html;charset=utf-8\"\n },\n \"payload\": \"ok\"\n }\n}\n"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Bad Request"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "post",
"requestPath": "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "hook_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "delivery_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42/deliveries/42/attempts",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42/deliveries/42/attempts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts', {\n org: 'org',\n hook_id: 42,\n delivery_id: 42\n})",
"html": "await octokit.request('POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts', {\n org: 'org',\n hook_id: 42,\n delivery_id: 42\n})\n"
}
],
"summary": "Redeliver a delivery for an organization webhook",
"description": "Redeliver a delivery for a webhook configured in an organization.",
"tags": [
"orgs"
],
"operationId": "orgs/redeliver-webhook-delivery",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
},
"slug": "redeliver-a-delivery-for-an-organization-webhook",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"responses": [
{
"httpStatusCode": "202",
"httpStatusMessage": "Accepted",
"description": "Accepted"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Bad Request"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [],
"descriptionHTML": "Redeliver a delivery for a webhook configured in an organization.
" }, { "verb": "post", "requestPath": "/orgs/{org}/hooks/{hook_id}/pings", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "hook_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42/pings", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42/pings"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/hooks/{hook_id}/pings', {\n org: 'org',\n hook_id: 42\n})",
"html": "await octokit.request('POST /orgs/{org}/hooks/{hook_id}/pings', {\n org: 'org',\n hook_id: 42\n})\n"
}
],
"summary": "Ping an organization webhook",
"description": "This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook.",
"tags": [
"orgs"
],
"operationId": "orgs/ping-webhook",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
},
"slug": "ping-an-organization-webhook",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "This will trigger a ping event to be sent to the hook.
" }, { "verb": "get", "requestPath": "/orgs/{org}/installation", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/installation", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/installation"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/installation', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/installation', {\n org: 'org'\n})\n"
}
],
"summary": "Get an organization installation for the authenticated app",
"description": "Enables an authenticated GitHub App to find the organization's installation information.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-org-installation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": null
},
"slug": "get-an-organization-installation-for-the-authenticated-app",
"category": "apps",
"categoryLabel": "Apps",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Enables an authenticated GitHub App to find the organization's installation information.
\nYou must use a JWT to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"account\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"html_url\": \"https://github.com/github\",\n \"followers_url\": \"https://api.github.com/users/github/followers\",\n \"following_url\": \"https://api.github.com/users/github/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/github/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/github/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/github/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/github/orgs\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"received_events_url\": \"https://api.github.com/users/github/received_events\",\n \"type\": \"Organization\",\n \"site_admin\": false\n },\n \"repository_selection\": \"all\",\n \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n \"repositories_url\": \"https://api.github.com/installation/repositories\",\n \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n \"app_id\": 1,\n \"target_id\": 1,\n \"target_type\": \"Organization\",\n \"permissions\": {\n \"checks\": \"write\",\n \"metadata\": \"read\",\n \"contents\": \"read\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ],\n \"created_at\": \"2018-02-09T20:51:14Z\",\n \"updated_at\": \"2018-02-09T20:51:14Z\",\n \"single_file_name\": \"config.yml\",\n \"has_multiple_single_files\": true,\n \"single_file_paths\": [\n \"config.yml\",\n \".github/issue_TEMPLATE.md\"\n ],\n \"app_slug\": \"github-actions\",\n \"suspended_at\": null,\n \"suspended_by\": null\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/installations",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/installations", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/installations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/installations', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/installations', {\n org: 'org'\n})\n"
}
],
"summary": "List app installations for an organization",
"description": "Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint.",
"tags": [
"orgs"
],
"operationId": "orgs/list-app-installations",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": null
},
"slug": "list-app-installations-for-an-organization",
"category": "orgs",
"categoryLabel": "Orgs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with admin:read scope to use this endpoint.
{\n \"total_count\": 1,\n \"installations\": [\n {\n \"id\": 25381,\n \"account\": {\n \"login\": \"octo-org\",\n \"id\": 6811672,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjY4MTE2NzI=\",\n \"avatar_url\": \"https://avatars3.githubusercontent.com/u/6811672?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octo-org\",\n \"html_url\": \"https://github.com/octo-org\",\n \"followers_url\": \"https://api.github.com/users/octo-org/followers\",\n \"following_url\": \"https://api.github.com/users/octo-org/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octo-org/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octo-org/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octo-org/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octo-org/orgs\",\n \"repos_url\": \"https://api.github.com/users/octo-org/repos\",\n \"events_url\": \"https://api.github.com/users/octo-org/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octo-org/received_events\",\n \"type\": \"Organization\",\n \"site_admin\": false\n },\n \"repository_selection\": \"selected\",\n \"access_tokens_url\": \"https://api.github.com/app/installations/25381/access_tokens\",\n \"repositories_url\": \"https://api.github.com/installation/repositories\",\n \"html_url\": \"https://github.com/organizations/octo-org/settings/installations/25381\",\n \"app_id\": 2218,\n \"target_id\": 6811672,\n \"target_type\": \"Organization\",\n \"permissions\": {\n \"deployments\": \"write\",\n \"metadata\": \"read\",\n \"pull_requests\": \"read\",\n \"statuses\": \"read\"\n },\n \"events\": [\n \"deployment\",\n \"deployment_status\"\n ],\n \"created_at\": \"2017-05-16T08:47:09.000-07:00\",\n \"updated_at\": \"2017-06-06T11:23:23.000-07:00\",\n \"single_file_name\": \"config.yml\",\n \"has_multiple_single_files\": true,\n \"single_file_paths\": [\n \"config.yml\",\n \".github/issue_TEMPLATE.md\"\n ],\n \"app_slug\": \"github-actions\",\n \"suspended_at\": null,\n \"suspended_by\": null\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/interaction-limits",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/interaction-limits",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/interaction-limits"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/interaction-limits', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/interaction-limits', {\n org: 'org'\n})\n"
}
],
"summary": "Get interaction restrictions for an organization",
"description": "Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response.",
"tags": [
"interactions"
],
"operationId": "interactions/get-restrictions-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "interactions",
"subcategory": "orgs"
},
"slug": "get-interaction-restrictions-for-an-organization",
"category": "interactions",
"categoryLabel": "Interactions",
"subcategory": "orgs",
"subcategoryLabel": "Orgs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"limit\": \"collaborators_only\",\n \"origin\": \"organization\",\n \"expires_at\": \"2018-08-17T04:18:39Z\"\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/orgs/{org}/interaction-limits",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/interaction-limits \\\n -d '{\"limit\":\"limit\"}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/interaction-limits \\\n -d '{\"limit\":\"limit\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/interaction-limits', {\n org: 'org',\n limit: 'limit'\n})",
"html": "await octokit.request('PUT /orgs/{org}/interaction-limits', {\n org: 'org',\n limit: 'limit'\n})\n"
}
],
"summary": "Set interaction restrictions for an organization",
"description": "Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization.",
"tags": [
"interactions"
],
"operationId": "interactions/set-restrictions-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"title": "Interaction Restrictions",
"description": "Limit interactions to a specific type of user for a specified duration",
"type": "object",
"properties": {
"limit": {
"type": "string",
"description": "Required. The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: existing_users, contributors_only, collaborators_only.
The duration of the interaction restriction. Can be one of: one_day, three_days, one_week, one_month, six_months. Default: one_day.
Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization.
", "bodyParameters": [ { "type": "string", "description": "Required. The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: existing_users, contributors_only, collaborators_only.
The duration of the interaction restriction. Can be one of: one_day, three_days, one_week, one_month, six_months. Default: one_day.
{\n \"limit\": \"collaborators_only\",\n \"origin\": \"organization\",\n \"expires_at\": \"2018-08-17T04:18:39Z\"\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/interaction-limits",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/interaction-limits",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/interaction-limits"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/interaction-limits', {\n org: 'org'\n})",
"html": "await octokit.request('DELETE /orgs/{org}/interaction-limits', {\n org: 'org'\n})\n"
}
],
"summary": "Remove interaction restrictions for an organization",
"description": "Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions.",
"tags": [
"interactions"
],
"operationId": "interactions/remove-restrictions-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "interactions",
"subcategory": "orgs"
},
"slug": "remove-interaction-restrictions-for-an-organization",
"category": "interactions",
"categoryLabel": "Interactions",
"subcategory": "orgs",
"subcategoryLabel": "Orgs",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions.
" }, { "verb": "get", "requestPath": "/orgs/{org}/invitations", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/invitations", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/invitations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/invitations', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/invitations', {\n org: 'org'\n})\n"
}
],
"summary": "List pending organization invitations",
"description": "The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.",
"tags": [
"orgs"
],
"operationId": "orgs/list-pending-invitations",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
},
"slug": "list-pending-organization-invitations",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "The return hash contains a role field which refers to the Organization Invitation role and will be one of the following values: direct_member, admin, billing_manager, hiring_manager, or reinstate. If the invitee is not a GitHub member, the login field in the return hash will be null.
[\n {\n \"id\": 1,\n \"login\": \"monalisa\",\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"email\": \"octocat@github.com\",\n \"role\": \"direct_member\",\n \"created_at\": \"2016-11-30T06:46:10-08:00\",\n \"failed_at\": \"\",\n \"failed_reason\": \"\",\n \"inviter\": {\n \"login\": \"other_user\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/other_user\",\n \"html_url\": \"https://github.com/other_user\",\n \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"team_count\": 2,\n \"invitation_teams_url\": \"https://api.github.com/organizations/2/invitations/1/teams\"\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/orgs/{org}/invitations",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/invitations \\\n -d '{\"invitee_id\":42}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/invitations \\\n -d '{\"invitee_id\":42}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/invitations', {\n org: 'org',\n invitee_id: 42\n})",
"html": "await octokit.request('POST /orgs/{org}/invitations', {\n org: 'org',\n invitee_id: 42\n})\n"
}
],
"summary": "Create an organization invitation",
"description": "Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.\n\nThis endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.",
"tags": [
"orgs"
],
"operationId": "orgs/create-invitation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#create-an-organization-invitation"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"invitee_id": {
"type": "integer",
"description": "Required unless you provide email. GitHub user ID for the person you are inviting.
Required unless you provide invitee_id. Email address of the person you are inviting, which can be an existing GitHub user.
Specify role for new member. Can be one of:
\n* admin - Organization owners with full administrative rights to the organization and complete access to all repositories and teams.
\n* direct_member - Non-owner organization members with ability to see other members and join teams by invitation.
\n* billing_manager - Non-owner organization members with ability to manage the billing settings of your organization.
Specify IDs for the teams you want to invite new members to.
", "items": { "type": "integer" }, "name": "team_ids", "in": "body", "rawType": "array", "rawDescription": "Specify IDs for the teams you want to invite new members to.", "childParamsGroups": [] } } }, "example": { "email": "octocat@github.com", "role": "direct_member", "team_ids": [ 12, 26 ] } } } }, "x-github": { "triggersNotification": true, "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "orgs", "subcategory": "members" }, "slug": "create-an-organization-invitation", "category": "orgs", "categoryLabel": "Orgs", "subcategory": "members", "subcategoryLabel": "Members", "contentType": "application/json", "notes": [], "descriptionHTML": "Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.
\nThis endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.
", "bodyParameters": [ { "type": "integer", "description": "Required unless you provide email. GitHub user ID for the person you are inviting.
Required unless you provide invitee_id. Email address of the person you are inviting, which can be an existing GitHub user.
Specify role for new member. Can be one of:
\n* admin - Organization owners with full administrative rights to the organization and complete access to all repositories and teams.
\n* direct_member - Non-owner organization members with ability to see other members and join teams by invitation.
\n* billing_manager - Non-owner organization members with ability to manage the billing settings of your organization.
Specify IDs for the teams you want to invite new members to.
", "items": { "type": "integer" }, "name": "team_ids", "in": "body", "rawType": "array", "rawDescription": "Specify IDs for the teams you want to invite new members to.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 1,\n \"login\": \"monalisa\",\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"email\": \"octocat@github.com\",\n \"role\": \"direct_member\",\n \"created_at\": \"2016-11-30T06:46:10-08:00\",\n \"inviter\": {\n \"login\": \"other_user\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/other_user\",\n \"html_url\": \"https://github.com/other_user\",\n \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"team_count\": 2,\n \"invitation_teams_url\": \"https://api.github.com/organizations/2/invitations/1/teams\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/invitations/{invitation_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "invitation_id",
"description": "invitation_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "invitation_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/invitations/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/invitations/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/invitations/{invitation_id}', {\n org: 'org',\n invitation_id: 42\n})",
"html": "await octokit.request('DELETE /orgs/{org}/invitations/{invitation_id}', {\n org: 'org',\n invitation_id: 42\n})\n"
}
],
"summary": "Cancel an organization invitation",
"description": "Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner.\n\nThis endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications).",
"tags": [
"orgs"
],
"operationId": "orgs/cancel-invitation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation"
},
"x-github": {
"triggersNotification": true,
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
},
"slug": "cancel-an-organization-invitation",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [],
"descriptionHTML": "Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner.
\nThis endpoint triggers notifications.
" }, { "verb": "get", "requestPath": "/orgs/{org}/invitations/{invitation_id}/teams", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "invitation_id", "description": "invitation_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "invitation_id parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/invitations/42/teams", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/invitations/42/teams"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/invitations/{invitation_id}/teams', {\n org: 'org',\n invitation_id: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/invitations/{invitation_id}/teams', {\n org: 'org',\n invitation_id: 42\n})\n"
}
],
"summary": "List organization invitation teams",
"description": "List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner.",
"tags": [
"orgs"
],
"operationId": "orgs/list-invitation-teams",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
},
"slug": "list-organization-invitation-teams",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/issues",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "filter",
"description": "Indicates which sorts of issues to return. Can be one of: \n\\* `assigned`: Issues assigned to you \n\\* `created`: Issues created by you \n\\* `mentioned`: Issues mentioning you \n\\* `subscribed`: Issues you're subscribed to updates for \n\\* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"assigned",
"created",
"mentioned",
"subscribed",
"repos",
"all"
],
"default": "assigned"
},
"descriptionHTML": "Indicates which sorts of issues to return. Can be one of:
\n* assigned: Issues assigned to you
\n* created: Issues created by you
\n* mentioned: Issues mentioning you
\n* subscribed: Issues you're subscribed to updates for
\n* all or repos: All issues the authenticated user can see, regardless of participation or creation
Indicates the state of the issues to return. Can be either open, closed, or all.
A list of comma separated label names. Example: bug,ui,@high
What to sort results by. Can be either created, updated, comments.
One of asc (ascending) or desc (descending).
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/issues", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/issues"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/issues', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/issues', {\n org: 'org'\n})\n"
}
],
"summary": "List organization issues assigned to the authenticated user",
"description": "List issues in an organization assigned to the authenticated user.\n\n**Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe `pull_request` key. Be aware that the `id` of a pull request returned from \"Issues\" endpoints will be an _issue id_. To find out the pull\nrequest id, use the \"[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)\" endpoint.",
"tags": [
"issues"
],
"operationId": "issues/list-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "issues",
"subcategory": null
},
"slug": "list-organization-issues-assigned-to-the-authenticated-user",
"category": "issues",
"categoryLabel": "Issues",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List issues in an organization assigned to the authenticated user.
\nNote: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe pull_request key. Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull\nrequest id, use the \"List pull requests\" endpoint.
[\n {\n \"id\": 1,\n \"node_id\": \"MDU6SXNzdWUx\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n \"number\": 1347,\n \"state\": \"open\",\n \"title\": \"Found a bug\",\n \"body\": \"I'm having a problem with this.\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"locked\": true,\n \"active_lock_reason\": \"too heated\",\n \"comments\": 0,\n \"pull_request\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n },\n \"closed_at\": null,\n \"created_at\": \"2011-04-22T13:33:48Z\",\n \"updated_at\": \"2011-04-22T13:33:48Z\",\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n },\n \"author_association\": \"COLLABORATOR\"\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/members",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "filter",
"description": "Filter members returned in the list. Can be one of: \n\\* `2fa_disabled` - Members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. Available for organization owners. \n\\* `all` - All members the authenticated user can see.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"2fa_disabled",
"all"
],
"default": "all"
},
"descriptionHTML": "Filter members returned in the list. Can be one of:
\n* 2fa_disabled - Members without two-factor authentication enabled. Available for organization owners.
\n* all - All members the authenticated user can see.
Filter members returned by their role. Can be one of:
\n* all - All members of the organization, regardless of role.
\n* admin - Organization owners.
\n* member - Non-owner organization members.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/members", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/members"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/members', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/members', {\n org: 'org'\n})\n"
}
],
"summary": "List organization members",
"description": "List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned.",
"tags": [
"orgs"
],
"operationId": "orgs/list-members",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-organization-members"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
},
"slug": "list-organization-members",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
},
{
"httpStatusCode": "302",
"httpStatusMessage": "Found",
"description": "Response if requester is not an organization member"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/members/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/members/USERNAME",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/members/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/members/{username}', {\n org: 'org',\n username: 'username'\n})",
"html": "await octokit.request('GET /orgs/{org}/members/{username}', {\n org: 'org',\n username: 'username'\n})\n"
}
],
"summary": "Check organization membership for a user",
"description": "Check if a user is, publicly or privately, a member of the organization.",
"tags": [
"orgs"
],
"operationId": "orgs/check-membership-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
},
"slug": "check-organization-membership-for-a-user",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response if requester is an organization member and user is a member"
},
{
"httpStatusCode": "302",
"httpStatusMessage": "Found",
"description": "Response if requester is not an organization member"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if requester is an organization member and user is not a member"
}
],
"bodyParameters": [],
"descriptionHTML": "Check if a user is, publicly or privately, a member of the organization.
" }, { "verb": "delete", "requestPath": "/orgs/{org}/members/{username}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/members/USERNAME", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/members/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/members/{username}', {\n org: 'org',\n username: 'username'\n})",
"html": "await octokit.request('DELETE /orgs/{org}/members/{username}', {\n org: 'org',\n username: 'username'\n})\n"
}
],
"summary": "Remove an organization member",
"description": "Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories.",
"tags": [
"orgs"
],
"operationId": "orgs/remove-member",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#remove-an-organization-member"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
},
"slug": "remove-an-organization-member",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
],
"bodyParameters": [],
"descriptionHTML": "Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories.
" }, { "verb": "get", "requestPath": "/orgs/{org}/memberships/{username}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/memberships/USERNAME", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/memberships/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/memberships/{username}', {\n org: 'org',\n username: 'username'\n})",
"html": "await octokit.request('GET /orgs/{org}/memberships/{username}', {\n org: 'org',\n username: 'username'\n})\n"
}
],
"summary": "Get organization membership for a user",
"description": "In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status.",
"tags": [
"orgs"
],
"operationId": "orgs/get-membership-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
},
"slug": "get-organization-membership-for-a-user",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "In order to get a user's membership with an organization, the authenticated user must be an organization member. The state parameter in the response can be used to identify the user's membership status.
{\n \"url\": \"https://api.github.com/orgs/octocat/memberships/defunkt\",\n \"state\": \"active\",\n \"role\": \"admin\",\n \"organization_url\": \"https://api.github.com/orgs/octocat\",\n \"organization\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\"\n },\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "put",
"requestPath": "/orgs/{org}/memberships/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/memberships/USERNAME \\\n -d '{\"role\":\"role\"}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/memberships/USERNAME \\\n -d '{\"role\":\"role\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/memberships/{username}', {\n org: 'org',\n username: 'username',\n role: 'role'\n})",
"html": "await octokit.request('PUT /orgs/{org}/memberships/{username}', {\n org: 'org',\n username: 'username',\n role: 'role'\n})\n"
}
],
"summary": "Set organization membership for a user",
"description": "Only authenticated organization owners can add a member to the organization or update the member's role.\n\n* If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) will be `pending` until they accept the invitation.\n \n* Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent.\n\n**Rate limits**\n\nTo prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period.",
"tags": [
"orgs"
],
"operationId": "orgs/set-membership-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"role": {
"type": "string",
"description": "The role to give the user in the organization. Can be one of:
\n* admin - The user will become an owner of the organization.
\n* member - The user will become a non-owner member of the organization.
Only authenticated organization owners can add a member to the organization or update the member's role.
\npending until they accept the invitation.role parameter. If the authenticated user changes a member's role to admin, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to member, no email will be sent.Rate limits
\nTo prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period.
", "bodyParameters": [ { "type": "string", "description": "The role to give the user in the organization. Can be one of:
\n* admin - The user will become an owner of the organization.
\n* member - The user will become a non-owner member of the organization.
{\n \"url\": \"https://api.github.com/orgs/octocat/memberships/defunkt\",\n \"state\": \"active\",\n \"role\": \"admin\",\n \"organization_url\": \"https://api.github.com/orgs/octocat\",\n \"organization\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\"\n },\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/memberships/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/memberships/USERNAME",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/memberships/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/memberships/{username}', {\n org: 'org',\n username: 'username'\n})",
"html": "await octokit.request('DELETE /orgs/{org}/memberships/{username}', {\n org: 'org',\n username: 'username'\n})\n"
}
],
"summary": "Remove organization membership for a user",
"description": "In order to remove a user's membership with an organization, the authenticated user must be an organization owner.\n\nIf the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases.",
"tags": [
"orgs"
],
"operationId": "orgs/remove-membership-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
},
"slug": "remove-organization-membership-for-a-user",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "In order to remove a user's membership with an organization, the authenticated user must be an organization owner.
\nIf the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases.
" }, { "verb": "get", "requestPath": "/orgs/{org}/migrations", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" }, { "name": "exclude", "description": "Exclude attributes from the API response to improve performance", "in": "query", "schema": { "type": "array", "items": { "description": "Allowed values that can be passed to the exclude param.", "enum": [ "repositories" ], "example": "repositories", "type": "string" } }, "descriptionHTML": "Exclude attributes from the API response to improve performance
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/migrations", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/migrations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/migrations', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/migrations', {\n org: 'org'\n})\n"
}
],
"summary": "List organization migrations",
"description": "Lists the most recent migrations.",
"tags": [
"migrations"
],
"operationId": "migrations/list-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#list-organization-migrations"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "orgs"
},
"slug": "list-organization-migrations",
"category": "migrations",
"categoryLabel": "Migrations",
"subcategory": "orgs",
"subcategoryLabel": "Orgs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the most recent migrations.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 79,\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"guid\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"state\": \"pending\",\n \"lock_repositories\": true,\n \"exclude_attachments\": false,\n \"exclude_releases\": false,\n \"exclude_owner_projects\": false,\n \"repositories\": [\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n ],\n \"url\": \"https://api.github.com/orgs/octo-org/migrations/79\",\n \"created_at\": \"2015-07-06T15:33:38-07:00\",\n \"updated_at\": \"2015-07-06T15:33:38-07:00\",\n \"node_id\": \"MDQ6VXNlcjE=\"\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/orgs/{org}/migrations",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/migrations \\\n -d '{\"repositories\":[\"repositories\"]}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/migrations \\\n -d '{\"repositories\":[\"repositories\"]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/migrations', {\n org: 'org',\n repositories: [\n 'repositories'\n ]\n})",
"html": "await octokit.request('POST /orgs/{org}/migrations', {\n org: 'org',\n repositories: [\n 'repositories'\n ]\n})\n"
}
],
"summary": "Start an organization migration",
"description": "Initiates the generation of a migration archive.",
"tags": [
"migrations"
],
"operationId": "migrations/start-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#start-an-organization-migration"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"repositories": {
"type": "array of strings",
"description": "Required. A list of arrays indicating which repositories should be migrated.
", "items": { "type": "string" }, "name": "repositories", "in": "body", "rawType": "array", "rawDescription": "A list of arrays indicating which repositories should be migrated.", "childParamsGroups": [] }, "lock_repositories": { "type": "boolean", "example": true, "description": "Indicates whether repositories should be locked (to prevent manipulation) while migrating data.
", "default": false, "name": "lock_repositories", "in": "body", "rawType": "boolean", "rawDescription": "Indicates whether repositories should be locked (to prevent manipulation) while migrating data.", "childParamsGroups": [] }, "exclude_attachments": { "type": "boolean", "example": true, "description": "Indicates whether attachments should be excluded from the migration (to reduce migration archive file size).
", "default": false, "name": "exclude_attachments", "in": "body", "rawType": "boolean", "rawDescription": "Indicates whether attachments should be excluded from the migration (to reduce migration archive file size).", "childParamsGroups": [] }, "exclude_releases": { "type": "boolean", "example": true, "description": "Indicates whether releases should be excluded from the migration (to reduce migration archive file size).
", "default": false, "name": "exclude_releases", "in": "body", "rawType": "boolean", "rawDescription": "Indicates whether releases should be excluded from the migration (to reduce migration archive file size).", "childParamsGroups": [] }, "exclude_owner_projects": { "type": "boolean", "example": true, "description": "Indicates whether projects owned by the organization or users should be excluded. from the migration.
", "default": false, "name": "exclude_owner_projects", "in": "body", "rawType": "boolean", "rawDescription": "Indicates whether projects owned by the organization or users should be excluded. from the migration.", "childParamsGroups": [] }, "exclude": { "type": "array of strings", "items": { "type": "string", "enum": [ "repositories" ] }, "name": "exclude", "in": "body", "rawType": "array", "description": "", "childParamsGroups": [] } }, "required": [ "repositories" ] }, "example": { "repositories": [ "github/Hello-World" ], "lock_repositories": true } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "migrations", "subcategory": "orgs" }, "slug": "start-an-organization-migration", "category": "migrations", "categoryLabel": "Migrations", "subcategory": "orgs", "subcategoryLabel": "Orgs", "contentType": "application/json", "notes": [], "descriptionHTML": "Initiates the generation of a migration archive.
", "bodyParameters": [ { "type": "array of strings", "description": "Required. A list of arrays indicating which repositories should be migrated.
", "items": { "type": "string" }, "name": "repositories", "in": "body", "rawType": "array", "rawDescription": "A list of arrays indicating which repositories should be migrated.", "childParamsGroups": [] }, { "type": "boolean", "example": true, "description": "Indicates whether repositories should be locked (to prevent manipulation) while migrating data.
", "default": false, "name": "lock_repositories", "in": "body", "rawType": "boolean", "rawDescription": "Indicates whether repositories should be locked (to prevent manipulation) while migrating data.", "childParamsGroups": [] }, { "type": "boolean", "example": true, "description": "Indicates whether attachments should be excluded from the migration (to reduce migration archive file size).
", "default": false, "name": "exclude_attachments", "in": "body", "rawType": "boolean", "rawDescription": "Indicates whether attachments should be excluded from the migration (to reduce migration archive file size).", "childParamsGroups": [] }, { "type": "boolean", "example": true, "description": "Indicates whether releases should be excluded from the migration (to reduce migration archive file size).
", "default": false, "name": "exclude_releases", "in": "body", "rawType": "boolean", "rawDescription": "Indicates whether releases should be excluded from the migration (to reduce migration archive file size).", "childParamsGroups": [] }, { "type": "boolean", "example": true, "description": "Indicates whether projects owned by the organization or users should be excluded. from the migration.
", "default": false, "name": "exclude_owner_projects", "in": "body", "rawType": "boolean", "rawDescription": "Indicates whether projects owned by the organization or users should be excluded. from the migration.", "childParamsGroups": [] }, { "type": "array of strings", "items": { "type": "string", "enum": [ "repositories" ] }, "name": "exclude", "in": "body", "rawType": "array", "description": "", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 79,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"guid\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"state\": \"pending\",\n \"lock_repositories\": true,\n \"exclude_attachments\": false,\n \"exclude_releases\": false,\n \"exclude_owner_projects\": false,\n \"repositories\": [\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n ],\n \"url\": \"https://api.github.com/orgs/octo-org/migrations/79\",\n \"created_at\": \"2015-07-06T15:33:38-07:00\",\n \"updated_at\": \"2015-07-06T15:33:38-07:00\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/migrations/{migration_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "migration_id",
"description": "migration_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "migration_id parameter
" }, { "name": "exclude", "description": "Exclude attributes from the API response to improve performance", "in": "query", "schema": { "type": "array", "items": { "description": "Allowed values that can be passed to the exclude param.", "enum": [ "repositories" ], "example": "repositories", "type": "string" } }, "descriptionHTML": "Exclude attributes from the API response to improve performance
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/migrations/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/migrations/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/migrations/{migration_id}', {\n org: 'org',\n migration_id: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/migrations/{migration_id}', {\n org: 'org',\n migration_id: 42\n})\n"
}
],
"summary": "Get an organization migration status",
"description": "Fetches the status of a migration.\n\nThe `state` of a migration can be one of the following values:\n\n* `pending`, which means the migration hasn't started yet.\n* `exporting`, which means the migration is in progress.\n* `exported`, which means the migration finished successfully.\n* `failed`, which means the migration failed.",
"tags": [
"migrations"
],
"operationId": "migrations/get-status-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "orgs"
},
"slug": "get-an-organization-migration-status",
"category": "migrations",
"categoryLabel": "Migrations",
"subcategory": "orgs",
"subcategoryLabel": "Orgs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Fetches the status of a migration.
\nThe state of a migration can be one of the following values:
pending, which means the migration hasn't started yet.exporting, which means the migration is in progress.exported, which means the migration finished successfully.failed, which means the migration failed.{\n \"id\": 79,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"guid\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"state\": \"exported\",\n \"lock_repositories\": true,\n \"exclude_attachments\": false,\n \"exclude_releases\": false,\n \"exclude_owner_projects\": false,\n \"repositories\": [\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n ],\n \"url\": \"https://api.github.com/orgs/octo-org/migrations/79\",\n \"created_at\": \"2015-07-06T15:33:38-07:00\",\n \"updated_at\": \"2015-07-06T15:33:38-07:00\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/migrations/{migration_id}/archive",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "migration_id",
"description": "migration_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "migration_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/migrations/42/archive", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/migrations/42/archive"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/migrations/{migration_id}/archive', {\n org: 'org',\n migration_id: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/migrations/{migration_id}/archive', {\n org: 'org',\n migration_id: 42\n})\n"
}
],
"summary": "Download an organization migration archive",
"description": "Fetches the URL to a migration archive.",
"tags": [
"migrations"
],
"operationId": "migrations/download-archive-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "orgs"
},
"slug": "download-an-organization-migration-archive",
"category": "migrations",
"categoryLabel": "Migrations",
"subcategory": "orgs",
"subcategoryLabel": "Orgs",
"notes": [],
"responses": [
{
"httpStatusCode": "302",
"httpStatusMessage": "Found",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Fetches the URL to a migration archive.
" }, { "verb": "delete", "requestPath": "/orgs/{org}/migrations/{migration_id}/archive", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "migration_id", "description": "migration_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "migration_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/migrations/42/archive", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/migrations/42/archive"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/migrations/{migration_id}/archive', {\n org: 'org',\n migration_id: 42\n})",
"html": "await octokit.request('DELETE /orgs/{org}/migrations/{migration_id}/archive', {\n org: 'org',\n migration_id: 42\n})\n"
}
],
"summary": "Delete an organization migration archive",
"description": "Deletes a previous migration archive. Migration archives are automatically deleted after seven days.",
"tags": [
"migrations"
],
"operationId": "migrations/delete-archive-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "orgs"
},
"slug": "delete-an-organization-migration-archive",
"category": "migrations",
"categoryLabel": "Migrations",
"subcategory": "orgs",
"subcategoryLabel": "Orgs",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes a previous migration archive. Migration archives are automatically deleted after seven days.
" }, { "verb": "delete", "requestPath": "/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "migration_id", "description": "migration_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "migration_id parameter
" }, { "name": "repo_name", "description": "repo_name parameter", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "repo_name parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/migrations/42/repos/REPO_NAME/lock", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/migrations/42/repos/REPO_NAME/lock"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock', {\n org: 'org',\n migration_id: 42,\n repo_name: 'repo_name'\n})",
"html": "await octokit.request('DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock', {\n org: 'org',\n migration_id: 42,\n repo_name: 'repo_name'\n})\n"
}
],
"summary": "Unlock an organization repository",
"description": "Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data.",
"tags": [
"migrations"
],
"operationId": "migrations/unlock-repo-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "orgs"
},
"slug": "unlock-an-organization-repository",
"category": "migrations",
"categoryLabel": "Migrations",
"subcategory": "orgs",
"subcategoryLabel": "Orgs",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Unlocks a repository that was locked for migration. You should unlock each migrated repository and delete them when the migration is complete and you no longer need the source data.
" }, { "verb": "get", "requestPath": "/orgs/{org}/migrations/{migration_id}/repositories", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "migration_id", "description": "migration_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "migration_id parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/migrations/42/repositories", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/migrations/42/repositories"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/migrations/{migration_id}/repositories', {\n org: 'org',\n migration_id: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/migrations/{migration_id}/repositories', {\n org: 'org',\n migration_id: 42\n})\n"
}
],
"summary": "List repositories in an organization migration",
"description": "List all the repositories for this organization migration.",
"tags": [
"migrations"
],
"operationId": "migrations/list-repos-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "orgs"
},
"slug": "list-repositories-in-an-organization-migration",
"category": "migrations",
"categoryLabel": "Migrations",
"subcategory": "orgs",
"subcategoryLabel": "Orgs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List all the repositories for this organization migration.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n }\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/outside_collaborators",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "filter",
"description": "Filter the list of outside collaborators. Can be one of: \n\\* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. \n\\* `all`: All outside collaborators.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"2fa_disabled",
"all"
],
"default": "all"
},
"descriptionHTML": "Filter the list of outside collaborators. Can be one of:
\n* 2fa_disabled: Outside collaborators without two-factor authentication enabled.
\n* all: All outside collaborators.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/outside_collaborators", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/outside_collaborators"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/outside_collaborators', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/outside_collaborators', {\n org: 'org'\n})\n"
}
],
"summary": "List outside collaborators for an organization",
"description": "List all users who are outside collaborators of an organization.",
"tags": [
"orgs"
],
"operationId": "orgs/list-outside-collaborators",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "outside-collaborators"
},
"slug": "list-outside-collaborators-for-an-organization",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "outside-collaborators",
"subcategoryLabel": "Outside collaborators",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List all users who are outside collaborators of an organization.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
}
]
},
{
"verb": "put",
"requestPath": "/orgs/{org}/outside_collaborators/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/outside_collaborators/USERNAME",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/outside_collaborators/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/outside_collaborators/{username}', {\n org: 'org',\n username: 'username'\n})",
"html": "await octokit.request('PUT /orgs/{org}/outside_collaborators/{username}', {\n org: 'org',\n username: 'username'\n})\n"
}
],
"summary": "Convert an organization member to outside collaborator",
"description": "When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see \"[Converting an organization member to an outside collaborator](https://help.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)\".",
"tags": [
"orgs"
],
"operationId": "orgs/convert-member-to-outside-collaborator",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "outside-collaborators"
},
"slug": "convert-an-organization-member-to-outside-collaborator",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "outside-collaborators",
"subcategoryLabel": "Outside collaborators",
"notes": [],
"responses": [
{
"httpStatusCode": "202",
"httpStatusMessage": "Accepted",
"description": "User is getting converted asynchronously"
},
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "User was converted"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden if user is the last owner of the organization or not a member of the organization"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see \"Converting an organization member to an outside collaborator\".
" }, { "verb": "delete", "requestPath": "/orgs/{org}/outside_collaborators/{username}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/outside_collaborators/USERNAME", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/outside_collaborators/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/outside_collaborators/{username}', {\n org: 'org',\n username: 'username'\n})",
"html": "await octokit.request('DELETE /orgs/{org}/outside_collaborators/{username}', {\n org: 'org',\n username: 'username'\n})\n"
}
],
"summary": "Remove outside collaborator from an organization",
"description": "Removing a user from this list will remove them from all the organization's repositories.",
"tags": [
"orgs"
],
"operationId": "orgs/remove-outside-collaborator",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "outside-collaborators"
},
"slug": "remove-outside-collaborator-from-an-organization",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "outside-collaborators",
"subcategoryLabel": "Outside collaborators",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Removing a user from this list will remove them from all the organization's repositories.
", "responses": [ { "httpStatusCode": "204", "httpStatusMessage": "No Content", "description": "Response" }, { "httpStatusCode": "422", "httpStatusMessage": "Unprocessable Entity", "description": "Unprocessable Entity if user is a member of the organization", "payload": "{\n \"message\": \"You cannot specify an organization member to remove as an outside collaborator.\",\n \"documentation_url\": \"https://docs.github.com/rest/reference/orgs#remove-outside-collaborator\"\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/packages",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "package_type",
"description": "The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"in": "query",
"required": true,
"schema": {
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"descriptionHTML": "The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The selected visibility of the packages. Can be one of public, private, or internal. Only container package_types currently support internal visibility properly. For other ecosystems internal is synonymous with private. This parameter is optional and only filters an existing result set.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/packages"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/packages', {\n package_type: 'package_type',\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/packages', {\n package_type: 'package_type',\n org: 'org'\n})\n"
}
],
"summary": "List packages for an organization",
"description": "Lists all packages in an organization readable by the user.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.",
"tags": [
"packages"
],
"operationId": "packages/list-packages-for-organization",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#list-packages-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "list-packages-for-an-organization",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all packages in an organization readable by the user.
\nTo use this endpoint, you must authenticate using an access token with the packages:read scope.\nIf package_type is not container, your token must also include the repo scope.
[\n {\n \"id\": 197,\n \"name\": \"hello_docker\",\n \"package_type\": \"container\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 9919,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjk5MTk=\",\n \"avatar_url\": \"https://avatars.githubusercontent.com/u/9919?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/github\",\n \"html_url\": \"https://github.com/github\",\n \"followers_url\": \"https://api.github.com/users/github/followers\",\n \"following_url\": \"https://api.github.com/users/github/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/github/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/github/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/github/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/github/orgs\",\n \"repos_url\": \"https://api.github.com/users/github/repos\",\n \"events_url\": \"https://api.github.com/users/github/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/github/received_events\",\n \"type\": \"Organization\",\n \"site_admin\": false\n },\n \"version_count\": 1,\n \"visibility\": \"private\",\n \"url\": \"https://api.github.com/orgs/github/packages/container/hello_docker\",\n \"created_at\": \"2020-05-19T22:19:11Z\",\n \"updated_at\": \"2020-05-19T22:19:11Z\",\n \"html_url\": \"https://github.com/orgs/github/packages/container/package/hello_docker\"\n },\n {\n \"id\": 198,\n \"name\": \"goodbye_docker\",\n \"package_type\": \"container\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 9919,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjk5MTk=\",\n \"avatar_url\": \"https://avatars.githubusercontent.com/u/9919?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/github\",\n \"html_url\": \"https://github.com/github\",\n \"followers_url\": \"https://api.github.com/users/github/followers\",\n \"following_url\": \"https://api.github.com/users/github/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/github/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/github/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/github/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/github/orgs\",\n \"repos_url\": \"https://api.github.com/users/github/repos\",\n \"events_url\": \"https://api.github.com/users/github/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/github/received_events\",\n \"type\": \"Organization\",\n \"site_admin\": false\n },\n \"version_count\": 2,\n \"visibility\": \"private\",\n \"url\": \"https://api.github.com/orgs/github/packages/container/goodbye_docker\",\n \"created_at\": \"2020-05-20T22:19:11Z\",\n \"updated_at\": \"2020-05-20T22:19:11Z\",\n \"html_url\": \"https://github.com/orgs/github/packages/container/package/goodbye_docker\"\n }\n]\n"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/packages/{package_type}/{package_name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "package_type",
"description": "The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"descriptionHTML": "The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/packages/PACKAGE_TYPE/PACKAGE_NAME", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/packages/PACKAGE_TYPE/PACKAGE_NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/packages/{package_type}/{package_name}', {\n package_type: 'package_type',\n package_name: 'package_name',\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/packages/{package_type}/{package_name}', {\n package_type: 'package_type',\n package_name: 'package_name',\n org: 'org'\n})\n"
}
],
"summary": "Get a package for an organization",
"description": "Gets a specific package in an organization.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.",
"tags": [
"packages"
],
"operationId": "packages/get-package-for-organization",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "get-a-package-for-an-organization",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a specific package in an organization.
\nTo use this endpoint, you must authenticate using an access token with the packages:read scope.\nIf package_type is not container, your token must also include the repo scope.
{\n \"id\": 197,\n \"name\": \"hello_docker\",\n \"package_type\": \"container\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 9919,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjk5MTk=\",\n \"avatar_url\": \"https://avatars.githubusercontent.com/u/9919?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/github\",\n \"html_url\": \"https://github.com/github\",\n \"followers_url\": \"https://api.github.com/users/github/followers\",\n \"following_url\": \"https://api.github.com/users/github/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/github/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/github/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/github/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/github/orgs\",\n \"repos_url\": \"https://api.github.com/users/github/repos\",\n \"events_url\": \"https://api.github.com/users/github/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/github/received_events\",\n \"type\": \"Organization\",\n \"site_admin\": false\n },\n \"version_count\": 1,\n \"visibility\": \"private\",\n \"url\": \"https://api.github.com/orgs/github/packages/container/hello_docker\",\n \"created_at\": \"2020-05-19T22:19:11Z\",\n \"updated_at\": \"2020-05-19T22:19:11Z\",\n \"html_url\": \"https://github.com/orgs/github/packages/container/package/hello_docker\"\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/packages/{package_type}/{package_name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "package_type",
"description": "The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"descriptionHTML": "The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/packages/PACKAGE_TYPE/PACKAGE_NAME", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/packages/PACKAGE_TYPE/PACKAGE_NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/packages/{package_type}/{package_name}', {\n package_type: 'package_type',\n package_name: 'package_name',\n org: 'org'\n})",
"html": "await octokit.request('DELETE /orgs/{org}/packages/{package_type}/{package_name}', {\n package_type: 'package_type',\n package_name: 'package_name',\n org: 'org'\n})\n"
}
],
"summary": "Delete a package for an organization",
"description": "Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.\n\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition:\n- If `package_type` is not `container`, your token must also include the `repo` scope.\n- If `package_type` is `container`, you must also have admin permissions to the container you want to delete.",
"tags": [
"packages"
],
"operationId": "packages/delete-package-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "delete-a-package-for-an-organization",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read and packages:delete scopes. In addition:
package_type is not container, your token must also include the repo scope.package_type is container, you must also have admin permissions to the container you want to delete.The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "token", "description": "package token", "schema": { "type": "string" }, "required": false, "in": "query", "descriptionHTML": "package token
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/packages/PACKAGE_TYPE/PACKAGE_NAME/restore", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/packages/PACKAGE_TYPE/PACKAGE_NAME/restore"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/packages/{package_type}/{package_name}/restore', {\n package_type: 'package_type',\n package_name: 'package_name',\n org: 'org'\n})",
"html": "await octokit.request('POST /orgs/{org}/packages/{package_type}/{package_name}/restore', {\n package_type: 'package_type',\n package_name: 'package_name',\n org: 'org'\n})\n"
}
],
"summary": "Restore a package for an organization",
"description": "Restores an entire package in an organization.\n\nYou can restore a deleted package under the following conditions:\n - The package was deleted within the last 30 days.\n - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.\n\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition:\n- If `package_type` is not `container`, your token must also include the `repo` scope.\n- If `package_type` is `container`, you must also have admin permissions to the container that you want to restore.",
"tags": [
"packages"
],
"operationId": "packages/restore-package-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "restore-a-package-for-an-organization",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Restores an entire package in an organization.
\nYou can restore a deleted package under the following conditions:
\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read and packages:write scopes. In addition:
package_type is not container, your token must also include the repo scope.package_type is container, you must also have admin permissions to the container that you want to restore.The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "state", "in": "query", "required": false, "description": "The state of the package, either active or deleted.", "schema": { "type": "string", "enum": [ "active", "deleted" ], "default": "active" }, "descriptionHTML": "The state of the package, either active or deleted.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/packages/PACKAGE_TYPE/PACKAGE_NAME/versions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/packages/PACKAGE_TYPE/PACKAGE_NAME/versions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/packages/{package_type}/{package_name}/versions', {\n package_type: 'package_type',\n package_name: 'package_name',\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/packages/{package_type}/{package_name}/versions', {\n package_type: 'package_type',\n package_name: 'package_name',\n org: 'org'\n})\n"
}
],
"summary": "Get all package versions for a package owned by an organization",
"description": "Returns all package versions for a package owned by an organization.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.",
"tags": [
"packages"
],
"operationId": "packages/get-all-package-versions-for-package-owned-by-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "get-all-package-versions-for-a-package-owned-by-an-organization",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns all package versions for a package owned by an organization.
\nTo use this endpoint, you must authenticate using an access token with the packages:read scope.\nIf package_type is not container, your token must also include the repo scope.
[\n {\n \"id\": 245301,\n \"name\": \"1.0.4\",\n \"url\": \"https://api.github.com/orgs/octo-org/packages/npm/hello-world-npm/versions/245301\",\n \"package_html_url\": \"https://github.com/octo-org/hello-world-npm/packages/43752\",\n \"created_at\": \"2019-11-05T22:49:04Z\",\n \"updated_at\": \"2019-11-05T22:49:04Z\",\n \"html_url\": \"https://github.com/octo-org/hello-world-npm/packages/43752?version=1.0.4\",\n \"metadata\": {\n \"package_type\": \"npm\"\n }\n },\n {\n \"id\": 209672,\n \"name\": \"1.0.3\",\n \"url\": \"https://api.github.com/orgs/octo-org/packages/npm/hello-world-npm/versions/209672\",\n \"package_html_url\": \"https://github.com/octo-org/hello-world-npm/packages/43752\",\n \"created_at\": \"2019-10-29T15:42:11Z\",\n \"updated_at\": \"2019-10-29T15:42:12Z\",\n \"html_url\": \"https://github.com/octo-org/hello-world-npm/packages/43752?version=1.0.3\",\n \"metadata\": {\n \"package_type\": \"npm\"\n }\n }\n]\n"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "package_type",
"description": "The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"descriptionHTML": "The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "package_version_id", "description": "Unique identifier of the package version.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the package version.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}', {\n package_type: 'package_type',\n package_name: 'package_name',\n org: 'org',\n package_version_id: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}', {\n package_type: 'package_type',\n package_name: 'package_name',\n org: 'org',\n package_version_id: 42\n})\n"
}
],
"summary": "Get a package version for an organization",
"description": "Gets a specific package version in an organization.\n\nYou must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.",
"tags": [
"packages"
],
"operationId": "packages/get-package-version-for-organization",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "get-a-package-version-for-an-organization",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a specific package version in an organization.
\nYou must authenticate using an access token with the packages:read scope.\nIf package_type is not container, your token must also include the repo scope.
{\n \"id\": 836,\n \"name\": \"sha256:b3d3e366b55f9a54599220198b3db5da8f53592acbbb7dc7e4e9878762fc5344\",\n \"url\": \"https://api.github.com/orgs/github/packages/container/hello_docker/versions/836\",\n \"package_html_url\": \"https://github.com/orgs/github/packages/container/package/hello_docker\",\n \"created_at\": \"2020-05-19T22:19:11Z\",\n \"updated_at\": \"2020-05-19T22:19:11Z\",\n \"html_url\": \"https://github.com/orgs/github/packages/container/hello_docker/836\",\n \"metadata\": {\n \"package_type\": \"container\",\n \"container\": {\n \"tags\": [\n \"latest\"\n ]\n }\n }\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "package_type",
"description": "The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"descriptionHTML": "The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "package_version_id", "description": "Unique identifier of the package version.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the package version.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}', {\n package_type: 'package_type',\n package_name: 'package_name',\n org: 'org',\n package_version_id: 42\n})",
"html": "await octokit.request('DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}', {\n package_type: 'package_type',\n package_name: 'package_name',\n org: 'org',\n package_version_id: 42\n})\n"
}
],
"summary": "Delete package version for an organization",
"description": "Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.\n\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition:\n- If `package_type` is not `container`, your token must also include the `repo` scope.\n- If `package_type` is `container`, you must also have admin permissions to the container you want to delete.",
"tags": [
"packages"
],
"operationId": "packages/delete-package-version-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "delete-package-version-for-an-organization",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read and packages:delete scopes. In addition:
package_type is not container, your token must also include the repo scope.package_type is container, you must also have admin permissions to the container you want to delete.The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "package_version_id", "description": "Unique identifier of the package version.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the package version.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42/restore", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42/restore"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore', {\n package_type: 'package_type',\n package_name: 'package_name',\n org: 'org',\n package_version_id: 42\n})",
"html": "await octokit.request('POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore', {\n package_type: 'package_type',\n package_name: 'package_name',\n org: 'org',\n package_version_id: 42\n})\n"
}
],
"summary": "Restore package version for an organization",
"description": "Restores a specific package version in an organization.\n\nYou can restore a deleted package under the following conditions:\n - The package was deleted within the last 30 days.\n - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.\n\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition:\n- If `package_type` is not `container`, your token must also include the `repo` scope.\n- If `package_type` is `container`, you must also have admin permissions to the container that you want to restore.",
"tags": [
"packages"
],
"operationId": "packages/restore-package-version-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "restore-package-version-for-an-organization",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Restores a specific package version in an organization.
\nYou can restore a deleted package under the following conditions:
\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read and packages:write scopes. In addition:
package_type is not container, your token must also include the repo scope.package_type is container, you must also have admin permissions to the container that you want to restore.Indicates the state of the projects to return. Can be either open, closed, or all.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/projects", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/projects"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/projects', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/projects', {\n org: 'org'\n})\n"
}
],
"summary": "List organization projects",
"description": "Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.",
"tags": [
"projects"
],
"operationId": "projects/list-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#list-organization-projects"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": null
},
"slug": "list-organization-projects",
"category": "projects",
"categoryLabel": "Projects",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the projects in an organization. Returns a 404 Not Found status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
[\n {\n \"owner_url\": \"https://api.github.com/orgs/octocat\",\n \"url\": \"https://api.github.com/projects/1002605\",\n \"html_url\": \"https://github.com/orgs/api-playground/projects/1\",\n \"columns_url\": \"https://api.github.com/projects/1002605/columns\",\n \"id\": 1002605,\n \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDU=\",\n \"name\": \"Organization Roadmap\",\n \"body\": \"High-level roadmap for the upcoming year.\",\n \"number\": 1,\n \"state\": \"open\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-11T20:09:31Z\",\n \"updated_at\": \"2014-03-04T18:58:10Z\"\n }\n]\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "post",
"requestPath": "/orgs/{org}/projects",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/projects \\\n -d '{\"name\":\"name\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/projects \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/projects', {\n org: 'org',\n name: 'name'\n})",
"html": "await octokit.request('POST /orgs/{org}/projects', {\n org: 'org',\n name: 'name'\n})\n"
}
],
"summary": "Create an organization project",
"description": "Creates an organization project board. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.",
"tags": [
"projects"
],
"operationId": "projects/create-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#create-an-organization-project"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Required. The name of the project.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the project.", "childParamsGroups": [] }, "body": { "type": "string", "description": "The description of the project.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The description of the project.", "childParamsGroups": [] } }, "required": [ "name" ] }, "example": { "name": "Organization Roadmap", "body": "High-level roadmap for the upcoming year." } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "projects", "subcategory": null }, "slug": "create-an-organization-project", "category": "projects", "categoryLabel": "Projects", "contentType": "application/json", "notes": [], "descriptionHTML": "Creates an organization project board. Returns a 404 Not Found status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
Required. The name of the project.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the project.", "childParamsGroups": [] }, { "type": "string", "description": "The description of the project.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The description of the project.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"owner_url\": \"https://api.github.com/orgs/octocat\",\n \"url\": \"https://api.github.com/projects/1002605\",\n \"html_url\": \"https://github.com/orgs/api-playground/projects/1\",\n \"columns_url\": \"https://api.github.com/projects/1002605/columns\",\n \"id\": 1002605,\n \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDU=\",\n \"name\": \"Organization Roadmap\",\n \"body\": \"High-level roadmap for the upcoming year.\",\n \"number\": 1,\n \"state\": \"open\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-11T20:09:31Z\",\n \"updated_at\": \"2014-03-04T18:58:10Z\"\n}\n"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/public_members",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/public_members", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/public_members"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/public_members', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/public_members', {\n org: 'org'\n})\n"
}
],
"summary": "List public organization members",
"description": "Members of an organization can choose to have their membership publicized or not.",
"tags": [
"orgs"
],
"operationId": "orgs/list-public-members",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-public-organization-members"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
},
"slug": "list-public-organization-members",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Members of an organization can choose to have their membership publicized or not.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/public_members/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/public_members/USERNAME",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/public_members/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/public_members/{username}', {\n org: 'org',\n username: 'username'\n})",
"html": "await octokit.request('GET /orgs/{org}/public_members/{username}', {\n org: 'org',\n username: 'username'\n})\n"
}
],
"summary": "Check public organization membership for a user",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/check-public-membership-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
},
"slug": "check-public-organization-membership-for-a-user",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response if user is a public member"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if user is not a public member"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "put",
"requestPath": "/orgs/{org}/public_members/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/public_members/USERNAME",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/public_members/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/public_members/{username}', {\n org: 'org',\n username: 'username'\n})",
"html": "await octokit.request('PUT /orgs/{org}/public_members/{username}', {\n org: 'org',\n username: 'username'\n})\n"
}
],
"summary": "Set public organization membership for the authenticated user",
"description": "The user can publicize their own membership. (A user cannot publicize the membership for another user.)\n\nNote that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"",
"tags": [
"orgs"
],
"operationId": "orgs/set-public-membership-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "orgs",
"subcategory": "members"
},
"slug": "set-public-organization-membership-for-the-authenticated-user",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
],
"bodyParameters": [],
"descriptionHTML": "The user can publicize their own membership. (A user cannot publicize the membership for another user.)
\nNote that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/public_members/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/public_members/{username}', {\n org: 'org',\n username: 'username'\n})",
"html": "await octokit.request('DELETE /orgs/{org}/public_members/{username}', {\n org: 'org',\n username: 'username'\n})\n"
}
],
"summary": "Remove public organization membership for the authenticated user",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/remove-public-membership-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "orgs",
"subcategory": "members"
},
"slug": "remove-public-organization-membership-for-the-authenticated-user",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/orgs/{org}/repos",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "type",
"description": "Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Note: For GitHub AE, can be one of `all`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"all",
"public",
"private",
"forks",
"sources",
"member",
"internal"
]
},
"descriptionHTML": "Specifies the types of repositories you want returned. Can be one of all, public, private, forks, sources, member, internal. Note: For GitHub AE, can be one of all, private, forks, sources, member, internal. Default: all. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, type can also be internal. However, the internal value is not yet supported when a GitHub App calls this API with an installation access token.
Can be one of created, updated, pushed, full_name.
Can be one of asc or desc. Default: when using full_name: asc, otherwise desc
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/repos", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/repos"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/repos', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/repos', {\n org: 'org'\n})\n"
}
],
"summary": "List organization repositories",
"description": "Lists repositories for the specified organization.",
"tags": [
"repos"
],
"operationId": "repos/list-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-organization-repositories"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
},
"slug": "list-organization-repositories",
"category": "repos",
"categoryLabel": "Repos",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists repositories for the specified organization.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n }\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/orgs/{org}/repos",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/repos \\\n -d '{\"name\":\"name\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/repos \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/repos', {\n org: 'org',\n name: 'name'\n})",
"html": "await octokit.request('POST /orgs/{org}/repos', {\n org: 'org',\n name: 'name'\n})\n"
}
],
"summary": "Create an organization repository",
"description": "Creates a new repository in the specified organization. The authenticated user must be a member of the organization.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.\n* `repo` scope to create a private repository",
"tags": [
"repos"
],
"operationId": "repos/create-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-an-organization-repository"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Required. The name of the repository.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the repository.", "childParamsGroups": [] }, "description": { "type": "string", "description": "A short description of the repository.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short description of the repository.", "childParamsGroups": [] }, "homepage": { "type": "string", "description": "A URL with more information about the repository.
", "name": "homepage", "in": "body", "rawType": "string", "rawDescription": "A URL with more information about the repository.", "childParamsGroups": [] }, "private": { "type": "boolean", "description": "Whether the repository is private.
", "default": false, "name": "private", "in": "body", "rawType": "boolean", "rawDescription": "Whether the repository is private.", "childParamsGroups": [] }, "visibility": { "type": "string", "description": "Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see \"Creating an internal repository\" in the GitHub Help documentation.
Either true to enable issues for this repository or false to disable them.
Either true to enable projects for this repository or false to disable them. Note: If you're creating a repository in an organization that has disabled repository projects, the default is false, and if you pass true, the API returns an error.
Either true to enable the wiki for this repository or false to disable it.
Either true to make this repo available as a template repository or false to prevent it.
The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.
", "name": "team_id", "in": "body", "rawType": "integer", "rawDescription": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.", "childParamsGroups": [] }, "auto_init": { "type": "boolean", "description": "Pass true to create an initial commit with empty README.
Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, \"Haskell\".
", "name": "gitignore_template", "in": "body", "rawType": "string", "rawDescription": "Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, \"Haskell\".", "childParamsGroups": [] }, "license_template": { "type": "string", "description": "Choose an open source license template that best suits your needs, and then use the license keyword as the license_template string. For example, \"mit\" or \"mpl-2.0\".
Either true to allow squash-merging pull requests, or false to prevent squash-merging.
Either true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.
Either true to allow rebase-merging pull requests, or false to prevent rebase-merging.
Either true to allow auto-merge on pull requests, or false to disallow auto-merge.
Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion.
Creates a new repository in the specified organization. The authenticated user must be a member of the organization.
\nOAuth scope requirements
\nWhen using OAuth, authorizations must include:
\npublic_repo scope or repo scope to create a public repository. Note: For GitHub AE, use repo scope to create an internal repository.repo scope to create a private repositoryRequired. The name of the repository.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the repository.", "childParamsGroups": [] }, { "type": "string", "description": "A short description of the repository.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short description of the repository.", "childParamsGroups": [] }, { "type": "string", "description": "A URL with more information about the repository.
", "name": "homepage", "in": "body", "rawType": "string", "rawDescription": "A URL with more information about the repository.", "childParamsGroups": [] }, { "type": "boolean", "description": "Whether the repository is private.
", "default": false, "name": "private", "in": "body", "rawType": "boolean", "rawDescription": "Whether the repository is private.", "childParamsGroups": [] }, { "type": "string", "description": "Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see \"Creating an internal repository\" in the GitHub Help documentation.
Either true to enable issues for this repository or false to disable them.
Either true to enable projects for this repository or false to disable them. Note: If you're creating a repository in an organization that has disabled repository projects, the default is false, and if you pass true, the API returns an error.
Either true to enable the wiki for this repository or false to disable it.
Either true to make this repo available as a template repository or false to prevent it.
The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.
", "name": "team_id", "in": "body", "rawType": "integer", "rawDescription": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.", "childParamsGroups": [] }, { "type": "boolean", "description": "Pass true to create an initial commit with empty README.
Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, \"Haskell\".
", "name": "gitignore_template", "in": "body", "rawType": "string", "rawDescription": "Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, \"Haskell\".", "childParamsGroups": [] }, { "type": "string", "description": "Choose an open source license template that best suits your needs, and then use the license keyword as the license_template string. For example, \"mit\" or \"mpl-2.0\".
Either true to allow squash-merging pull requests, or false to prevent squash-merging.
Either true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.
Either true to allow rebase-merging pull requests, or false to prevent rebase-merging.
Either true to allow auto-merge on pull requests, or false to disallow auto-merge.
Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion.
{\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"organization\": null,\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/secret-scanning/alerts",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "state",
"in": "query",
"description": "Set to `open` or `resolved` to only list secret scanning alerts in a specific state.",
"required": false,
"schema": {
"type": "string",
"enum": [
"open",
"resolved"
]
},
"descriptionHTML": "Set to open or resolved to only list secret scanning alerts in a specific state.
A comma-separated list of secret types to return. By default all secret types are returned.
" }, { "name": "resolution", "in": "query", "description": "A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`.", "required": false, "schema": { "type": "string" }, "descriptionHTML": "A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are false_positive, wont_fix, revoked, pattern_edited, pattern_deleted or used_in_tests.
Page number of the results to fetch.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/secret-scanning/alerts", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/secret-scanning/alerts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/secret-scanning/alerts', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/secret-scanning/alerts', {\n org: 'org'\n})\n"
}
],
"summary": "List secret scanning alerts by organization",
"description": "Lists all secret scanning alerts for all eligible repositories in an organization, from newest to oldest.\nTo use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope.\n\nGitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.",
"tags": [
"secret-scanning"
],
"operationId": "secret-scanning/list-alerts-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-by-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "secret-scanning",
"subcategory": null
},
"slug": "list-secret-scanning-alerts-by-organization",
"category": "secret-scanning",
"categoryLabel": "Secret scanning",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all secret scanning alerts for all eligible repositories in an organization, from newest to oldest.\nTo use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the repo scope or security_events scope.
GitHub Apps must have the secret_scanning_alerts read permission to use this endpoint.
[\n {\n \"number\": 2,\n \"created_at\": \"2020-11-06T18:48:51Z\",\n \"url\": \"https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/2\",\n \"html_url\": \"https://github.com/owner/private-repo/security/secret-scanning/2\",\n \"state\": \"resolved\",\n \"resolution\": \"false_positive\",\n \"resolved_at\": \"2020-11-07T02:47:13Z\",\n \"resolved_by\": {\n \"login\": \"monalisa\",\n \"id\": 2,\n \"node_id\": \"MDQ6VXNlcjI=\",\n \"avatar_url\": \"https://alambic.github.com/avatars/u/2?\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/monalisa\",\n \"html_url\": \"https://github.com/monalisa\",\n \"followers_url\": \"https://api.github.com/users/monalisa/followers\",\n \"following_url\": \"https://api.github.com/users/monalisa/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/monalisa/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/monalisa/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/monalisa/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/monalisa/orgs\",\n \"repos_url\": \"https://api.github.com/users/monalisa/repos\",\n \"events_url\": \"https://api.github.com/users/monalisa/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/monalisa/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"secret_type\": \"adafruit_io_key\",\n \"secret\": \"aio_XXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n }\n }\n },\n {\n \"number\": 1,\n \"created_at\": \"2020-11-06T18:18:30Z\",\n \"url\": \"https://api.github.com/repos/owner/repo/secret-scanning/alerts/1\",\n \"html_url\": \"https://github.com/owner/repo/security/secret-scanning/1\",\n \"state\": \"open\",\n \"resolution\": null,\n \"resolved_at\": null,\n \"resolved_by\": null,\n \"secret_type\": \"mailchimp_api_key\",\n \"secret\": \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2\",\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n }\n }\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/settings/billing/actions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/settings/billing/actions",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/settings/billing/actions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/settings/billing/actions', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/settings/billing/actions', {\n org: 'org'\n})\n"
}
],
"summary": "Get GitHub Actions billing for an organization",
"description": "Gets the summary of the free and paid GitHub Actions minutes used.\n\nPaid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see \"[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)\".\n\nAccess tokens must have the `repo` or `admin:org` scope.",
"operationId": "billing/get-github-actions-billing-org",
"tags": [
"billing"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "billing",
"subcategory": null
},
"slug": "get-github-actions-billing-for-an-organization",
"category": "billing",
"categoryLabel": "Billing",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the summary of the free and paid GitHub Actions minutes used.
\nPaid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see \"Managing billing for GitHub Actions\".
\nAccess tokens must have the repo or admin:org scope.
{\n \"total_minutes_used\": 305,\n \"total_paid_minutes_used\": 0,\n \"included_minutes\": 3000,\n \"minutes_used_breakdown\": {\n \"UBUNTU\": 205,\n \"MACOS\": 10,\n \"WINDOWS\": 90\n }\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/settings/billing/packages",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/settings/billing/packages",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/settings/billing/packages"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/settings/billing/packages', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/settings/billing/packages', {\n org: 'org'\n})\n"
}
],
"summary": "Get GitHub Packages billing for an organization",
"description": "Gets the free and paid storage used for GitHub Packages in gigabytes.\n\nPaid minutes only apply to packages stored for private repositories. For more information, see \"[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages).\"\n\nAccess tokens must have the `repo` or `admin:org` scope.",
"operationId": "billing/get-github-packages-billing-org",
"tags": [
"billing"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "billing",
"subcategory": null
},
"slug": "get-github-packages-billing-for-an-organization",
"category": "billing",
"categoryLabel": "Billing",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the free and paid storage used for GitHub Packages in gigabytes.
\nPaid minutes only apply to packages stored for private repositories. For more information, see \"Managing billing for GitHub Packages.\"
\nAccess tokens must have the repo or admin:org scope.
{\n \"total_gigabytes_bandwidth_used\": 50,\n \"total_paid_gigabytes_bandwidth_used\": 40,\n \"included_gigabytes_bandwidth\": 10\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/settings/billing/shared-storage",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/settings/billing/shared-storage",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/settings/billing/shared-storage"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/settings/billing/shared-storage', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/settings/billing/shared-storage', {\n org: 'org'\n})\n"
}
],
"summary": "Get shared storage billing for an organization",
"description": "Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages.\n\nPaid minutes only apply to packages stored for private repositories. For more information, see \"[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages).\"\n\nAccess tokens must have the `repo` or `admin:org` scope.",
"operationId": "billing/get-shared-storage-billing-org",
"tags": [
"billing"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "billing",
"subcategory": null
},
"slug": "get-shared-storage-billing-for-an-organization",
"category": "billing",
"categoryLabel": "Billing",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages.
\nPaid minutes only apply to packages stored for private repositories. For more information, see \"Managing billing for GitHub Packages.\"
\nAccess tokens must have the repo or admin:org scope.
{\n \"days_left_in_billing_cycle\": 20,\n \"estimated_paid_storage_for_month\": 15,\n \"estimated_storage_for_month\": 40\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/team-sync/groups",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page token", "in": "query", "schema": { "type": "string" }, "descriptionHTML": "Page token
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/team-sync/groups", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/team-sync/groups"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/team-sync/groups', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/team-sync/groups', {\n org: 'org'\n})\n"
}
],
"summary": "List IdP groups for an organization",
"description": "Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nList IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see \"[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89).\"",
"tags": [
"teams"
],
"operationId": "teams/list-idp-groups-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-idp-groups-for-an-organization"
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "team-sync"
},
"slug": "list-idp-groups-for-an-organization",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "team-sync",
"subcategoryLabel": "Team sync",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nList IdP groups available in an organization. You can limit your page results using the per_page parameter. GitHub generates a url-encoded page token using a cursor value for where the next page begins. For more information on cursor pagination, see \"Offset and Cursor Pagination explained.\"
{\n \"groups\": [\n {\n \"group_id\": \"123\",\n \"group_name\": \"Octocat admins\",\n \"group_description\": \"The people who configure your octoworld.\"\n },\n {\n \"group_id\": \"456\",\n \"group_name\": \"Octocat docs members\",\n \"group_description\": \"The people who make your octoworld come to life.\"\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/teams",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams', {\n org: 'org'\n})",
"html": "await octokit.request('GET /orgs/{org}/teams', {\n org: 'org'\n})\n"
}
],
"summary": "List teams",
"description": "Lists all teams in an organization that are visible to the authenticated user.",
"tags": [
"teams"
],
"operationId": "teams/list",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-teams"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
},
"slug": "list-teams",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all teams in an organization that are visible to the authenticated user.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n]\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "post",
"requestPath": "/orgs/{org}/teams",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams \\\n -d '{\"name\":\"name\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/teams', {\n org: 'org',\n name: 'name'\n})",
"html": "await octokit.request('POST /orgs/{org}/teams', {\n org: 'org',\n name: 'name'\n})\n"
}
],
"summary": "Create a team",
"description": "To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see \"[Setting team creation permissions](https://help.github.com/en/articles/setting-team-creation-permissions-in-your-organization).\"\n\nWhen you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see \"[About teams](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)\".",
"tags": [
"teams"
],
"operationId": "teams/create",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#create-a-team"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Required. The name of the team.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the team.", "childParamsGroups": [] }, "description": { "type": "string", "description": "The description of the team.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "The description of the team.", "childParamsGroups": [] }, "maintainers": { "type": "array of strings", "description": "List GitHub IDs for organization members who will become team maintainers.
", "items": { "type": "string" }, "name": "maintainers", "in": "body", "rawType": "array", "rawDescription": "List GitHub IDs for organization members who will become team maintainers.", "childParamsGroups": [] }, "repo_names": { "type": "array of strings", "description": "The full name (e.g., \"organization-name/repository-name\") of repositories to add the team to.
", "items": { "type": "string" }, "name": "repo_names", "in": "body", "rawType": "array", "rawDescription": "The full name (e.g., \"organization-name/repository-name\") of repositories to add the team to.", "childParamsGroups": [] }, "privacy": { "type": "string", "description": "The level of privacy this team should have. The options are:
\nFor a non-nested team:
\n* secret - only visible to organization owners and members of this team.
\n* closed - visible to all members of this organization.
\nDefault: secret
\nFor a parent or child team:
\n* closed - visible to all members of this organization.
\nDefault for child team: closed
Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of:
\n* pull - team members can pull, but not push to or administer newly-added repositories.
\n* push - team members can pull and push, but not administer newly-added repositories.
\n* admin - team members can pull, push and administer newly-added repositories.
The ID of a team to set as the parent team.
", "name": "parent_team_id", "in": "body", "rawType": "integer", "rawDescription": "The ID of a team to set as the parent team.", "childParamsGroups": [] } }, "required": [ "name" ] }, "example": { "name": "Justice League", "description": "A great team", "permission": "admin", "privacy": "closed" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "teams", "subcategory": null }, "slug": "create-a-team", "category": "teams", "categoryLabel": "Teams", "contentType": "application/json", "notes": [], "descriptionHTML": "To create a team, the authenticated user must be a member or owner of {org}. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see \"Setting team creation permissions.\"
When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of maintainers. For more information, see \"About teams\".
Required. The name of the team.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the team.", "childParamsGroups": [] }, { "type": "string", "description": "The description of the team.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "The description of the team.", "childParamsGroups": [] }, { "type": "array of strings", "description": "List GitHub IDs for organization members who will become team maintainers.
", "items": { "type": "string" }, "name": "maintainers", "in": "body", "rawType": "array", "rawDescription": "List GitHub IDs for organization members who will become team maintainers.", "childParamsGroups": [] }, { "type": "array of strings", "description": "The full name (e.g., \"organization-name/repository-name\") of repositories to add the team to.
", "items": { "type": "string" }, "name": "repo_names", "in": "body", "rawType": "array", "rawDescription": "The full name (e.g., \"organization-name/repository-name\") of repositories to add the team to.", "childParamsGroups": [] }, { "type": "string", "description": "The level of privacy this team should have. The options are:
\nFor a non-nested team:
\n* secret - only visible to organization owners and members of this team.
\n* closed - visible to all members of this organization.
\nDefault: secret
\nFor a parent or child team:
\n* closed - visible to all members of this organization.
\nDefault for child team: closed
Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of:
\n* pull - team members can pull, but not push to or administer newly-added repositories.
\n* push - team members can pull and push, but not administer newly-added repositories.
\n* admin - team members can pull, push and administer newly-added repositories.
The ID of a team to set as the parent team.
", "name": "parent_team_id", "in": "body", "rawType": "integer", "rawDescription": "The ID of a team to set as the parent team.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null,\n \"members_count\": 3,\n \"repos_count\": 10,\n \"created_at\": \"2017-07-14T16:53:42Z\",\n \"updated_at\": \"2017-08-17T12:37:15Z\",\n \"organization\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\",\n \"name\": \"github\",\n \"company\": \"GitHub\",\n \"blog\": \"https://github.com/blog\",\n \"location\": \"San Francisco\",\n \"email\": \"octocat@github.com\",\n \"is_verified\": true,\n \"has_organization_projects\": true,\n \"has_repository_projects\": true,\n \"public_repos\": 2,\n \"public_gists\": 1,\n \"followers\": 20,\n \"following\": 0,\n \"html_url\": \"https://github.com/octocat\",\n \"created_at\": \"2008-01-14T04:33:35Z\",\n \"updated_at\": \"2017-08-17T12:37:15Z\",\n \"type\": \"Organization\"\n }\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/teams/{team_slug}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams/{team_slug}', {\n org: 'org',\n team_slug: 'team_slug'\n})",
"html": "await octokit.request('GET /orgs/{org}/teams/{team_slug}', {\n org: 'org',\n team_slug: 'team_slug'\n})\n"
}
],
"summary": "Get a team by name",
"description": "Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`.",
"tags": [
"teams"
],
"operationId": "teams/get-by-name",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#get-a-team-by-name"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
},
"slug": "get-a-team-by-name",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a team using the team's slug. GitHub generates the slug from the team name.
Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}.
{\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null,\n \"members_count\": 3,\n \"repos_count\": 10,\n \"created_at\": \"2017-07-14T16:53:42Z\",\n \"updated_at\": \"2017-08-17T12:37:15Z\",\n \"organization\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\",\n \"name\": \"github\",\n \"company\": \"GitHub\",\n \"blog\": \"https://github.com/blog\",\n \"location\": \"San Francisco\",\n \"email\": \"octocat@github.com\",\n \"is_verified\": true,\n \"has_organization_projects\": true,\n \"has_repository_projects\": true,\n \"public_repos\": 2,\n \"public_gists\": 1,\n \"followers\": 20,\n \"following\": 0,\n \"html_url\": \"https://github.com/octocat\",\n \"created_at\": \"2008-01-14T04:33:35Z\",\n \"updated_at\": \"2017-08-17T12:37:15Z\",\n \"type\": \"Organization\"\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/orgs/{org}/teams/{team_slug}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG \\\n -d '{\"name\":\"name\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /orgs/{org}/teams/{team_slug}', {\n org: 'org',\n team_slug: 'team_slug',\n name: 'name'\n})",
"html": "await octokit.request('PATCH /orgs/{org}/teams/{team_slug}', {\n org: 'org',\n team_slug: 'team_slug',\n name: 'name'\n})\n"
}
],
"summary": "Update a team",
"description": "To edit a team, the authenticated user must either be an organization owner or a team maintainer.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`.",
"tags": [
"teams"
],
"operationId": "teams/update-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#update-a-team"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the team.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the team.", "childParamsGroups": [] }, "description": { "type": "string", "description": "The description of the team.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "The description of the team.", "childParamsGroups": [] }, "privacy": { "type": "string", "description": "The level of privacy this team should have. Editing teams without specifying this parameter leaves privacy intact. When a team is nested, the privacy for parent teams cannot be secret. The options are:
\nFor a non-nested team:
\n* secret - only visible to organization owners and members of this team.
\n* closed - visible to all members of this organization.
\nFor a parent or child team:
\n* closed - visible to all members of this organization.
Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of:
\n* pull - team members can pull, but not push to or administer newly-added repositories.
\n* push - team members can pull and push, but not administer newly-added repositories.
\n* admin - team members can pull, push and administer newly-added repositories.
The ID of a team to set as the parent team.
", "nullable": true, "name": "parent_team_id", "in": "body", "rawType": "integer", "rawDescription": "The ID of a team to set as the parent team.", "childParamsGroups": [] } } }, "example": { "name": "new team name", "description": "new team description", "privacy": "closed" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "teams", "subcategory": null }, "slug": "update-a-team", "category": "teams", "categoryLabel": "Teams", "contentType": "application/json", "notes": [], "descriptionHTML": "To edit a team, the authenticated user must either be an organization owner or a team maintainer.
\nNote: You can also specify a team by org_id and team_id using the route PATCH /organizations/{org_id}/team/{team_id}.
The name of the team.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the team.", "childParamsGroups": [] }, { "type": "string", "description": "The description of the team.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "The description of the team.", "childParamsGroups": [] }, { "type": "string", "description": "The level of privacy this team should have. Editing teams without specifying this parameter leaves privacy intact. When a team is nested, the privacy for parent teams cannot be secret. The options are:
\nFor a non-nested team:
\n* secret - only visible to organization owners and members of this team.
\n* closed - visible to all members of this organization.
\nFor a parent or child team:
\n* closed - visible to all members of this organization.
Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of:
\n* pull - team members can pull, but not push to or administer newly-added repositories.
\n* push - team members can pull and push, but not administer newly-added repositories.
\n* admin - team members can pull, push and administer newly-added repositories.
The ID of a team to set as the parent team.
", "nullable": true, "name": "parent_team_id", "in": "body", "rawType": "integer", "rawDescription": "The ID of a team to set as the parent team.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null,\n \"members_count\": 3,\n \"repos_count\": 10,\n \"created_at\": \"2017-07-14T16:53:42Z\",\n \"updated_at\": \"2017-08-17T12:37:15Z\",\n \"organization\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\",\n \"name\": \"github\",\n \"company\": \"GitHub\",\n \"blog\": \"https://github.com/blog\",\n \"location\": \"San Francisco\",\n \"email\": \"octocat@github.com\",\n \"is_verified\": true,\n \"has_organization_projects\": true,\n \"has_repository_projects\": true,\n \"public_repos\": 2,\n \"public_gists\": 1,\n \"followers\": 20,\n \"following\": 0,\n \"html_url\": \"https://github.com/octocat\",\n \"created_at\": \"2008-01-14T04:33:35Z\",\n \"updated_at\": \"2017-08-17T12:37:15Z\",\n \"type\": \"Organization\"\n }\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/teams/{team_slug}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}', {\n org: 'org',\n team_slug: 'team_slug'\n})",
"html": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}', {\n org: 'org',\n team_slug: 'team_slug'\n})\n"
}
],
"summary": "Delete a team",
"description": "To delete a team, the authenticated user must be an organization owner or team maintainer.\n\nIf you are an organization owner, deleting a parent team will delete all of its child teams as well.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`.",
"tags": [
"teams"
],
"operationId": "teams/delete-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#delete-a-team"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
},
"slug": "delete-a-team",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "To delete a team, the authenticated user must be an organization owner or team maintainer.
\nIf you are an organization owner, deleting a parent team will delete all of its child teams as well.
\nNote: You can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}.
team_slug parameter
" }, { "name": "direction", "description": "One of `asc` (ascending) or `desc` (descending).", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc" }, "descriptionHTML": "One of asc (ascending) or desc (descending).
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" }, { "name": "pinned", "in": "query", "required": false, "description": "Pinned discussions only filter", "schema": { "type": "string" }, "descriptionHTML": "Pinned discussions only filter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/discussions', {\n org: 'org',\n team_slug: 'team_slug'\n})",
"html": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/discussions', {\n org: 'org',\n team_slug: 'team_slug'\n})\n"
}
],
"summary": "List discussions",
"description": "List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`.",
"tags": [
"teams"
],
"operationId": "teams/list-discussions-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-discussions"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "discussions"
},
"slug": "list-discussions",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "discussions",
"subcategoryLabel": "Discussions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List all discussions on a team's page. 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.
[\n {\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Hi! This is an area for us to collaborate as a team.\",\n \"body_html\": \"<p>Hi! This is an area for us to collaborate as a team</p>\",\n \"body_version\": \"0d495416a700fb06133c612575d92bfb\",\n \"comments_count\": 0,\n \"comments_url\": \"https://api.github.com/teams/2343027/discussions/1/comments\",\n \"created_at\": \"2018-01-25T18:56:31Z\",\n \"last_edited_at\": null,\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1\",\n \"node_id\": \"MDE0OlRlYW1EaXNjdXNzaW9uMQ==\",\n \"number\": 1,\n \"pinned\": false,\n \"private\": false,\n \"team_url\": \"https://api.github.com/teams/2343027\",\n \"title\": \"Our first team post\",\n \"updated_at\": \"2018-01-25T18:56:31Z\",\n \"url\": \"https://api.github.com/teams/2343027/discussions/1\",\n \"reactions\": {\n \"url\": \"https://api.github.com/teams/2343027/discussions/1/reactions\",\n \"total_count\": 5,\n \"+1\": 3,\n \"-1\": 1,\n \"laugh\": 0,\n \"confused\": 0,\n \"heart\": 1,\n \"hooray\": 0,\n \"eyes\": 1,\n \"rocket\": 1\n }\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/orgs/{org}/teams/{team_slug}/discussions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/teams/{team_slug}/discussions', {\n org: 'org',\n team_slug: 'team_slug',\n title: 'title',\n body: 'body'\n})",
"html": "await octokit.request('POST /orgs/{org}/teams/{team_slug}/discussions', {\n org: 'org',\n team_slug: 'team_slug',\n title: 'title',\n body: 'body'\n})\n"
}
],
"summary": "Create a discussion",
"description": "Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\nThis endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`.",
"tags": [
"teams"
],
"operationId": "teams/create-discussion-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#create-a-discussion"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Required. The discussion post's title.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The discussion post's title.", "childParamsGroups": [] }, "body": { "type": "string", "description": "Required. The discussion post's body text.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The discussion post's body text.", "childParamsGroups": [] }, "private": { "type": "boolean", "description": "Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.
Creates a new discussion post on a team's page. OAuth access tokens require the write:discussion scope.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.
\nNote: You can also specify a team by org_id and team_id using the route POST /organizations/{org_id}/team/{team_id}/discussions.
Required. The discussion post's title.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The discussion post's title.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The discussion post's body text.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The discussion post's body text.", "childParamsGroups": [] }, { "type": "boolean", "description": "Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.
{\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Hi! This is an area for us to collaborate as a team.\",\n \"body_html\": \"<p>Hi! This is an area for us to collaborate as a team</p>\",\n \"body_version\": \"0d495416a700fb06133c612575d92bfb\",\n \"comments_count\": 0,\n \"comments_url\": \"https://api.github.com/teams/2343027/discussions/1/comments\",\n \"created_at\": \"2018-01-25T18:56:31Z\",\n \"last_edited_at\": null,\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1\",\n \"node_id\": \"MDE0OlRlYW1EaXNjdXNzaW9uMQ==\",\n \"number\": 1,\n \"pinned\": false,\n \"private\": false,\n \"team_url\": \"https://api.github.com/teams/2343027\",\n \"title\": \"Our first team post\",\n \"updated_at\": \"2018-01-25T18:56:31Z\",\n \"url\": \"https://api.github.com/teams/2343027/discussions/1\",\n \"reactions\": {\n \"url\": \"https://api.github.com/teams/2343027/discussions/1/reactions\",\n \"total_count\": 5,\n \"+1\": 3,\n \"-1\": 1,\n \"laugh\": 0,\n \"confused\": 0,\n \"heart\": 1,\n \"hooray\": 0,\n \"eyes\": 1,\n \"rocket\": 1\n }\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "discussion_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42\n})\n"
}
],
"summary": "Get a discussion",
"description": "Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**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}`.",
"tags": [
"teams"
],
"operationId": "teams/get-discussion-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#get-a-discussion"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "discussions"
},
"slug": "get-a-discussion",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "discussions",
"subcategoryLabel": "Discussions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Get a specific discussion on a team's page. 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}.
{\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Hi! This is an area for us to collaborate as a team.\",\n \"body_html\": \"<p>Hi! This is an area for us to collaborate as a team</p>\",\n \"body_version\": \"0d495416a700fb06133c612575d92bfb\",\n \"comments_count\": 0,\n \"comments_url\": \"https://api.github.com/teams/2343027/discussions/1/comments\",\n \"created_at\": \"2018-01-25T18:56:31Z\",\n \"last_edited_at\": null,\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1\",\n \"node_id\": \"MDE0OlRlYW1EaXNjdXNzaW9uMQ==\",\n \"number\": 1,\n \"pinned\": false,\n \"private\": false,\n \"team_url\": \"https://api.github.com/teams/2343027\",\n \"title\": \"Our first team post\",\n \"updated_at\": \"2018-01-25T18:56:31Z\",\n \"url\": \"https://api.github.com/teams/2343027/discussions/1\",\n \"reactions\": {\n \"url\": \"https://api.github.com/teams/2343027/discussions/1/reactions\",\n \"total_count\": 5,\n \"+1\": 3,\n \"-1\": 1,\n \"laugh\": 0,\n \"confused\": 0,\n \"heart\": 1,\n \"hooray\": 0,\n \"eyes\": 1,\n \"rocket\": 1\n }\n}\n"
}
]
},
{
"verb": "patch",
"requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "discussion_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42 \\\n -d '{\"title\":\"title\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42 \\\n -d '{\"title\":\"title\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n title: 'title'\n})",
"html": "await octokit.request('PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n title: 'title'\n})\n"
}
],
"summary": "Update a discussion",
"description": "Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.",
"tags": [
"teams"
],
"operationId": "teams/update-discussion-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#update-a-discussion"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The discussion post's title.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The discussion post's title.", "childParamsGroups": [] }, "body": { "type": "string", "description": "The discussion post's body text.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The discussion post's body text.", "childParamsGroups": [] } } }, "example": { "title": "Welcome to our first team post" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "teams", "subcategory": "discussions" }, "slug": "update-a-discussion", "category": "teams", "categoryLabel": "Teams", "subcategory": "discussions", "subcategoryLabel": "Discussions", "contentType": "application/json", "notes": [], "descriptionHTML": "Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the write:discussion scope.
Note: You can also specify a team by org_id and team_id using the route PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.
The discussion post's title.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The discussion post's title.", "childParamsGroups": [] }, { "type": "string", "description": "The discussion post's body text.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The discussion post's body text.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Hi! This is an area for us to collaborate as a team.\",\n \"body_html\": \"<p>Hi! This is an area for us to collaborate as a team</p>\",\n \"body_version\": \"0d495416a700fb06133c612575d92bfb\",\n \"comments_count\": 1,\n \"comments_url\": \"https://api.github.com/teams/2343027/discussions/1/comments\",\n \"created_at\": \"2018-01-25T18:56:31Z\",\n \"last_edited_at\": \"2018-01-26T18:22:20Z\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1\",\n \"node_id\": \"MDE0OlRlYW1EaXNjdXNzaW9uMQ==\",\n \"number\": 1,\n \"pinned\": false,\n \"private\": false,\n \"team_url\": \"https://api.github.com/teams/2343027\",\n \"title\": \"Welcome to our first team post\",\n \"updated_at\": \"2018-01-26T18:22:20Z\",\n \"url\": \"https://api.github.com/teams/2343027/discussions/1\",\n \"reactions\": {\n \"url\": \"https://api.github.com/teams/2343027/discussions/1/reactions\",\n \"total_count\": 5,\n \"+1\": 3,\n \"-1\": 1,\n \"laugh\": 0,\n \"confused\": 0,\n \"heart\": 1,\n \"hooray\": 0,\n \"eyes\": 1,\n \"rocket\": 1\n }\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "discussion_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42\n})",
"html": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42\n})\n"
}
],
"summary": "Delete a discussion",
"description": "Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.",
"tags": [
"teams"
],
"operationId": "teams/delete-discussion-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#delete-a-discussion"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "discussions"
},
"slug": "delete-a-discussion",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "discussions",
"subcategoryLabel": "Discussions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Delete a discussion from a team's page. OAuth access tokens require the write:discussion scope.
Note: You can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.
team_slug parameter
" }, { "name": "discussion_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "direction", "description": "One of `asc` (ascending) or `desc` (descending).", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc" }, "descriptionHTML": "One of asc (ascending) or desc (descending).
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42\n})\n"
}
],
"summary": "List discussion comments",
"description": "List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**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`.",
"tags": [
"teams"
],
"operationId": "teams/list-discussion-comments-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-discussion-comments"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "discussion-comments"
},
"slug": "list-discussion-comments",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "discussion-comments",
"subcategoryLabel": "Discussion comments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List all comments on 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}/comments.
[\n {\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Do you like apples?\",\n \"body_html\": \"<p>Do you like apples?</p>\",\n \"body_version\": \"5eb32b219cdc6a5a9b29ba5d6caa9c51\",\n \"created_at\": \"2018-01-15T23:53:58Z\",\n \"last_edited_at\": null,\n \"discussion_url\": \"https://api.github.com/teams/2403582/discussions/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1\",\n \"node_id\": \"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=\",\n \"number\": 1,\n \"updated_at\": \"2018-01-15T23:53:58Z\",\n \"url\": \"https://api.github.com/teams/2403582/discussions/1/comments/1\",\n \"reactions\": {\n \"url\": \"https://api.github.com/teams/2403582/discussions/1/reactions\",\n \"total_count\": 5,\n \"+1\": 3,\n \"-1\": 1,\n \"laugh\": 0,\n \"confused\": 0,\n \"heart\": 1,\n \"hooray\": 0,\n \"eyes\": 1,\n \"rocket\": 1\n }\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "discussion_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments \\\n -d '{\"body\":\"body\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments \\\n -d '{\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n body: 'body'\n})",
"html": "await octokit.request('POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n body: 'body'\n})\n"
}
],
"summary": "Create a discussion comment",
"description": "Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\nThis endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\n**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`.",
"tags": [
"teams"
],
"operationId": "teams/create-discussion-comment-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#create-a-discussion-comment"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "Required. The discussion comment's body text.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The discussion comment's body text.", "childParamsGroups": [] } }, "required": [ "body" ] }, "example": { "body": "Do you like apples?" } } } }, "x-github": { "triggersNotification": true, "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "teams", "subcategory": "discussion-comments" }, "slug": "create-a-discussion-comment", "category": "teams", "categoryLabel": "Teams", "subcategory": "discussion-comments", "subcategoryLabel": "Discussion comments", "contentType": "application/json", "notes": [], "descriptionHTML": "Creates a new comment on a team discussion. OAuth access tokens require the write:discussion scope.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.
\nNote: 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.
Required. The discussion comment's body text.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The discussion comment's body text.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Do you like apples?\",\n \"body_html\": \"<p>Do you like apples?</p>\",\n \"body_version\": \"5eb32b219cdc6a5a9b29ba5d6caa9c51\",\n \"created_at\": \"2018-01-15T23:53:58Z\",\n \"last_edited_at\": null,\n \"discussion_url\": \"https://api.github.com/teams/2403582/discussions/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1\",\n \"node_id\": \"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=\",\n \"number\": 1,\n \"updated_at\": \"2018-01-15T23:53:58Z\",\n \"url\": \"https://api.github.com/teams/2403582/discussions/1/comments/1\",\n \"reactions\": {\n \"url\": \"https://api.github.com/teams/2403582/discussions/1/reactions\",\n \"total_count\": 5,\n \"+1\": 3,\n \"-1\": 1,\n \"laugh\": 0,\n \"confused\": 0,\n \"heart\": 1,\n \"hooray\": 0,\n \"eyes\": 1,\n \"rocket\": 1\n }\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "discussion_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "comment_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42\n})\n"
}
],
"summary": "Get a discussion comment",
"description": "Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**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}`.",
"tags": [
"teams"
],
"operationId": "teams/get-discussion-comment-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#get-a-discussion-comment"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "discussion-comments"
},
"slug": "get-a-discussion-comment",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "discussion-comments",
"subcategoryLabel": "Discussion comments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Get a specific comment on 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}/comments/{comment_number}.
{\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Do you like apples?\",\n \"body_html\": \"<p>Do you like apples?</p>\",\n \"body_version\": \"5eb32b219cdc6a5a9b29ba5d6caa9c51\",\n \"created_at\": \"2018-01-15T23:53:58Z\",\n \"last_edited_at\": null,\n \"discussion_url\": \"https://api.github.com/teams/2403582/discussions/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1\",\n \"node_id\": \"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=\",\n \"number\": 1,\n \"updated_at\": \"2018-01-15T23:53:58Z\",\n \"url\": \"https://api.github.com/teams/2403582/discussions/1/comments/1\",\n \"reactions\": {\n \"url\": \"https://api.github.com/teams/2403582/discussions/1/reactions\",\n \"total_count\": 5,\n \"+1\": 3,\n \"-1\": 1,\n \"laugh\": 0,\n \"confused\": 0,\n \"heart\": 1,\n \"hooray\": 0,\n \"eyes\": 1,\n \"rocket\": 1\n }\n}\n"
}
]
},
{
"verb": "patch",
"requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "discussion_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "comment_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42 \\\n -d '{\"body\":\"body\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42 \\\n -d '{\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42,\n body: 'body'\n})",
"html": "await octokit.request('PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42,\n body: 'body'\n})\n"
}
],
"summary": "Update a discussion comment",
"description": "Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.",
"tags": [
"teams"
],
"operationId": "teams/update-discussion-comment-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#update-a-discussion-comment"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "Required. The discussion comment's body text.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The discussion comment's body text.", "childParamsGroups": [] } }, "required": [ "body" ] }, "example": { "body": "Do you like pineapples?" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "teams", "subcategory": "discussion-comments" }, "slug": "update-a-discussion-comment", "category": "teams", "categoryLabel": "Teams", "subcategory": "discussion-comments", "subcategoryLabel": "Discussion comments", "contentType": "application/json", "notes": [], "descriptionHTML": "Edits the body text of a discussion comment. OAuth access tokens require the write:discussion scope.
Note: You can also specify a team by org_id and team_id using the route PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}.
Required. The discussion comment's body text.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The discussion comment's body text.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Do you like pineapples?\",\n \"body_html\": \"<p>Do you like pineapples?</p>\",\n \"body_version\": \"e6907b24d9c93cc0c5024a7af5888116\",\n \"created_at\": \"2018-01-15T23:53:58Z\",\n \"last_edited_at\": \"2018-01-26T18:22:20Z\",\n \"discussion_url\": \"https://api.github.com/teams/2403582/discussions/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1\",\n \"node_id\": \"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=\",\n \"number\": 1,\n \"updated_at\": \"2018-01-26T18:22:20Z\",\n \"url\": \"https://api.github.com/teams/2403582/discussions/1/comments/1\",\n \"reactions\": {\n \"url\": \"https://api.github.com/teams/2403582/discussions/1/reactions\",\n \"total_count\": 5,\n \"+1\": 3,\n \"-1\": 1,\n \"laugh\": 0,\n \"confused\": 0,\n \"heart\": 1,\n \"hooray\": 0,\n \"eyes\": 1,\n \"rocket\": 1\n }\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "discussion_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "comment_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42\n})",
"html": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42\n})\n"
}
],
"summary": "Delete a discussion comment",
"description": "Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.",
"tags": [
"teams"
],
"operationId": "teams/delete-discussion-comment-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#delete-a-discussion-comment"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "discussion-comments"
},
"slug": "delete-a-discussion-comment",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "discussion-comments",
"subcategoryLabel": "Discussion comments",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes a comment on a team discussion. OAuth access tokens require the write:discussion scope.
Note: You can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}.
team_slug parameter
" }, { "name": "discussion_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "comment_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "content", "description": "Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ] }, "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to a team discussion comment.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42/reactions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42/reactions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42\n})\n"
}
],
"summary": "List reactions for a team discussion comment",
"description": "List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**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`.",
"tags": [
"reactions"
],
"operationId": "reactions/list-for-team-discussion-comment-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
},
"slug": "list-reactions-for-a-team-discussion-comment",
"category": "reactions",
"categoryLabel": "Reactions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "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.
[\n {\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "discussion_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "comment_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42/reactions \\\n -d '{\"content\":\"content\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42/reactions \\\n -d '{\"content\":\"content\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42,\n content: 'content'\n})",
"html": "await octokit.request('POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42,\n content: 'content'\n})\n"
}
],
"summary": "Create reaction for a team discussion comment",
"description": "Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment.\n\n**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`.",
"tags": [
"reactions"
],
"operationId": "reactions/create-for-team-discussion-comment-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "Required. The reaction type to add to the team discussion comment.
", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment.", "childParamsGroups": [] } }, "required": [ "content" ] }, "example": { "content": "heart" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "reactions", "subcategory": null }, "slug": "create-reaction-for-a-team-discussion-comment", "category": "reactions", "categoryLabel": "Reactions", "contentType": "application/json", "notes": [], "descriptionHTML": "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.
Required. The reaction type to add to the team discussion comment.
", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n"
},
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response",
"payload": "{\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "discussion_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "comment_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "reaction_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42/reactions/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/comments/42/reactions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42,\n reaction_id: 42\n})",
"html": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n comment_number: 42,\n reaction_id: 42\n})\n"
}
],
"summary": "Delete team discussion comment reaction",
"description": "**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`.\n\nDelete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"reactions"
],
"operationId": "reactions/delete-for-team-discussion-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
},
"slug": "delete-team-discussion-comment-reaction",
"category": "reactions",
"categoryLabel": "Reactions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "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.
team_slug parameter
" }, { "name": "discussion_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "content", "description": "Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ] }, "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to a team discussion.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/reactions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/reactions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42\n})\n"
}
],
"summary": "List reactions for a team discussion",
"description": "List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**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`.",
"tags": [
"reactions"
],
"operationId": "reactions/list-for-team-discussion-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
},
"slug": "list-reactions-for-a-team-discussion",
"category": "reactions",
"categoryLabel": "Reactions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "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.
[\n {\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "discussion_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/reactions \\\n -d '{\"content\":\"content\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/reactions \\\n -d '{\"content\":\"content\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n content: 'content'\n})",
"html": "await octokit.request('POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n content: 'content'\n})\n"
}
],
"summary": "Create reaction for a team discussion",
"description": "Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion.\n\n**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`.",
"tags": [
"reactions"
],
"operationId": "reactions/create-for-team-discussion-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "Required. The reaction type to add to the team discussion.
", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion.", "childParamsGroups": [] } }, "required": [ "content" ] }, "example": { "content": "heart" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "reactions", "subcategory": null }, "slug": "create-reaction-for-a-team-discussion", "category": "reactions", "categoryLabel": "Reactions", "contentType": "application/json", "notes": [], "descriptionHTML": "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.
Required. The reaction type to add to the team discussion.
", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n"
},
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response",
"payload": "{\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "discussion_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "reaction_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/reactions/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/discussions/42/reactions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n reaction_id: 42\n})",
"html": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}', {\n org: 'org',\n team_slug: 'team_slug',\n discussion_number: 42,\n reaction_id: 42\n})\n"
}
],
"summary": "Delete team discussion reaction",
"description": "**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`.\n\nDelete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"reactions"
],
"operationId": "reactions/delete-for-team-discussion",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
},
"slug": "delete-team-discussion-reaction",
"category": "reactions",
"categoryLabel": "Reactions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "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.
team_slug parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/external-groups \\\n -d '{\"group_id\":42}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/external-groups \\\n -d '{\"group_id\":42}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /orgs/{org}/teams/{team_slug}/external-groups', {\n org: 'org',\n team_slug: 'team_slug',\n group_id: 42\n})",
"html": "await octokit.request('PATCH /orgs/{org}/teams/{team_slug}/external-groups', {\n org: 'org',\n team_slug: 'team_slug',\n group_id: 42\n})\n"
}
],
"summary": "Update the connection between an external group and a team",
"description": "Creates a connection between a team and an external group. Only one external group can be linked to a team.\n\nYou can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see \"[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)\" in the GitHub Help documentation.",
"tags": [
"teams"
],
"operationId": "teams/link-external-idp-group-to-team-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#link-external-idp-group-team-connection"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"group_id": {
"type": "integer",
"description": "Required. External Group Id
", "example": 1, "name": "group_id", "in": "body", "rawType": "integer", "rawDescription": "External Group Id", "childParamsGroups": [] } }, "required": [ "group_id" ] }, "example": { "group_id": 123 } } } }, "x-github": { "githubCloudOnly": true, "enabledForGitHubApps": false, "category": "teams", "subcategory": "external-groups" }, "slug": "update-the-connection-between-an-external-group-and-a-team", "category": "teams", "categoryLabel": "Teams", "subcategory": "external-groups", "subcategoryLabel": "External groups", "contentType": "application/json", "notes": [], "descriptionHTML": "Creates a connection between a team and an external group. Only one external group can be linked to a team.
\nYou can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see \"GitHub's products\" in the GitHub Help documentation.
", "bodyParameters": [ { "type": "integer", "description": "Required. External Group Id
", "example": 1, "name": "group_id", "in": "body", "rawType": "integer", "rawDescription": "External Group Id", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"group_id\": \"123\",\n \"group_name\": \"Octocat admins\",\n \"updated_at\": \"2021-01-24T11:31:04-06:00\",\n \"teams\": [\n {\n \"team_id\": 1,\n \"team_name\": \"team-test\"\n },\n {\n \"team_id\": 2,\n \"team_name\": \"team-test2\"\n }\n ],\n \"members\": [\n {\n \"member_id\": 1,\n \"member_login\": \"mona-lisa_eocsaxrs\",\n \"member_name\": \"Mona Lisa\",\n \"member_email\": \"mona_lisa@github.com\"\n },\n {\n \"member_id\": 2,\n \"member_login\": \"octo-lisa_eocsaxrs\",\n \"member_name\": \"Octo Lisa\",\n \"member_email\": \"octo_lisa@github.com\"\n }\n ]\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/teams/{team_slug}/external-groups",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/external-groups", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/external-groups"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}/external-groups', {\n org: 'org',\n team_slug: 'team_slug'\n})",
"html": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}/external-groups', {\n org: 'org',\n team_slug: 'team_slug'\n})\n"
}
],
"summary": "Remove the connection between an external group and a team",
"description": "Deletes a connection between a team and an external group.\n\nYou can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"teams"
],
"operationId": "teams/unlink-external-idp-group-from-team-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#unlink-external-idp-group-team-connection"
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": false,
"category": "teams",
"subcategory": "external-groups"
},
"slug": "remove-the-connection-between-an-external-group-and-a-team",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "external-groups",
"subcategoryLabel": "External groups",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes a connection between a team and an external group.
\nYou can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
" }, { "verb": "get", "requestPath": "/orgs/{org}/teams/{team_slug}/invitations", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "team_slug", "description": "team_slug parameter", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "team_slug parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/invitations", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/invitations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/invitations', {\n org: 'org',\n team_slug: 'team_slug'\n})",
"html": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/invitations', {\n org: 'org',\n team_slug: 'team_slug'\n})\n"
}
],
"summary": "List pending team invitations",
"description": "The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`.",
"tags": [
"teams"
],
"operationId": "teams/list-pending-invitations-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-pending-team-invitations"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "members"
},
"slug": "list-pending-team-invitations",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "The return hash contains a role field which refers to the Organization Invitation role and will be one of the following values: direct_member, admin, billing_manager, hiring_manager, or reinstate. If the invitee is not a GitHub member, the login field in the return hash will be null.
Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/invitations.
[\n {\n \"id\": 1,\n \"login\": \"monalisa\",\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"email\": \"octocat@github.com\",\n \"role\": \"direct_member\",\n \"created_at\": \"2016-11-30T06:46:10-08:00\",\n \"failed_at\": \"\",\n \"failed_reason\": \"\",\n \"inviter\": {\n \"login\": \"other_user\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/other_user\",\n \"html_url\": \"https://github.com/other_user\",\n \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"team_count\": 2,\n \"invitation_teams_url\": \"https://api.github.com/organizations/2/invitations/1/teams\"\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/teams/{team_slug}/members",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "role", "description": "Filters members returned by their role in the team. Can be one of: \n\\* `member` - normal members of the team. \n\\* `maintainer` - team maintainers. \n\\* `all` - all members of the team.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "member", "maintainer", "all" ], "default": "all" }, "descriptionHTML": "Filters members returned by their role in the team. Can be one of:
\n* member - normal members of the team.
\n* maintainer - team maintainers.
\n* all - all members of the team.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/members", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/members"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/members', {\n org: 'org',\n team_slug: 'team_slug'\n})",
"html": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/members', {\n org: 'org',\n team_slug: 'team_slug'\n})\n"
}
],
"summary": "List team members",
"description": "Team members will include the members of child teams.\n\nTo list members in a team, the team must be visible to the authenticated user.",
"tags": [
"teams"
],
"operationId": "teams/list-members-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-team-members"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "members"
},
"slug": "list-team-members",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Team members will include the members of child teams.
\nTo list members in a team, the team must be visible to the authenticated user.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/teams/{team_slug}/memberships/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/memberships/USERNAME", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/memberships/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/memberships/{username}', {\n org: 'org',\n team_slug: 'team_slug',\n username: 'username'\n})",
"html": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/memberships/{username}', {\n org: 'org',\n team_slug: 'team_slug',\n username: 'username'\n})\n"
}
],
"summary": "Get team membership for a user",
"description": "Team members will include the members of child teams.\n\nTo get a user's membership with a team, the team must be visible to the authenticated user.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`.\n\n**Note:**\nThe response contains the `state` of the membership and the member's `role`.\n\nThe `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team).",
"tags": [
"teams"
],
"operationId": "teams/get-membership-for-user-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "members"
},
"slug": "get-team-membership-for-a-user",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Team members will include the members of child teams.
\nTo get a user's membership with a team, the team must be visible to the authenticated user.
\nNote: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/memberships/{username}.
Note:\nThe response contains the state of the membership and the member's role.
The role for organization owners is set to maintainer. For more information about maintainer roles, see see Create a team.
{\n \"url\": \"https://api.github.com/teams/1/memberships/octocat\",\n \"role\": \"maintainer\",\n \"state\": \"active\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "if user has no team membership"
}
]
},
{
"verb": "put",
"requestPath": "/orgs/{org}/teams/{team_slug}/memberships/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/memberships/USERNAME \\\n -d '{\"role\":\"role\"}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/memberships/USERNAME \\\n -d '{\"role\":\"role\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/teams/{team_slug}/memberships/{username}', {\n org: 'org',\n team_slug: 'team_slug',\n username: 'username',\n role: 'role'\n})",
"html": "await octokit.request('PUT /orgs/{org}/teams/{team_slug}/memberships/{username}', {\n org: 'org',\n team_slug: 'team_slug',\n username: 'username',\n role: 'role'\n})\n"
}
],
"summary": "Add or update team membership for a user",
"description": "Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nAdds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team.\n\n**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/).\"\n\nAn organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the \"pending\" state until the person accepts the invitation, at which point the membership will transition to the \"active\" state and the user will be added as a member of the team.\n\nIf the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`.",
"tags": [
"teams"
],
"operationId": "teams/add-or-update-membership-for-user-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"role": {
"type": "string",
"description": "The role that this user should have in the team. Can be one of:
\n* member - a normal member of the team.
\n* maintainer - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description.
Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nAdds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team.
\nNote: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"Synchronizing teams between your identity provider and GitHub.\"
\nAn organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the \"pending\" state until the person accepts the invitation, at which point the membership will transition to the \"active\" state and the user will be added as a member of the team.
\nIf the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.
\nNote: You can also specify a team by org_id and team_id using the route PUT /organizations/{org_id}/team/{team_id}/memberships/{username}.
The role that this user should have in the team. Can be one of:
\n* member - a normal member of the team.
\n* maintainer - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description.
{\n \"url\": \"https://api.github.com/teams/1/memberships/octocat\",\n \"role\": \"member\",\n \"state\": \"pending\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden if team synchronization is set up"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Unprocessable Entity if you attempt to add an organization to a team"
}
]
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/teams/{team_slug}/memberships/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/memberships/USERNAME", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/memberships/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}', {\n org: 'org',\n team_slug: 'team_slug',\n username: 'username'\n})",
"html": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}', {\n org: 'org',\n team_slug: 'team_slug',\n username: 'username'\n})\n"
}
],
"summary": "Remove team membership for a user",
"description": "Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nTo remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.\n\n**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/).\"\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`.",
"tags": [
"teams"
],
"operationId": "teams/remove-membership-for-user-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "members"
},
"slug": "remove-team-membership-for-a-user",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden if team synchronization is set up"
}
],
"bodyParameters": [],
"descriptionHTML": "Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nTo remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.
\nNote: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"Synchronizing teams between your identity provider and GitHub.\"
\nNote: You can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}.
team_slug parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/projects", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/projects"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/projects', {\n org: 'org',\n team_slug: 'team_slug'\n})",
"html": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/projects', {\n org: 'org',\n team_slug: 'team_slug'\n})\n"
}
],
"summary": "List team projects",
"description": "Lists the organization projects for a team.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`.",
"tags": [
"teams"
],
"operationId": "teams/list-projects-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-team-projects"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
},
"slug": "list-team-projects",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the organization projects for a team.
\nNote: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/projects.
[\n {\n \"owner_url\": \"https://api.github.com/orgs/octocat\",\n \"url\": \"https://api.github.com/projects/1002605\",\n \"html_url\": \"https://github.com/orgs/api-playground/projects/1\",\n \"columns_url\": \"https://api.github.com/projects/1002605/columns\",\n \"id\": 1002605,\n \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDU=\",\n \"name\": \"Organization Roadmap\",\n \"body\": \"High-level roadmap for the upcoming year.\",\n \"number\": 1,\n \"state\": \"open\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-11T20:09:31Z\",\n \"updated_at\": \"2014-03-04T18:58:10Z\",\n \"organization_permission\": \"write\",\n \"private\": false,\n \"permissions\": {\n \"read\": true,\n \"write\": true,\n \"admin\": false\n }\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/teams/{team_slug}/projects/{project_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "project_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/projects/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/projects/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/projects/{project_id}', {\n org: 'org',\n team_slug: 'team_slug',\n project_id: 42\n})",
"html": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/projects/{project_id}', {\n org: 'org',\n team_slug: 'team_slug',\n project_id: 42\n})\n"
}
],
"summary": "Check team permissions for a project",
"description": "Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`.",
"tags": [
"teams"
],
"operationId": "teams/check-permissions-for-project-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
},
"slug": "check-team-permissions-for-a-project",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Checks whether a team has read, write, or admin permissions for an organization project. The response includes projects inherited from a parent team.
Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/projects/{project_id}.
{\n \"owner_url\": \"https://api.github.com/orgs/octocat\",\n \"url\": \"https://api.github.com/projects/1002605\",\n \"html_url\": \"https://github.com/orgs/api-playground/projects/1\",\n \"columns_url\": \"https://api.github.com/projects/1002605/columns\",\n \"id\": 1002605,\n \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDU=\",\n \"name\": \"Organization Roadmap\",\n \"body\": \"High-level roadmap for the upcoming year.\",\n \"number\": 1,\n \"state\": \"open\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-11T20:09:31Z\",\n \"updated_at\": \"2014-03-04T18:58:10Z\",\n \"organization_permission\": \"write\",\n \"private\": false,\n \"permissions\": {\n \"read\": true,\n \"write\": true,\n \"admin\": false\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if project is not managed by this team"
}
]
},
{
"verb": "put",
"requestPath": "/orgs/{org}/teams/{team_slug}/projects/{project_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "project_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/projects/42 \\\n -d '{\"permission\":\"permission\"}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/projects/42 \\\n -d '{\"permission\":\"permission\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}', {\n org: 'org',\n team_slug: 'team_slug',\n project_id: 42,\n permission: 'permission'\n})",
"html": "await octokit.request('PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}', {\n org: 'org',\n team_slug: 'team_slug',\n project_id: 42,\n permission: 'permission'\n})\n"
}
],
"summary": "Add or update team project permissions",
"description": "Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`.",
"tags": [
"teams"
],
"operationId": "teams/add-or-update-project-permissions-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"permission": {
"type": "string",
"description": "The permission to grant to the team for this project. Can be one of:
\n* read - team members can read, but not write to or administer this project.
\n* write - team members can read and write, but not administer this project.
\n* admin - team members can read, write and administer this project.
\nDefault: the team's permission attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have admin permissions for the project. The project and team must be part of the same organization.
Note: You can also specify a team by org_id and team_id using the route PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}.
The permission to grant to the team for this project. Can be one of:
\n* read - team members can read, but not write to or administer this project.
\n* write - team members can read and write, but not administer this project.
\n* admin - team members can read, write and administer this project.
\nDefault: the team's permission attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
{\n \"message\": \"Must have admin rights to Repository.\",\n \"documentation_url\": \"https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions\"\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/orgs/{org}/teams/{team_slug}/projects/{project_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "project_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/projects/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/projects/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}', {\n org: 'org',\n team_slug: 'team_slug',\n project_id: 42\n})",
"html": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}', {\n org: 'org',\n team_slug: 'team_slug',\n project_id: 42\n})\n"
}
],
"summary": "Remove a project from a team",
"description": "Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`.",
"tags": [
"teams"
],
"operationId": "teams/remove-project-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
},
"slug": "remove-a-project-from-a-team",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have read access to both the team and project, or admin access to the team or project. This endpoint removes the project from the team, but does not delete the project.
Note: You can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}.
team_slug parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/repos", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/repos"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/repos', {\n org: 'org',\n team_slug: 'team_slug'\n})",
"html": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/repos', {\n org: 'org',\n team_slug: 'team_slug'\n})\n"
}
],
"summary": "List team repositories",
"description": "Lists a team's repositories visible to the authenticated user.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`.",
"tags": [
"teams"
],
"operationId": "teams/list-repos-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-team-repositories"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
},
"slug": "list-team-repositories",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists a team's repositories visible to the authenticated user.
\nNote: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/repos.
[\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n }\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/repos/octocat/hello-world", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/repos/octocat/hello-world"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}', {\n org: 'org',\n team_slug: 'team_slug',\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}', {\n org: 'org',\n team_slug: 'team_slug',\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Check team permissions for a repository",
"description": "Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.\n\nYou can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header.\n\nIf a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.",
"tags": [
"teams"
],
"operationId": "teams/check-permissions-for-repo-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
},
"slug": "check-team-permissions-for-a-repository",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Checks whether a team has admin, push, maintain, triage, or pull permission for a repository. Repositories inherited through a parent team will also be checked.
You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom media type via the application/vnd.github.v3.repository+json accept header.
If a team doesn't have permission for the repository, you will receive a 404 Not Found response status.
Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}.
{\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n },\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n}\n"
},
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header."
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if team does not have permission for the repository"
}
]
},
{
"verb": "put",
"requestPath": "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" }, { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/repos/octocat/hello-world \\\n -d '{\"permission\":\"permission\"}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/repos/octocat/hello-world \\\n -d '{\"permission\":\"permission\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}', {\n org: 'org',\n team_slug: 'team_slug',\n owner: 'octocat',\n repo: 'hello-world',\n permission: 'permission'\n})",
"html": "await octokit.request('PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}', {\n org: 'org',\n team_slug: 'team_slug',\n owner: 'octocat',\n repo: 'hello-world',\n permission: 'permission'\n})\n"
}
],
"summary": "Add or update team repository permissions",
"description": "To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.\n\nFor more information about the permission levels, see \"[Repository permission levels for an organization](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\".",
"tags": [
"teams"
],
"operationId": "teams/add-or-update-repo-permissions-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"permission": {
"type": "string",
"description": "The permission to grant the team on this repository. Can be one of:
\n* pull - team members can pull, but not push to or administer this repository.
\n* push - team members can pull and push, but not administer this repository.
\n* admin - team members can pull, push and administer this repository.
\n* maintain - team members can manage the repository without access to sensitive or destructive actions. Recommended for project managers. Only applies to repositories owned by organizations.
\n* triage - team members can proactively manage issues and pull requests without write access. Recommended for contributors who triage a repository. Only applies to repositories owned by organizations.
If no permission is specified, the team's permission attribute will be used to determine what permission to grant the team on this repository.
To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a 422 Unprocessable Entity status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
Note: You can also specify a team by org_id and team_id using the route PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}.
For more information about the permission levels, see \"Repository permission levels for an organization\".
", "bodyParameters": [ { "type": "string", "description": "The permission to grant the team on this repository. Can be one of:
\n* pull - team members can pull, but not push to or administer this repository.
\n* push - team members can pull and push, but not administer this repository.
\n* admin - team members can pull, push and administer this repository.
\n* maintain - team members can manage the repository without access to sensitive or destructive actions. Recommended for project managers. Only applies to repositories owned by organizations.
\n* triage - team members can proactively manage issues and pull requests without write access. Recommended for contributors who triage a repository. Only applies to repositories owned by organizations.
If no permission is specified, the team's permission attribute will be used to determine what permission to grant the team on this repository.
team_slug parameter
" }, { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/repos/octocat/hello-world", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/repos/octocat/hello-world"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}', {\n org: 'org',\n team_slug: 'team_slug',\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}', {\n org: 'org',\n team_slug: 'team_slug',\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Remove a repository from a team",
"description": "If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.",
"tags": [
"teams"
],
"operationId": "teams/remove-repo-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
},
"slug": "remove-a-repository-from-a-team",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team.
\nNote: You can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}.
team_slug parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/team-sync/group-mappings", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/team-sync/group-mappings"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings', {\n org: 'org',\n team_slug: 'team_slug'\n})",
"html": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings', {\n org: 'org',\n team_slug: 'team_slug'\n})\n"
}
],
"summary": "List IdP groups for a team",
"description": "Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nList IdP groups connected to a team on GitHub.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`.",
"tags": [
"teams"
],
"operationId": "teams/list-idp-groups-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team"
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": false,
"category": "teams",
"subcategory": "team-sync"
},
"slug": "list-idp-groups-for-a-team",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "team-sync",
"subcategoryLabel": "Team sync",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nList IdP groups connected to a team on GitHub.
\nNote: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings.
{\n \"groups\": [\n {\n \"group_id\": \"123\",\n \"group_name\": \"Octocat admins\",\n \"group_description\": \"The people who configure your octoworld.\"\n },\n {\n \"group_id\": \"456\",\n \"group_name\": \"Octocat docs members\",\n \"group_description\": \"The people who make your octoworld come to life.\"\n }\n ]\n}\n"
}
]
},
{
"verb": "patch",
"requestPath": "/orgs/{org}/teams/{team_slug}/team-sync/group-mappings",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "team_slug",
"description": "team_slug parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "team_slug parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/team-sync/group-mappings \\\n -d '{\"groups\":[{\"group_id\":\"group_id\",\"group_name\":\"group_name\",\"group_description\":\"group_description\"}]}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/team-sync/group-mappings \\\n -d '{\"groups\":[{\"group_id\":\"group_id\",\"group_name\":\"group_name\",\"group_description\":\"group_description\"}]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /orgs/{org}/teams/{team_slug}/team-sync/group-mappings', {\n org: 'org',\n team_slug: 'team_slug',\n groups: [\n {\n group_id: 'group_id',\n group_name: 'group_name',\n group_description: 'group_description'\n }\n ]\n})",
"html": "await octokit.request('PATCH /orgs/{org}/teams/{team_slug}/team-sync/group-mappings', {\n org: 'org',\n team_slug: 'team_slug',\n groups: [\n {\n group_id: 'group_id',\n group_name: 'group_name',\n group_description: 'group_description'\n }\n ]\n})\n"
}
],
"summary": "Create or update IdP group connections",
"description": "Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nCreates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`.",
"tags": [
"teams"
],
"operationId": "teams/create-or-update-idp-group-connections-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"groups": {
"type": "array of objects",
"description": "The IdP groups you want to connect to a GitHub team. When updating, the new groups object will replace the original one. You must include any existing groups that you don't want to remove.
Required. ID of the IdP group.
", "name": "group_id", "in": "body", "rawType": "string", "rawDescription": "ID of the IdP group.", "childParamsGroups": [] }, "group_name": { "type": "string", "description": "Required. Name of the IdP group.
", "name": "group_name", "in": "body", "rawType": "string", "rawDescription": "Name of the IdP group.", "childParamsGroups": [] }, "group_description": { "type": "string", "description": "Required. Description of the IdP group.
", "name": "group_description", "in": "body", "rawType": "string", "rawDescription": "Description of the IdP group.", "childParamsGroups": [] } }, "required": [ "group_id", "group_name", "group_description" ] }, "name": "groups", "in": "body", "rawType": "array", "rawDescription": "The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove.", "childParamsGroups": [ { "parentName": "groups", "parentType": "items", "id": "groups-items", "params": [ { "type": "string", "description": "Required. ID of the IdP group.
", "name": "group_id", "in": "body", "rawType": "string", "rawDescription": "ID of the IdP group.", "childParamsGroups": [] }, { "type": "string", "description": "Required. Name of the IdP group.
", "name": "group_name", "in": "body", "rawType": "string", "rawDescription": "Name of the IdP group.", "childParamsGroups": [] }, { "type": "string", "description": "Required. Description of the IdP group.
", "name": "group_description", "in": "body", "rawType": "string", "rawDescription": "Description of the IdP group.", "childParamsGroups": [] } ] } ] } }, "additionalProperties": false }, "example": { "groups": [ { "group_id": "123", "group_name": "Octocat admins", "group_description": "string" } ] } } } }, "x-github": { "githubCloudOnly": true, "enabledForGitHubApps": false, "category": "teams", "subcategory": "team-sync" }, "slug": "create-or-update-idp-group-connections", "category": "teams", "categoryLabel": "Teams", "subcategory": "team-sync", "subcategoryLabel": "Team sync", "contentType": "application/json", "notes": [], "descriptionHTML": "Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nCreates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty groups array will remove all connections for a team.
Note: You can also specify a team by org_id and team_id using the route PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings.
{\n \"groups\": [\n {\n \"group_id\": \"123\",\n \"group_name\": \"Octocat admins\",\n \"group_description\": \"The people who configure your octoworld.\"\n },\n {\n \"group_id\": \"456\",\n \"group_name\": \"Octocat docs members\",\n \"group_description\": \"The people who make your octoworld come to life.\"\n }\n ]\n}\n"
}
],
"bodyParameters": [
{
"type": "array of objects",
"description": "The IdP groups you want to connect to a GitHub team. When updating, the new groups object will replace the original one. You must include any existing groups that you don't want to remove.
Required. ID of the IdP group.
", "name": "group_id", "in": "body", "rawType": "string", "rawDescription": "ID of the IdP group.", "childParamsGroups": [] }, "group_name": { "type": "string", "description": "Required. Name of the IdP group.
", "name": "group_name", "in": "body", "rawType": "string", "rawDescription": "Name of the IdP group.", "childParamsGroups": [] }, "group_description": { "type": "string", "description": "Required. Description of the IdP group.
", "name": "group_description", "in": "body", "rawType": "string", "rawDescription": "Description of the IdP group.", "childParamsGroups": [] } }, "required": [ "group_id", "group_name", "group_description" ] }, "name": "groups", "in": "body", "rawType": "array", "rawDescription": "The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove.", "childParamsGroups": [ { "parentName": "groups", "parentType": "items", "id": "groups-items", "params": [ { "type": "string", "description": "Required. ID of the IdP group.
", "name": "group_id", "in": "body", "rawType": "string", "rawDescription": "ID of the IdP group.", "childParamsGroups": [] }, { "type": "string", "description": "Required. Name of the IdP group.
", "name": "group_name", "in": "body", "rawType": "string", "rawDescription": "Name of the IdP group.", "childParamsGroups": [] }, { "type": "string", "description": "Required. Description of the IdP group.
", "name": "group_description", "in": "body", "rawType": "string", "rawDescription": "Description of the IdP group.", "childParamsGroups": [] } ] } ] } ] }, { "verb": "get", "requestPath": "/orgs/{org}/teams/{team_slug}/teams", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "team_slug", "description": "team_slug parameter", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "team_slug parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/teams", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG/teams"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/teams', {\n org: 'org',\n team_slug: 'team_slug'\n})",
"html": "await octokit.request('GET /orgs/{org}/teams/{team_slug}/teams', {\n org: 'org',\n team_slug: 'team_slug'\n})\n"
}
],
"summary": "List child teams",
"description": "Lists the child teams of the team specified by `{team_slug}`.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`.",
"tags": [
"teams"
],
"operationId": "teams/list-child-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-child-teams"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
},
"slug": "list-child-teams",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the child teams of the team specified by {team_slug}.
Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/teams.
[\n {\n \"id\": 2,\n \"node_id\": \"MDQ6VGVhbTI=\",\n \"url\": \"https://api.github.com/teams/2\",\n \"name\": \"Original Roster\",\n \"slug\": \"original-roster\",\n \"description\": \"Started it all.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/2/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/2/repos\",\n \"parent\": {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n },\n \"html_url\": \"https://github.com/orgs/rails/teams/core\"\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/projects/columns/cards/{card_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "card_id",
"description": "card_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "card_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/cards/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/cards/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /projects/columns/cards/{card_id}', {\n card_id: 42\n})",
"html": "await octokit.request('GET /projects/columns/cards/{card_id}', {\n card_id: 42\n})\n"
}
],
"summary": "Get a project card",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/get-card",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#get-a-project-card"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "cards"
},
"slug": "get-a-project-card",
"category": "projects",
"categoryLabel": "Projects",
"subcategory": "cards",
"subcategoryLabel": "Cards",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"url\": \"https://api.github.com/projects/columns/cards/1478\",\n \"id\": 1478,\n \"node_id\": \"MDExOlByb2plY3RDYXJkMTQ3OA==\",\n \"note\": \"Add payload for delete Project column\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2016-09-05T14:21:06Z\",\n \"updated_at\": \"2016-09-05T14:20:22Z\",\n \"archived\": false,\n \"column_url\": \"https://api.github.com/projects/columns/367\",\n \"content_url\": \"https://api.github.com/repos/api-playground/projects-test/issues/3\",\n \"project_url\": \"https://api.github.com/projects/120\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/projects/columns/cards/{card_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "card_id",
"description": "card_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "card_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/cards/42 \\\n -d '{\"note\":\"note\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/cards/42 \\\n -d '{\"note\":\"note\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /projects/columns/cards/{card_id}', {\n card_id: 42,\n note: 'note'\n})",
"html": "await octokit.request('PATCH /projects/columns/cards/{card_id}', {\n card_id: 42,\n note: 'note'\n})\n"
}
],
"summary": "Update an existing project card",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/update-card",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#update-a-project-card"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"note": {
"description": "The project card's note
", "example": "Update all gems", "type": "string or nullable", "nullable": true, "name": "note", "in": "body", "rawType": "string", "rawDescription": "The project card's note", "childParamsGroups": [] }, "archived": { "description": "Whether or not the card is archived
", "example": false, "type": "boolean", "name": "archived", "in": "body", "rawType": "boolean", "rawDescription": "Whether or not the card is archived", "childParamsGroups": [] } } } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "projects", "subcategory": "cards" }, "slug": "update-an-existing-project-card", "category": "projects", "categoryLabel": "Projects", "subcategory": "cards", "subcategoryLabel": "Cards", "contentType": "application/json", "notes": [], "descriptionHTML": "", "bodyParameters": [ { "description": "The project card's note
", "example": "Update all gems", "type": "string or nullable", "nullable": true, "name": "note", "in": "body", "rawType": "string", "rawDescription": "The project card's note", "childParamsGroups": [] }, { "description": "Whether or not the card is archived
", "example": false, "type": "boolean", "name": "archived", "in": "body", "rawType": "boolean", "rawDescription": "Whether or not the card is archived", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/projects/columns/cards/1478\",\n \"id\": 1478,\n \"node_id\": \"MDExOlByb2plY3RDYXJkMTQ3OA==\",\n \"note\": \"Add payload for delete Project column\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2016-09-05T14:21:06Z\",\n \"updated_at\": \"2016-09-05T14:20:22Z\",\n \"archived\": false,\n \"column_url\": \"https://api.github.com/projects/columns/367\",\n \"content_url\": \"https://api.github.com/repos/api-playground/projects-test/issues/3\",\n \"project_url\": \"https://api.github.com/projects/120\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/projects/columns/cards/{card_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "card_id",
"description": "card_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "card_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/cards/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/cards/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /projects/columns/cards/{card_id}', {\n card_id: 42\n})",
"html": "await octokit.request('DELETE /projects/columns/cards/{card_id}', {\n card_id: 42\n})\n"
}
],
"summary": "Delete a project card",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/delete-card",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#delete-a-project-card"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "cards"
},
"slug": "delete-a-project-card",
"category": "projects",
"categoryLabel": "Projects",
"subcategory": "cards",
"subcategoryLabel": "Cards",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "post",
"requestPath": "/projects/columns/cards/{card_id}/moves",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "card_id",
"description": "card_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "card_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/cards/42/moves \\\n -d '{\"position\":\"position\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/cards/42/moves \\\n -d '{\"position\":\"position\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /projects/columns/cards/{card_id}/moves', {\n card_id: 42,\n position: 'position'\n})",
"html": "await octokit.request('POST /projects/columns/cards/{card_id}/moves', {\n card_id: 42,\n position: 'position'\n})\n"
}
],
"summary": "Move a project card",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/move-card",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#move-a-project-card"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"position": {
"description": "Required. The position of the card in a column. Can be one of: top, bottom, or after:<card_id> to place after the specified card.
The unique identifier of the column the card should be moved to
", "example": 42, "type": "integer", "name": "column_id", "in": "body", "rawType": "integer", "rawDescription": "The unique identifier of the column the card should be moved to", "childParamsGroups": [] } }, "required": [ "position" ], "type": "object" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "projects", "subcategory": "cards" }, "slug": "move-a-project-card", "category": "projects", "categoryLabel": "Projects", "subcategory": "cards", "subcategoryLabel": "Cards", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response" }, { "httpStatusCode": "304", "httpStatusMessage": "Not Modified", "description": "Not modified" }, { "httpStatusCode": "401", "httpStatusMessage": "Unauthorized", "description": "Requires authentication" }, { "httpStatusCode": "403", "httpStatusMessage": "Forbidden", "description": "Forbidden" }, { "httpStatusCode": "422", "httpStatusMessage": "Unprocessable Entity", "description": "Validation failed" }, { "httpStatusCode": "503", "httpStatusMessage": "Service Unavailable", "description": "Response" } ], "descriptionHTML": "", "bodyParameters": [ { "description": "Required. The position of the card in a column. Can be one of: top, bottom, or after:<card_id> to place after the specified card.
The unique identifier of the column the card should be moved to
", "example": 42, "type": "integer", "name": "column_id", "in": "body", "rawType": "integer", "rawDescription": "The unique identifier of the column the card should be moved to", "childParamsGroups": [] } ] }, { "verb": "get", "requestPath": "/projects/columns/{column_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "column_id", "description": "column_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "column_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /projects/columns/{column_id}', {\n column_id: 42\n})",
"html": "await octokit.request('GET /projects/columns/{column_id}', {\n column_id: 42\n})\n"
}
],
"summary": "Get a project column",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/get-column",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#get-a-project-column"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "columns"
},
"slug": "get-a-project-column",
"category": "projects",
"categoryLabel": "Projects",
"subcategory": "columns",
"subcategoryLabel": "Columns",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"url\": \"https://api.github.com/projects/columns/367\",\n \"project_url\": \"https://api.github.com/projects/120\",\n \"cards_url\": \"https://api.github.com/projects/columns/367/cards\",\n \"id\": 367,\n \"node_id\": \"MDEzOlByb2plY3RDb2x1bW4zNjc=\",\n \"name\": \"To Do\",\n \"created_at\": \"2016-09-05T14:18:44Z\",\n \"updated_at\": \"2016-09-05T14:22:28Z\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/projects/columns/{column_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "column_id",
"description": "column_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "column_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/42 \\\n -d '{\"name\":\"name\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/42 \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /projects/columns/{column_id}', {\n column_id: 42,\n name: 'name'\n})",
"html": "await octokit.request('PATCH /projects/columns/{column_id}', {\n column_id: 42,\n name: 'name'\n})\n"
}
],
"summary": "Update an existing project column",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/update-column",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#update-a-project-column"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"description": "Required. Name of the project column
", "example": "Remaining tasks", "type": "string", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Name of the project column", "childParamsGroups": [] } }, "required": [ "name" ], "type": "object" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "projects", "subcategory": "columns" }, "slug": "update-an-existing-project-column", "category": "projects", "categoryLabel": "Projects", "subcategory": "columns", "subcategoryLabel": "Columns", "contentType": "application/json", "notes": [], "descriptionHTML": "", "bodyParameters": [ { "description": "Required. Name of the project column
", "example": "Remaining tasks", "type": "string", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Name of the project column", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/projects/columns/367\",\n \"project_url\": \"https://api.github.com/projects/120\",\n \"cards_url\": \"https://api.github.com/projects/columns/367/cards\",\n \"id\": 367,\n \"node_id\": \"MDEzOlByb2plY3RDb2x1bW4zNjc=\",\n \"name\": \"To Do\",\n \"created_at\": \"2016-09-05T14:18:44Z\",\n \"updated_at\": \"2016-09-05T14:22:28Z\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "delete",
"requestPath": "/projects/columns/{column_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "column_id",
"description": "column_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "column_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /projects/columns/{column_id}', {\n column_id: 42\n})",
"html": "await octokit.request('DELETE /projects/columns/{column_id}', {\n column_id: 42\n})\n"
}
],
"summary": "Delete a project column",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/delete-column",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#delete-a-project-column"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "columns"
},
"slug": "delete-a-project-column",
"category": "projects",
"categoryLabel": "Projects",
"subcategory": "columns",
"subcategoryLabel": "Columns",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/projects/columns/{column_id}/cards",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "column_id",
"description": "column_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "column_id parameter
" }, { "name": "archived_state", "description": "Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "all", "archived", "not_archived" ], "default": "not_archived" }, "descriptionHTML": "Filters the project cards that are returned by the card's state. Can be one of all,archived, or not_archived.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/42/cards", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/42/cards"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /projects/columns/{column_id}/cards', {\n column_id: 42\n})",
"html": "await octokit.request('GET /projects/columns/{column_id}/cards', {\n column_id: 42\n})\n"
}
],
"summary": "List project cards",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/list-cards",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#list-project-cards"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "cards"
},
"slug": "list-project-cards",
"category": "projects",
"categoryLabel": "Projects",
"subcategory": "cards",
"subcategoryLabel": "Cards",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"url\": \"https://api.github.com/projects/columns/cards/1478\",\n \"id\": 1478,\n \"node_id\": \"MDExOlByb2plY3RDYXJkMTQ3OA==\",\n \"note\": \"Add payload for delete Project column\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2016-09-05T14:21:06Z\",\n \"updated_at\": \"2016-09-05T14:20:22Z\",\n \"archived\": false,\n \"column_url\": \"https://api.github.com/projects/columns/367\",\n \"content_url\": \"https://api.github.com/repos/api-playground/projects-test/issues/3\",\n \"project_url\": \"https://api.github.com/projects/120\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "post",
"requestPath": "/projects/columns/{column_id}/cards",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "column_id",
"description": "column_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "column_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/42/cards", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/42/cards"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /projects/columns/{column_id}/cards', {\n column_id: 42\n})",
"html": "await octokit.request('POST /projects/columns/{column_id}/cards', {\n column_id: 42\n})\n"
}
],
"summary": "Create a project card",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/create-card",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#create-a-project-card"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"note": {
"description": "Required. The project card's note
", "example": "Update all gems", "type": "string or nullable", "nullable": true, "name": "note", "in": "body", "rawType": "string", "rawDescription": "The project card's note", "childParamsGroups": [] }, "content_id": { "description": "Required. The unique identifier of the content associated with the card
", "example": 42, "type": "integer", "name": "content_id", "in": "body", "rawType": "integer", "rawDescription": "The unique identifier of the content associated with the card", "childParamsGroups": [] }, "content_type": { "description": "Required. The piece of content associated with the card
", "example": "PullRequest", "type": "string", "name": "content_type", "in": "body", "rawType": "string", "rawDescription": "The piece of content associated with the card", "childParamsGroups": [] } }, "required": [ "note" ] }, { "type": "object", "properties": { "content_id": { "description": "Required. The unique identifier of the content associated with the card
", "example": 42, "type": "integer", "name": "content_id", "in": "body", "rawType": "integer", "rawDescription": "The unique identifier of the content associated with the card", "childParamsGroups": [] }, "content_type": { "description": "Required. The piece of content associated with the card
", "example": "PullRequest", "type": "string", "name": "content_type", "in": "body", "rawType": "string", "rawDescription": "The piece of content associated with the card", "childParamsGroups": [] } }, "required": [ "content_id", "content_type" ] } ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "projects", "subcategory": "cards" }, "slug": "create-a-project-card", "category": "projects", "categoryLabel": "Projects", "subcategory": "cards", "subcategoryLabel": "Cards", "contentType": "application/json", "notes": [], "descriptionHTML": "", "bodyParameters": [ { "description": "Required. The project card's note
", "example": "Update all gems", "type": "string or nullable", "nullable": true, "name": "note", "in": "body", "rawType": "string", "rawDescription": "The project card's note", "childParamsGroups": [] }, { "description": "Required. The unique identifier of the content associated with the card
", "example": 42, "type": "integer", "name": "content_id", "in": "body", "rawType": "integer", "rawDescription": "The unique identifier of the content associated with the card", "childParamsGroups": [] }, { "description": "Required. The piece of content associated with the card
", "example": "PullRequest", "type": "string", "name": "content_type", "in": "body", "rawType": "string", "rawDescription": "The piece of content associated with the card", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/projects/columns/cards/1478\",\n \"id\": 1478,\n \"node_id\": \"MDExOlByb2plY3RDYXJkMTQ3OA==\",\n \"note\": \"Add payload for delete Project column\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2016-09-05T14:21:06Z\",\n \"updated_at\": \"2016-09-05T14:20:22Z\",\n \"archived\": false,\n \"column_url\": \"https://api.github.com/projects/columns/367\",\n \"content_url\": \"https://api.github.com/repos/api-playground/projects-test/issues/3\",\n \"project_url\": \"https://api.github.com/projects/120\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Response"
}
]
},
{
"verb": "post",
"requestPath": "/projects/columns/{column_id}/moves",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "column_id",
"description": "column_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "column_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/42/moves \\\n -d '{\"position\":\"position\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/columns/42/moves \\\n -d '{\"position\":\"position\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /projects/columns/{column_id}/moves', {\n column_id: 42,\n position: 'position'\n})",
"html": "await octokit.request('POST /projects/columns/{column_id}/moves', {\n column_id: 42,\n position: 'position'\n})\n"
}
],
"summary": "Move a project column",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/move-column",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#move-a-project-column"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"position": {
"description": "Required. The position of the column in a project. Can be one of: first, last, or after:<column_id> to place after the specified column.
Required. The position of the column in a project. Can be one of: first, last, or after:<column_id> to place after the specified column.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /projects/{project_id}', {\n project_id: 42\n})",
"html": "await octokit.request('GET /projects/{project_id}', {\n project_id: 42\n})\n"
}
],
"summary": "Get a project",
"description": "Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.",
"tags": [
"projects"
],
"operationId": "projects/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#get-a-project"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": null
},
"slug": "get-a-project",
"category": "projects",
"categoryLabel": "Projects",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a project by its id. Returns a 404 Not Found status if projects are disabled. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
{\n \"owner_url\": \"https://api.github.com/repos/api-playground/projects-test\",\n \"url\": \"https://api.github.com/projects/1002604\",\n \"html_url\": \"https://github.com/api-playground/projects-test/projects/1\",\n \"columns_url\": \"https://api.github.com/projects/1002604/columns\",\n \"id\": 1002604,\n \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDQ=\",\n \"name\": \"Projects Documentation\",\n \"body\": \"Developer documentation project for the developer site.\",\n \"number\": 1,\n \"state\": \"open\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "patch",
"requestPath": "/projects/{project_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "project_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/42 \\\n -d '{\"name\":\"name\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/42 \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /projects/{project_id}', {\n project_id: 42,\n name: 'name'\n})",
"html": "await octokit.request('PATCH /projects/{project_id}', {\n project_id: 42,\n name: 'name'\n})\n"
}
],
"summary": "Update a project",
"description": "Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.",
"operationId": "projects/update",
"tags": [
"projects"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#update-a-project"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"description": "Name of the project
", "example": "Week One Sprint", "type": "string", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Name of the project", "childParamsGroups": [] }, "body": { "description": "Body of the project
", "example": "This project represents the sprint of the first week in January", "type": "string or nullable", "nullable": true, "name": "body", "in": "body", "rawType": "string", "rawDescription": "Body of the project", "childParamsGroups": [] }, "state": { "description": "State of the project; either 'open' or 'closed'
", "example": "open", "type": "string", "name": "state", "in": "body", "rawType": "string", "rawDescription": "State of the project; either 'open' or 'closed'", "childParamsGroups": [] }, "organization_permission": { "description": "The baseline permission that all organization members have on this project
", "type": "string", "enum": [ "read", "write", "admin", "none" ], "name": "organization_permission", "in": "body", "rawType": "string", "rawDescription": "The baseline permission that all organization members have on this project", "childParamsGroups": [] }, "private": { "description": "Whether or not this project can be seen by everyone.
", "type": "boolean", "name": "private", "in": "body", "rawType": "boolean", "rawDescription": "Whether or not this project can be seen by everyone.", "childParamsGroups": [] } }, "type": "object" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "projects", "subcategory": null }, "slug": "update-a-project", "category": "projects", "categoryLabel": "Projects", "contentType": "application/json", "notes": [], "descriptionHTML": "Updates a project board's information. Returns a 404 Not Found status if projects are disabled. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
Name of the project
", "example": "Week One Sprint", "type": "string", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Name of the project", "childParamsGroups": [] }, { "description": "Body of the project
", "example": "This project represents the sprint of the first week in January", "type": "string or nullable", "nullable": true, "name": "body", "in": "body", "rawType": "string", "rawDescription": "Body of the project", "childParamsGroups": [] }, { "description": "State of the project; either 'open' or 'closed'
", "example": "open", "type": "string", "name": "state", "in": "body", "rawType": "string", "rawDescription": "State of the project; either 'open' or 'closed'", "childParamsGroups": [] }, { "description": "The baseline permission that all organization members have on this project
", "type": "string", "enum": [ "read", "write", "admin", "none" ], "name": "organization_permission", "in": "body", "rawType": "string", "rawDescription": "The baseline permission that all organization members have on this project", "childParamsGroups": [] }, { "description": "Whether or not this project can be seen by everyone.
", "type": "boolean", "name": "private", "in": "body", "rawType": "boolean", "rawDescription": "Whether or not this project can be seen by everyone.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"owner_url\": \"https://api.github.com/repos/api-playground/projects-test\",\n \"url\": \"https://api.github.com/projects/1002604\",\n \"html_url\": \"https://github.com/api-playground/projects-test/projects/1\",\n \"columns_url\": \"https://api.github.com/projects/1002604/columns\",\n \"id\": 1002604,\n \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDQ=\",\n \"name\": \"Projects Documentation\",\n \"body\": \"Developer documentation project for the developer site.\",\n \"number\": 1,\n \"state\": \"open\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if the authenticated user does not have access to the project"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/projects/{project_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "project_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/42",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /projects/{project_id}', {\n project_id: 42\n})",
"html": "await octokit.request('DELETE /projects/{project_id}', {\n project_id: 42\n})\n"
}
],
"summary": "Delete a project",
"description": "Deletes a project board. Returns a `404 Not Found` status if projects are disabled.",
"operationId": "projects/delete",
"tags": [
"projects"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#delete-a-project"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": null
},
"slug": "delete-a-project",
"category": "projects",
"categoryLabel": "Projects",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Delete Success"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes a project board. Returns a 404 Not Found status if projects are disabled.
Filters the collaborators by their affiliation. Can be one of:
\n* outside: Outside collaborators of a project that are not a member of the project's organization.
\n* direct: Collaborators with permissions to a project, regardless of organization membership status.
\n* all: All collaborators the authenticated user can see.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/42/collaborators", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/42/collaborators"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /projects/{project_id}/collaborators', {\n project_id: 42\n})",
"html": "await octokit.request('GET /projects/{project_id}/collaborators', {\n project_id: 42\n})\n"
}
],
"summary": "List project collaborators",
"description": "Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators.",
"tags": [
"projects"
],
"operationId": "projects/list-collaborators",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#list-project-collaborators"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "collaborators"
},
"slug": "list-project-collaborators",
"category": "projects",
"categoryLabel": "Projects",
"subcategory": "collaborators",
"subcategoryLabel": "Collaborators",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project admin to list collaborators.
[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "put",
"requestPath": "/projects/{project_id}/collaborators/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "project_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/42/collaborators/USERNAME \\\n -d '{\"permission\":\"permission\"}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/42/collaborators/USERNAME \\\n -d '{\"permission\":\"permission\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /projects/{project_id}/collaborators/{username}', {\n project_id: 42,\n username: 'username',\n permission: 'permission'\n})",
"html": "await octokit.request('PUT /projects/{project_id}/collaborators/{username}', {\n project_id: 42,\n username: 'username',\n permission: 'permission'\n})\n"
}
],
"summary": "Add project collaborator",
"description": "Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator.",
"tags": [
"projects"
],
"operationId": "projects/add-collaborator",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#add-project-collaborator"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"permission": {
"description": "The permission to grant the collaborator.
", "enum": [ "read", "write", "admin" ], "default": "write", "example": "write", "type": "string", "name": "permission", "in": "body", "rawType": "string", "rawDescription": "The permission to grant the collaborator.", "childParamsGroups": [] } }, "nullable": true } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "projects", "subcategory": "collaborators" }, "slug": "add-project-collaborator", "category": "projects", "categoryLabel": "Projects", "subcategory": "collaborators", "subcategoryLabel": "Collaborators", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "204", "httpStatusMessage": "No Content", "description": "Response" }, { "httpStatusCode": "304", "httpStatusMessage": "Not Modified", "description": "Not modified" }, { "httpStatusCode": "401", "httpStatusMessage": "Unauthorized", "description": "Requires authentication" }, { "httpStatusCode": "403", "httpStatusMessage": "Forbidden", "description": "Forbidden" }, { "httpStatusCode": "404", "httpStatusMessage": "Not Found", "description": "Resource not found" }, { "httpStatusCode": "422", "httpStatusMessage": "Unprocessable Entity", "description": "Validation failed" } ], "descriptionHTML": "Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project admin to add a collaborator.
The permission to grant the collaborator.
", "enum": [ "read", "write", "admin" ], "default": "write", "example": "write", "type": "string", "name": "permission", "in": "body", "rawType": "string", "rawDescription": "The permission to grant the collaborator.", "childParamsGroups": [] } ] }, { "verb": "delete", "requestPath": "/projects/{project_id}/collaborators/{username}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "project_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/42/collaborators/USERNAME", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/42/collaborators/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /projects/{project_id}/collaborators/{username}', {\n project_id: 42,\n username: 'username'\n})",
"html": "await octokit.request('DELETE /projects/{project_id}/collaborators/{username}', {\n project_id: 42,\n username: 'username'\n})\n"
}
],
"summary": "Remove user as a collaborator",
"description": "Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator.",
"tags": [
"projects"
],
"operationId": "projects/remove-collaborator",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#remove-project-collaborator"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "collaborators"
},
"slug": "remove-user-as-a-collaborator",
"category": "projects",
"categoryLabel": "Projects",
"subcategory": "collaborators",
"subcategoryLabel": "Collaborators",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [],
"descriptionHTML": "Removes a collaborator from an organization project. You must be an organization owner or a project admin to remove a collaborator.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/42/collaborators/USERNAME/permission"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /projects/{project_id}/collaborators/{username}/permission', {\n project_id: 42,\n username: 'username'\n})",
"html": "await octokit.request('GET /projects/{project_id}/collaborators/{username}/permission', {\n project_id: 42,\n username: 'username'\n})\n"
}
],
"summary": "Get project permission for a user",
"description": "Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level.",
"tags": [
"projects"
],
"operationId": "projects/get-permission-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "collaborators"
},
"slug": "get-project-permission-for-a-user",
"category": "projects",
"categoryLabel": "Projects",
"subcategory": "collaborators",
"subcategoryLabel": "Collaborators",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns the collaborator's permission level for an organization project. Possible values for the permission key: admin, write, read, none. You must be an organization owner or a project admin to review a user's permission level.
{\n \"permission\": \"admin\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/projects/{project_id}/columns",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "project_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/42/columns", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/42/columns"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /projects/{project_id}/columns', {\n project_id: 42\n})",
"html": "await octokit.request('GET /projects/{project_id}/columns', {\n project_id: 42\n})\n"
}
],
"summary": "List project columns",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/list-columns",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#list-project-columns"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "columns"
},
"slug": "list-project-columns",
"category": "projects",
"categoryLabel": "Projects",
"subcategory": "columns",
"subcategoryLabel": "Columns",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"url\": \"https://api.github.com/projects/columns/367\",\n \"project_url\": \"https://api.github.com/projects/120\",\n \"cards_url\": \"https://api.github.com/projects/columns/367/cards\",\n \"id\": 367,\n \"node_id\": \"MDEzOlByb2plY3RDb2x1bW4zNjc=\",\n \"name\": \"To Do\",\n \"created_at\": \"2016-09-05T14:18:44Z\",\n \"updated_at\": \"2016-09-05T14:22:28Z\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "post",
"requestPath": "/projects/{project_id}/columns",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "project_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/42/columns \\\n -d '{\"name\":\"name\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/projects/42/columns \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /projects/{project_id}/columns', {\n project_id: 42,\n name: 'name'\n})",
"html": "await octokit.request('POST /projects/{project_id}/columns', {\n project_id: 42,\n name: 'name'\n})\n"
}
],
"summary": "Create a project column",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/create-column",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#create-a-project-column"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"description": "Required. Name of the project column
", "example": "Remaining tasks", "type": "string", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Name of the project column", "childParamsGroups": [] } }, "required": [ "name" ], "type": "object" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "projects", "subcategory": "columns" }, "slug": "create-a-project-column", "category": "projects", "categoryLabel": "Projects", "subcategory": "columns", "subcategoryLabel": "Columns", "contentType": "application/json", "notes": [], "descriptionHTML": "", "bodyParameters": [ { "description": "Required. Name of the project column
", "example": "Remaining tasks", "type": "string", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Name of the project column", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/projects/columns/367\",\n \"project_url\": \"https://api.github.com/projects/120\",\n \"cards_url\": \"https://api.github.com/projects/columns/367/cards\",\n \"id\": 367,\n \"node_id\": \"MDEzOlByb2plY3RDb2x1bW4zNjc=\",\n \"name\": \"To Do\",\n \"created_at\": \"2016-09-05T14:18:44Z\",\n \"updated_at\": \"2016-09-05T14:22:28Z\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/rate_limit",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/rate_limit",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/rate_limit"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /rate_limit')",
"html": "await octokit.request('GET /rate_limit')\n"
}
],
"summary": "Get rate limit status for the authenticated user",
"description": "**Note:** Accessing this endpoint does not count against your REST API rate limit.\n\n**Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object.",
"tags": [
"rate-limit"
],
"operationId": "rate-limit/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "rate-limit",
"subcategory": null
},
"slug": "get-rate-limit-status-for-the-authenticated-user",
"category": "rate-limit",
"categoryLabel": "Rate limit",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Note: Accessing this endpoint does not count against your REST API rate limit.
\nNote: The rate object is deprecated. If you're writing new API client code or updating existing code, you should use the core object instead of the rate object. The core object contains the same information that is present in the rate object.
{\n \"resources\": {\n \"core\": {\n \"limit\": 5000,\n \"remaining\": 4999,\n \"reset\": 1372700873,\n \"used\": 1\n },\n \"search\": {\n \"limit\": 30,\n \"remaining\": 18,\n \"reset\": 1372697452,\n \"used\": 12\n },\n \"graphql\": {\n \"limit\": 5000,\n \"remaining\": 4993,\n \"reset\": 1372700389,\n \"used\": 7\n },\n \"integration_manifest\": {\n \"limit\": 5000,\n \"remaining\": 4999,\n \"reset\": 1551806725,\n \"used\": 1\n },\n \"code_scanning_upload\": {\n \"limit\": 500,\n \"remaining\": 499,\n \"reset\": 1551806725,\n \"used\": 1\n }\n },\n \"rate\": {\n \"limit\": 5000,\n \"remaining\": 4999,\n \"reset\": 1372700873,\n \"used\": 1\n }\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "delete",
"requestPath": "/reactions/{reaction_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "reaction_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/reactions/42",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/reactions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /reactions/{reaction_id}', {\n reaction_id: 42\n})",
"html": "await octokit.request('DELETE /reactions/{reaction_id}', {\n reaction_id: 42\n})\n"
}
],
"summary": "Delete a reaction (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/).\n\nOAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments).",
"tags": [
"reactions"
],
"operationId": "reactions/delete-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions/#delete-a-reaction-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-21",
"deprecationDate": "2020-02-26",
"category": "reactions",
"subcategory": null
},
"deprecated": true,
"slug": "delete-a-reaction-legacy",
"category": "reactions",
"categoryLabel": "Reactions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
}
],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this blog post.
\nOAuth access tokens require the write:discussion scope, when deleting a team discussion or team discussion comment.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get a repository",
"description": "The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network.",
"tags": [
"repos"
],
"operationId": "repos/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
},
"slug": "get-a-repository",
"category": "repos",
"categoryLabel": "Repos",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "The parent and source objects are present when the repository is a fork. parent is the repository this repository was forked from, source is the ultimate source for the network.
{\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"forks\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"open_issues\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"pull\": true,\n \"push\": false,\n \"admin\": false\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n },\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"spdx_id\": \"MIT\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n },\n \"organization\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"Organization\",\n \"site_admin\": false\n },\n \"parent\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n },\n \"source\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n}\n"
},
{
"httpStatusCode": "301",
"httpStatusMessage": "Moved Permanently",
"description": "Moved permanently"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world \\\n -d '{\"name\":\"name\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}', {\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}', {\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})\n"
}
],
"summary": "Update a repository",
"description": "**Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint.",
"tags": [
"repos"
],
"operationId": "repos/update",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos/#update-a-repository"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the repository.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the repository.", "childParamsGroups": [] }, "description": { "type": "string", "description": "A short description of the repository.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short description of the repository.", "childParamsGroups": [] }, "homepage": { "type": "string", "description": "A URL with more information about the repository.
", "name": "homepage", "in": "body", "rawType": "string", "rawDescription": "A URL with more information about the repository.", "childParamsGroups": [] }, "private": { "type": "boolean", "description": "Either true to make the repository private or false to make it public. Default: false.
\nNote: You will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. Note: You will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private.
Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal.\"
Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: {\"security_and_analysis\": {\"advanced_security\": {\"status\": \"enabled\"}}}. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a GET /repos/{owner}/{repo} request.
Use the status property to enable or disable GitHub Advanced Security for this repository. For more information, see \"About GitHub Advanced Security.\"
Can be enabled or disabled.
Can be enabled or disabled.
Use the status property to enable or disable secret scanning for this repository. For more information, see \"About secret scanning.\"
Can be enabled or disabled.
Can be enabled or disabled.
Use the status property to enable or disable GitHub Advanced Security for this repository. For more information, see \"About GitHub Advanced Security.\"
Can be enabled or disabled.
Can be enabled or disabled.
Use the status property to enable or disable secret scanning for this repository. For more information, see \"About secret scanning.\"
Can be enabled or disabled.
Can be enabled or disabled.
Can be enabled or disabled.
Can be enabled or disabled.
Either true to enable issues for this repository or false to disable them.
Either true to enable projects for this repository or false to disable them. Note: If you're creating a repository in an organization that has disabled repository projects, the default is false, and if you pass true, the API returns an error.
Either true to enable the wiki for this repository or false to disable it.
Either true to make this repo available as a template repository or false to prevent it.
Updates the default branch for this repository.
", "name": "default_branch", "in": "body", "rawType": "string", "rawDescription": "Updates the default branch for this repository.", "childParamsGroups": [] }, "allow_squash_merge": { "type": "boolean", "description": "Either true to allow squash-merging pull requests, or false to prevent squash-merging.
Either true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.
Either true to allow rebase-merging pull requests, or false to prevent rebase-merging.
Either true to allow auto-merge on pull requests, or false to disallow auto-merge.
Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion.
true to archive this repository. Note: You cannot unarchive repositories through the API.
Either true to allow private forks, or false to prevent private forks.
Note: To edit a repository's topics, use the Replace all repository topics endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"language\": null,\n \"forks_count\": 9,\n \"forks\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"open_issues\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"pull\": true,\n \"push\": false,\n \"admin\": false\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n },\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"allow_forking\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"organization\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"Organization\",\n \"site_admin\": false\n },\n \"parent\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n },\n \"source\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n}\n"
},
{
"httpStatusCode": "307",
"httpStatusMessage": "Temporary Redirect",
"description": "Temporary Redirect"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"type": "string",
"description": "The name of the repository.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the repository.", "childParamsGroups": [] }, { "type": "string", "description": "A short description of the repository.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short description of the repository.", "childParamsGroups": [] }, { "type": "string", "description": "A URL with more information about the repository.
", "name": "homepage", "in": "body", "rawType": "string", "rawDescription": "A URL with more information about the repository.", "childParamsGroups": [] }, { "type": "boolean", "description": "Either true to make the repository private or false to make it public. Default: false.
\nNote: You will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. Note: You will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private.
Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal.\"
Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: {\"security_and_analysis\": {\"advanced_security\": {\"status\": \"enabled\"}}}. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a GET /repos/{owner}/{repo} request.
Use the status property to enable or disable GitHub Advanced Security for this repository. For more information, see \"About GitHub Advanced Security.\"
Can be enabled or disabled.
Can be enabled or disabled.
Use the status property to enable or disable secret scanning for this repository. For more information, see \"About secret scanning.\"
Can be enabled or disabled.
Can be enabled or disabled.
Use the status property to enable or disable GitHub Advanced Security for this repository. For more information, see \"About GitHub Advanced Security.\"
Can be enabled or disabled.
Can be enabled or disabled.
Use the status property to enable or disable secret scanning for this repository. For more information, see \"About secret scanning.\"
Can be enabled or disabled.
Can be enabled or disabled.
Can be enabled or disabled.
Can be enabled or disabled.
Either true to enable issues for this repository or false to disable them.
Either true to enable projects for this repository or false to disable them. Note: If you're creating a repository in an organization that has disabled repository projects, the default is false, and if you pass true, the API returns an error.
Either true to enable the wiki for this repository or false to disable it.
Either true to make this repo available as a template repository or false to prevent it.
Updates the default branch for this repository.
", "name": "default_branch", "in": "body", "rawType": "string", "rawDescription": "Updates the default branch for this repository.", "childParamsGroups": [] }, { "type": "boolean", "description": "Either true to allow squash-merging pull requests, or false to prevent squash-merging.
Either true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.
Either true to allow rebase-merging pull requests, or false to prevent rebase-merging.
Either true to allow auto-merge on pull requests, or false to disallow auto-merge.
Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion.
true to archive this repository. Note: You cannot unarchive repositories through the API.
Either true to allow private forks, or false to prevent private forks.
curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Delete a repository",
"description": "Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required.\n\nIf an organization owner has configured the organization to prevent members from deleting organization-owned\nrepositories, you will get a `403 Forbidden` response.",
"tags": [
"repos"
],
"operationId": "repos/delete",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
},
"slug": "delete-a-repository",
"category": "repos",
"categoryLabel": "Repos",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deleting a repository requires admin access. If OAuth is used, the delete_repo scope is required.
If an organization owner has configured the organization to prevent members from deleting organization-owned\nrepositories, you will get a 403 Forbidden response.
{\n \"message\": \"Organization members cannot delete repositories.\",\n \"documentation_url\": \"https://docs.github.com/rest/reference/repos#delete-a-repository\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/artifacts",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/artifacts", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/artifacts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/artifacts', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/artifacts', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List artifacts for a repository",
"description": "Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-artifacts-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "artifacts"
},
"slug": "list-artifacts-for-a-repository",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "artifacts",
"subcategoryLabel": "Artifacts",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
{\n \"total_count\": 2,\n \"artifacts\": [\n {\n \"id\": 11,\n \"node_id\": \"MDg6QXJ0aWZhY3QxMQ==\",\n \"name\": \"Rails\",\n \"size_in_bytes\": 556,\n \"url\": \"https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/11\",\n \"archive_download_url\": \"https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/11/zip\",\n \"expired\": false,\n \"created_at\": \"2020-01-10T14:59:22Z\",\n \"expires_at\": \"2020-03-21T14:59:22Z\",\n \"updated_at\": \"2020-02-21T14:59:22Z\"\n },\n {\n \"id\": 13,\n \"node_id\": \"MDg6QXJ0aWZhY3QxMw==\",\n \"name\": \"\",\n \"size_in_bytes\": 453,\n \"url\": \"https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13\",\n \"archive_download_url\": \"https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip\",\n \"expired\": false,\n \"created_at\": \"2020-01-10T14:59:22Z\",\n \"expires_at\": \"2020-03-21T14:59:22Z\",\n \"updated_at\": \"2020-02-21T14:59:22Z\"\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "artifact_id",
"description": "artifact_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "artifact_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/artifacts/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/artifacts/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n artifact_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n artifact_id: 42\n})\n"
}
],
"summary": "Get an artifact",
"description": "Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-artifact",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-an-artifact"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "artifacts"
},
"slug": "get-an-artifact",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "artifacts",
"subcategoryLabel": "Artifacts",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
{\n \"id\": 11,\n \"node_id\": \"MDg6QXJ0aWZhY3QxMQ==\",\n \"name\": \"Rails\",\n \"size_in_bytes\": 556,\n \"url\": \"https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/11\",\n \"archive_download_url\": \"https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/11/zip\",\n \"expired\": false,\n \"created_at\": \"2020-01-10T14:59:22Z\",\n \"expires_at\": \"2020-01-21T14:59:22Z\",\n \"updated_at\": \"2020-01-21T14:59:22Z\"\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "artifact_id",
"description": "artifact_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "artifact_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/artifacts/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/artifacts/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n artifact_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n artifact_id: 42\n})\n"
}
],
"summary": "Delete an artifact",
"description": "Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-artifact",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-an-artifact"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "artifacts"
},
"slug": "delete-an-artifact",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "artifacts",
"subcategoryLabel": "Artifacts",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes an artifact for a workflow run. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint.
artifact_id parameter
" }, { "name": "archive_format", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/artifacts/42/ARCHIVE_FORMAT", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/artifacts/42/ARCHIVE_FORMAT"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}', {\n owner: 'octocat',\n repo: 'hello-world',\n artifact_id: 42,\n archive_format: 'archive_format'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}', {\n owner: 'octocat',\n repo: 'hello-world',\n artifact_id: 42,\n archive_format: 'archive_format'\n})\n"
}
],
"summary": "Download an artifact",
"description": "Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in\nthe response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to\nthe repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope.\nGitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/download-artifact",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#download-an-artifact"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "artifacts"
},
"slug": "download-an-artifact",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "artifacts",
"subcategoryLabel": "Artifacts",
"notes": [],
"responses": [
{
"httpStatusCode": "302",
"httpStatusMessage": "Found",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for Location: in\nthe response header to find the URL for the download. The :archive_format must be zip. Anyone with read access to\nthe repository can use this endpoint. If the repository is private you must use an access token with the repo scope.\nGitHub Apps must have the actions:read permission to use this endpoint.
job_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/jobs/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/jobs/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/jobs/{job_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n job_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/jobs/{job_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n job_id: 42\n})\n"
}
],
"summary": "Get a job for a workflow run",
"description": "Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-job-for-workflow-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-jobs"
},
"slug": "get-a-job-for-a-workflow-run",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-jobs",
"subcategoryLabel": "Workflow jobs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
{\n \"id\": 399444496,\n \"run_id\": 29679449,\n \"run_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/29679449\",\n \"node_id\": \"MDEyOldvcmtmbG93IEpvYjM5OTQ0NDQ5Ng==\",\n \"head_sha\": \"f83a356604ae3c5d03e1b46ef4d1ca77d64a90b0\",\n \"url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/jobs/399444496\",\n \"html_url\": \"https://github.com/octo-org/octo-repo/runs/399444496\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"started_at\": \"2020-01-20T17:42:40Z\",\n \"completed_at\": \"2020-01-20T17:44:39Z\",\n \"name\": \"build\",\n \"steps\": [\n {\n \"name\": \"Set up job\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 1,\n \"started_at\": \"2020-01-20T09:42:40.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:41.000-08:00\"\n },\n {\n \"name\": \"Run actions/checkout@v2\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 2,\n \"started_at\": \"2020-01-20T09:42:41.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:45.000-08:00\"\n },\n {\n \"name\": \"Set up Ruby\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 3,\n \"started_at\": \"2020-01-20T09:42:45.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:45.000-08:00\"\n },\n {\n \"name\": \"Run actions/cache@v2\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 4,\n \"started_at\": \"2020-01-20T09:42:45.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:48.000-08:00\"\n },\n {\n \"name\": \"Install Bundler\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 5,\n \"started_at\": \"2020-01-20T09:42:48.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:52.000-08:00\"\n },\n {\n \"name\": \"Install Gems\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 6,\n \"started_at\": \"2020-01-20T09:42:52.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:53.000-08:00\"\n },\n {\n \"name\": \"Run Tests\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 7,\n \"started_at\": \"2020-01-20T09:42:53.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:59.000-08:00\"\n },\n {\n \"name\": \"Deploy to Heroku\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 8,\n \"started_at\": \"2020-01-20T09:42:59.000-08:00\",\n \"completed_at\": \"2020-01-20T09:44:39.000-08:00\"\n },\n {\n \"name\": \"Post actions/cache@v2\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 16,\n \"started_at\": \"2020-01-20T09:44:39.000-08:00\",\n \"completed_at\": \"2020-01-20T09:44:39.000-08:00\"\n },\n {\n \"name\": \"Complete job\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 17,\n \"started_at\": \"2020-01-20T09:44:39.000-08:00\",\n \"completed_at\": \"2020-01-20T09:44:39.000-08:00\"\n }\n ],\n \"check_run_url\": \"https://api.github.com/repos/octo-org/octo-repo/check-runs/399444496\",\n \"labels\": [\n \"self-hosted\",\n \"foo\",\n \"bar\"\n ],\n \"runner_id\": 1,\n \"runner_name\": \"my runner\",\n \"runner_group_id\": 2,\n \"runner_group_name\": \"my runner group\"\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "job_id",
"description": "job_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "job_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/jobs/42/logs", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/jobs/42/logs"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs', {\n owner: 'octocat',\n repo: 'hello-world',\n job_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs', {\n owner: 'octocat',\n repo: 'hello-world',\n job_id: 42\n})\n"
}
],
"summary": "Download job logs for a workflow run",
"description": "Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look\nfor `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can\nuse this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must\nhave the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/download-job-logs-for-workflow-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-jobs"
},
"slug": "download-job-logs-for-a-workflow-run",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-jobs",
"subcategoryLabel": "Workflow jobs",
"notes": [],
"responses": [
{
"httpStatusCode": "302",
"httpStatusMessage": "Found",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look\nfor Location: in the response header to find the URL for the download. Anyone with read access to the repository can\nuse this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must\nhave the actions:read permission to use this endpoint.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/permissions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/permissions', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/permissions', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get GitHub Actions permissions for a repository",
"description": "Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions allowed to run in the repository.\n\nYou must authenticate using an access token with the `repo` scope to use this\nendpoint. GitHub Apps must have the `administration` repository permission to use this API.",
"operationId": "actions/get-github-actions-permissions-repository",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
},
"slug": "get-github-actions-permissions-for-a-repository",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "permissions",
"subcategoryLabel": "Permissions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions allowed to run in the repository.
\nYou must authenticate using an access token with the repo scope to use this\nendpoint. GitHub Apps must have the administration repository permission to use this API.
{\n \"enabled\": true,\n \"allowed_actions\": \"selected\",\n \"selected_actions_url\": \"https://api.github.com/repositories/42/actions/permissions/selected-actions\"\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/actions/permissions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/permissions \\\n -d '{\"enabled\":true}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/permissions \\\n -d '{\"enabled\":true}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/actions/permissions', {\n owner: 'octocat',\n repo: 'hello-world',\n enabled: true\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/actions/permissions', {\n owner: 'octocat',\n repo: 'hello-world',\n enabled: true\n})\n"
}
],
"summary": "Set GitHub Actions permissions for a repository",
"description": "Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository.\n\nIf the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions, then you cannot override them for the repository.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.",
"operationId": "actions/set-github-actions-permissions-repository",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "Required. Whether GitHub Actions is enabled on the repository.
", "name": "enabled", "in": "body", "rawType": "boolean", "rawDescription": "Whether GitHub Actions is enabled on the repository.", "childParamsGroups": [] }, "allowed_actions": { "type": "string", "description": "The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.
Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository.
\nIf the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as allowed_actions to selected actions, then you cannot override them for the repository.
You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the administration repository permission to use this API.
Required. Whether GitHub Actions is enabled on the repository.
", "name": "enabled", "in": "body", "rawType": "boolean", "rawDescription": "Whether GitHub Actions is enabled on the repository.", "childParamsGroups": [] }, { "type": "string", "description": "The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/permissions/selected-actions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/permissions/selected-actions', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/permissions/selected-actions', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get allowed actions for a repository",
"description": "Gets the settings for selected actions that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository).\"\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.",
"operationId": "actions/get-allowed-actions-repository",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
},
"slug": "get-allowed-actions-for-a-repository",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "permissions",
"subcategoryLabel": "Permissions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the settings for selected actions that are allowed in a repository. To use this endpoint, the repository policy for allowed_actions must be configured to selected. For more information, see \"Set GitHub Actions permissions for a repository.\"
You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the administration repository permission to use this API.
{\n \"github_owned_allowed\": true,\n \"verified_allowed\": false,\n \"patterns_allowed\": [\n \"monalisa/octocat@*\",\n \"docker/*\"\n ]\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/actions/permissions/selected-actions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/permissions/selected-actions \\\n -d '{\"github_owned_allowed\":true}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/permissions/selected-actions \\\n -d '{\"github_owned_allowed\":true}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/actions/permissions/selected-actions', {\n owner: 'octocat',\n repo: 'hello-world',\n github_owned_allowed: true\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/actions/permissions/selected-actions', {\n owner: 'octocat',\n repo: 'hello-world',\n github_owned_allowed: true\n})\n"
}
],
"summary": "Set allowed actions for a repository",
"description": "Sets the actions that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository).\"\n\nIf the repository belongs to an organization or enterprise that has `selected` actions set at the organization or enterprise levels, then you cannot override any of the allowed actions settings.\n\nTo use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.",
"operationId": "actions/set-allowed-actions-repository",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"github_owned_allowed": {
"type": "boolean",
"description": "Whether GitHub-owned actions are allowed. For example, this includes the actions in the actions organization.
Whether actions in GitHub Marketplace from verified creators are allowed. Set to true to allow all GitHub Marketplace actions by verified creators.
Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@*, monalisa/octocat@v2, monalisa/*.\"
Sets the actions that are allowed in a repository. To use this endpoint, the repository permission policy for allowed_actions must be configured to selected. For more information, see \"Set GitHub Actions permissions for a repository.\"
If the repository belongs to an organization or enterprise that has selected actions set at the organization or enterprise levels, then you cannot override any of the allowed actions settings.
To use the patterns_allowed setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the patterns_allowed setting only applies to public repositories.
You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the administration repository permission to use this API.
Whether GitHub-owned actions are allowed. For example, this includes the actions in the actions organization.
Whether actions in GitHub Marketplace from verified creators are allowed. Set to true to allow all GitHub Marketplace actions by verified creators.
Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@*, monalisa/octocat@v2, monalisa/*.\"
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/runners', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/runners', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List self-hosted runners for a repository",
"description": "Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-self-hosted-runners-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
},
"slug": "list-self-hosted-runners-for-a-repository",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runners",
"subcategoryLabel": "Self hosted runners",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the repo scope to use this endpoint.
{\n \"total_count\": 2,\n \"runners\": [\n {\n \"id\": 23,\n \"name\": \"linux_runner\",\n \"os\": \"linux\",\n \"status\": \"online\",\n \"busy\": true,\n \"labels\": [\n {\n \"id\": 5,\n \"name\": \"self-hosted\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 7,\n \"name\": \"X64\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 11,\n \"name\": \"Linux\",\n \"type\": \"read-only\"\n }\n ]\n },\n {\n \"id\": 24,\n \"name\": \"mac_runner\",\n \"os\": \"macos\",\n \"status\": \"offline\",\n \"busy\": false,\n \"labels\": [\n {\n \"id\": 5,\n \"name\": \"self-hosted\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 7,\n \"name\": \"X64\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 20,\n \"name\": \"macOS\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 21,\n \"name\": \"no-gpu\",\n \"type\": \"custom\"\n }\n ]\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/runners/downloads",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners/downloads",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners/downloads"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/runners/downloads', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/runners/downloads', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List runner applications for a repository",
"description": "Lists binaries for the runner application that you can download and run.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-runner-applications-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
},
"slug": "list-runner-applications-for-a-repository",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runners",
"subcategoryLabel": "Self hosted runners",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists binaries for the runner application that you can download and run.
\nYou must authenticate using an access token with the repo scope to use this endpoint.
[\n {\n \"os\": \"osx\",\n \"architecture\": \"x64\",\n \"download_url\": \"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-osx-x64-2.164.0.tar.gz\",\n \"filename\": \"actions-runner-osx-x64-2.164.0.tar.gz\"\n },\n {\n \"os\": \"linux\",\n \"architecture\": \"x64\",\n \"download_url\": \"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-x64-2.164.0.tar.gz\",\n \"filename\": \"actions-runner-linux-x64-2.164.0.tar.gz\"\n },\n {\n \"os\": \"linux\",\n \"architecture\": \"arm\",\n \"download_url\": \"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm-2.164.0.tar.gz\",\n \"filename\": \"actions-runner-linux-arm-2.164.0.tar.gz\"\n },\n {\n \"os\": \"win\",\n \"architecture\": \"x64\",\n \"download_url\": \"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-win-x64-2.164.0.zip\",\n \"filename\": \"actions-runner-win-x64-2.164.0.zip\"\n },\n {\n \"os\": \"linux\",\n \"architecture\": \"arm64\",\n \"download_url\": \"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm64-2.164.0.tar.gz\",\n \"filename\": \"actions-runner-linux-arm64-2.164.0.tar.gz\"\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/actions/runners/registration-token",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners/registration-token",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners/registration-token"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/actions/runners/registration-token', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/actions/runners/registration-token', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Create a registration token for a repository",
"description": "Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate\nusing an access token with the `repo` scope to use this endpoint.\n\n#### Example using registration token\n \nConfigure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.\n\n```\n./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n```",
"tags": [
"actions"
],
"operationId": "actions/create-registration-token-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
},
"slug": "create-a-registration-token-for-a-repository",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runners",
"subcategoryLabel": "Self hosted runners",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns a token that you can pass to the config script. The token expires after one hour. You must authenticate\nusing an access token with the repo scope to use this endpoint.
Configure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint.
./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n",
"responses": [
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response",
"payload": "{\n \"token\": \"LLBF3JGZDX3P5PMEXLND6TS6FCWO6\",\n \"expires_at\": \"2020-01-22T12:13:35.123-08:00\"\n}\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/actions/runners/remove-token",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners/remove-token",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners/remove-token"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/actions/runners/remove-token', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/actions/runners/remove-token', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Create a remove token for a repository",
"description": "Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the `repo` scope to use this endpoint.\n\n#### Example using remove token\n \nTo remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.\n\n```\n./config.sh remove --token TOKEN\n```",
"tags": [
"actions"
],
"operationId": "actions/create-remove-token-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
},
"slug": "create-a-remove-token-for-a-repository",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runners",
"subcategoryLabel": "Self hosted runners",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the repo scope to use this endpoint.
To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.
\n./config.sh remove --token TOKEN\n",
"responses": [
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response",
"payload": "{\n \"token\": \"AABF3JGZDX3P5PMEXLND6TS6FCWO6\",\n \"expires_at\": \"2020-01-29T12:13:35.123-08:00\"\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/runners/{runner_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "runner_id",
"description": "Unique identifier of the self-hosted runner.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "Unique identifier of the self-hosted runner.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/runners/{runner_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n runner_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/runners/{runner_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n runner_id: 42\n})\n"
}
],
"summary": "Get a self-hosted runner for a repository",
"description": "Gets a specific self-hosted runner configured in a repository.\n\nYou must authenticate using an access token with the `repo` scope to use this\nendpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-self-hosted-runner-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
},
"slug": "get-a-self-hosted-runner-for-a-repository",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runners",
"subcategoryLabel": "Self hosted runners",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a specific self-hosted runner configured in a repository.
\nYou must authenticate using an access token with the repo scope to use this\nendpoint.
{\n \"id\": 23,\n \"name\": \"MBP\",\n \"os\": \"macos\",\n \"status\": \"online\",\n \"busy\": true,\n \"labels\": [\n {\n \"id\": 5,\n \"name\": \"self-hosted\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 7,\n \"name\": \"X64\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 20,\n \"name\": \"macOS\",\n \"type\": \"read-only\"\n },\n {\n \"id\": 21,\n \"name\": \"no-gpu\",\n \"type\": \"custom\"\n }\n ]\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/actions/runners/{runner_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "runner_id",
"description": "Unique identifier of the self-hosted runner.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "Unique identifier of the self-hosted runner.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runners/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n runner_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n runner_id: 42\n})\n"
}
],
"summary": "Delete a self-hosted runner from a repository",
"description": "Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.\n\nYou must authenticate using an access token with the `repo`\nscope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-self-hosted-runner-from-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
},
"slug": "delete-a-self-hosted-runner-from-a-repository",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "self-hosted-runners",
"subcategoryLabel": "Self hosted runners",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
\nYou must authenticate using an access token with the repo\nscope to use this endpoint.
Returns someone's workflow runs. Use the login for the user who created the push associated with the check suite or workflow run.
Returns workflow runs associated with a branch. Use the name of the branch of the push.
Returns workflow run triggered by the event you specify. For example, push, pull_request or issue. For more information, see \"Events that trigger workflows.\"
Returns workflow runs with the check run status or conclusion that you specify. For example, a conclusion can be success or a status can be in_progress. Only GitHub can set a status of waiting or requested. For a list of the possible status and conclusion options, see \"Create a check run.\"
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" }, { "name": "created", "in": "query", "required": false, "schema": { "type": "string", "format": "date-time" }, "descriptionHTML": "" }, { "name": "exclude_pull_requests", "description": "If `true` pull requests are omitted from the response (empty array).", "in": "query", "required": false, "schema": { "type": "boolean", "default": false }, "descriptionHTML": "If true pull requests are omitted from the response (empty array).
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List workflow runs for a repository",
"description": "Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters).\n\nAnyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-workflow-runs-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
},
"slug": "list-workflow-runs-for-a-repository",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-runs",
"subcategoryLabel": "Workflow runs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see Parameters.
\nAnyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
{\n \"total_count\": 1,\n \"workflow_runs\": [\n {\n \"id\": 30433642,\n \"name\": \"Build\",\n \"node_id\": \"MDEyOldvcmtmbG93IFJ1bjI2OTI4OQ==\",\n \"head_branch\": \"master\",\n \"head_sha\": \"acb5820ced9479c074f688cc328bf03f341a511d\",\n \"run_number\": 562,\n \"event\": \"push\",\n \"status\": \"queued\",\n \"conclusion\": null,\n \"workflow_id\": 159038,\n \"url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642\",\n \"html_url\": \"https://github.com/octo-org/octo-repo/actions/runs/30433642\",\n \"pull_requests\": [],\n \"created_at\": \"2020-01-22T19:33:08Z\",\n \"updated_at\": \"2020-01-22T19:33:08Z\",\n \"jobs_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/jobs\",\n \"logs_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/logs\",\n \"check_suite_url\": \"https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374\",\n \"artifacts_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/artifacts\",\n \"cancel_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/cancel\",\n \"rerun_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/rerun\",\n \"workflow_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/workflows/159038\",\n \"head_commit\": {\n \"id\": \"acb5820ced9479c074f688cc328bf03f341a511d\",\n \"tree_id\": \"d23f6eedb1e1b9610bbc754ddb5197bfe7271223\",\n \"message\": \"Create linter.yaml\",\n \"timestamp\": \"2020-01-22T19:33:05Z\",\n \"author\": {\n \"name\": \"Octo Cat\",\n \"email\": \"octocat@github.com\"\n },\n \"committer\": {\n \"name\": \"GitHub\",\n \"email\": \"noreply@github.com\"\n }\n },\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n },\n \"head_repository\": {\n \"id\": 217723378,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMTc3MjMzNzg=\",\n \"name\": \"octo-repo\",\n \"full_name\": \"octo-org/octo-repo\",\n \"private\": true,\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"html_url\": \"https://github.com/octo-org/octo-repo\",\n \"description\": null,\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octo-org/octo-repo\",\n \"forks_url\": \"https://api.github.com/repos/octo-org/octo-repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/octo-org/octo-repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/octo-org/octo-repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/octo-org/octo-repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/octo-org/octo-repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/octo-org/octo-repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/octo-org/octo-repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/octo-org/octo-repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/octo-org/octo-repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/octo-org/octo-repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/octo-org/octo-repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/octo-org/octo-repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/octo-org/octo-repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/octo-org/octo-repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/octo-org/octo-repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octo-org/octo-repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/octo-org/octo-repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/octo-org/octo-repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/octo-org/octo-repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/octo-org/octo-repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/octo-org/octo-repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/octo-org/octo-repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/octo-org/octo-repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/octo-org/octo-repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/octo-org/octo-repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/octo-org/octo-repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/octo-org/octo-repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octo-org/octo-repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/octo-org/octo-repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/octo-org/octo-repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/octo-org/octo-repo/deployments\"\n }\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/runs/{run_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "run_id",
"description": "The id of the workflow run.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "The id of the workflow run.
" }, { "name": "exclude_pull_requests", "description": "If `true` pull requests are omitted from the response (empty array).", "in": "query", "required": false, "schema": { "type": "boolean", "default": false }, "descriptionHTML": "If true pull requests are omitted from the response (empty array).
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})\n"
}
],
"summary": "Get a workflow run",
"description": "Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-workflow-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-workflow-run"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
},
"slug": "get-a-workflow-run",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-runs",
"subcategoryLabel": "Workflow runs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
{\n \"id\": 30433642,\n \"name\": \"Build\",\n \"node_id\": \"MDEyOldvcmtmbG93IFJ1bjI2OTI4OQ==\",\n \"check_suite_id\": 42,\n \"check_suite_node_id\": \"MDEwOkNoZWNrU3VpdGU0Mg==\",\n \"head_branch\": \"master\",\n \"head_sha\": \"acb5820ced9479c074f688cc328bf03f341a511d\",\n \"run_number\": 562,\n \"event\": \"push\",\n \"status\": \"queued\",\n \"conclusion\": null,\n \"workflow_id\": 159038,\n \"url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642\",\n \"html_url\": \"https://github.com/octo-org/octo-repo/actions/runs/30433642\",\n \"pull_requests\": [],\n \"created_at\": \"2020-01-22T19:33:08Z\",\n \"updated_at\": \"2020-01-22T19:33:08Z\",\n \"jobs_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/jobs\",\n \"logs_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/logs\",\n \"check_suite_url\": \"https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374\",\n \"artifacts_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/artifacts\",\n \"cancel_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/cancel\",\n \"rerun_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/rerun\",\n \"workflow_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/workflows/159038\",\n \"head_commit\": {\n \"id\": \"acb5820ced9479c074f688cc328bf03f341a511d\",\n \"tree_id\": \"d23f6eedb1e1b9610bbc754ddb5197bfe7271223\",\n \"message\": \"Create linter.yaml\",\n \"timestamp\": \"2020-01-22T19:33:05Z\",\n \"author\": {\n \"name\": \"Octo Cat\",\n \"email\": \"octocat@github.com\"\n },\n \"committer\": {\n \"name\": \"GitHub\",\n \"email\": \"noreply@github.com\"\n }\n },\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n },\n \"head_repository\": {\n \"id\": 217723378,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMTc3MjMzNzg=\",\n \"name\": \"octo-repo\",\n \"full_name\": \"octo-org/octo-repo\",\n \"private\": true,\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"html_url\": \"https://github.com/octo-org/octo-repo\",\n \"description\": null,\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octo-org/octo-repo\",\n \"forks_url\": \"https://api.github.com/repos/octo-org/octo-repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/octo-org/octo-repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/octo-org/octo-repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/octo-org/octo-repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/octo-org/octo-repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/octo-org/octo-repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/octo-org/octo-repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/octo-org/octo-repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/octo-org/octo-repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/octo-org/octo-repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/octo-org/octo-repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/octo-org/octo-repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/octo-org/octo-repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/octo-org/octo-repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/octo-org/octo-repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octo-org/octo-repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/octo-org/octo-repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/octo-org/octo-repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/octo-org/octo-repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/octo-org/octo-repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/octo-org/octo-repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/octo-org/octo-repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/octo-org/octo-repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/octo-org/octo-repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/octo-org/octo-repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/octo-org/octo-repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/octo-org/octo-repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octo-org/octo-repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/octo-org/octo-repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/octo-org/octo-repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/octo-org/octo-repo/deployments\"\n }\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/actions/runs/{run_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "run_id",
"description": "The id of the workflow run.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "The id of the workflow run.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/actions/runs/{run_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/actions/runs/{run_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})\n"
}
],
"summary": "Delete a workflow run",
"description": "Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is\nprivate you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use\nthis endpoint.",
"operationId": "actions/delete-workflow-run",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-a-workflow-run"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
},
"slug": "delete-a-workflow-run",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-runs",
"subcategoryLabel": "Workflow runs",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is\nprivate you must use an access token with the repo scope. GitHub Apps must have the actions:write permission to use\nthis endpoint.
The id of the workflow run.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/approvals", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/approvals"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})\n"
}
],
"summary": "Get the review history for a workflow run",
"description": "Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-reviews-for-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
},
"slug": "get-the-review-history-for-a-workflow-run",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-runs",
"subcategoryLabel": "Workflow runs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
[\n {\n \"state\": \"approved\",\n \"comment\": \"Ship it!\",\n \"environments\": [\n {\n \"id\": 161088068,\n \"node_id\": \"MDExOkVudmlyb25tZW50MTYxMDg4MDY4\",\n \"name\": \"staging\",\n \"url\": \"https://api.github.com/repos/github/hello-world/environments/staging\",\n \"html_url\": \"https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging\",\n \"created_at\": \"2020-11-23T22:00:40Z\",\n \"updated_at\": \"2020-11-23T22:00:40Z\"\n }\n ],\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/actions/runs/{run_id}/approve",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "run_id",
"description": "The id of the workflow run.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "The id of the workflow run.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/approve", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/approve"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})\n"
}
],
"summary": "Approve a workflow run for a fork pull request",
"description": "Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see [\"Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks).\"\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/approve-workflow-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
},
"slug": "approve-a-workflow-run-for-a-fork-pull-request",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-runs",
"subcategoryLabel": "Workflow runs",
"notes": [],
"responses": [
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see \"Approving workflow runs from public forks.\"
\nYou must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint.
The id of the workflow run.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/artifacts", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/artifacts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})\n"
}
],
"summary": "List workflow run artifacts",
"description": "Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-workflow-run-artifacts",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "artifacts"
},
"slug": "list-workflow-run-artifacts",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "artifacts",
"subcategoryLabel": "Artifacts",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
{\n \"total_count\": 2,\n \"artifacts\": [\n {\n \"id\": 11,\n \"node_id\": \"MDg6QXJ0aWZhY3QxMQ==\",\n \"name\": \"Rails\",\n \"size_in_bytes\": 556,\n \"url\": \"https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/11\",\n \"archive_download_url\": \"https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/11/zip\",\n \"expired\": false,\n \"created_at\": \"2020-01-10T14:59:22Z\",\n \"expires_at\": \"2020-03-21T14:59:22Z\",\n \"updated_at\": \"2020-02-21T14:59:22Z\"\n },\n {\n \"id\": 13,\n \"node_id\": \"MDg6QXJ0aWZhY3QxMw==\",\n \"name\": \"\",\n \"size_in_bytes\": 453,\n \"url\": \"https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13\",\n \"archive_download_url\": \"https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip\",\n \"expired\": false,\n \"created_at\": \"2020-01-10T14:59:22Z\",\n \"expires_at\": \"2020-03-21T14:59:22Z\",\n \"updated_at\": \"2020-02-21T14:59:22Z\"\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "run_id",
"description": "The id of the workflow run.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "The id of the workflow run.
" }, { "name": "attempt_number", "description": "The attempt number of the workflow run.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "The attempt number of the workflow run.
" }, { "name": "exclude_pull_requests", "description": "If `true` pull requests are omitted from the response (empty array).", "in": "query", "required": false, "schema": { "type": "boolean", "default": false }, "descriptionHTML": "If true pull requests are omitted from the response (empty array).
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/attempts/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42,\n attempt_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42,\n attempt_number: 42\n})\n"
}
],
"summary": "Get a workflow run attempt",
"description": "Gets a specific workflow run attempt. Anyone with read access to the repository\ncan use this endpoint. If the repository is private you must use an access token\nwith the `repo` scope. GitHub Apps must have the `actions:read` permission to\nuse this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-workflow-run-attempt",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
},
"slug": "get-a-workflow-run-attempt",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-runs",
"subcategoryLabel": "Workflow runs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a specific workflow run attempt. Anyone with read access to the repository\ncan use this endpoint. If the repository is private you must use an access token\nwith the repo scope. GitHub Apps must have the actions:read permission to\nuse this endpoint.
{\n \"id\": 30433642,\n \"name\": \"Build\",\n \"node_id\": \"MDEyOldvcmtmbG93IFJ1bjI2OTI4OQ==\",\n \"check_suite_id\": 42,\n \"check_suite_node_id\": \"MDEwOkNoZWNrU3VpdGU0Mg==\",\n \"head_branch\": \"master\",\n \"head_sha\": \"acb5820ced9479c074f688cc328bf03f341a511d\",\n \"run_number\": 562,\n \"event\": \"push\",\n \"status\": \"queued\",\n \"conclusion\": null,\n \"workflow_id\": 159038,\n \"url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642\",\n \"html_url\": \"https://github.com/octo-org/octo-repo/actions/runs/30433642\",\n \"pull_requests\": [],\n \"created_at\": \"2020-01-22T19:33:08Z\",\n \"updated_at\": \"2020-01-22T19:33:08Z\",\n \"jobs_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/jobs\",\n \"logs_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/logs\",\n \"check_suite_url\": \"https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374\",\n \"artifacts_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/artifacts\",\n \"cancel_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/cancel\",\n \"rerun_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/rerun\",\n \"workflow_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/workflows/159038\",\n \"head_commit\": {\n \"id\": \"acb5820ced9479c074f688cc328bf03f341a511d\",\n \"tree_id\": \"d23f6eedb1e1b9610bbc754ddb5197bfe7271223\",\n \"message\": \"Create linter.yaml\",\n \"timestamp\": \"2020-01-22T19:33:05Z\",\n \"author\": {\n \"name\": \"Octo Cat\",\n \"email\": \"octocat@github.com\"\n },\n \"committer\": {\n \"name\": \"GitHub\",\n \"email\": \"noreply@github.com\"\n }\n },\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n },\n \"head_repository\": {\n \"id\": 217723378,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMTc3MjMzNzg=\",\n \"name\": \"octo-repo\",\n \"full_name\": \"octo-org/octo-repo\",\n \"private\": true,\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"html_url\": \"https://github.com/octo-org/octo-repo\",\n \"description\": null,\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octo-org/octo-repo\",\n \"forks_url\": \"https://api.github.com/repos/octo-org/octo-repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/octo-org/octo-repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/octo-org/octo-repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/octo-org/octo-repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/octo-org/octo-repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/octo-org/octo-repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/octo-org/octo-repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/octo-org/octo-repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/octo-org/octo-repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/octo-org/octo-repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/octo-org/octo-repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/octo-org/octo-repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/octo-org/octo-repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/octo-org/octo-repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/octo-org/octo-repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octo-org/octo-repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/octo-org/octo-repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/octo-org/octo-repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/octo-org/octo-repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/octo-org/octo-repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/octo-org/octo-repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/octo-org/octo-repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/octo-org/octo-repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/octo-org/octo-repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/octo-org/octo-repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/octo-org/octo-repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/octo-org/octo-repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octo-org/octo-repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/octo-org/octo-repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/octo-org/octo-repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/octo-org/octo-repo/deployments\"\n }\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "run_id",
"description": "The id of the workflow run.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "The id of the workflow run.
" }, { "name": "attempt_number", "description": "The attempt number of the workflow run.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "The attempt number of the workflow run.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/attempts/42/jobs", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/attempts/42/jobs"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42,\n attempt_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42,\n attempt_number: 42\n})\n"
}
],
"summary": "List jobs for a workflow run attempt",
"description": "Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters).",
"tags": [
"actions"
],
"operationId": "actions/list-jobs-for-workflow-run-attempt",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-jobs"
},
"slug": "list-jobs-for-a-workflow-run-attempt",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-jobs",
"subcategoryLabel": "Workflow jobs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see Parameters.
{\n \"total_count\": 1,\n \"jobs\": [\n {\n \"id\": 399444496,\n \"run_id\": 29679449,\n \"run_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/29679449\",\n \"node_id\": \"MDEyOldvcmtmbG93IEpvYjM5OTQ0NDQ5Ng==\",\n \"head_sha\": \"f83a356604ae3c5d03e1b46ef4d1ca77d64a90b0\",\n \"url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/jobs/399444496\",\n \"html_url\": \"https://github.com/octo-org/octo-repo/runs/399444496\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"started_at\": \"2020-01-20T17:42:40Z\",\n \"completed_at\": \"2020-01-20T17:44:39Z\",\n \"name\": \"build\",\n \"steps\": [\n {\n \"name\": \"Set up job\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 1,\n \"started_at\": \"2020-01-20T09:42:40.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:41.000-08:00\"\n },\n {\n \"name\": \"Run actions/checkout@v2\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 2,\n \"started_at\": \"2020-01-20T09:42:41.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:45.000-08:00\"\n },\n {\n \"name\": \"Set up Ruby\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 3,\n \"started_at\": \"2020-01-20T09:42:45.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:45.000-08:00\"\n },\n {\n \"name\": \"Run actions/cache@v2\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 4,\n \"started_at\": \"2020-01-20T09:42:45.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:48.000-08:00\"\n },\n {\n \"name\": \"Install Bundler\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 5,\n \"started_at\": \"2020-01-20T09:42:48.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:52.000-08:00\"\n },\n {\n \"name\": \"Install Gems\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 6,\n \"started_at\": \"2020-01-20T09:42:52.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:53.000-08:00\"\n },\n {\n \"name\": \"Run Tests\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 7,\n \"started_at\": \"2020-01-20T09:42:53.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:59.000-08:00\"\n },\n {\n \"name\": \"Deploy to Heroku\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 8,\n \"started_at\": \"2020-01-20T09:42:59.000-08:00\",\n \"completed_at\": \"2020-01-20T09:44:39.000-08:00\"\n },\n {\n \"name\": \"Post actions/cache@v2\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 16,\n \"started_at\": \"2020-01-20T09:44:39.000-08:00\",\n \"completed_at\": \"2020-01-20T09:44:39.000-08:00\"\n },\n {\n \"name\": \"Complete job\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 17,\n \"started_at\": \"2020-01-20T09:44:39.000-08:00\",\n \"completed_at\": \"2020-01-20T09:44:39.000-08:00\"\n }\n ],\n \"check_run_url\": \"https://api.github.com/repos/octo-org/octo-repo/check-runs/399444496\",\n \"labels\": [\n \"self-hosted\",\n \"foo\",\n \"bar\"\n ],\n \"runner_id\": 1,\n \"runner_name\": \"my runner\",\n \"runner_group_id\": 2,\n \"runner_group_name\": \"my runner group\"\n }\n ]\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "run_id",
"description": "The id of the workflow run.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "The id of the workflow run.
" }, { "name": "attempt_number", "description": "The attempt number of the workflow run.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "The attempt number of the workflow run.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/attempts/42/logs", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/attempts/42/logs"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42,\n attempt_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42,\n attempt_number: 42\n})\n"
}
],
"summary": "Download workflow run attempt logs",
"description": "Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after\n1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to\nthe repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope.\nGitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/download-workflow-run-attempt-logs",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
},
"slug": "download-workflow-run-attempt-logs",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-runs",
"subcategoryLabel": "Workflow runs",
"notes": [],
"responses": [
{
"httpStatusCode": "302",
"httpStatusMessage": "Found",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after\n1 minute. Look for Location: in the response header to find the URL for the download. Anyone with read access to\nthe repository can use this endpoint. If the repository is private you must use an access token with the repo scope.\nGitHub Apps must have the actions:read permission to use this endpoint.
The id of the workflow run.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/cancel", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/cancel"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})\n"
}
],
"summary": "Cancel a workflow run",
"description": "Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/cancel-workflow-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#cancel-a-workflow-run"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
},
"slug": "cancel-a-workflow-run",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-runs",
"subcategoryLabel": "Workflow runs",
"notes": [],
"responses": [
{
"httpStatusCode": "202",
"httpStatusMessage": "Accepted",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Cancels a workflow run using its id. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint.
The id of the workflow run.
" }, { "name": "filter", "description": "Filters jobs by their `completed_at` timestamp. Can be one of: \n\\* `latest`: Returns jobs from the most recent execution of the workflow run. \n\\* `all`: Returns all jobs for a workflow run, including from old executions of the workflow run.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "latest", "all" ], "default": "latest" }, "descriptionHTML": "Filters jobs by their completed_at timestamp. Can be one of:
\n* latest: Returns jobs from the most recent execution of the workflow run.
\n* all: Returns all jobs for a workflow run, including from old executions of the workflow run.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/jobs", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/jobs"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})\n"
}
],
"summary": "List jobs for a workflow run",
"description": "Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters).",
"tags": [
"actions"
],
"operationId": "actions/list-jobs-for-workflow-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-jobs"
},
"slug": "list-jobs-for-a-workflow-run",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-jobs",
"subcategoryLabel": "Workflow jobs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see Parameters.
{\n \"total_count\": 1,\n \"jobs\": [\n {\n \"id\": 399444496,\n \"run_id\": 29679449,\n \"run_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/29679449\",\n \"node_id\": \"MDEyOldvcmtmbG93IEpvYjM5OTQ0NDQ5Ng==\",\n \"head_sha\": \"f83a356604ae3c5d03e1b46ef4d1ca77d64a90b0\",\n \"url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/jobs/399444496\",\n \"html_url\": \"https://github.com/octo-org/octo-repo/runs/399444496\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"started_at\": \"2020-01-20T17:42:40Z\",\n \"completed_at\": \"2020-01-20T17:44:39Z\",\n \"name\": \"build\",\n \"steps\": [\n {\n \"name\": \"Set up job\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 1,\n \"started_at\": \"2020-01-20T09:42:40.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:41.000-08:00\"\n },\n {\n \"name\": \"Run actions/checkout@v2\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 2,\n \"started_at\": \"2020-01-20T09:42:41.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:45.000-08:00\"\n },\n {\n \"name\": \"Set up Ruby\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 3,\n \"started_at\": \"2020-01-20T09:42:45.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:45.000-08:00\"\n },\n {\n \"name\": \"Run actions/cache@v2\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 4,\n \"started_at\": \"2020-01-20T09:42:45.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:48.000-08:00\"\n },\n {\n \"name\": \"Install Bundler\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 5,\n \"started_at\": \"2020-01-20T09:42:48.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:52.000-08:00\"\n },\n {\n \"name\": \"Install Gems\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 6,\n \"started_at\": \"2020-01-20T09:42:52.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:53.000-08:00\"\n },\n {\n \"name\": \"Run Tests\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 7,\n \"started_at\": \"2020-01-20T09:42:53.000-08:00\",\n \"completed_at\": \"2020-01-20T09:42:59.000-08:00\"\n },\n {\n \"name\": \"Deploy to Heroku\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 8,\n \"started_at\": \"2020-01-20T09:42:59.000-08:00\",\n \"completed_at\": \"2020-01-20T09:44:39.000-08:00\"\n },\n {\n \"name\": \"Post actions/cache@v2\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 16,\n \"started_at\": \"2020-01-20T09:44:39.000-08:00\",\n \"completed_at\": \"2020-01-20T09:44:39.000-08:00\"\n },\n {\n \"name\": \"Complete job\",\n \"status\": \"completed\",\n \"conclusion\": \"success\",\n \"number\": 17,\n \"started_at\": \"2020-01-20T09:44:39.000-08:00\",\n \"completed_at\": \"2020-01-20T09:44:39.000-08:00\"\n }\n ],\n \"check_run_url\": \"https://api.github.com/repos/octo-org/octo-repo/check-runs/399444496\",\n \"labels\": [\n \"self-hosted\",\n \"foo\",\n \"bar\"\n ],\n \"runner_id\": 1,\n \"runner_name\": \"my runner\",\n \"runner_group_id\": 2,\n \"runner_group_name\": \"my runner group\"\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/runs/{run_id}/logs",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "run_id",
"description": "The id of the workflow run.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "The id of the workflow run.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/logs", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/logs"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})\n"
}
],
"summary": "Download workflow run logs",
"description": "Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for\n`Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use\nthis endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have\nthe `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/download-workflow-run-logs",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#download-workflow-run-logs"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
},
"slug": "download-workflow-run-logs",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-runs",
"subcategoryLabel": "Workflow runs",
"notes": [],
"responses": [
{
"httpStatusCode": "302",
"httpStatusMessage": "Found",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for\nLocation: in the response header to find the URL for the download. Anyone with read access to the repository can use\nthis endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have\nthe actions:read permission to use this endpoint.
The id of the workflow run.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/logs", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/logs"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})\n"
}
],
"summary": "Delete workflow run logs",
"description": "Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-workflow-run-logs",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-workflow-run-logs"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
},
"slug": "delete-workflow-run-logs",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-runs",
"subcategoryLabel": "Workflow runs",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes all logs for a workflow run. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint.
The id of the workflow run.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/pending_deployments", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/pending_deployments"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})\n"
}
],
"summary": "Get pending deployments for a workflow run",
"description": "Get all deployment environments for a workflow run that are waiting for protection rules to pass.\n\nAnyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-pending-deployments-for-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
},
"slug": "get-pending-deployments-for-a-workflow-run",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-runs",
"subcategoryLabel": "Workflow runs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Get all deployment environments for a workflow run that are waiting for protection rules to pass.
\nAnyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
[\n {\n \"environment\": {\n \"id\": 161088068,\n \"node_id\": \"MDExOkVudmlyb25tZW50MTYxMDg4MDY4\",\n \"name\": \"staging\",\n \"url\": \"https://api.github.com/repos/github/hello-world/environments/staging\",\n \"html_url\": \"https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging\"\n },\n \"wait_timer\": 30,\n \"wait_timer_started_at\": \"2020-11-23T22:00:40Z\",\n \"current_user_can_approve\": true,\n \"reviewers\": [\n {\n \"type\": \"User\",\n \"reviewer\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n },\n {\n \"type\": \"Team\",\n \"reviewer\": {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n }\n ]\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "run_id",
"description": "The id of the workflow run.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "The id of the workflow run.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/pending_deployments \\\n -d '{\"environment_ids\":[42],\"state\":\"state\",\"comment\":\"comment\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/pending_deployments \\\n -d '{\"environment_ids\":[42],\"state\":\"state\",\"comment\":\"comment\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42,\n environment_ids: [\n 42\n ],\n state: 'state',\n comment: 'comment'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42,\n environment_ids: [\n 42\n ],\n state: 'state',\n comment: 'comment'\n})\n"
}
],
"summary": "Review pending deployments for a workflow run",
"description": "Approve or reject pending deployments that are waiting on approval by a required reviewer.\n\nAnyone with read access to the repository contents and deployments can use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/review-pending-deployments-for-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"environment_ids": {
"type": "array of integers",
"description": "Required. The list of environment ids to approve or reject
", "example": [ 161171787, 161171795 ], "items": { "type": "integer", "example": 161171787 }, "name": "environment_ids", "in": "body", "rawType": "array", "rawDescription": "The list of environment ids to approve or reject", "childParamsGroups": [] }, "state": { "type": "string", "description": "Required. Whether to approve or reject deployment to the specified environments. Must be one of: approved or rejected
Required. A comment to accompany the deployment review
", "example": "Ship it!", "name": "comment", "in": "body", "rawType": "string", "rawDescription": "A comment to accompany the deployment review", "childParamsGroups": [] } }, "required": [ "environment_ids", "state", "comment" ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "actions", "subcategory": "workflow-runs" }, "slug": "review-pending-deployments-for-a-workflow-run", "category": "actions", "categoryLabel": "Actions", "subcategory": "workflow-runs", "subcategoryLabel": "Workflow runs", "contentType": "application/json", "notes": [], "descriptionHTML": "Approve or reject pending deployments that are waiting on approval by a required reviewer.
\nAnyone with read access to the repository contents and deployments can use this endpoint.
", "bodyParameters": [ { "type": "array of integers", "description": "Required. The list of environment ids to approve or reject
", "example": [ 161171787, 161171795 ], "items": { "type": "integer", "example": 161171787 }, "name": "environment_ids", "in": "body", "rawType": "array", "rawDescription": "The list of environment ids to approve or reject", "childParamsGroups": [] }, { "type": "string", "description": "Required. Whether to approve or reject deployment to the specified environments. Must be one of: approved or rejected
Required. A comment to accompany the deployment review
", "example": "Ship it!", "name": "comment", "in": "body", "rawType": "string", "rawDescription": "A comment to accompany the deployment review", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/repos/octocat/example/deployments/1\",\n \"id\": 1,\n \"node_id\": \"MDEwOkRlcGxveW1lbnQx\",\n \"sha\": \"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n \"ref\": \"topic-branch\",\n \"task\": \"deploy\",\n \"payload\": {},\n \"original_environment\": \"staging\",\n \"environment\": \"production\",\n \"description\": \"Deploy request from hubot\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2012-07-20T01:19:13Z\",\n \"updated_at\": \"2012-07-20T01:19:13Z\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/example/deployments/1/statuses\",\n \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n \"transient_environment\": false,\n \"production_environment\": true\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "run_id",
"description": "The id of the workflow run.",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "The id of the workflow run.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/rerun", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/rerun"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})\n"
}
],
"summary": "Re-run a workflow",
"description": "Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/re-run-workflow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#re-run-a-workflow"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"deprecationDate": "2021-09-14",
"category": "actions",
"subcategory": "workflow-runs"
},
"deprecated": true,
"slug": "re-run-a-workflow",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-runs",
"subcategoryLabel": "Workflow runs",
"notes": [],
"responses": [
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Re-runs your workflow run using its id. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint.
The id of the workflow run.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/timing", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/runs/42/timing"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})\n"
}
],
"summary": "Get workflow run usage",
"description": "Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see \"[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)\".\n\nAnyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-workflow-run-usage",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-workflow-run-usage"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "actions",
"subcategory": "workflow-runs"
},
"slug": "get-workflow-run-usage",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-runs",
"subcategoryLabel": "Workflow runs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see \"Managing billing for GitHub Actions\".
\nAnyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
{\n \"billable\": {\n \"UBUNTU\": {\n \"total_ms\": 180000,\n \"jobs\": 1,\n \"job_runs\": [\n {\n \"job_id\": 1,\n \"duration_ms\": 180000\n }\n ]\n },\n \"MACOS\": {\n \"total_ms\": 240000,\n \"jobs\": 4,\n \"job_runs\": [\n {\n \"job_id\": 2,\n \"duration_ms\": 60000\n },\n {\n \"job_id\": 3,\n \"duration_ms\": 60000\n },\n {\n \"job_id\": 4,\n \"duration_ms\": 60000\n },\n {\n \"job_id\": 5,\n \"duration_ms\": 60000\n }\n ]\n },\n \"WINDOWS\": {\n \"total_ms\": 300000,\n \"jobs\": 2,\n \"job_runs\": [\n {\n \"job_id\": 6,\n \"duration_ms\": 150000\n },\n {\n \"job_id\": 7,\n \"duration_ms\": 150000\n }\n ]\n }\n },\n \"run_duration_ms\": 500000\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/secrets",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/secrets", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/secrets"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/secrets', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/secrets', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List repository secrets",
"description": "Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-repo-secrets",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-repository-secrets"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
},
"slug": "list-repository-secrets",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "secrets",
"subcategoryLabel": "Secrets",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the secrets repository permission to use this endpoint.
{\n \"total_count\": 2,\n \"secrets\": [\n {\n \"name\": \"GH_TOKEN\",\n \"created_at\": \"2019-08-10T14:59:22Z\",\n \"updated_at\": \"2020-01-10T14:59:22Z\"\n },\n {\n \"name\": \"GIST_ID\",\n \"created_at\": \"2020-01-10T10:59:22Z\",\n \"updated_at\": \"2020-01-11T11:59:22Z\"\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/secrets/public-key",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/secrets/public-key",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/secrets/public-key"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/secrets/public-key', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/secrets/public-key', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get a repository public key",
"description": "Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-repo-public-key",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-repository-public-key"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
},
"slug": "get-a-repository-public-key",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "secrets",
"subcategoryLabel": "Secrets",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the secrets repository permission to use this endpoint.
{\n \"key_id\": \"012345678912345678\",\n \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\"\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/secrets/{secret_name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "secret_name",
"description": "secret_name parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "secret_name parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/secrets/SECRET_NAME", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/secrets/SECRET_NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/secrets/{secret_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n secret_name: 'secret_name'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/secrets/{secret_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n secret_name: 'secret_name'\n})\n"
}
],
"summary": "Get a repository secret",
"description": "Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-repo-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-repository-secret"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
},
"slug": "get-a-repository-secret",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "secrets",
"subcategoryLabel": "Secrets",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the secrets repository permission to use this endpoint.
{\n \"name\": \"GH_TOKEN\",\n \"created_at\": \"2019-08-10T14:59:22Z\",\n \"updated_at\": \"2020-01-10T14:59:22Z\"\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/actions/secrets/{secret_name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "secret_name",
"description": "secret_name parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "secret_name parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/secrets/SECRET_NAME \\\n -d '{\"encrypted_value\":\"encrypted_value\"}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/secrets/SECRET_NAME \\\n -d '{\"encrypted_value\":\"encrypted_value\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n secret_name: 'secret_name',\n encrypted_value: 'encrypted_value'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n secret_name: 'secret_name',\n encrypted_value: 'encrypted_value'\n})\n"
}
],
"summary": "Create or update a repository secret",
"description": "Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access\ntoken with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use\nthis endpoint.\n\n#### Example encrypting a secret using Node.js\n\nEncrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.\n\n```\nconst sodium = require('tweetsodium');\n\nconst key = \"base64-encoded-public-key\";\nconst value = \"plain-text-secret\";\n\n// Convert the message and key to Uint8Array's (Buffer implements that interface)\nconst messageBytes = Buffer.from(value);\nconst keyBytes = Buffer.from(key, 'base64');\n\n// Encrypt using LibSodium.\nconst encryptedBytes = sodium.seal(messageBytes, keyBytes);\n\n// Base64 the encrypted secret\nconst encrypted = Buffer.from(encryptedBytes).toString('base64');\n\nconsole.log(encrypted);\n```\n\n\n#### Example encrypting a secret using Python\n\nEncrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3.\n\n```\nfrom base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n```\n\n#### Example encrypting a secret using C#\n\nEncrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.\n\n```\nvar secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n```\n\n#### Example encrypting a secret using Ruby\n\nEncrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.\n\n```ruby\nrequire \"rbnacl\"\nrequire \"base64\"\n\nkey = Base64.decode64(\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\")\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(\"my_secret\")\n\n# Print the base64 encoded secret\nputs Base64.strict_encode64(encrypted_secret)\n```",
"tags": [
"actions"
],
"operationId": "actions/create-or-update-repo-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"encrypted_value": {
"type": "string",
"description": "Value for your secret, encrypted with LibSodium using the public key retrieved from the Get a repository public key endpoint.
", "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", "rawDescription": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint.", "childParamsGroups": [] }, "key_id": { "type": "string", "description": "ID of the key you used to encrypt the secret.
", "name": "key_id", "in": "body", "rawType": "string", "rawDescription": "ID of the key you used to encrypt the secret.", "childParamsGroups": [] } } }, "example": { "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "actions", "subcategory": "secrets" }, "slug": "create-or-update-a-repository-secret", "category": "actions", "categoryLabel": "Actions", "subcategory": "secrets", "subcategoryLabel": "Secrets", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response when creating a secret" }, { "httpStatusCode": "204", "httpStatusMessage": "No Content", "description": "Response when updating a secret" } ], "descriptionHTML": "Creates or updates a repository secret with an encrypted value. Encrypt your secret using\nLibSodium. You must authenticate using an access\ntoken with the repo scope to use this endpoint. GitHub Apps must have the secrets repository permission to use\nthis endpoint.
Encrypt your secret using the tweetsodium library.
\nconst sodium = require('tweetsodium');\n\nconst key = \"base64-encoded-public-key\";\nconst value = \"plain-text-secret\";\n\n// Convert the message and key to Uint8Array's (Buffer implements that interface)\nconst messageBytes = Buffer.from(value);\nconst keyBytes = Buffer.from(key, 'base64');\n\n// Encrypt using LibSodium.\nconst encryptedBytes = sodium.seal(messageBytes, keyBytes);\n\n// Base64 the encrypted secret\nconst encrypted = Buffer.from(encryptedBytes).toString('base64');\n\nconsole.log(encrypted);\n\nEncrypt your secret using pynacl with Python 3.
\nfrom base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n\nEncrypt your secret using the Sodium.Core package.
\nvar secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n\nEncrypt your secret using the rbnacl gem.
\nrequire \"rbnacl\"\nrequire \"base64\"\n\nkey = Base64.decode64(\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\")\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(\"my_secret\")\n\n# Print the base64 encoded secret\nputs Base64.strict_encode64(encrypted_secret)\n",
"bodyParameters": [
{
"type": "string",
"description": "Value for your secret, encrypted with LibSodium using the public key retrieved from the Get a repository public key endpoint.
", "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", "rawDescription": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint.", "childParamsGroups": [] }, { "type": "string", "description": "ID of the key you used to encrypt the secret.
", "name": "key_id", "in": "body", "rawType": "string", "rawDescription": "ID of the key you used to encrypt the secret.", "childParamsGroups": [] } ] }, { "verb": "delete", "requestPath": "/repos/{owner}/{repo}/actions/secrets/{secret_name}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "secret_name", "description": "secret_name parameter", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "secret_name parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/secrets/SECRET_NAME", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/secrets/SECRET_NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n secret_name: 'secret_name'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n secret_name: 'secret_name'\n})\n"
}
],
"summary": "Delete a repository secret",
"description": "Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-repo-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-a-repository-secret"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
},
"slug": "delete-a-repository-secret",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "secrets",
"subcategoryLabel": "Secrets",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes a secret in a repository using the secret name. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the secrets repository permission to use this endpoint.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/workflows", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/workflows"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/workflows', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/workflows', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List repository workflows",
"description": "Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-repo-workflows",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-repository-workflows"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflows"
},
"slug": "list-repository-workflows",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflows",
"subcategoryLabel": "Workflows",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
{\n \"total_count\": 2,\n \"workflows\": [\n {\n \"id\": 161335,\n \"node_id\": \"MDg6V29ya2Zsb3cxNjEzMzU=\",\n \"name\": \"CI\",\n \"path\": \".github/workflows/blank.yaml\",\n \"state\": \"active\",\n \"created_at\": \"2020-01-08T23:48:37.000-08:00\",\n \"updated_at\": \"2020-01-08T23:50:21.000-08:00\",\n \"url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/workflows/161335\",\n \"html_url\": \"https://github.com/octo-org/octo-repo/blob/master/.github/workflows/161335\",\n \"badge_url\": \"https://github.com/octo-org/octo-repo/workflows/CI/badge.svg\"\n },\n {\n \"id\": 269289,\n \"node_id\": \"MDE4OldvcmtmbG93IFNlY29uZGFyeTI2OTI4OQ==\",\n \"name\": \"Linter\",\n \"path\": \".github/workflows/linter.yaml\",\n \"state\": \"active\",\n \"created_at\": \"2020-01-08T23:48:37.000-08:00\",\n \"updated_at\": \"2020-01-08T23:50:21.000-08:00\",\n \"url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/workflows/269289\",\n \"html_url\": \"https://github.com/octo-org/octo-repo/blob/master/.github/workflows/269289\",\n \"badge_url\": \"https://github.com/octo-org/octo-repo/workflows/Linter/badge.svg\"\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/workflows/{workflow_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "workflow_id",
"in": "path",
"description": "The ID of the workflow. You can also pass the workflow file name as a string.",
"required": true,
"schema": {
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"descriptionHTML": "The ID of the workflow. You can also pass the workflow file name as a string.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/workflows/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/workflows/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n workflow_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n workflow_id: 42\n})\n"
}
],
"summary": "Get a workflow",
"description": "Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-workflow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-workflow"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflows"
},
"slug": "get-a-workflow",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflows",
"subcategoryLabel": "Workflows",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a specific workflow. You can replace workflow_id with the workflow file name. For example, you could use main.yaml. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
{\n \"id\": 161335,\n \"node_id\": \"MDg6V29ya2Zsb3cxNjEzMzU=\",\n \"name\": \"CI\",\n \"path\": \".github/workflows/blank.yaml\",\n \"state\": \"active\",\n \"created_at\": \"2020-01-08T23:48:37.000-08:00\",\n \"updated_at\": \"2020-01-08T23:50:21.000-08:00\",\n \"url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/workflows/161335\",\n \"html_url\": \"https://github.com/octo-org/octo-repo/blob/master/.github/workflows/161335\",\n \"badge_url\": \"https://github.com/octo-org/octo-repo/workflows/CI/badge.svg\"\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "workflow_id",
"in": "path",
"description": "The ID of the workflow. You can also pass the workflow file name as a string.",
"required": true,
"schema": {
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"descriptionHTML": "The ID of the workflow. You can also pass the workflow file name as a string.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/workflows/42/disable", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/workflows/42/disable"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable', {\n owner: 'octocat',\n repo: 'hello-world',\n workflow_id: 42\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable', {\n owner: 'octocat',\n repo: 'hello-world',\n workflow_id: 42\n})\n"
}
],
"summary": "Disable a workflow",
"description": "Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/disable-workflow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#disable-a-workflow"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflows"
},
"slug": "disable-a-workflow",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflows",
"subcategoryLabel": "Workflows",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Disables a workflow and sets the state of the workflow to disabled_manually. You can replace workflow_id with the workflow file name. For example, you could use main.yaml.
You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint.
The ID of the workflow. You can also pass the workflow file name as a string.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/workflows/42/dispatches \\\n -d '{\"ref\":\"ref\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/workflows/42/dispatches \\\n -d '{\"ref\":\"ref\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches', {\n owner: 'octocat',\n repo: 'hello-world',\n workflow_id: 42,\n ref: 'ref'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches', {\n owner: 'octocat',\n repo: 'hello-world',\n workflow_id: 42,\n ref: 'ref'\n})\n"
}
],
"summary": "Create a workflow dispatch event",
"description": "You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.\n\nYou must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see \"[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch).\"\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see \"[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line).\"",
"operationId": "actions/create-workflow-dispatch",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "Required. The git reference for the workflow. The reference can be a branch or tag name.
", "name": "ref", "in": "body", "rawType": "string", "rawDescription": "The git reference for the workflow. The reference can be a branch or tag name.", "childParamsGroups": [] }, "inputs": { "type": "object", "description": "Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when inputs are omitted.
You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace workflow_id with the workflow file name. For example, you could use main.yaml.
You must configure your GitHub Actions workflow to run when the workflow_dispatch webhook event occurs. The inputs are configured in the workflow file. For more information about how to configure the workflow_dispatch event in the workflow file, see \"Events that trigger workflows.\"
You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint. For more information, see \"Creating a personal access token for the command line.\"
Required. The git reference for the workflow. The reference can be a branch or tag name.
", "name": "ref", "in": "body", "rawType": "string", "rawDescription": "The git reference for the workflow. The reference can be a branch or tag name.", "childParamsGroups": [] }, { "type": "object", "description": "Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when inputs are omitted.
The ID of the workflow. You can also pass the workflow file name as a string.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/workflows/42/enable", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/workflows/42/enable"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable', {\n owner: 'octocat',\n repo: 'hello-world',\n workflow_id: 42\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable', {\n owner: 'octocat',\n repo: 'hello-world',\n workflow_id: 42\n})\n"
}
],
"summary": "Enable a workflow",
"description": "Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/enable-workflow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#enable-a-workflow"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflows"
},
"slug": "enable-a-workflow",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflows",
"subcategoryLabel": "Workflows",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Enables a workflow and sets the state of the workflow to active. You can replace workflow_id with the workflow file name. For example, you could use main.yaml.
You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint.
The ID of the workflow. You can also pass the workflow file name as a string.
" }, { "name": "actor", "description": "Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run.", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "Returns someone's workflow runs. Use the login for the user who created the push associated with the check suite or workflow run.
Returns workflow runs associated with a branch. Use the name of the branch of the push.
Returns workflow run triggered by the event you specify. For example, push, pull_request or issue. For more information, see \"Events that trigger workflows.\"
Returns workflow runs with the check run status or conclusion that you specify. For example, a conclusion can be success or a status can be in_progress. Only GitHub can set a status of waiting or requested. For a list of the possible status and conclusion options, see \"Create a check run.\"
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" }, { "name": "created", "in": "query", "required": false, "schema": { "type": "string", "format": "date-time" }, "descriptionHTML": "" }, { "name": "exclude_pull_requests", "description": "If `true` pull requests are omitted from the response (empty array).", "in": "query", "required": false, "schema": { "type": "boolean", "default": false }, "descriptionHTML": "If true pull requests are omitted from the response (empty array).
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/workflows/42/runs"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs', {\n owner: 'octocat',\n repo: 'hello-world',\n workflow_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs', {\n owner: 'octocat',\n repo: 'hello-world',\n workflow_id: 42\n})\n"
}
],
"summary": "List workflow runs",
"description": "List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters).\n\nAnyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope.",
"tags": [
"actions"
],
"operationId": "actions/list-workflow-runs",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-workflow-runs"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
},
"slug": "list-workflow-runs",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflow-runs",
"subcategoryLabel": "Workflow runs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List all workflow runs for a workflow. You can replace workflow_id with the workflow file name. For example, you could use main.yaml. You can use parameters to narrow the list of results. For more information about using parameters, see Parameters.
Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope.
{\n \"total_count\": 1,\n \"workflow_runs\": [\n {\n \"id\": 30433642,\n \"name\": \"Build\",\n \"node_id\": \"MDEyOldvcmtmbG93IFJ1bjI2OTI4OQ==\",\n \"head_branch\": \"master\",\n \"head_sha\": \"acb5820ced9479c074f688cc328bf03f341a511d\",\n \"run_number\": 562,\n \"event\": \"push\",\n \"status\": \"queued\",\n \"conclusion\": null,\n \"workflow_id\": 159038,\n \"url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642\",\n \"html_url\": \"https://github.com/octo-org/octo-repo/actions/runs/30433642\",\n \"pull_requests\": [],\n \"created_at\": \"2020-01-22T19:33:08Z\",\n \"updated_at\": \"2020-01-22T19:33:08Z\",\n \"jobs_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/jobs\",\n \"logs_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/logs\",\n \"check_suite_url\": \"https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374\",\n \"artifacts_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/artifacts\",\n \"cancel_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/cancel\",\n \"rerun_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/rerun\",\n \"workflow_url\": \"https://api.github.com/repos/octo-org/octo-repo/actions/workflows/159038\",\n \"head_commit\": {\n \"id\": \"acb5820ced9479c074f688cc328bf03f341a511d\",\n \"tree_id\": \"d23f6eedb1e1b9610bbc754ddb5197bfe7271223\",\n \"message\": \"Create linter.yaml\",\n \"timestamp\": \"2020-01-22T19:33:05Z\",\n \"author\": {\n \"name\": \"Octo Cat\",\n \"email\": \"octocat@github.com\"\n },\n \"committer\": {\n \"name\": \"GitHub\",\n \"email\": \"noreply@github.com\"\n }\n },\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n },\n \"head_repository\": {\n \"id\": 217723378,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMTc3MjMzNzg=\",\n \"name\": \"octo-repo\",\n \"full_name\": \"octo-org/octo-repo\",\n \"private\": true,\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"html_url\": \"https://github.com/octo-org/octo-repo\",\n \"description\": null,\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octo-org/octo-repo\",\n \"forks_url\": \"https://api.github.com/repos/octo-org/octo-repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/octo-org/octo-repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/octo-org/octo-repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/octo-org/octo-repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/octo-org/octo-repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/octo-org/octo-repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/octo-org/octo-repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/octo-org/octo-repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/octo-org/octo-repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/octo-org/octo-repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/octo-org/octo-repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/octo-org/octo-repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/octo-org/octo-repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/octo-org/octo-repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/octo-org/octo-repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octo-org/octo-repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/octo-org/octo-repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/octo-org/octo-repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/octo-org/octo-repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/octo-org/octo-repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/octo-org/octo-repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/octo-org/octo-repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/octo-org/octo-repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/octo-org/octo-repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/octo-org/octo-repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/octo-org/octo-repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/octo-org/octo-repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/octo-org/octo-repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octo-org/octo-repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/octo-org/octo-repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/octo-org/octo-repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/octo-org/octo-repo/deployments\"\n }\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "workflow_id",
"in": "path",
"description": "The ID of the workflow. You can also pass the workflow file name as a string.",
"required": true,
"schema": {
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"descriptionHTML": "The ID of the workflow. You can also pass the workflow file name as a string.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/workflows/42/timing", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/actions/workflows/42/timing"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing', {\n owner: 'octocat',\n repo: 'hello-world',\n workflow_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing', {\n owner: 'octocat',\n repo: 'hello-world',\n workflow_id: 42\n})\n"
}
],
"summary": "Get workflow usage",
"description": "Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see \"[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)\".\n\nYou can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-workflow-usage",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-workflow-usage"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "actions",
"subcategory": "workflows"
},
"slug": "get-workflow-usage",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "workflows",
"subcategoryLabel": "Workflows",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see \"Managing billing for GitHub Actions\".
\nYou can replace workflow_id with the workflow file name. For example, you could use main.yaml. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
{\n \"billable\": {\n \"UBUNTU\": {\n \"total_ms\": 180000\n },\n \"MACOS\": {\n \"total_ms\": 240000\n },\n \"WINDOWS\": {\n \"total_ms\": 300000\n }\n }\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/assignees",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/assignees", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/assignees"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/assignees', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/assignees', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List assignees",
"description": "Lists the [available assignees](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository.",
"tags": [
"issues"
],
"operationId": "issues/list-assignees",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-assignees"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "assignees"
},
"slug": "list-assignees",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "assignees",
"subcategoryLabel": "Assignees",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the available assignees for issues in a repository.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/assignees/{assignee}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "assignee",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/assignees/ASSIGNEE",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/assignees/ASSIGNEE"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/assignees/{assignee}', {\n owner: 'octocat',\n repo: 'hello-world',\n assignee: 'assignee'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/assignees/{assignee}', {\n owner: 'octocat',\n repo: 'hello-world',\n assignee: 'assignee'\n})\n"
}
],
"summary": "Check if a user can be assigned",
"description": "Checks if a user has permission to be assigned to an issue in this repository.\n\nIf the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned.\n\nOtherwise a `404` status code is returned.",
"tags": [
"issues"
],
"operationId": "issues/check-user-can-be-assigned",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "assignees"
},
"slug": "check-if-a-user-can-be-assigned",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "assignees",
"subcategoryLabel": "Assignees",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned."
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Otherwise a `404` status code is returned."
}
],
"bodyParameters": [],
"descriptionHTML": "Checks if a user has permission to be assigned to an issue in this repository.
\nIf the assignee can be assigned to issues in the repository, a 204 header with no content is returned.
Otherwise a 404 status code is returned.
Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/autolinks", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/autolinks"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/autolinks', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/autolinks', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List all autolinks of a repository",
"description": "This returns a list of autolinks configured for the given repository.\n\nInformation about autolinks are only available to repository administrators.",
"tags": [
"repos"
],
"operationId": "repos/list-autolinks",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/v3/repos#list-autolinks"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "autolinks"
},
"slug": "list-all-autolinks-of-a-repository",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "autolinks",
"subcategoryLabel": "Autolinks",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "This returns a list of autolinks configured for the given repository.
\nInformation about autolinks are only available to repository administrators.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"key_prefix\": \"TICKET-\",\n \"url_template\": \"https://example.com/TICKET?query=<num>\"\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/autolinks",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/autolinks \\\n -d '{\"key_prefix\":\"key_prefix\",\"url_template\":\"url_template\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/autolinks \\\n -d '{\"key_prefix\":\"key_prefix\",\"url_template\":\"url_template\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/autolinks', {\n owner: 'octocat',\n repo: 'hello-world',\n key_prefix: 'key_prefix',\n url_template: 'url_template'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/autolinks', {\n owner: 'octocat',\n repo: 'hello-world',\n key_prefix: 'key_prefix',\n url_template: 'url_template'\n})\n"
}
],
"summary": "Create an autolink reference for a repository",
"description": "Users with admin access to the repository can create an autolink.",
"tags": [
"repos"
],
"operationId": "repos/create-autolink",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/v3/repos#create-an-autolink"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"key_prefix": {
"type": "string",
"description": "Required. The prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit.
", "name": "key_prefix", "in": "body", "rawType": "string", "rawDescription": "The prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit.", "childParamsGroups": [] }, "url_template": { "type": "string", "description": "Required. The URL must contain
Users with admin access to the repository can create an autolink.
", "bodyParameters": [ { "type": "string", "description": "Required. The prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit.
", "name": "key_prefix", "in": "body", "rawType": "string", "rawDescription": "The prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The URL must contain
{\n \"id\": 1,\n \"key_prefix\": \"TICKET-\",\n \"url_template\": \"https://example.com/TICKET?query=<num>\"\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/autolinks/{autolink_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "autolink_id",
"description": "autolink_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "autolink_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/autolinks/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/autolinks/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/autolinks/{autolink_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n autolink_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/autolinks/{autolink_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n autolink_id: 42\n})\n"
}
],
"summary": "Get an autolink reference of a repository",
"description": "This returns a single autolink reference by ID that was configured for the given repository.\n\nInformation about autolinks are only available to repository administrators.",
"tags": [
"repos"
],
"operationId": "repos/get-autolink",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/v3/repos#get-autolink"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "autolinks"
},
"slug": "get-an-autolink-reference-of-a-repository",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "autolinks",
"subcategoryLabel": "Autolinks",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "This returns a single autolink reference by ID that was configured for the given repository.
\nInformation about autolinks are only available to repository administrators.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"key_prefix\": \"TICKET-\",\n \"url_template\": \"https://example.com/TICKET?query=<num>\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/autolinks/{autolink_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "autolink_id",
"description": "autolink_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "autolink_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/autolinks/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/autolinks/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n autolink_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n autolink_id: 42\n})\n"
}
],
"summary": "Delete an autolink reference from a repository",
"description": "This deletes a single autolink reference by ID that was configured for the given repository.\n\nInformation about autolinks are only available to repository administrators.",
"tags": [
"repos"
],
"operationId": "repos/delete-autolink",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/v3/repos#delete-autolink"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "autolinks"
},
"slug": "delete-an-autolink-reference-from-a-repository",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "autolinks",
"subcategoryLabel": "Autolinks",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "This deletes a single autolink reference by ID that was configured for the given repository.
\nInformation about autolinks are only available to repository administrators.
" }, { "verb": "put", "requestPath": "/repos/{owner}/{repo}/automated-security-fixes", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/automated-security-fixes", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/automated-security-fixes"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/automated-security-fixes', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/automated-security-fixes', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Enable automated security fixes",
"description": "Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see \"[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)\".",
"tags": [
"repos"
],
"operationId": "repos/enable-automated-security-fixes",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#enable-automated-security-fixes"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
},
"slug": "enable-automated-security-fixes",
"category": "repos",
"categoryLabel": "Repos",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see \"Configuring automated security fixes\".
" }, { "verb": "delete", "requestPath": "/repos/{owner}/{repo}/automated-security-fixes", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/automated-security-fixes", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/automated-security-fixes"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/automated-security-fixes', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/automated-security-fixes', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Disable automated security fixes",
"description": "Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see \"[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)\".",
"tags": [
"repos"
],
"operationId": "repos/disable-automated-security-fixes",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#disable-automated-security-fixes"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
},
"slug": "disable-automated-security-fixes",
"category": "repos",
"categoryLabel": "Repos",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see \"Configuring automated security fixes\".
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/branches", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "protected", "description": "Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches.", "in": "query", "required": false, "schema": { "type": "boolean" }, "descriptionHTML": "Setting to true returns only protected branches. When set to false, only unprotected branches are returned. Omitting this parameter returns all branches.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/branches', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/branches', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List branches",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/list-branches",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-branches"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "list-branches",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"name\": \"master\",\n \"commit\": {\n \"sha\": \"c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\"\n },\n \"protected\": true,\n \"protection\": {\n \"required_status_checks\": {\n \"enforcement_level\": \"non_admins\",\n \"contexts\": [\n \"ci-test\",\n \"linter\"\n ]\n }\n },\n \"protection_url\": \"https://api.github.com/repos/octocat/hello-world/branches/master/protection\"\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Get a branch",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/get-branch",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-branch"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "get-a-branch",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
},
{
"httpStatusCode": "301",
"httpStatusMessage": "Moved Permanently",
"description": "Moved permanently"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "415",
"httpStatusMessage": "Unsupported Media Type",
"description": "Preview header missing"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Get branch protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/get-branch-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-branch-protection"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "get-branch-protection",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection\",\n \"required_status_checks\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks\",\n \"contexts\": [\n \"continuous-integration/travis-ci\"\n ],\n \"contexts_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts\",\n \"enforcement_level\": \"non_admins\"\n },\n \"enforce_admins\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins\",\n \"enabled\": true\n },\n \"required_pull_request_reviews\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_pull_request_reviews\",\n \"dismissal_restrictions\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions\",\n \"users_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/users\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/teams\",\n \"users\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"teams\": [\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n ]\n },\n \"dismiss_stale_reviews\": true,\n \"require_code_owner_reviews\": true,\n \"required_approving_review_count\": 2\n },\n \"restrictions\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions\",\n \"users_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/users\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams\",\n \"apps_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams\",\n \"users\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"teams\": [\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n ],\n \"apps\": [\n {\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\"\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n }\n ]\n },\n \"required_linear_history\": {\n \"enabled\": true\n },\n \"allow_force_pushes\": {\n \"enabled\": true\n },\n \"allow_deletions\": {\n \"enabled\": true\n },\n \"required_conversation_resolution\": {\n \"enabled\": true\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection \\\n -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection \\\n -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n required_status_checks: {\n strict: true,\n contexts: [\n 'contexts'\n ]\n },\n enforce_admins: true,\n required_pull_request_reviews: {\n dismissal_restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n },\n dismiss_stale_reviews: true,\n require_code_owner_reviews: true,\n required_approving_review_count: 42\n },\n restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ],\n apps: [\n 'apps'\n ]\n }\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n required_status_checks: {\n strict: true,\n contexts: [\n 'contexts'\n ]\n },\n enforce_admins: true,\n required_pull_request_reviews: {\n dismissal_restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n },\n dismiss_stale_reviews: true,\n require_code_owner_reviews: true,\n required_approving_review_count: 42\n },\n restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ],\n apps: [\n 'apps'\n ]\n }\n})\n"
}
],
"summary": "Update branch protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nProtecting a branch requires admin or owner permissions to the repository.\n\n**Note**: Passing new arrays of `users` and `teams` replaces their previous values.\n\n**Note**: The list of users, apps, and teams in total is limited to 100 items.",
"tags": [
"repos"
],
"operationId": "repos/update-branch-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#update-branch-protection"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"required_status_checks": {
"type": "object or nullable",
"description": "Required. Require status checks to pass before merging. Set to null to disable.
Required. Require branches to be up to date before merging.
", "name": "strict", "in": "body", "rawType": "boolean", "rawDescription": "Require branches to be up to date before merging.", "childParamsGroups": [] }, "contexts": { "type": "array of strings", "description": "Required. The list of status checks to require in order to merge into this branch
", "items": { "type": "string" }, "name": "contexts", "in": "body", "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch", "childParamsGroups": [] } }, "required": [ "strict", "contexts" ], "name": "required_status_checks", "in": "body", "rawType": "object", "rawDescription": "Require status checks to pass before merging. Set to `null` to disable.", "childParamsGroups": [ { "parentName": "required_status_checks", "parentType": "object", "id": "required_status_checks-object", "params": [ { "type": "boolean", "description": "Required. Require branches to be up to date before merging.
", "name": "strict", "in": "body", "rawType": "boolean", "rawDescription": "Require branches to be up to date before merging.", "childParamsGroups": [] }, { "type": "array of strings", "description": "Required. The list of status checks to require in order to merge into this branch
", "items": { "type": "string" }, "name": "contexts", "in": "body", "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch", "childParamsGroups": [] } ] } ] }, "enforce_admins": { "type": "boolean or nullable", "description": "Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable.
Required. Require at least one approving review on a pull request, before merging. Set to null to disable.
Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners review them.
", "name": "require_code_owner_reviews", "in": "body", "rawType": "boolean", "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them.", "childParamsGroups": [] }, "required_approving_review_count": { "type": "integer", "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", "name": "required_approving_review_count", "in": "body", "rawType": "integer", "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", "childParamsGroups": [] } }, "name": "required_pull_request_reviews", "in": "body", "rawType": "object", "rawDescription": "Require at least one approving review on a pull request, before merging. Set to `null` to disable.", "childParamsGroups": [ { "parentName": "required_pull_request_reviews", "parentType": "object", "id": "required_pull_request_reviews-object", "params": [ { "type": "object", "description": "Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners review them.
", "name": "require_code_owner_reviews", "in": "body", "rawType": "boolean", "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them.", "childParamsGroups": [] }, { "type": "integer", "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", "name": "required_approving_review_count", "in": "body", "rawType": "integer", "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", "childParamsGroups": [] } ] }, { "parentName": "dismissal_restrictions", "parentType": "object", "id": "dismissal_restrictions-object", "params": [ { "type": "array of strings", "description": "The list of user logins with dismissal access
The list of team slugs with dismissal access
Required. Restrict who can push to the protected branch. User, app, and team restrictions are only available for organization-owned repositories. Set to null to disable.
Required. The list of user logins with push access
Required. The list of team slugs with push access
The list of app slugs with push access
Required. The list of user logins with push access
Required. The list of team slugs with push access
The list of app slugs with push access
Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to true to enforce a linear commit history. Set to false to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: false. For more information, see \"Requiring a linear commit history\" in the GitHub Help documentation.
Permits force pushes to the protected branch by anyone with write access to the repository. Set to true to allow force pushes. Set to false or null to block force pushes. Default: false. For more information, see \"Enabling force pushes to a protected branch\" in the GitHub Help documentation.\"
Allows deletion of the protected branch by anyone with write access to the repository. Set to false to prevent deletion of the protected branch. Default: false. For more information, see \"Enabling force pushes to a protected branch\" in the GitHub Help documentation.
Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to false to disable. Default: false.
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nProtecting a branch requires admin or owner permissions to the repository.
\nNote: Passing new arrays of users and teams replaces their previous values.
Note: The list of users, apps, and teams in total is limited to 100 items.
", "bodyParameters": [ { "type": "object or nullable", "description": "Required. Require status checks to pass before merging. Set to null to disable.
Required. Require branches to be up to date before merging.
", "name": "strict", "in": "body", "rawType": "boolean", "rawDescription": "Require branches to be up to date before merging.", "childParamsGroups": [] }, "contexts": { "type": "array of strings", "description": "Required. The list of status checks to require in order to merge into this branch
", "items": { "type": "string" }, "name": "contexts", "in": "body", "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch", "childParamsGroups": [] } }, "required": [ "strict", "contexts" ], "name": "required_status_checks", "in": "body", "rawType": "object", "rawDescription": "Require status checks to pass before merging. Set to `null` to disable.", "childParamsGroups": [ { "parentName": "required_status_checks", "parentType": "object", "id": "required_status_checks-object", "params": [ { "type": "boolean", "description": "Required. Require branches to be up to date before merging.
", "name": "strict", "in": "body", "rawType": "boolean", "rawDescription": "Require branches to be up to date before merging.", "childParamsGroups": [] }, { "type": "array of strings", "description": "Required. The list of status checks to require in order to merge into this branch
", "items": { "type": "string" }, "name": "contexts", "in": "body", "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch", "childParamsGroups": [] } ] } ] }, { "type": "boolean or nullable", "description": "Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable.
Required. Require at least one approving review on a pull request, before merging. Set to null to disable.
Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners review them.
", "name": "require_code_owner_reviews", "in": "body", "rawType": "boolean", "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them.", "childParamsGroups": [] }, "required_approving_review_count": { "type": "integer", "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", "name": "required_approving_review_count", "in": "body", "rawType": "integer", "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", "childParamsGroups": [] } }, "name": "required_pull_request_reviews", "in": "body", "rawType": "object", "rawDescription": "Require at least one approving review on a pull request, before merging. Set to `null` to disable.", "childParamsGroups": [ { "parentName": "required_pull_request_reviews", "parentType": "object", "id": "required_pull_request_reviews-object", "params": [ { "type": "object", "description": "Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners review them.
", "name": "require_code_owner_reviews", "in": "body", "rawType": "boolean", "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them.", "childParamsGroups": [] }, { "type": "integer", "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", "name": "required_approving_review_count", "in": "body", "rawType": "integer", "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", "childParamsGroups": [] } ] }, { "parentName": "dismissal_restrictions", "parentType": "object", "id": "dismissal_restrictions-object", "params": [ { "type": "array of strings", "description": "The list of user logins with dismissal access
The list of team slugs with dismissal access
Required. Restrict who can push to the protected branch. User, app, and team restrictions are only available for organization-owned repositories. Set to null to disable.
Required. The list of user logins with push access
Required. The list of team slugs with push access
The list of app slugs with push access
Required. The list of user logins with push access
Required. The list of team slugs with push access
The list of app slugs with push access
Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to true to enforce a linear commit history. Set to false to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: false. For more information, see \"Requiring a linear commit history\" in the GitHub Help documentation.
Permits force pushes to the protected branch by anyone with write access to the repository. Set to true to allow force pushes. Set to false or null to block force pushes. Default: false. For more information, see \"Enabling force pushes to a protected branch\" in the GitHub Help documentation.\"
Allows deletion of the protected branch by anyone with write access to the repository. Set to false to prevent deletion of the protected branch. Default: false. For more information, see \"Enabling force pushes to a protected branch\" in the GitHub Help documentation.
Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to false to disable. Default: false.
The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Delete branch protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/delete-branch-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-branch-protection"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "delete-branch-protection",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "branch", "description": "The name of the branch.", "in": "path", "required": true, "schema": { "type": "string" }, "x-multi-segment": true, "descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_admins", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_admins"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Get admin branch protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/get-admin-branch-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-admin-branch-protection"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "get-admin-branch-protection",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins\",\n \"enabled\": true\n}\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_admins", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_admins"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Set admin branch protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nAdding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.",
"tags": [
"repos"
],
"operationId": "repos/set-admin-branch-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#set-admin-branch-protection"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "set-admin-branch-protection",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nAdding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins\",\n \"enabled\": true\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_admins", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_admins"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Delete admin branch protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nRemoving admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.",
"tags": [
"repos"
],
"operationId": "repos/delete-admin-branch-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-admin-branch-protection"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "delete-admin-branch-protection",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nRemoving admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "branch", "description": "The name of the branch.", "in": "path", "required": true, "schema": { "type": "string" }, "x-multi-segment": true, "descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviews", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviews"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Get pull request review protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/get-pull-request-review-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-pull-request-review-protection"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "get-pull-request-review-protection",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_pull_request_reviews\",\n \"dismissal_restrictions\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions\",\n \"users_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/users\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/teams\",\n \"users\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"teams\": [\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n ]\n },\n \"dismiss_stale_reviews\": true,\n \"require_code_owner_reviews\": true,\n \"required_approving_review_count\": 2\n}\n"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviews \\\n -d '{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]}}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviews \\\n -d '{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]}}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n dismissal_restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n }\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n dismissal_restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n }\n})\n"
}
],
"summary": "Update pull request review protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nUpdating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.\n\n**Note**: Passing new arrays of `users` and `teams` replaces their previous values.",
"tags": [
"repos"
],
"operationId": "repos/update-pull-request-review-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#update-pull-request-review-protection"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dismissal_restrictions": {
"type": "object",
"description": "Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners have reviewed.
", "name": "require_code_owner_reviews", "in": "body", "rawType": "boolean", "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed.", "childParamsGroups": [] }, "required_approving_review_count": { "type": "integer", "description": "Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", "name": "required_approving_review_count", "in": "body", "rawType": "integer", "rawDescription": "Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6.", "childParamsGroups": [] } } }, "example": { "dismissal_restrictions": { "users": [ "octocat" ], "teams": [ "justice-league" ] }, "dismiss_stale_reviews": true, "require_code_owner_reviews": true, "required_approving_review_count": 2 } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "repos", "subcategory": "branches" }, "slug": "update-pull-request-review-protection", "category": "repos", "categoryLabel": "Repos", "subcategory": "branches", "subcategoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nUpdating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
\nNote: Passing new arrays of users and teams replaces their previous values.
{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_pull_request_reviews\",\n \"dismissal_restrictions\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions\",\n \"users_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/users\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/teams\",\n \"users\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"teams\": [\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n ]\n },\n \"dismiss_stale_reviews\": true,\n \"require_code_owner_reviews\": true,\n \"required_approving_review_count\": 2\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"type": "object",
"description": "Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners have reviewed.
", "name": "require_code_owner_reviews", "in": "body", "rawType": "boolean", "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed.", "childParamsGroups": [] }, { "type": "integer", "description": "Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", "name": "required_approving_review_count", "in": "body", "rawType": "integer", "rawDescription": "Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6.", "childParamsGroups": [] } ] }, { "verb": "delete", "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "branch", "description": "The name of the branch.", "in": "path", "required": true, "schema": { "type": "string" }, "x-multi-segment": true, "descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviews", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviews"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Delete pull request review protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/delete-pull-request-review-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-pull-request-review-protection"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "delete-pull-request-review-protection",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "branch", "description": "The name of the branch.", "in": "path", "required": true, "schema": { "type": "string" }, "x-multi-segment": true, "descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signatures", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signatures"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Get commit signature protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nWhen authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://help.github.com/articles/signing-commits-with-gpg) in GitHub Help.\n\n**Note**: You must enable branch protection to require signed commits.",
"tags": [
"repos"
],
"operationId": "repos/get-commit-signature-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-commit-signature-protection"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "get-commit-signature-protection",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nWhen authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of true indicates you must sign commits on this branch. For more information, see Signing commits with GPG in GitHub Help.
Note: You must enable branch protection to require signed commits.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures\",\n \"enabled\": true\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signatures", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signatures"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Create commit signature protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nWhen authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits.",
"tags": [
"repos"
],
"operationId": "repos/create-commit-signature-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-commit-signature-protection"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "create-commit-signature-protection",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nWhen authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures\",\n \"enabled\": true\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signatures", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signatures"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Delete commit signature protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nWhen authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits.",
"tags": [
"repos"
],
"operationId": "repos/delete-commit-signature-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-commit-signature-protection"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "delete-commit-signature-protection",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nWhen authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "branch", "description": "The name of the branch.", "in": "path", "required": true, "schema": { "type": "string" }, "x-multi-segment": true, "descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Get status checks protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/get-status-checks-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-status-checks-protection"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "get-status-checks-protection",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks\",\n \"strict\": true,\n \"contexts\": [\n \"continuous-integration/travis-ci\"\n ],\n \"contexts_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks \\\n -d '{\"strict\":true}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks \\\n -d '{\"strict\":true}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n strict: true\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n strict: true\n})\n"
}
],
"summary": "Update status check protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nUpdating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.",
"tags": [
"repos"
],
"operationId": "repos/update-status-check-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#update-status-check-potection"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"strict": {
"type": "boolean",
"description": "Require branches to be up to date before merging.
", "name": "strict", "in": "body", "rawType": "boolean", "rawDescription": "Require branches to be up to date before merging.", "childParamsGroups": [] }, "contexts": { "type": "array of strings", "description": "The list of status checks to require in order to merge into this branch
", "items": { "type": "string" }, "name": "contexts", "in": "body", "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch", "childParamsGroups": [] } } }, "example": { "strict": true, "contexts": [ "continuous-integration/travis-ci" ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "repos", "subcategory": "branches" }, "slug": "update-status-check-protection", "category": "repos", "categoryLabel": "Repos", "subcategory": "branches", "subcategoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nUpdating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.
", "bodyParameters": [ { "type": "boolean", "description": "Require branches to be up to date before merging.
", "name": "strict", "in": "body", "rawType": "boolean", "rawDescription": "Require branches to be up to date before merging.", "childParamsGroups": [] }, { "type": "array of strings", "description": "The list of status checks to require in order to merge into this branch
", "items": { "type": "string" }, "name": "contexts", "in": "body", "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks\",\n \"strict\": true,\n \"contexts\": [\n \"continuous-integration/travis-ci\"\n ],\n \"contexts_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Remove status check protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/remove-status-check-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#remove-status-check-protection"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "remove-status-check-protection",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "branch", "description": "The name of the branch.", "in": "path", "required": true, "schema": { "type": "string" }, "x-multi-segment": true, "descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Get all status check contexts",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/get-all-status-check-contexts",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-all-status-check-contexts"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "get-all-status-check-contexts",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n \"continuous-integration/travis-ci\"\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Add status check contexts",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/add-status-check-contexts",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#add-status-check-contexts"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"contexts": {
"type": "array of strings",
"description": "Required. contexts parameter
", "items": { "type": "string" }, "name": "contexts", "in": "body", "rawType": "array", "rawDescription": "contexts parameter", "childParamsGroups": [] } }, "required": [ "contexts" ], "example": { "contexts": [ "contexts" ] } }, { "type": "array", "description": "contexts parameter", "items": { "type": "string" } } ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "requestBodyParameterName": "contexts", "category": "repos", "subcategory": "branches" }, "slug": "add-status-check-contexts", "category": "repos", "categoryLabel": "Repos", "subcategory": "branches", "subcategoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", "bodyParameters": [ { "type": "array of strings", "description": "Required. contexts parameter
", "items": { "type": "string" }, "name": "contexts", "in": "body", "rawType": "array", "rawDescription": "contexts parameter", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n \"continuous-integration/travis-ci\",\n \"continuous-integration/jenkins\"\n]\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Set status check contexts",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/set-status-check-contexts",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#set-status-check-contexts"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"contexts": {
"type": "array of strings",
"description": "Required. contexts parameter
", "items": { "type": "string" }, "name": "contexts", "in": "body", "rawType": "array", "rawDescription": "contexts parameter", "childParamsGroups": [] } }, "required": [ "contexts" ], "example": { "contexts": [ "contexts" ] } }, { "type": "array", "description": "contexts parameter", "items": { "type": "string" } } ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "requestBodyParameterName": "contexts", "category": "repos", "subcategory": "branches" }, "slug": "set-status-check-contexts", "category": "repos", "categoryLabel": "Repos", "subcategory": "branches", "subcategoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", "bodyParameters": [ { "type": "array of strings", "description": "Required. contexts parameter
", "items": { "type": "string" }, "name": "contexts", "in": "body", "rawType": "array", "rawDescription": "contexts parameter", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n \"continuous-integration/travis-ci\"\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Remove status check contexts",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/remove-status-check-contexts",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#remove-status-check-contexts"
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"contexts": {
"type": "array of strings",
"description": "Required. contexts parameter
", "items": { "type": "string" }, "name": "contexts", "in": "body", "rawType": "array", "rawDescription": "contexts parameter", "childParamsGroups": [] } }, "required": [ "contexts" ], "example": { "contexts": [ "contexts" ] } }, { "type": "array", "description": "contexts parameter", "items": { "type": "string" } } ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "requestBodyParameterName": "contexts", "category": "repos", "subcategory": "branches" }, "slug": "remove-status-check-contexts", "category": "repos", "categoryLabel": "Repos", "subcategory": "branches", "subcategoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", "bodyParameters": [ { "type": "array of strings", "description": "Required. contexts parameter
", "items": { "type": "string" }, "name": "contexts", "in": "body", "rawType": "array", "rawDescription": "contexts parameter", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n \"continuous-integration/travis-ci\"\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Get access restrictions",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nLists who has access to this protected branch.\n\n**Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories.",
"tags": [
"repos"
],
"operationId": "repos/get-access-restrictions",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-access-restrictions"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "get-access-restrictions",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nLists who has access to this protected branch.
\nNote: Users, apps, and teams restrictions are only available for organization-owned repositories.
{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions\",\n \"users_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/users\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams\",\n \"apps_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams\",\n \"users\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"teams\": [\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n ],\n \"apps\": [\n {\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\"\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n }\n ]\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Delete access restrictions",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nDisables the ability to restrict who can push to this branch.",
"tags": [
"repos"
],
"operationId": "repos/delete-access-restrictions",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-access-restrictions"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "delete-access-restrictions",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nDisables the ability to restrict who can push to this branch.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "branch", "description": "The name of the branch.", "in": "path", "required": true, "schema": { "type": "string" }, "x-multi-segment": true, "descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/apps", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/apps"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Get apps with access to the protected branch",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nLists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch.",
"tags": [
"repos"
],
"operationId": "repos/get-apps-with-access-to-protected-branch",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-apps-with-access-to-the-protected-branch"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "get-apps-with-access-to-the-protected-branch",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nLists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.
[\n {\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/apps", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/apps"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Add app access restrictions",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nGrants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch.\n\n| Type | Description |\n| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |",
"tags": [
"repos"
],
"operationId": "repos/add-app-access-restrictions",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#add-app-access-restrictions"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"apps": {
"type": "array of strings",
"description": "Required. apps parameter
", "items": { "type": "string" }, "name": "apps", "in": "body", "rawType": "array", "rawDescription": "apps parameter", "childParamsGroups": [] } }, "required": [ "apps" ], "example": { "apps": [ "my-app" ] } }, { "type": "array", "items": { "type": "string" } } ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "requestBodyParameterName": "apps", "category": "repos", "subcategory": "branches" }, "slug": "add-app-access-restrictions", "category": "repos", "categoryLabel": "Repos", "subcategory": "branches", "subcategoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nGrants the specified apps push access for this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.
| Type | Description |
|---|---|
array | The GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items. |
Required. apps parameter
", "items": { "type": "string" }, "name": "apps", "in": "body", "rawType": "array", "rawDescription": "apps parameter", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n }\n]\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/apps", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/apps"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Set app access restrictions",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nReplaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch.\n\n| Type | Description |\n| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |",
"tags": [
"repos"
],
"operationId": "repos/set-app-access-restrictions",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#set-app-access-restrictions"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"apps": {
"type": "array of strings",
"description": "Required. apps parameter
", "items": { "type": "string" }, "name": "apps", "in": "body", "rawType": "array", "rawDescription": "apps parameter", "childParamsGroups": [] } }, "required": [ "apps" ], "example": { "apps": [ "my-app" ] } }, { "type": "array", "items": { "type": "string" } } ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "requestBodyParameterName": "apps", "category": "repos", "subcategory": "branches" }, "slug": "set-app-access-restrictions", "category": "repos", "categoryLabel": "Repos", "subcategory": "branches", "subcategoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nReplaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.
| Type | Description |
|---|---|
array | The GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items. |
Required. apps parameter
", "items": { "type": "string" }, "name": "apps", "in": "body", "rawType": "array", "rawDescription": "apps parameter", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n }\n]\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/apps", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/apps"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Remove app access restrictions",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nRemoves the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch.\n\n| Type | Description |\n| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |",
"tags": [
"repos"
],
"operationId": "repos/remove-app-access-restrictions",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#remove-app-access-restrictions"
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"apps": {
"type": "array of strings",
"description": "Required. apps parameter
", "items": { "type": "string" }, "name": "apps", "in": "body", "rawType": "array", "rawDescription": "apps parameter", "childParamsGroups": [] } }, "required": [ "apps" ], "example": { "apps": [ "my-app" ] } }, { "type": "array", "items": { "type": "string" } } ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "requestBodyParameterName": "apps", "category": "repos", "subcategory": "branches" }, "slug": "remove-app-access-restrictions", "category": "repos", "categoryLabel": "Repos", "subcategory": "branches", "subcategoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nRemoves the ability of an app to push to this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.
| Type | Description |
|---|---|
array | The GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items. |
Required. apps parameter
", "items": { "type": "string" }, "name": "apps", "in": "body", "rawType": "array", "rawDescription": "apps parameter", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n }\n]\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Get teams with access to the protected branch",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nLists the teams who have push access to this branch. The list includes child teams.",
"tags": [
"repos"
],
"operationId": "repos/get-teams-with-access-to-protected-branch",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-teams-with-access-to-the-protected-branch"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "get-teams-with-access-to-the-protected-branch",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nLists the teams who have push access to this branch. The list includes child teams.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Add team access restrictions",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nGrants the specified teams push access for this branch. You can also give push access to child teams.\n\n| Type | Description |\n| ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |\n| `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |",
"tags": [
"repos"
],
"operationId": "repos/add-team-access-restrictions",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#add-team-access-restrictions"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"teams": {
"type": "array of strings",
"description": "Required. teams parameter
", "items": { "type": "string" }, "name": "teams", "in": "body", "rawType": "array", "rawDescription": "teams parameter", "childParamsGroups": [] } }, "required": [ "teams" ], "example": { "teams": [ "my-team" ] } }, { "type": "array", "description": "teams parameter", "items": { "type": "string" } } ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "requestBodyParameterName": "teams", "category": "repos", "subcategory": "branches" }, "slug": "add-team-access-restrictions", "category": "repos", "categoryLabel": "Repos", "subcategory": "branches", "subcategoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nGrants the specified teams push access for this branch. You can also give push access to child teams.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description |
|---|---|
array | The teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items. |
Required. teams parameter
", "items": { "type": "string" }, "name": "teams", "in": "body", "rawType": "array", "rawDescription": "teams parameter", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n]\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Set team access restrictions",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nReplaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams.\n\n| Type | Description |\n| ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |\n| `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |",
"tags": [
"repos"
],
"operationId": "repos/set-team-access-restrictions",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#set-team-access-restrictions"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"teams": {
"type": "array of strings",
"description": "Required. teams parameter
", "items": { "type": "string" }, "name": "teams", "in": "body", "rawType": "array", "rawDescription": "teams parameter", "childParamsGroups": [] } }, "required": [ "teams" ], "example": { "teams": [ "my-team" ] } }, { "type": "array", "description": "teams parameter", "items": { "type": "string" } } ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "requestBodyParameterName": "teams", "category": "repos", "subcategory": "branches" }, "slug": "set-team-access-restrictions", "category": "repos", "categoryLabel": "Repos", "subcategory": "branches", "subcategoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nReplaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description |
|---|---|
array | The teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items. |
Required. teams parameter
", "items": { "type": "string" }, "name": "teams", "in": "body", "rawType": "array", "rawDescription": "teams parameter", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n]\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Remove team access restrictions",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nRemoves the ability of a team to push to this branch. You can also remove push access for child teams.\n\n| Type | Description |\n| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |",
"tags": [
"repos"
],
"operationId": "repos/remove-team-access-restrictions",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#remove-team-access-restrictions"
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"teams": {
"type": "array of strings",
"description": "Required. teams parameter
", "items": { "type": "string" }, "name": "teams", "in": "body", "rawType": "array", "rawDescription": "teams parameter", "childParamsGroups": [] } }, "required": [ "teams" ], "example": { "teams": [ "my-team" ] } }, { "type": "array", "description": "teams parameter", "items": { "type": "string" } } ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "requestBodyParameterName": "teams", "category": "repos", "subcategory": "branches" }, "slug": "remove-team-access-restrictions", "category": "repos", "categoryLabel": "Repos", "subcategory": "branches", "subcategoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nRemoves the ability of a team to push to this branch. You can also remove push access for child teams.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description |
|---|---|
array | Teams that should no longer have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items. |
Required. teams parameter
", "items": { "type": "string" }, "name": "teams", "in": "body", "rawType": "array", "rawDescription": "teams parameter", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n]\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Get users with access to the protected branch",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nLists the people who have push access to this branch.",
"tags": [
"repos"
],
"operationId": "repos/get-users-with-access-to-protected-branch",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-users-with-access-to-the-protected-branch"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "branches"
},
"slug": "get-users-with-access-to-the-protected-branch",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "branches",
"subcategoryLabel": "Branches",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nLists the people who have push access to this branch.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Add user access restrictions",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nGrants the specified people push access for this branch.\n\n| Type | Description |\n| ------- | ----------------------------------------------------------------------------------------------------------------------------- |\n| `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |",
"tags": [
"repos"
],
"operationId": "repos/add-user-access-restrictions",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#add-user-access-restrictions"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"users": {
"type": "array of strings",
"description": "Required. users parameter
", "items": { "type": "string" }, "name": "users", "in": "body", "rawType": "array", "rawDescription": "users parameter", "childParamsGroups": [] } }, "required": [ "users" ], "example": { "users": [ "mona" ] } }, { "type": "array", "items": { "type": "string" } } ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "requestBodyParameterName": "users", "category": "repos", "subcategory": "branches" }, "slug": "add-user-access-restrictions", "category": "repos", "categoryLabel": "Repos", "subcategory": "branches", "subcategoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nGrants the specified people push access for this branch.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description |
|---|---|
array | Usernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items. |
Required. users parameter
", "items": { "type": "string" }, "name": "users", "in": "body", "rawType": "array", "rawDescription": "users parameter", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Set user access restrictions",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nReplaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.\n\n| Type | Description |\n| ------- | ----------------------------------------------------------------------------------------------------------------------------- |\n| `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |",
"tags": [
"repos"
],
"operationId": "repos/set-user-access-restrictions",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#set-user-access-restrictions"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"users": {
"type": "array of strings",
"description": "Required. users parameter
", "items": { "type": "string" }, "name": "users", "in": "body", "rawType": "array", "rawDescription": "users parameter", "childParamsGroups": [] } }, "required": [ "users" ], "example": { "users": [ "mona" ] } }, { "type": "array", "items": { "type": "string" } } ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "requestBodyParameterName": "users", "category": "repos", "subcategory": "branches" }, "slug": "set-user-access-restrictions", "category": "repos", "categoryLabel": "Repos", "subcategory": "branches", "subcategoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nReplaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description |
|---|---|
array | Usernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items. |
Required. users parameter
", "items": { "type": "string" }, "name": "users", "in": "body", "rawType": "array", "rawDescription": "users parameter", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Remove user access restrictions",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nRemoves the ability of a user to push to this branch.\n\n| Type | Description |\n| ------- | --------------------------------------------------------------------------------------------------------------------------------------------- |\n| `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |",
"tags": [
"repos"
],
"operationId": "repos/remove-user-access-restrictions",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#remove-user-access-restrictions"
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"users": {
"type": "array of strings",
"description": "Required. users parameter
", "items": { "type": "string" }, "name": "users", "in": "body", "rawType": "array", "rawDescription": "users parameter", "childParamsGroups": [] } }, "required": [ "users" ], "example": { "users": [ "mona" ] } }, { "type": "array", "items": { "type": "string" } } ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "requestBodyParameterName": "users", "category": "repos", "subcategory": "branches" }, "slug": "remove-user-access-restrictions", "category": "repos", "categoryLabel": "Repos", "subcategory": "branches", "subcategoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nRemoves the ability of a user to push to this branch.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description |
|---|---|
array | Usernames of the people who should no longer have push access. Note: The list of users, apps, and teams in total is limited to 100 items. |
Required. users parameter
", "items": { "type": "string" }, "name": "users", "in": "body", "rawType": "array", "rawDescription": "users parameter", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/branches/{branch}/rename",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "branch",
"description": "The name of the branch.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The name of the branch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/rename \\\n -d '{\"new_name\":\"new_name\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/rename \\\n -d '{\"new_name\":\"new_name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/rename', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n new_name: 'new_name'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/rename', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n new_name: 'new_name'\n})\n"
}
],
"summary": "Rename a branch",
"description": "Renames a branch in a repository.\n\n**Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see \"[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)\".\n\nThe permissions required to use this endpoint depends on whether you are renaming the default branch.\n\nTo rename a non-default branch:\n\n* Users must have push access.\n* GitHub Apps must have the `contents:write` repository permission.\n\nTo rename the default branch:\n\n* Users must have admin or owner permissions.\n* GitHub Apps must have the `administration:write` repository permission.",
"tags": [
"repos"
],
"operationId": "repos/rename-branch",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#rename-a-branch"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"new_name": {
"type": "string",
"description": "Required. The new name of the branch.
", "name": "new_name", "in": "body", "rawType": "string", "rawDescription": "The new name of the branch.", "childParamsGroups": [] } }, "required": [ "new_name" ] }, "example": { "new_name": "my_renamed_branch" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "repos", "subcategory": "branches" }, "slug": "rename-a-branch", "category": "repos", "categoryLabel": "Repos", "subcategory": "branches", "subcategoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "Renames a branch in a repository.
\nNote: Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see \"Renaming a branch\".
\nThe permissions required to use this endpoint depends on whether you are renaming the default branch.
\nTo rename a non-default branch:
\ncontents:write repository permission.To rename the default branch:
\nadministration:write repository permission.Required. The new name of the branch.
", "name": "new_name", "in": "body", "rawType": "string", "rawDescription": "The new name of the branch.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"name\": \"master\",\n \"commit\": {\n \"sha\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n \"node_id\": \"MDY6Q29tbWl0N2ZkMWE2MGIwMWY5MWIzMTRmNTk5NTVhNGU0ZDRlODBkOGVkZjExZA==\",\n \"commit\": {\n \"author\": {\n \"name\": \"The Octocat\",\n \"date\": \"2012-03-06T15:06:50-08:00\",\n \"email\": \"octocat@nowhere.com\"\n },\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n \"message\": \"Merge pull request #6 from Spaceghost/patch-1\\n\\nNew line at end of file.\",\n \"tree\": {\n \"sha\": \"b4eecafa9be2f2006ce1b709d6857b07069b4608\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608\"\n },\n \"committer\": {\n \"name\": \"The Octocat\",\n \"date\": \"2012-03-06T15:06:50-08:00\",\n \"email\": \"octocat@nowhere.com\"\n },\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n },\n \"comment_count\": 0\n },\n \"author\": {\n \"gravatar_id\": \"\",\n \"avatar_url\": \"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"id\": 583231,\n \"login\": \"octocat\",\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"parents\": [\n {\n \"sha\": \"553c2077f0edc3d5dc5d17262f6aa498e69d6f8e\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e\"\n },\n {\n \"sha\": \"762941318ee16e59dabbacb1b4049eec22f0d303\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303\"\n }\n ],\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n \"committer\": {\n \"gravatar_id\": \"\",\n \"avatar_url\": \"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"id\": 583231,\n \"login\": \"octocat\",\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\"\n },\n \"_links\": {\n \"html\": \"https://github.com/octocat/Hello-World/tree/master\",\n \"self\": \"https://api.github.com/repos/octocat/Hello-World/branches/master\"\n },\n \"protected\": true,\n \"protection\": {\n \"required_status_checks\": {\n \"enforcement_level\": \"non_admins\",\n \"contexts\": [\n \"ci-test\",\n \"linter\"\n ]\n }\n },\n \"protection_url\": \"https://api.github.com/repos/octocat/hello-world/branches/master/protection\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/check-runs",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-runs \\\n -d '{\"name\":\"name\",\"head_sha\":\"head_sha\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-runs \\\n -d '{\"name\":\"name\",\"head_sha\":\"head_sha\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/check-runs', {\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name',\n head_sha: 'head_sha'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/check-runs', {\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name',\n head_sha: 'head_sha'\n})\n"
}
],
"summary": "Create a check run",
"description": "**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.\n\nCreates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs.\n\nIn a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs.",
"tags": [
"checks"
],
"operationId": "checks/create",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/checks#create-a-check-run"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Required. The name of the check. For example, \"code-coverage\".
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the check. For example, \"code-coverage\".", "childParamsGroups": [] }, "head_sha": { "type": "string", "description": "Required. The SHA of the commit.
", "name": "head_sha", "in": "body", "rawType": "string", "rawDescription": "The SHA of the commit.", "childParamsGroups": [] }, "details_url": { "type": "string", "description": "The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used.
", "name": "details_url", "in": "body", "rawType": "string", "rawDescription": "The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used.", "childParamsGroups": [] }, "external_id": { "type": "string", "description": "A reference for the run on the integrator's system.
", "name": "external_id", "in": "body", "rawType": "string", "rawDescription": "A reference for the run on the integrator's system.", "childParamsGroups": [] }, "status": { "type": "string", "description": "The current status. Can be one of queued, in_progress, or completed.
The time that the check run began. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Required if you provide completed_at or a status of completed. The final conclusion of the check. Can be one of action_required, cancelled, failure, neutral, success, skipped, stale, or timed_out. When the conclusion is action_required, additional details should be provided on the site specified by details_url.
\nNote: Providing conclusion will automatically set the status parameter to completed. You cannot change a check run conclusion to stale, only GitHub can set this.
The time the check completed. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Check runs can accept a variety of data in the output object, including a title and summary and can optionally provide descriptive details about the run. See the output object description.
Required. The title of the check run.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title of the check run.", "childParamsGroups": [] }, "summary": { "type": "string", "maxLength": 65535, "description": "Required. The summary of the check run. This parameter supports Markdown.
", "name": "summary", "in": "body", "rawType": "string", "rawDescription": "The summary of the check run. This parameter supports Markdown.", "childParamsGroups": [] }, "text": { "type": "string", "maxLength": 65535, "description": "The details of the check run. This parameter supports Markdown.
", "name": "text", "in": "body", "rawType": "string", "rawDescription": "The details of the check run. This parameter supports Markdown.", "childParamsGroups": [] }, "annotations": { "type": "array of objects", "description": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the Checks and Files changed tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"About status checks\". See the annotations object description for details about how to use this parameter.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, "end_line": { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, "start_column": { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, "title": { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, "raw_details": { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } }, "required": [ "path", "start_line", "end_line", "annotation_level", "message" ] }, "name": "annotations", "in": "body", "rawType": "array", "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter.", "childParamsGroups": [ { "parentName": "annotations", "parentType": "items", "id": "annotations-items", "params": [ { "type": "string", "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } ] } ] }, "images": { "type": "array of objects", "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, "image_url": { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, "caption": { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } }, "required": [ "alt", "image_url" ] }, "name": "images", "in": "body", "rawType": "array", "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details.", "childParamsGroups": [ { "parentName": "images", "parentType": "items", "id": "images-items", "params": [ { "type": "string", "description": "Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } ] } ] } }, "required": [ "title", "summary" ], "name": "output", "in": "body", "rawType": "object", "rawDescription": "Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object) description.", "childParamsGroups": [ { "parentName": "output", "parentType": "object", "id": "output-object", "params": [ { "type": "string", "description": "Required. The title of the check run.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title of the check run.", "childParamsGroups": [] }, { "type": "string", "maxLength": 65535, "description": "Required. The summary of the check run. This parameter supports Markdown.
", "name": "summary", "in": "body", "rawType": "string", "rawDescription": "The summary of the check run. This parameter supports Markdown.", "childParamsGroups": [] }, { "type": "string", "maxLength": 65535, "description": "The details of the check run. This parameter supports Markdown.
", "name": "text", "in": "body", "rawType": "string", "rawDescription": "The details of the check run. This parameter supports Markdown.", "childParamsGroups": [] }, { "type": "array of objects", "description": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the Checks and Files changed tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"About status checks\". See the annotations object description for details about how to use this parameter.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, "end_line": { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, "start_column": { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, "title": { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, "raw_details": { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } }, "required": [ "path", "start_line", "end_line", "annotation_level", "message" ] }, "name": "annotations", "in": "body", "rawType": "array", "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter.", "childParamsGroups": [ { "parentName": "annotations", "parentType": "items", "id": "annotations-items", "params": [ { "type": "string", "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } ] } ] }, { "type": "array of objects", "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, "image_url": { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, "caption": { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } }, "required": [ "alt", "image_url" ] }, "name": "images", "in": "body", "rawType": "array", "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details.", "childParamsGroups": [ { "parentName": "images", "parentType": "items", "id": "images-items", "params": [ { "type": "string", "description": "Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } ] } ] } ] }, { "parentName": "annotations", "parentType": "items", "id": "annotations-items", "params": [ { "type": "string", "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } ] }, { "parentName": "images", "parentType": "items", "id": "images-items", "params": [ { "type": "string", "description": "Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } ] } ] }, "actions": { "type": "array of objects", "description": "Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the check_run.requested_action webhook to your app. Each action includes a label, identifier and description. A maximum of three actions are accepted. See the actions object description. To learn more about check runs and requested actions, see \"Check runs and requested actions.\"
Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", "name": "label", "in": "body", "rawType": "string", "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", "childParamsGroups": [] }, "description": { "type": "string", "maxLength": 40, "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", "childParamsGroups": [] }, "identifier": { "type": "string", "maxLength": 20, "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", "name": "identifier", "in": "body", "rawType": "string", "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", "childParamsGroups": [] } }, "required": [ "label", "description", "identifier" ] }, "name": "actions", "in": "body", "rawType": "array", "rawDescription": "Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions).\"", "childParamsGroups": [ { "parentName": "actions", "parentType": "items", "id": "actions-items", "params": [ { "type": "string", "maxLength": 20, "description": "Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", "name": "label", "in": "body", "rawType": "string", "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", "childParamsGroups": [] }, { "type": "string", "maxLength": 40, "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", "childParamsGroups": [] }, { "type": "string", "maxLength": 20, "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", "name": "identifier", "in": "body", "rawType": "string", "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", "childParamsGroups": [] } ] } ] } }, "required": [ "name", "head_sha" ], "oneOf": [ { "properties": { "status": { "enum": [ "completed" ] } }, "required": [ "status", "conclusion" ], "additionalProperties": true }, { "properties": { "status": { "enum": [ "queued", "in_progress" ] } }, "additionalProperties": true } ] }, "examples": { "example-of-in-progress-conclusion": { "summary": "Response for in_progress conclusion", "value": { "name": "mighty_readme", "head_sha": "ce587453ced02b1526dfb4cb910479d431683101", "status": "in_progress", "external_id": "42", "started_at": "2018-05-04T01:14:52Z", "output": { "title": "Mighty Readme report", "summary": "", "text": "" } } }, "example-of-completed-conclusion": { "summary": "Response for completed conclusion", "value": { "name": "mighty_readme", "head_sha": "ce587453ced02b1526dfb4cb910479d431683101", "status": "completed", "started_at": "2017-11-30T19:39:10Z", "conclusion": "success", "completed_at": "2017-11-30T19:49:10Z", "output": { "title": "Mighty Readme report", "summary": "There are 0 failures, 2 warnings, and 1 notices.", "text": "You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.", "annotations": [ { "path": "README.md", "annotation_level": "warning", "title": "Spell Checker", "message": "Check your spelling for 'banaas'.", "raw_details": "Do you mean 'bananas' or 'banana'?", "start_line": 2, "end_line": 2 }, { "path": "README.md", "annotation_level": "warning", "title": "Spell Checker", "message": "Check your spelling for 'aples'", "raw_details": "Do you mean 'apples' or 'Naples'", "start_line": 4, "end_line": 4 } ], "images": [ { "alt": "Super bananas", "image_url": "http://example.com/images/42" } ] }, "actions": [ { "label": "Fix", "identifier": "fix_errors", "description": "Allow us to fix these errors for you" } ] } } } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "checks", "subcategory": "runs" }, "slug": "create-a-check-run", "category": "checks", "categoryLabel": "Checks", "subcategory": "runs", "subcategoryLabel": "Runs", "contentType": "application/json", "notes": [], "descriptionHTML": "Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.
Creates a new check run for a specific commit in a repository. Your GitHub App must have the checks:write permission to create check runs.
In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs.
", "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response for completed conclusion", "payload": "{\n \"id\": 4,\n \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n \"node_id\": \"MDg6Q2hlY2tSdW40\",\n \"external_id\": \"\",\n \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n \"details_url\": \"https://example.com\",\n \"status\": \"completed\",\n \"conclusion\": \"neutral\",\n \"started_at\": \"2018-05-04T01:14:52Z\",\n \"completed_at\": \"2018-05-04T01:14:52Z\",\n \"output\": {\n \"title\": \"Mighty Readme report\",\n \"summary\": \"There are 0 failures, 2 warnings, and 1 notice.\",\n \"text\": \"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.\",\n \"annotations_count\": 2,\n \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n },\n \"name\": \"mighty_readme\",\n \"check_suite\": {\n \"id\": 5\n },\n \"app\": {\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n },\n \"pull_requests\": [\n {\n \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n \"id\": 1934,\n \"number\": 3956,\n \"head\": {\n \"ref\": \"say-hello\",\n \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n \"repo\": {\n \"id\": 526,\n \"url\": \"https://api.github.com/repos/github/hello-world\",\n \"name\": \"hello-world\"\n }\n },\n \"base\": {\n \"ref\": \"master\",\n \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n \"repo\": {\n \"id\": 526,\n \"url\": \"https://api.github.com/repos/github/hello-world\",\n \"name\": \"hello-world\"\n }\n }\n }\n ]\n}\n"
}
],
"bodyParameters": [
{
"type": "string",
"description": "Required. The name of the check. For example, \"code-coverage\".
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the check. For example, \"code-coverage\".", "childParamsGroups": [] }, { "type": "string", "description": "Required. The SHA of the commit.
", "name": "head_sha", "in": "body", "rawType": "string", "rawDescription": "The SHA of the commit.", "childParamsGroups": [] }, { "type": "string", "description": "The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used.
", "name": "details_url", "in": "body", "rawType": "string", "rawDescription": "The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used.", "childParamsGroups": [] }, { "type": "string", "description": "A reference for the run on the integrator's system.
", "name": "external_id", "in": "body", "rawType": "string", "rawDescription": "A reference for the run on the integrator's system.", "childParamsGroups": [] }, { "type": "string", "description": "The current status. Can be one of queued, in_progress, or completed.
The time that the check run began. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Required if you provide completed_at or a status of completed. The final conclusion of the check. Can be one of action_required, cancelled, failure, neutral, success, skipped, stale, or timed_out. When the conclusion is action_required, additional details should be provided on the site specified by details_url.
\nNote: Providing conclusion will automatically set the status parameter to completed. You cannot change a check run conclusion to stale, only GitHub can set this.
The time the check completed. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Check runs can accept a variety of data in the output object, including a title and summary and can optionally provide descriptive details about the run. See the output object description.
Required. The title of the check run.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title of the check run.", "childParamsGroups": [] }, "summary": { "type": "string", "maxLength": 65535, "description": "Required. The summary of the check run. This parameter supports Markdown.
", "name": "summary", "in": "body", "rawType": "string", "rawDescription": "The summary of the check run. This parameter supports Markdown.", "childParamsGroups": [] }, "text": { "type": "string", "maxLength": 65535, "description": "The details of the check run. This parameter supports Markdown.
", "name": "text", "in": "body", "rawType": "string", "rawDescription": "The details of the check run. This parameter supports Markdown.", "childParamsGroups": [] }, "annotations": { "type": "array of objects", "description": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the Checks and Files changed tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"About status checks\". See the annotations object description for details about how to use this parameter.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, "end_line": { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, "start_column": { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, "title": { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, "raw_details": { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } }, "required": [ "path", "start_line", "end_line", "annotation_level", "message" ] }, "name": "annotations", "in": "body", "rawType": "array", "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter.", "childParamsGroups": [ { "parentName": "annotations", "parentType": "items", "id": "annotations-items", "params": [ { "type": "string", "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } ] } ] }, "images": { "type": "array of objects", "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, "image_url": { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, "caption": { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } }, "required": [ "alt", "image_url" ] }, "name": "images", "in": "body", "rawType": "array", "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details.", "childParamsGroups": [ { "parentName": "images", "parentType": "items", "id": "images-items", "params": [ { "type": "string", "description": "Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } ] } ] } }, "required": [ "title", "summary" ], "name": "output", "in": "body", "rawType": "object", "rawDescription": "Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object) description.", "childParamsGroups": [ { "parentName": "output", "parentType": "object", "id": "output-object", "params": [ { "type": "string", "description": "Required. The title of the check run.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title of the check run.", "childParamsGroups": [] }, { "type": "string", "maxLength": 65535, "description": "Required. The summary of the check run. This parameter supports Markdown.
", "name": "summary", "in": "body", "rawType": "string", "rawDescription": "The summary of the check run. This parameter supports Markdown.", "childParamsGroups": [] }, { "type": "string", "maxLength": 65535, "description": "The details of the check run. This parameter supports Markdown.
", "name": "text", "in": "body", "rawType": "string", "rawDescription": "The details of the check run. This parameter supports Markdown.", "childParamsGroups": [] }, { "type": "array of objects", "description": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the Checks and Files changed tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"About status checks\". See the annotations object description for details about how to use this parameter.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, "end_line": { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, "start_column": { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, "title": { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, "raw_details": { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } }, "required": [ "path", "start_line", "end_line", "annotation_level", "message" ] }, "name": "annotations", "in": "body", "rawType": "array", "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter.", "childParamsGroups": [ { "parentName": "annotations", "parentType": "items", "id": "annotations-items", "params": [ { "type": "string", "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } ] } ] }, { "type": "array of objects", "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, "image_url": { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, "caption": { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } }, "required": [ "alt", "image_url" ] }, "name": "images", "in": "body", "rawType": "array", "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details.", "childParamsGroups": [ { "parentName": "images", "parentType": "items", "id": "images-items", "params": [ { "type": "string", "description": "Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } ] } ] } ] }, { "parentName": "annotations", "parentType": "items", "id": "annotations-items", "params": [ { "type": "string", "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } ] }, { "parentName": "images", "parentType": "items", "id": "images-items", "params": [ { "type": "string", "description": "Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } ] } ] }, { "type": "array of objects", "description": "Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the check_run.requested_action webhook to your app. Each action includes a label, identifier and description. A maximum of three actions are accepted. See the actions object description. To learn more about check runs and requested actions, see \"Check runs and requested actions.\"
Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", "name": "label", "in": "body", "rawType": "string", "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", "childParamsGroups": [] }, "description": { "type": "string", "maxLength": 40, "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", "childParamsGroups": [] }, "identifier": { "type": "string", "maxLength": 20, "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", "name": "identifier", "in": "body", "rawType": "string", "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", "childParamsGroups": [] } }, "required": [ "label", "description", "identifier" ] }, "name": "actions", "in": "body", "rawType": "array", "rawDescription": "Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions).\"", "childParamsGroups": [ { "parentName": "actions", "parentType": "items", "id": "actions-items", "params": [ { "type": "string", "maxLength": 20, "description": "Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", "name": "label", "in": "body", "rawType": "string", "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", "childParamsGroups": [] }, { "type": "string", "maxLength": 40, "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", "childParamsGroups": [] }, { "type": "string", "maxLength": 20, "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", "name": "identifier", "in": "body", "rawType": "string", "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", "childParamsGroups": [] } ] } ] } ] }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/check-runs/{check_run_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "check_run_id", "description": "check_run_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "check_run_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-runs/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-runs/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/check-runs/{check_run_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n check_run_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/check-runs/{check_run_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n check_run_id: 42\n})\n"
}
],
"summary": "Get a check run",
"description": "**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.\n\nGets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository.",
"tags": [
"checks"
],
"operationId": "checks/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/checks#get-a-check-run"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "checks",
"subcategory": "runs"
},
"slug": "get-a-check-run",
"category": "checks",
"categoryLabel": "Checks",
"subcategory": "runs",
"subcategoryLabel": "Runs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.
Gets a single check run using its id. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the repo scope to get check runs in a private repository.
{\n \"id\": 4,\n \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n \"node_id\": \"MDg6Q2hlY2tSdW40\",\n \"external_id\": \"\",\n \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n \"details_url\": \"https://example.com\",\n \"status\": \"completed\",\n \"conclusion\": \"neutral\",\n \"started_at\": \"2018-05-04T01:14:52Z\",\n \"completed_at\": \"2018-05-04T01:14:52Z\",\n \"output\": {\n \"title\": \"Mighty Readme report\",\n \"summary\": \"There are 0 failures, 2 warnings, and 1 notice.\",\n \"text\": \"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.\",\n \"annotations_count\": 2,\n \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n },\n \"name\": \"mighty_readme\",\n \"check_suite\": {\n \"id\": 5\n },\n \"app\": {\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n },\n \"pull_requests\": [\n {\n \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n \"id\": 1934,\n \"number\": 3956,\n \"head\": {\n \"ref\": \"say-hello\",\n \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n \"repo\": {\n \"id\": 526,\n \"url\": \"https://api.github.com/repos/github/hello-world\",\n \"name\": \"hello-world\"\n }\n },\n \"base\": {\n \"ref\": \"master\",\n \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n \"repo\": {\n \"id\": 526,\n \"url\": \"https://api.github.com/repos/github/hello-world\",\n \"name\": \"hello-world\"\n }\n }\n }\n ]\n}\n"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/check-runs/{check_run_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "check_run_id",
"description": "check_run_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "check_run_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-runs/42 \\\n -d '{\"name\":\"name\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-runs/42 \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n check_run_id: 42,\n name: 'name'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n check_run_id: 42,\n name: 'name'\n})\n"
}
],
"summary": "Update a check run",
"description": "**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.\n\nUpdates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs.",
"tags": [
"checks"
],
"operationId": "checks/update",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/checks#update-a-check-run"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the check. For example, \"code-coverage\".
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the check. For example, \"code-coverage\".", "childParamsGroups": [] }, "details_url": { "type": "string", "description": "The URL of the integrator's site that has the full details of the check.
", "name": "details_url", "in": "body", "rawType": "string", "rawDescription": "The URL of the integrator's site that has the full details of the check.", "childParamsGroups": [] }, "external_id": { "type": "string", "description": "A reference for the run on the integrator's system.
", "name": "external_id", "in": "body", "rawType": "string", "rawDescription": "A reference for the run on the integrator's system.", "childParamsGroups": [] }, "started_at": { "type": "string", "format": "date-time", "description": "This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The current status. Can be one of queued, in_progress, or completed.
Required if you provide completed_at or a status of completed. The final conclusion of the check. Can be one of action_required, cancelled, failure, neutral, success, skipped, stale, or timed_out.
\nNote: Providing conclusion will automatically set the status parameter to completed. You cannot change a check run conclusion to stale, only GitHub can set this.
The time the check completed. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Check runs can accept a variety of data in the output object, including a title and summary and can optionally provide descriptive details about the run. See the output object description.
Required.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "**Required**.", "childParamsGroups": [] }, "summary": { "type": "string", "description": "Required. Can contain Markdown.
", "maxLength": 65535, "name": "summary", "in": "body", "rawType": "string", "rawDescription": "Can contain Markdown.", "childParamsGroups": [] }, "text": { "type": "string", "description": "Can contain Markdown.
", "maxLength": 65535, "name": "text", "in": "body", "rawType": "string", "rawDescription": "Can contain Markdown.", "childParamsGroups": [] }, "annotations": { "type": "array of objects", "description": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"About status checks\". See the annotations object description for details.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, "end_line": { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, "start_column": { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, "title": { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, "raw_details": { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } }, "required": [ "path", "start_line", "end_line", "annotation_level", "message" ] }, "name": "annotations", "in": "body", "rawType": "array", "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details.", "childParamsGroups": [ { "parentName": "annotations", "parentType": "items", "id": "annotations-items", "params": [ { "type": "string", "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } ] } ] }, "images": { "type": "array of objects", "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, "image_url": { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, "caption": { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } }, "required": [ "alt", "image_url" ] }, "name": "images", "in": "body", "rawType": "array", "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details.", "childParamsGroups": [ { "parentName": "images", "parentType": "items", "id": "images-items", "params": [ { "type": "string", "description": "Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } ] } ] } }, "required": [ "summary" ], "name": "output", "in": "body", "rawType": "object", "rawDescription": "Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object-1) description.", "childParamsGroups": [ { "parentName": "output", "parentType": "object", "id": "output-object", "params": [ { "type": "string", "description": "Required.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "**Required**.", "childParamsGroups": [] }, { "type": "string", "description": "Required. Can contain Markdown.
", "maxLength": 65535, "name": "summary", "in": "body", "rawType": "string", "rawDescription": "Can contain Markdown.", "childParamsGroups": [] }, { "type": "string", "description": "Can contain Markdown.
", "maxLength": 65535, "name": "text", "in": "body", "rawType": "string", "rawDescription": "Can contain Markdown.", "childParamsGroups": [] }, { "type": "array of objects", "description": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"About status checks\". See the annotations object description for details.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, "end_line": { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, "start_column": { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, "title": { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, "raw_details": { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } }, "required": [ "path", "start_line", "end_line", "annotation_level", "message" ] }, "name": "annotations", "in": "body", "rawType": "array", "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details.", "childParamsGroups": [ { "parentName": "annotations", "parentType": "items", "id": "annotations-items", "params": [ { "type": "string", "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } ] } ] }, { "type": "array of objects", "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, "image_url": { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, "caption": { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } }, "required": [ "alt", "image_url" ] }, "name": "images", "in": "body", "rawType": "array", "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details.", "childParamsGroups": [ { "parentName": "images", "parentType": "items", "id": "images-items", "params": [ { "type": "string", "description": "Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } ] } ] } ] }, { "parentName": "annotations", "parentType": "items", "id": "annotations-items", "params": [ { "type": "string", "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } ] }, { "parentName": "images", "parentType": "items", "id": "images-items", "params": [ { "type": "string", "description": "Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } ] } ] }, "actions": { "type": "array of objects", "description": "Possible further actions the integrator can perform, which a user may trigger. Each action includes a label, identifier and description. A maximum of three actions are accepted. See the actions object description. To learn more about check runs and requested actions, see \"Check runs and requested actions.\"
Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", "name": "label", "in": "body", "rawType": "string", "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", "childParamsGroups": [] }, "description": { "type": "string", "maxLength": 40, "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", "childParamsGroups": [] }, "identifier": { "type": "string", "maxLength": 20, "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", "name": "identifier", "in": "body", "rawType": "string", "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", "childParamsGroups": [] } }, "required": [ "label", "description", "identifier" ] }, "name": "actions", "in": "body", "rawType": "array", "rawDescription": "Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions).\"", "childParamsGroups": [ { "parentName": "actions", "parentType": "items", "id": "actions-items", "params": [ { "type": "string", "maxLength": 20, "description": "Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", "name": "label", "in": "body", "rawType": "string", "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", "childParamsGroups": [] }, { "type": "string", "maxLength": 40, "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", "childParamsGroups": [] }, { "type": "string", "maxLength": 20, "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", "name": "identifier", "in": "body", "rawType": "string", "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", "childParamsGroups": [] } ] } ] } }, "anyOf": [ { "properties": { "status": { "enum": [ "completed" ] } }, "required": [ "conclusion" ], "additionalProperties": true }, { "properties": { "status": { "enum": [ "queued", "in_progress" ] } }, "additionalProperties": true } ] }, "example": { "name": "mighty_readme", "started_at": "2018-05-04T01:14:52Z", "status": "completed", "conclusion": "success", "completed_at": "2018-05-04T01:14:52Z", "output": { "title": "Mighty Readme report", "summary": "There are 0 failures, 2 warnings, and 1 notices.", "text": "You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.", "annotations": [ { "path": "README.md", "annotation_level": "warning", "title": "Spell Checker", "message": "Check your spelling for 'banaas'.", "raw_details": "Do you mean 'bananas' or 'banana'?", "start_line": 2, "end_line": 2 }, { "path": "README.md", "annotation_level": "warning", "title": "Spell Checker", "message": "Check your spelling for 'aples'", "raw_details": "Do you mean 'apples' or 'Naples'", "start_line": 4, "end_line": 4 } ], "images": [ { "alt": "Super bananas", "image_url": "http://example.com/images/42" } ] } } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "checks", "subcategory": "runs" }, "slug": "update-a-check-run", "category": "checks", "categoryLabel": "Checks", "subcategory": "runs", "subcategoryLabel": "Runs", "contentType": "application/json", "notes": [], "descriptionHTML": "Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.
Updates a check run for a specific commit in a repository. Your GitHub App must have the checks:write permission to edit check runs.
{\n \"id\": 4,\n \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n \"node_id\": \"MDg6Q2hlY2tSdW40\",\n \"external_id\": \"\",\n \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n \"details_url\": \"https://example.com\",\n \"status\": \"completed\",\n \"conclusion\": \"neutral\",\n \"started_at\": \"2018-05-04T01:14:52Z\",\n \"completed_at\": \"2018-05-04T01:14:52Z\",\n \"output\": {\n \"title\": \"Mighty Readme report\",\n \"summary\": \"There are 0 failures, 2 warnings, and 1 notice.\",\n \"text\": \"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.\",\n \"annotations_count\": 2,\n \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n },\n \"name\": \"mighty_readme\",\n \"check_suite\": {\n \"id\": 5\n },\n \"app\": {\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n },\n \"pull_requests\": [\n {\n \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n \"id\": 1934,\n \"number\": 3956,\n \"head\": {\n \"ref\": \"say-hello\",\n \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n \"repo\": {\n \"id\": 526,\n \"url\": \"https://api.github.com/repos/github/hello-world\",\n \"name\": \"hello-world\"\n }\n },\n \"base\": {\n \"ref\": \"master\",\n \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n \"repo\": {\n \"id\": 526,\n \"url\": \"https://api.github.com/repos/github/hello-world\",\n \"name\": \"hello-world\"\n }\n }\n }\n ]\n}\n"
}
],
"bodyParameters": [
{
"type": "string",
"description": "The name of the check. For example, \"code-coverage\".
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the check. For example, \"code-coverage\".", "childParamsGroups": [] }, { "type": "string", "description": "The URL of the integrator's site that has the full details of the check.
", "name": "details_url", "in": "body", "rawType": "string", "rawDescription": "The URL of the integrator's site that has the full details of the check.", "childParamsGroups": [] }, { "type": "string", "description": "A reference for the run on the integrator's system.
", "name": "external_id", "in": "body", "rawType": "string", "rawDescription": "A reference for the run on the integrator's system.", "childParamsGroups": [] }, { "type": "string", "format": "date-time", "description": "This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The current status. Can be one of queued, in_progress, or completed.
Required if you provide completed_at or a status of completed. The final conclusion of the check. Can be one of action_required, cancelled, failure, neutral, success, skipped, stale, or timed_out.
\nNote: Providing conclusion will automatically set the status parameter to completed. You cannot change a check run conclusion to stale, only GitHub can set this.
The time the check completed. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Check runs can accept a variety of data in the output object, including a title and summary and can optionally provide descriptive details about the run. See the output object description.
Required.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "**Required**.", "childParamsGroups": [] }, "summary": { "type": "string", "description": "Required. Can contain Markdown.
", "maxLength": 65535, "name": "summary", "in": "body", "rawType": "string", "rawDescription": "Can contain Markdown.", "childParamsGroups": [] }, "text": { "type": "string", "description": "Can contain Markdown.
", "maxLength": 65535, "name": "text", "in": "body", "rawType": "string", "rawDescription": "Can contain Markdown.", "childParamsGroups": [] }, "annotations": { "type": "array of objects", "description": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"About status checks\". See the annotations object description for details.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, "end_line": { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, "start_column": { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, "title": { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, "raw_details": { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } }, "required": [ "path", "start_line", "end_line", "annotation_level", "message" ] }, "name": "annotations", "in": "body", "rawType": "array", "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details.", "childParamsGroups": [ { "parentName": "annotations", "parentType": "items", "id": "annotations-items", "params": [ { "type": "string", "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } ] } ] }, "images": { "type": "array of objects", "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, "image_url": { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, "caption": { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } }, "required": [ "alt", "image_url" ] }, "name": "images", "in": "body", "rawType": "array", "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details.", "childParamsGroups": [ { "parentName": "images", "parentType": "items", "id": "images-items", "params": [ { "type": "string", "description": "Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } ] } ] } }, "required": [ "summary" ], "name": "output", "in": "body", "rawType": "object", "rawDescription": "Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object-1) description.", "childParamsGroups": [ { "parentName": "output", "parentType": "object", "id": "output-object", "params": [ { "type": "string", "description": "Required.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "**Required**.", "childParamsGroups": [] }, { "type": "string", "description": "Required. Can contain Markdown.
", "maxLength": 65535, "name": "summary", "in": "body", "rawType": "string", "rawDescription": "Can contain Markdown.", "childParamsGroups": [] }, { "type": "string", "description": "Can contain Markdown.
", "maxLength": 65535, "name": "text", "in": "body", "rawType": "string", "rawDescription": "Can contain Markdown.", "childParamsGroups": [] }, { "type": "array of objects", "description": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"About status checks\". See the annotations object description for details.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, "end_line": { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, "start_column": { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, "title": { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, "raw_details": { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } }, "required": [ "path", "start_line", "end_line", "annotation_level", "message" ] }, "name": "annotations", "in": "body", "rawType": "array", "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details.", "childParamsGroups": [ { "parentName": "annotations", "parentType": "items", "id": "annotations-items", "params": [ { "type": "string", "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } ] } ] }, { "type": "array of objects", "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, "image_url": { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, "caption": { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } }, "required": [ "alt", "image_url" ] }, "name": "images", "in": "body", "rawType": "array", "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details.", "childParamsGroups": [ { "parentName": "images", "parentType": "items", "id": "images-items", "params": [ { "type": "string", "description": "Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } ] } ] } ] }, { "parentName": "annotations", "parentType": "items", "id": "annotations-items", "params": [ { "type": "string", "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", "name": "start_line", "in": "body", "rawType": "integer", "rawDescription": "The start line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "Required. The end line of the annotation.
", "name": "end_line", "in": "body", "rawType": "integer", "rawDescription": "The end line of the annotation.", "childParamsGroups": [] }, { "type": "integer", "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", "childParamsGroups": [] }, { "type": "string", "description": "The title that represents the annotation. The maximum size is 255 characters.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", "childParamsGroups": [] }, { "type": "string", "description": "Details about this annotation. The maximum size is 64 KB.
", "name": "raw_details", "in": "body", "rawType": "string", "rawDescription": "Details about this annotation. The maximum size is 64 KB.", "childParamsGroups": [] } ] }, { "parentName": "images", "parentType": "items", "id": "images-items", "params": [ { "type": "string", "description": "Required. The alternative text for the image.
", "name": "alt", "in": "body", "rawType": "string", "rawDescription": "The alternative text for the image.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The full URL of the image.
", "name": "image_url", "in": "body", "rawType": "string", "rawDescription": "The full URL of the image.", "childParamsGroups": [] }, { "type": "string", "description": "A short image description.
", "name": "caption", "in": "body", "rawType": "string", "rawDescription": "A short image description.", "childParamsGroups": [] } ] } ] }, { "type": "array of objects", "description": "Possible further actions the integrator can perform, which a user may trigger. Each action includes a label, identifier and description. A maximum of three actions are accepted. See the actions object description. To learn more about check runs and requested actions, see \"Check runs and requested actions.\"
Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", "name": "label", "in": "body", "rawType": "string", "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", "childParamsGroups": [] }, "description": { "type": "string", "maxLength": 40, "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", "childParamsGroups": [] }, "identifier": { "type": "string", "maxLength": 20, "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", "name": "identifier", "in": "body", "rawType": "string", "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", "childParamsGroups": [] } }, "required": [ "label", "description", "identifier" ] }, "name": "actions", "in": "body", "rawType": "array", "rawDescription": "Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions).\"", "childParamsGroups": [ { "parentName": "actions", "parentType": "items", "id": "actions-items", "params": [ { "type": "string", "maxLength": 20, "description": "Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", "name": "label", "in": "body", "rawType": "string", "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", "childParamsGroups": [] }, { "type": "string", "maxLength": 40, "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", "childParamsGroups": [] }, { "type": "string", "maxLength": 20, "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", "name": "identifier", "in": "body", "rawType": "string", "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", "childParamsGroups": [] } ] } ] } ] }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "check_run_id", "description": "check_run_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "check_run_id parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-runs/42/annotations", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-runs/42/annotations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations', {\n owner: 'octocat',\n repo: 'hello-world',\n check_run_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations', {\n owner: 'octocat',\n repo: 'hello-world',\n check_run_id: 42\n})\n"
}
],
"summary": "List check run annotations",
"description": "Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository.",
"tags": [
"checks"
],
"operationId": "checks/list-annotations",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/checks#list-check-run-annotations"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "checks",
"subcategory": "runs"
},
"slug": "list-check-run-annotations",
"category": "checks",
"categoryLabel": "Checks",
"subcategory": "runs",
"subcategoryLabel": "Runs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists annotations for a check run using the annotation id. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the repo scope to get annotations for a check run in a private repository.
[\n {\n \"path\": \"README.md\",\n \"start_line\": 2,\n \"end_line\": 2,\n \"start_column\": 5,\n \"end_column\": 10,\n \"annotation_level\": \"warning\",\n \"title\": \"Spell Checker\",\n \"message\": \"Check your spelling for 'banaas'.\",\n \"raw_details\": \"Do you mean 'bananas' or 'banana'?\",\n \"blob_href\": \"https://api.github.com/repos/github/rest-api-description/git/blobs/abc\"\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "check_run_id",
"description": "check_run_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "check_run_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-runs/42/rerequest", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-runs/42/rerequest"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest', {\n owner: 'octocat',\n repo: 'hello-world',\n check_run_id: 42\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest', {\n owner: 'octocat',\n repo: 'hello-world',\n check_run_id: 42\n})\n"
}
],
"summary": "Rerequest a check run",
"description": "Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared.\n\nTo rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository.",
"tags": [
"checks"
],
"operationId": "checks/rerequest-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/checks#rerequest-a-check-run"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "checks",
"subcategory": "runs"
},
"slug": "rerequest-a-check-run",
"category": "checks",
"categoryLabel": "Checks",
"subcategory": "runs",
"subcategoryLabel": "Runs",
"notes": [],
"responses": [
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation error if the check run is not rerequestable"
}
],
"bodyParameters": [],
"descriptionHTML": "Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the check_run webhook event with the action rerequested. When a check run is rerequested, its status is reset to queued and the conclusion is cleared.
To rerequest a check run, your GitHub App must have the checks:read permission on a private repository or pull access to a public repository.
curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-suites \\\n -d '{\"head_sha\":\"head_sha\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/check-suites', {\n owner: 'octocat',\n repo: 'hello-world',\n head_sha: 'head_sha'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/check-suites', {\n owner: 'octocat',\n repo: 'hello-world',\n head_sha: 'head_sha'\n})\n"
}
],
"summary": "Create a check suite",
"description": "**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.\n\nBy default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using \"[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)\". Your GitHub App must have the `checks:write` permission to create check suites.",
"tags": [
"checks"
],
"operationId": "checks/create-suite",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/checks#create-a-check-suite"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"head_sha": {
"type": "string",
"description": "Required. The sha of the head commit.
", "name": "head_sha", "in": "body", "rawType": "string", "rawDescription": "The sha of the head commit.", "childParamsGroups": [] } }, "required": [ "head_sha" ] }, "example": { "head_sha": "d6fde92930d4715a2b49857d24b940956b26d2d3" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "checks", "subcategory": "suites" }, "slug": "create-a-check-suite", "category": "checks", "categoryLabel": "Checks", "subcategory": "suites", "subcategoryLabel": "Suites", "contentType": "application/json", "notes": [], "descriptionHTML": "Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array and a null value for head_branch.
By default, check suites are automatically created when you create a check run. You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using \"Update repository preferences for check suites\". Your GitHub App must have the checks:write permission to create check suites.
Required. The sha of the head commit.
", "name": "head_sha", "in": "body", "rawType": "string", "rawDescription": "The sha of the head commit.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "when the suite already existed", "payload": "{\n \"id\": 5,\n \"node_id\": \"MDEwOkNoZWNrU3VpdGU1\",\n \"head_branch\": \"master\",\n \"head_sha\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n \"status\": \"completed\",\n \"conclusion\": \"neutral\",\n \"url\": \"https://api.github.com/repos/github/hello-world/check-suites/5\",\n \"before\": \"146e867f55c26428e5f9fade55a9bbf5e95a7912\",\n \"after\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n \"pull_requests\": [],\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"app\": {\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n },\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n },\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"delete_branch_on_merge\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n },\n \"head_commit\": {\n \"id\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n \"tree_id\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n \"message\": \"Merge pull request #6 from Spaceghost/patch-1\\n\\nNew line at end of file.\",\n \"timestamp\": \"2016-10-10T00:00:00Z\",\n \"author\": {\n \"name\": \"The Octocat\",\n \"email\": \"octocat@nowhere.com\"\n },\n \"committer\": {\n \"name\": \"The Octocat\",\n \"email\": \"octocat@nowhere.com\"\n }\n },\n \"latest_check_runs_count\": 1,\n \"check_runs_url\": \"https://api.github.com/repos/octocat/Hello-World/check-suites/5/check-runs\"\n}\n"
},
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response when the suite was created",
"payload": "{\n \"id\": 5,\n \"node_id\": \"MDEwOkNoZWNrU3VpdGU1\",\n \"head_branch\": \"master\",\n \"head_sha\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n \"status\": \"completed\",\n \"conclusion\": \"neutral\",\n \"url\": \"https://api.github.com/repos/github/hello-world/check-suites/5\",\n \"before\": \"146e867f55c26428e5f9fade55a9bbf5e95a7912\",\n \"after\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n \"pull_requests\": [],\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"app\": {\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n },\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n },\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"delete_branch_on_merge\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n },\n \"head_commit\": {\n \"id\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n \"tree_id\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n \"message\": \"Merge pull request #6 from Spaceghost/patch-1\\n\\nNew line at end of file.\",\n \"timestamp\": \"2016-10-10T00:00:00Z\",\n \"author\": {\n \"name\": \"The Octocat\",\n \"email\": \"octocat@nowhere.com\"\n },\n \"committer\": {\n \"name\": \"The Octocat\",\n \"email\": \"octocat@nowhere.com\"\n }\n },\n \"latest_check_runs_count\": 1,\n \"check_runs_url\": \"https://api.github.com/repos/octocat/Hello-World/check-suites/5/check-runs\"\n}\n"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/check-suites/preferences",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-suites/preferences \\\n -d '{\"auto_trigger_checks\":[{\"app_id\":42,\"setting\":true}]}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-suites/preferences \\\n -d '{\"auto_trigger_checks\":[{\"app_id\":42,\"setting\":true}]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/check-suites/preferences', {\n owner: 'octocat',\n repo: 'hello-world',\n auto_trigger_checks: [\n {\n app_id: 42,\n setting: true\n }\n ]\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/check-suites/preferences', {\n owner: 'octocat',\n repo: 'hello-world',\n auto_trigger_checks: [\n {\n app_id: 42,\n setting: true\n }\n ]\n})\n"
}
],
"summary": "Update repository preferences for check suites",
"description": "Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites.",
"tags": [
"checks"
],
"operationId": "checks/set-suites-preferences",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"auto_trigger_checks": {
"type": "array of objects",
"description": "Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the auto_trigger_checks object description for details.
Required. The id of the GitHub App.
Required. Set to true to enable automatic creation of CheckSuite events upon pushes to the repository, or false to disable them.
Required. The id of the GitHub App.
Required. Set to true to enable automatic creation of CheckSuite events upon pushes to the repository, or false to disable them.
Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually Create a check suite. You must have admin permissions in the repository to set preferences for check suites.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"preferences\": {\n \"auto_trigger_checks\": [\n {\n \"app_id\": 2,\n \"setting\": true\n },\n {\n \"app_id\": 4,\n \"setting\": false\n }\n ]\n },\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n }\n }\n}\n"
}
],
"bodyParameters": [
{
"type": "array of objects",
"description": "Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the auto_trigger_checks object description for details.
Required. The id of the GitHub App.
Required. Set to true to enable automatic creation of CheckSuite events upon pushes to the repository, or false to disable them.
Required. The id of the GitHub App.
Required. Set to true to enable automatic creation of CheckSuite events upon pushes to the repository, or false to disable them.
check_suite_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-suites/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-suites/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/check-suites/{check_suite_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n check_suite_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/check-suites/{check_suite_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n check_suite_id: 42\n})\n"
}
],
"summary": "Get a check suite",
"description": "**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.\n\nGets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository.",
"tags": [
"checks"
],
"operationId": "checks/get-suite",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/checks#get-a-check-suite"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "checks",
"subcategory": "suites"
},
"slug": "get-a-check-suite",
"category": "checks",
"categoryLabel": "Checks",
"subcategory": "suites",
"subcategoryLabel": "Suites",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array and a null value for head_branch.
Gets a single check suite using its id. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the repo scope to get check suites in a private repository.
{\n \"id\": 5,\n \"node_id\": \"MDEwOkNoZWNrU3VpdGU1\",\n \"head_branch\": \"master\",\n \"head_sha\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n \"status\": \"completed\",\n \"conclusion\": \"neutral\",\n \"url\": \"https://api.github.com/repos/github/hello-world/check-suites/5\",\n \"before\": \"146e867f55c26428e5f9fade55a9bbf5e95a7912\",\n \"after\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n \"pull_requests\": [],\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"app\": {\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n },\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n },\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"delete_branch_on_merge\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n },\n \"head_commit\": {\n \"id\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n \"tree_id\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n \"message\": \"Merge pull request #6 from Spaceghost/patch-1\\n\\nNew line at end of file.\",\n \"timestamp\": \"2016-10-10T00:00:00Z\",\n \"author\": {\n \"name\": \"The Octocat\",\n \"email\": \"octocat@nowhere.com\"\n },\n \"committer\": {\n \"name\": \"The Octocat\",\n \"email\": \"octocat@nowhere.com\"\n }\n },\n \"latest_check_runs_count\": 1,\n \"check_runs_url\": \"https://api.github.com/repos/octocat/Hello-World/check-suites/5/check-runs\"\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "check_suite_id",
"description": "check_suite_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "check_suite_id parameter
" }, { "name": "check_name", "description": "Returns check runs with the specified `name`.", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "Returns check runs with the specified name.
Returns check runs with the specified status. Can be one of queued, in_progress, or completed.
Filters check runs by their completed_at timestamp. Can be one of latest (returning the most recent check runs) or all.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-suites/42/check-runs", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-suites/42/check-runs"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs', {\n owner: 'octocat',\n repo: 'hello-world',\n check_suite_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs', {\n owner: 'octocat',\n repo: 'hello-world',\n check_suite_id: 42\n})\n"
}
],
"summary": "List check runs in a check suite",
"description": "**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.\n\nLists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository.",
"tags": [
"checks"
],
"operationId": "checks/list-for-suite",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "checks",
"subcategory": "runs"
},
"slug": "list-check-runs-in-a-check-suite",
"category": "checks",
"categoryLabel": "Checks",
"subcategory": "runs",
"subcategoryLabel": "Runs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.
Lists check runs for a check suite using its id. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the repo scope to get check runs in a private repository.
{\n \"total_count\": 1,\n \"check_runs\": [\n {\n \"id\": 4,\n \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n \"node_id\": \"MDg6Q2hlY2tSdW40\",\n \"external_id\": \"\",\n \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n \"details_url\": \"https://example.com\",\n \"status\": \"completed\",\n \"conclusion\": \"neutral\",\n \"started_at\": \"2018-05-04T01:14:52Z\",\n \"completed_at\": \"2018-05-04T01:14:52Z\",\n \"output\": {\n \"title\": \"Mighty Readme report\",\n \"summary\": \"There are 0 failures, 2 warnings, and 1 notice.\",\n \"text\": \"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.\",\n \"annotations_count\": 2,\n \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n },\n \"name\": \"mighty_readme\",\n \"check_suite\": {\n \"id\": 5\n },\n \"app\": {\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n },\n \"pull_requests\": [\n {\n \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n \"id\": 1934,\n \"number\": 3956,\n \"head\": {\n \"ref\": \"say-hello\",\n \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n \"repo\": {\n \"id\": 526,\n \"url\": \"https://api.github.com/repos/github/hello-world\",\n \"name\": \"hello-world\"\n }\n },\n \"base\": {\n \"ref\": \"master\",\n \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n \"repo\": {\n \"id\": 526,\n \"url\": \"https://api.github.com/repos/github/hello-world\",\n \"name\": \"hello-world\"\n }\n }\n }\n ]\n }\n ]\n}\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "check_suite_id",
"description": "check_suite_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "check_suite_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-suites/42/rerequest", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-suites/42/rerequest"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest', {\n owner: 'octocat',\n repo: 'hello-world',\n check_suite_id: 42\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest', {\n owner: 'octocat',\n repo: 'hello-world',\n check_suite_id: 42\n})\n"
}
],
"summary": "Rerequest a check suite",
"description": "Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared.\n\nTo rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository.",
"tags": [
"checks"
],
"operationId": "checks/rerequest-suite",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/checks#rerequest-a-check-suite"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "checks",
"subcategory": "suites"
},
"slug": "rerequest-a-check-suite",
"category": "checks",
"categoryLabel": "Checks",
"subcategory": "suites",
"subcategoryLabel": "Suites",
"notes": [],
"responses": [
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the check_suite webhook event with the action rerequested. When a check suite is rerequested, its status is reset to queued and the conclusion is cleared.
To rerequest a check suite, your GitHub App must have the checks:read permission on a private repository or pull access to a public repository.
The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either tool_name or tool_guid, but not both.
The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either tool_guid or tool_name, but not both.
Page number of the results to fetch.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "ref", "description": "The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/The Git reference for the results you want to list. The ref for a branch can be formatted either as refs/heads/<branch name> or simply <branch name>. To reference a pull request use refs/pull/<number>/merge.
Set to open, fixed, or dismissed to list code scanning alerts in a specific state.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/code-scanning/alerts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/code-scanning/alerts', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/code-scanning/alerts', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List code scanning alerts for a repository",
"description": "Lists all open code scanning alerts for the default branch (usually `main`\nor `master`). You must use an access token with the `security_events` scope to use\nthis endpoint. GitHub Apps must have the `security_events` read permission to use\nthis endpoint.\n\nThe response includes a `most_recent_instance` object.\nThis provides details of the most recent instance of this alert\nfor the default branch or for the specified Git reference\n(if you used `ref` in the request).",
"tags": [
"code-scanning"
],
"operationId": "code-scanning/list-alerts-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "code-scanning",
"subcategory": null
},
"slug": "list-code-scanning-alerts-for-a-repository",
"category": "code-scanning",
"categoryLabel": "Code scanning",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all open code scanning alerts for the default branch (usually main\nor master). You must use an access token with the security_events scope to use\nthis endpoint. GitHub Apps must have the security_events read permission to use\nthis endpoint.
The response includes a most_recent_instance object.\nThis provides details of the most recent instance of this alert\nfor the default branch or for the specified Git reference\n(if you used ref in the request).
[\n {\n \"number\": 4,\n \"created_at\": \"2020-02-13T12:29:18Z\",\n \"url\": \"https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/4\",\n \"html_url\": \"https://github.com/octocat/hello-world/code-scanning/4\",\n \"state\": \"open\",\n \"dismissed_by\": null,\n \"dismissed_at\": null,\n \"dismissed_reason\": null,\n \"rule\": {\n \"id\": \"js/zipslip\",\n \"severity\": \"error\",\n \"description\": \"Arbitrary file write during zip extraction\",\n \"name\": \"js/zipslip\"\n },\n \"tool\": {\n \"name\": \"CodeQL\",\n \"guid\": null,\n \"version\": \"2.4.0\"\n },\n \"most_recent_instance\": {\n \"ref\": \"refs/heads/main\",\n \"analysis_key\": \".github/workflows/codeql-analysis.yml:CodeQL-Build\",\n \"environment\": \"{}\",\n \"state\": \"open\",\n \"commit_sha\": \"39406e42cb832f683daa691dd652a8dc36ee8930\",\n \"message\": {\n \"text\": \"This path depends on a user-provided value.\"\n },\n \"location\": {\n \"path\": \"spec-main/api-session-spec.ts\",\n \"start_line\": 917,\n \"end_line\": 917,\n \"start_column\": 7,\n \"end_column\": 18\n },\n \"classifications\": [\n \"test\"\n ]\n },\n \"instances_url\": \"https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/4/instances\"\n },\n {\n \"number\": 3,\n \"created_at\": \"2020-02-13T12:29:18Z\",\n \"url\": \"https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/3\",\n \"html_url\": \"https://github.com/octocat/hello-world/code-scanning/3\",\n \"state\": \"dismissed\",\n \"dismissed_by\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"dismissed_at\": \"2020-02-14T12:29:18Z\",\n \"dismissed_reason\": \"false positive\",\n \"rule\": {\n \"id\": \"js/zipslip\",\n \"severity\": \"error\",\n \"description\": \"Arbitrary file write during zip extraction\",\n \"name\": \"js/zipslip\"\n },\n \"tool\": {\n \"name\": \"CodeQL\",\n \"guid\": null,\n \"version\": \"2.4.0\"\n },\n \"most_recent_instance\": {\n \"ref\": \"refs/heads/main\",\n \"analysis_key\": \".github/workflows/codeql-analysis.yml:CodeQL-Build\",\n \"environment\": \"{}\",\n \"state\": \"open\",\n \"commit_sha\": \"39406e42cb832f683daa691dd652a8dc36ee8930\",\n \"message\": {\n \"text\": \"This path depends on a user-provided value.\"\n },\n \"location\": {\n \"path\": \"lib/ab12-gen.js\",\n \"start_line\": 917,\n \"end_line\": 917,\n \"start_column\": 7,\n \"end_column\": 18\n },\n \"classifications\": []\n },\n \"instances_url\": \"https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/3/instances\"\n }\n]\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Response if GitHub Advanced Security is not enabled for this repository"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "alert_number",
"in": "path",
"description": "The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation.",
"required": true,
"schema": {
"type": "integer",
"description": "The security alert number.",
"readOnly": true,
"nullable": false
},
"descriptionHTML": "The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the number field in the response from the GET /repos/{owner}/{repo}/code-scanning/alerts operation.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n alert_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n alert_number: 42\n})\n"
}
],
"summary": "Get a code scanning alert",
"description": "Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint.\n\n**Deprecation notice**:\nThe instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`.",
"tags": [
"code-scanning"
],
"operationId": "code-scanning/get-alert",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "code-scanning",
"subcategory": null
},
"slug": "get-a-code-scanning-alert",
"category": "code-scanning",
"categoryLabel": "Code scanning",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a single code scanning alert. You must use an access token with the security_events scope to use this endpoint. GitHub Apps must have the security_events read permission to use this endpoint.
Deprecation notice:\nThe instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by instances_url.
{\n \"number\": 42,\n \"created_at\": \"2020-06-19T11:21:34Z\",\n \"url\": \"https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/42\",\n \"html_url\": \"https://github.com/octocat/hello-world/code-scanning/42\",\n \"state\": \"dismissed\",\n \"dismissed_by\": {\n \"login\": \"octocat\",\n \"id\": 54933897,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"dismissed_at\": \"2020-02-14T12:29:18Z\",\n \"dismissed_reason\": \"false positive\",\n \"rule\": {\n \"id\": \"js/zipslip\",\n \"severity\": \"error\",\n \"security_severity_level\": \"high\",\n \"description\": \"Arbitrary file write during zip extraction (\\\"Zip Slip\\\")\",\n \"name\": \"js/zipslip\",\n \"full_description\": \"Extracting files from a malicious zip archive without validating that the destination file path is within the destination directory can cause files outside the destination directory to be overwritten.\",\n \"tags\": [\n \"security\",\n \"external/cwe/cwe-022\"\n ],\n \"help\": \"# Arbitrary file write during zip extraction (\\\"Zip Slip\\\")\\\\nExtracting files from a malicious zip archive without validating that the destination file path is within the destination directory can cause files outside the destination directory to be overwritten ...\"\n },\n \"tool\": {\n \"name\": \"CodeQL\",\n \"guid\": null,\n \"version\": \"2.4.0\"\n },\n \"most_recent_instance\": {\n \"ref\": \"refs/heads/main\",\n \"analysis_key\": \".github/workflows/codeql-analysis.yml:CodeQL-Build\",\n \"environment\": \"{}\",\n \"state\": \"dismissed\",\n \"commit_sha\": \"39406e42cb832f683daa691dd652a8dc36ee8930\",\n \"message\": {\n \"text\": \"This path depends on a user-provided value.\"\n },\n \"location\": {\n \"path\": \"spec-main/api-session-spec.ts\",\n \"start_line\": 917,\n \"end_line\": 917,\n \"start_column\": 7,\n \"end_column\": 18\n },\n \"classifications\": [\n \"test\"\n ]\n },\n \"instances_url\": \"https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/42/instances\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Response if GitHub Advanced Security is not enabled for this repository"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "alert_number",
"in": "path",
"description": "The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation.",
"required": true,
"schema": {
"type": "integer",
"description": "The security alert number.",
"readOnly": true,
"nullable": false
},
"descriptionHTML": "The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the number field in the response from the GET /repos/{owner}/{repo}/code-scanning/alerts operation.
curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/42 \\\n -d '{\"state\":\"state\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n alert_number: 42,\n state: 'state'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n alert_number: 42,\n state: 'state'\n})\n"
}
],
"summary": "Update a code scanning alert",
"description": "Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` write permission to use this endpoint.",
"operationId": "code-scanning/update-alert",
"tags": [
"code-scanning"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"state": {
"description": "Required. Sets the state of the code scanning alert. Can be one of open or dismissed. You must provide dismissed_reason when you set the state to dismissed.
Required when the state is dismissed. The reason for dismissing or closing the alert. Can be one of: false positive, won't fix, and used in tests.
Updates the status of a single code scanning alert. You must use an access token with the security_events scope to use this endpoint. GitHub Apps must have the security_events write permission to use this endpoint.
Required. Sets the state of the code scanning alert. Can be one of open or dismissed. You must provide dismissed_reason when you set the state to dismissed.
Required when the state is dismissed. The reason for dismissing or closing the alert. Can be one of: false positive, won't fix, and used in tests.
{\n \"number\": 42,\n \"created_at\": \"2020-08-25T21:28:36Z\",\n \"url\": \"https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/42\",\n \"html_url\": \"https://github.com/octocat/hello-world/code-scanning/42\",\n \"state\": \"dismissed\",\n \"dismissed_by\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"dismissed_at\": \"2020-09-02T22:34:56Z\",\n \"dismissed_reason\": \"false positive\",\n \"rule\": {\n \"id\": \"js/zipslip\",\n \"severity\": \"error\",\n \"security_severity_level\": \"high\",\n \"description\": \"Arbitrary file write during zip extraction (\\\"Zip Slip\\\")\",\n \"name\": \"js/zipslip\",\n \"full_description\": \"Extracting files from a malicious zip archive without validating that the destination file path is within the destination directory can cause files outside the destination directory to be overwritten.\",\n \"tags\": [\n \"security\",\n \"external/cwe/cwe-022\"\n ],\n \"help\": \"# Arbitrary file write during zip extraction (\\\"Zip Slip\\\")\\\\nExtracting files from a malicious zip archive without validating that the destination file path is within the destination directory can cause files outside the destination directory to be overwritten ...\"\n },\n \"tool\": {\n \"name\": \"CodeQL\",\n \"guid\": null,\n \"version\": \"2.4.0\"\n },\n \"most_recent_instance\": {\n \"ref\": \"refs/heads/main\",\n \"analysis_key\": \".github/workflows/codeql-analysis.yml:CodeQL-Build\",\n \"environment\": \"{}\",\n \"state\": \"dismissed\",\n \"commit_sha\": \"39406e42cb832f683daa691dd652a8dc36ee8930\",\n \"message\": {\n \"text\": \"This path depends on a user-provided value.\"\n },\n \"location\": {\n \"path\": \"spec-main/api-session-spec.ts\",\n \"start_line\": 917,\n \"end_line\": 917,\n \"start_column\": 7,\n \"end_column\": 18\n },\n \"classifications\": [\n \"test\"\n ]\n },\n \"instances_url\": \"https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/42/instances\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Response if the repository is archived or if github advanced security is not enabled for this repository"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "alert_number",
"in": "path",
"description": "The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation.",
"required": true,
"schema": {
"type": "integer",
"description": "The security alert number.",
"readOnly": true,
"nullable": false
},
"descriptionHTML": "The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the number field in the response from the GET /repos/{owner}/{repo}/code-scanning/alerts operation.
Page number of the results to fetch.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "ref", "description": "The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/The Git reference for the results you want to list. The ref for a branch can be formatted either as refs/heads/<branch name> or simply <branch name>. To reference a pull request use refs/pull/<number>/merge.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/42/instances"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances', {\n owner: 'octocat',\n repo: 'hello-world',\n alert_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances', {\n owner: 'octocat',\n repo: 'hello-world',\n alert_number: 42\n})\n"
}
],
"summary": "List instances of a code scanning alert",
"description": "Lists all instances of the specified code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint.",
"tags": [
"code-scanning"
],
"operationId": "code-scanning/list-alert-instances",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "code-scanning",
"subcategory": null
},
"slug": "list-instances-of-a-code-scanning-alert",
"category": "code-scanning",
"categoryLabel": "Code scanning",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all instances of the specified code scanning alert. You must use an access token with the security_events scope to use this endpoint. GitHub Apps must have the security_events read permission to use this endpoint.
[\n {\n \"ref\": \"refs/heads/main\",\n \"analysis_key\": \".github/workflows/codeql-analysis.yml:CodeQL-Build\",\n \"environment\": \"\",\n \"state\": \"open\",\n \"commit_sha\": \"39406e42cb832f683daa691dd652a8dc36ee8930\",\n \"message\": {\n \"text\": \"This path depends on a user-provided value.\"\n },\n \"location\": {\n \"path\": \"lib/ab12-gen.js\",\n \"start_line\": 917,\n \"end_line\": 917,\n \"start_column\": 7,\n \"end_column\": 18\n },\n \"classifications\": [\n \"library\"\n ]\n },\n {\n \"ref\": \"refs/pull/3740/merge\",\n \"analysis_key\": \".github/workflows/codeql-analysis.yml:CodeQL-Build\",\n \"environment\": \"\",\n \"category\": \".github/workflows/codeql-analysis.yml:CodeQL-Build\",\n \"state\": \"fixed\",\n \"commit_sha\": \"b09da05606e27f463a2b49287684b4ae777092f2\",\n \"message\": {\n \"text\": \"This suffix check is missing a length comparison to correctly handle lastIndexOf returning -1.\"\n },\n \"location\": {\n \"path\": \"app/script.js\",\n \"start_line\": 2,\n \"end_line\": 2,\n \"start_column\": 10,\n \"end_column\": 50\n },\n \"classifications\": [\n \"source\"\n ]\n }\n]\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Response if GitHub Advanced Security is not enabled for this repository"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/code-scanning/analyses",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "tool_name",
"description": "The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"description": "The name of the tool used to generate the code scanning analysis."
},
"descriptionHTML": "The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either tool_name or tool_guid, but not both.
The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either tool_guid or tool_name, but not both.
Page number of the results to fetch.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "ref", "in": "query", "description": "The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/The Git reference for the analyses you want to list. The ref for a branch can be formatted either as refs/heads/<branch name> or simply <branch name>. To reference a pull request use refs/pull/<number>/merge.
Filter analyses belonging to the same SARIF upload.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/code-scanning/analyses", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/code-scanning/analyses"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/code-scanning/analyses', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/code-scanning/analyses', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List code scanning analyses for a repository",
"description": "Lists the details of all code scanning analyses for a repository,\nstarting with the most recent.\nThe response is paginated and you can use the `page` and `per_page` parameters\nto list the analyses you're interested in.\nBy default 30 analyses are listed per page.\n\nThe `rules_count` field in the response give the number of rules\nthat were run in the analysis.\nFor very old analyses this data is not available,\nand `0` is returned in this field.\n\nYou must use an access token with the `security_events` scope to use this endpoint.\nGitHub Apps must have the `security_events` read permission to use this endpoint.\n\n**Deprecation notice**:\nThe `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field.",
"operationId": "code-scanning/list-recent-analyses",
"tags": [
"code-scanning"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "code-scanning"
},
"slug": "list-code-scanning-analyses-for-a-repository",
"category": "code-scanning",
"categoryLabel": "Code scanning",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the details of all code scanning analyses for a repository,\nstarting with the most recent.\nThe response is paginated and you can use the page and per_page parameters\nto list the analyses you're interested in.\nBy default 30 analyses are listed per page.
The rules_count field in the response give the number of rules\nthat were run in the analysis.\nFor very old analyses this data is not available,\nand 0 is returned in this field.
You must use an access token with the security_events scope to use this endpoint.\nGitHub Apps must have the security_events read permission to use this endpoint.
Deprecation notice:\nThe tool_name field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the tool field.
[\n {\n \"ref\": \"refs/heads/main\",\n \"commit_sha\": \"d99612c3e1f2970085cfbaeadf8f010ef69bad83\",\n \"analysis_key\": \".github/workflows/codeql-analysis.yml:analyze\",\n \"environment\": \"{\\\"language\\\":\\\"python\\\"}\",\n \"error\": \"\",\n \"category\": \".github/workflows/codeql-analysis.yml:analyze/language:python\",\n \"created_at\": \"2020-08-27T15:05:21Z\",\n \"results_count\": 17,\n \"rules_count\": 49,\n \"id\": 201,\n \"url\": \"https://api.github.com/repos/octocat/hello-world/code-scanning/analyses/201\",\n \"sarif_id\": \"6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53\",\n \"tool\": {\n \"name\": \"CodeQL\",\n \"guid\": null,\n \"version\": \"2.4.0\"\n },\n \"deletable\": true,\n \"warning\": \"\"\n },\n {\n \"ref\": \"refs/heads/my-branch\",\n \"commit_sha\": \"c8cff6510d4d084fb1b4aa13b64b97ca12b07321\",\n \"analysis_key\": \".github/workflows/shiftleft.yml:build\",\n \"environment\": \"{}\",\n \"error\": \"\",\n \"category\": \".github/workflows/shiftleft.yml:build/\",\n \"created_at\": \"2020-08-31T22:46:44Z\",\n \"results_count\": 17,\n \"rules_count\": 32,\n \"id\": 200,\n \"url\": \"https://api.github.com/repos/octocat/hello-world/code-scanning/analyses/200\",\n \"sarif_id\": \"8981cd8e-b078-4ac3-a3be-1dad7dbd0b582\",\n \"tool\": {\n \"name\": \"Python Security Analysis\",\n \"guid\": null,\n \"version\": \"1.2.0\"\n },\n \"deletable\": true,\n \"warning\": \"\"\n }\n]\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Response if GitHub Advanced Security is not enabled for this repository"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "analysis_id",
"in": "path",
"description": "The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation.",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "The ID of the analysis, as returned from the GET /repos/{owner}/{repo}/code-scanning/analyses operation.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/code-scanning/analyses/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n analysis_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n analysis_id: 42\n})\n"
}
],
"summary": "Get a code scanning analysis for a repository",
"description": "Gets a specified code scanning analysis for a repository.\nYou must use an access token with the `security_events` scope to use this endpoint.\nGitHub Apps must have the `security_events` read permission to use this endpoint.\n\nThe default JSON response contains fields that describe the analysis.\nThis includes the Git reference and commit SHA to which the analysis relates,\nthe datetime of the analysis, the name of the code scanning tool,\nand the number of alerts.\n\nThe `rules_count` field in the default response give the number of rules\nthat were run in the analysis.\nFor very old analyses this data is not available,\nand `0` is returned in this field.\n\nIf you use the Accept header `application/sarif+json`,\nthe response contains the analysis data that was uploaded.\nThis is formatted as\n[SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html).",
"operationId": "code-scanning/get-analysis",
"tags": [
"code-scanning"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "code-scanning"
},
"slug": "get-a-code-scanning-analysis-for-a-repository",
"category": "code-scanning",
"categoryLabel": "Code scanning",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a specified code scanning analysis for a repository.\nYou must use an access token with the security_events scope to use this endpoint.\nGitHub Apps must have the security_events read permission to use this endpoint.
The default JSON response contains fields that describe the analysis.\nThis includes the Git reference and commit SHA to which the analysis relates,\nthe datetime of the analysis, the name of the code scanning tool,\nand the number of alerts.
\nThe rules_count field in the default response give the number of rules\nthat were run in the analysis.\nFor very old analyses this data is not available,\nand 0 is returned in this field.
If you use the Accept header application/sarif+json,\nthe response contains the analysis data that was uploaded.\nThis is formatted as\nSARIF version 2.1.0.
{\n \"ref\": \"refs/heads/main\",\n \"commit_sha\": \"c18c69115654ff0166991962832dc2bd7756e655\",\n \"analysis_key\": \".github/workflows/codeql-analysis.yml:analyze\",\n \"environment\": \"{\\\"language\\\":\\\"javascript\\\"}\",\n \"error\": \"\",\n \"category\": \".github/workflows/codeql-analysis.yml:analyze/language:javascript\",\n \"created_at\": \"2021-01-13T11:55:49Z\",\n \"results_count\": 3,\n \"rules_count\": 67,\n \"id\": 3602840,\n \"url\": \"https://api.github.com/repos/octocat/hello-world/code-scanning/analyses/201\",\n \"sarif_id\": \"47177e22-5596-11eb-80a1-c1e54ef945c6\",\n \"tool\": {\n \"name\": \"CodeQL\",\n \"guid\": null,\n \"version\": \"2.4.0\"\n },\n \"deletable\": true,\n \"warning\": \"\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Response if GitHub Advanced Security is not enabled for this repository"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "analysis_id",
"in": "path",
"description": "The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation.",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "The ID of the analysis, as returned from the GET /repos/{owner}/{repo}/code-scanning/analyses operation.
Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to true, you'll get a 400 response with the message: Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.
curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/code-scanning/analyses/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n analysis_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n analysis_id: 42\n})\n"
}
],
"summary": "Delete a code scanning analysis from a repository",
"description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` and `repo:security_events` scopes.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `analysis_key`\n* `environment`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set\n(see the example default response below).\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin the set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find the deletable analysis for one of the sets,\nstep through deleting the analyses in that set,\nand then repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.",
"operationId": "code-scanning/delete-analysis",
"tags": [
"code-scanning"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "code-scanning"
},
"slug": "delete-a-code-scanning-analysis-from-a-repository",
"category": "code-scanning",
"categoryLabel": "Code scanning",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the repo scope. For public repositories,\nyou must use an access token with public_repo and repo:security_events scopes.\nGitHub Apps must have the security_events write permission to use this endpoint.
You can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.
\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:
\n\"deletable\": true\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:
\nreftoolanalysis_keyenvironmentIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:
\nAnalysis specified is not deletable.\n\nThe response from a successful DELETE operation provides you with\ntwo alternative URLs for deleting the next analysis in the set\n(see the example default response below).\nUse the next_analysis_url URL if you want to avoid accidentally deleting the final analysis\nin the set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the confirm_delete_url URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set the value of next_analysis_url and confirm_delete_url\nin the 200 response is null.
As an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find the deletable analysis for one of the sets,\nstep through deleting the analyses in that set,\nand then repeat the process for the second set.\nThe procedure therefore consists of a nested loop:
\nOuter loop:
\nList the analyses for the repository, filtered by tool.
\nParse this list to find a deletable analysis. If found:
\nInner loop:
\nconfirm_delete_url and, if found, use this in the next iteration.The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the confirm_delete_url value. Alternatively, you could use the next_analysis_url value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.
{\n \"next_analysis_url\": \"https://api.github.com/repos/octocat/hello-world/code-scanning/analyses/41\",\n \"confirm_delete_url\": \"https://api.github.com/repos/octocat/hello-world/code-scanning/analyses/41?confirm_delete\"\n}\n"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Bad Request"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Response if the repository is archived or if github advanced security is not enabled for this repository"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/code-scanning/sarifs",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/code-scanning/sarifs \\\n -d '{\"commit_sha\":\"commit_sha\",\"ref\":\"ref\",\"sarif\":\"sarif\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/code-scanning/sarifs \\\n -d '{\"commit_sha\":\"commit_sha\",\"ref\":\"ref\",\"sarif\":\"sarif\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/code-scanning/sarifs', {\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha',\n ref: 'ref',\n sarif: 'sarif'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/code-scanning/sarifs', {\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha',\n ref: 'ref',\n sarif: 'sarif'\n})\n"
}
],
"summary": "Upload an analysis as SARIF data",
"description": "Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` write permission to use this endpoint.\n\nThere are two places where you can upload code scanning results.\n - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see \"[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests).\"\n - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see \"[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository).\"\n\nYou must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example:\n\n```\ngzip -c analysis-data.sarif | base64 -w0\n```\n\nSARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries.\n\nThe `202 Accepted`, response includes an `id` value.\nYou can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint.\nFor more information, see \"[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload).\"",
"operationId": "code-scanning/upload-sarif",
"tags": [
"code-scanning"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"commit_sha": {
"description": "Required. The SHA of the commit to which the analysis you are uploading relates.
", "type": "string", "minLength": 40, "maxLength": 40, "pattern": "^[0-9a-fA-F]+$", "name": "commit_sha", "in": "body", "rawType": "string", "rawDescription": "The SHA of the commit to which the analysis you are uploading relates.", "childParamsGroups": [] }, "ref": { "type": "string", "description": "Required. The full Git reference, formatted as refs/heads/<branch name>,\nrefs/pull/<number>/merge, or refs/pull/<number>/head.
Required. A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using gzip and then translate the contents of the file into a Base64 encoding string. For more information, see \"SARIF support for code scanning.\"
The base directory used in the analysis, as it appears in the SARIF file.\nThis property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository.
", "example": "file:///github/workspace/", "type": "string", "format": "uri", "name": "checkout_uri", "in": "body", "rawType": "string", "rawDescription": "The base directory used in the analysis, as it appears in the SARIF file.\nThis property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository.", "childParamsGroups": [] }, "started_at": { "description": "The time that the analysis run began. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to \"API\". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the tool_guid parameter of operations such as GET /repos/{owner}/{repo}/code-scanning/alerts.
Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the security_events scope to use this endpoint. GitHub Apps must have the security_events write permission to use this endpoint.
There are two places where you can upload code scanning results.
\n--ref refs/pull/42/merge or --ref refs/pull/42/head, then the results appear as alerts in a pull request check. For more information, see \"Triaging code scanning alerts in pull requests.\"--ref refs/heads/my-branch, then the results appear in the Security tab for your repository. For more information, see \"Managing code scanning alerts for your repository.\"You must compress the SARIF-formatted analysis data that you want to upload, using gzip, and then encode it as a Base64 format string. For example:
gzip -c analysis-data.sarif | base64 -w0\n\nSARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries.
\nThe 202 Accepted, response includes an id value.\nYou can use this ID to check the status of the upload by using this for the /sarifs/{sarif_id} endpoint.\nFor more information, see \"Get information about a SARIF upload.\"
Required. The SHA of the commit to which the analysis you are uploading relates.
", "type": "string", "minLength": 40, "maxLength": 40, "pattern": "^[0-9a-fA-F]+$", "name": "commit_sha", "in": "body", "rawType": "string", "rawDescription": "The SHA of the commit to which the analysis you are uploading relates.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The full Git reference, formatted as refs/heads/<branch name>,\nrefs/pull/<number>/merge, or refs/pull/<number>/head.
Required. A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using gzip and then translate the contents of the file into a Base64 encoding string. For more information, see \"SARIF support for code scanning.\"
The base directory used in the analysis, as it appears in the SARIF file.\nThis property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository.
", "example": "file:///github/workspace/", "type": "string", "format": "uri", "name": "checkout_uri", "in": "body", "rawType": "string", "rawDescription": "The base directory used in the analysis, as it appears in the SARIF file.\nThis property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository.", "childParamsGroups": [] }, { "description": "The time that the analysis run began. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to \"API\". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the tool_guid parameter of operations such as GET /repos/{owner}/{repo}/code-scanning/alerts.
{\n \"id\": \"47177e22-5596-11eb-80a1-c1e54ef945c6\",\n \"url\": \"https://api.github.com/repos/octocat/hello-world/code-scanning/sarifs/47177e22-5596-11eb-80a1-c1e54ef945c6\"\n}\n"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Bad Request if the sarif field is invalid"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Response if the repository is archived or if github advanced security is not enabled for this repository"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "413",
"httpStatusMessage": "Payload Too Large",
"description": "Payload Too Large if the sarif field is too large"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "sarif_id",
"description": "The SARIF ID obtained after uploading.",
"in": "path",
"schema": {
"type": "string"
},
"required": true,
"descriptionHTML": "The SARIF ID obtained after uploading.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/code-scanning/sarifs/SARIF_ID", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/code-scanning/sarifs/SARIF_ID"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n sarif_id: 'sarif_id'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n sarif_id: 'sarif_id'\n})\n"
}
],
"summary": "Get information about a SARIF upload",
"description": "Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see \"[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository).\" You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint.",
"operationId": "code-scanning/get-sarif",
"tags": [
"code-scanning"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "code-scanning"
},
"slug": "get-information-about-a-sarif-upload",
"category": "code-scanning",
"categoryLabel": "Code scanning",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see \"Get a code scanning analysis for a repository.\" You must use an access token with the security_events scope to use this endpoint. GitHub Apps must have the security_events read permission to use this endpoint.
{\n \"processing_status\": \"complete\",\n \"analyses_url\": \"https://api.github.com/repos/octocat/hello-world/code-scanning/analyses?sarif_id=47177e22-5596-11eb-80a1-c1e54ef945c6\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Response if GitHub Advanced Security is not enabled for this repository"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if the sarif id does not match any upload"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/collaborators",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "affiliation",
"description": "Filter collaborators returned by their affiliation. Can be one of: \n\\* `outside`: All outside collaborators of an organization-owned repository. \n\\* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status. \n\\* `all`: All collaborators the authenticated user can see.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"outside",
"direct",
"all"
],
"default": "all"
},
"descriptionHTML": "Filter collaborators returned by their affiliation. Can be one of:
\n* outside: All outside collaborators of an organization-owned repository.
\n* direct: All collaborators with permissions to an organization-owned repository, regardless of organization membership status.
\n* all: All collaborators the authenticated user can see.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/collaborators', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/collaborators', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List repository collaborators",
"description": "For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.\n\nTeam members will include the members of child teams.\n\nYou must have push access to the repository in order to list collaborators.",
"tags": [
"repos"
],
"operationId": "repos/list-collaborators",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-repository-collaborators"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "collaborators"
},
"slug": "list-repository-collaborators",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "collaborators",
"subcategoryLabel": "Collaborators",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.
\nTeam members will include the members of child teams.
\nYou must have push access to the repository in order to list collaborators.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false,\n \"permissions\": {\n \"pull\": true,\n \"push\": true,\n \"admin\": false\n }\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/collaborators/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/collaborators/{username}', {\n owner: 'octocat',\n repo: 'hello-world',\n username: 'username'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/collaborators/{username}', {\n owner: 'octocat',\n repo: 'hello-world',\n username: 'username'\n})\n"
}
],
"summary": "Check if a user is a repository collaborator",
"description": "For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.\n\nTeam members will include the members of child teams.",
"tags": [
"repos"
],
"operationId": "repos/check-collaborator",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#check-if-a-user-is-a-repository-collaborator"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "collaborators"
},
"slug": "check-if-a-user-is-a-repository-collaborator",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "collaborators",
"subcategoryLabel": "Collaborators",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response if user is a collaborator"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if user is not a collaborator"
}
],
"bodyParameters": [],
"descriptionHTML": "For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.
\nTeam members will include the members of child teams.
" }, { "verb": "put", "requestPath": "/repos/{owner}/{repo}/collaborators/{username}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME \\\n -d '{\"permission\":\"permission\"}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME \\\n -d '{\"permission\":\"permission\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/collaborators/{username}', {\n owner: 'octocat',\n repo: 'hello-world',\n username: 'username',\n permission: 'permission'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/collaborators/{username}', {\n owner: 'octocat',\n repo: 'hello-world',\n username: 'username',\n permission: 'permission'\n})\n"
}
],
"summary": "Add a repository collaborator",
"description": "This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\nFor more information on permission levels, see \"[Repository permission levels for an organization](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\".\n\nNote that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"\n\nThe invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/rest/reference/repos#invitations).\n\n**Rate limits**\n\nYou are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.",
"tags": [
"repos"
],
"operationId": "repos/add-collaborator",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#add-a-repository-collaborator"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"permission": {
"type": "string",
"description": "The permission to grant the collaborator. Only valid on organization-owned repositories. Can be one of:
\n* pull - can pull, but not push to or administer this repository.
\n* push - can pull and push, but not administer this repository.
\n* admin - can pull, push and administer this repository.
\n* maintain - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.
\n* triage - Recommended for contributors who need to proactively manage issues and pull requests without write access.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.
\nFor more information on permission levels, see \"Repository permission levels for an organization\".
\nNote that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.
\nRate limits
\nYou are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.
", "bodyParameters": [ { "type": "string", "description": "The permission to grant the collaborator. Only valid on organization-owned repositories. Can be one of:
\n* pull - can pull, but not push to or administer this repository.
\n* push - can pull and push, but not administer this repository.
\n* admin - can pull, push and administer this repository.
\n* maintain - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.
\n* triage - Recommended for contributors who need to proactively manage issues and pull requests without write access.
{\n \"id\": 1,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n },\n \"invitee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"inviter\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"permissions\": \"write\",\n \"created_at\": \"2016-06-13T14:52:50-05:00\",\n \"url\": \"https://api.github.com/user/repository_invitations/1296269\",\n \"html_url\": \"https://github.com/octocat/Hello-World/invitations\"\n}\n"
},
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response when person is already a collaborator"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/collaborators/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/collaborators/{username}', {\n owner: 'octocat',\n repo: 'hello-world',\n username: 'username'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/collaborators/{username}', {\n owner: 'octocat',\n repo: 'hello-world',\n username: 'username'\n})\n"
}
],
"summary": "Remove a repository collaborator",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/remove-collaborator",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#remove-a-repository-collaborator"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "collaborators"
},
"slug": "remove-a-repository-collaborator",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "collaborators",
"subcategoryLabel": "Collaborators",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/collaborators/{username}/permission",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME/permission",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME/permission"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/collaborators/{username}/permission', {\n owner: 'octocat',\n repo: 'hello-world',\n username: 'username'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/collaborators/{username}/permission', {\n owner: 'octocat',\n repo: 'hello-world',\n username: 'username'\n})\n"
}
],
"summary": "Get repository permissions for a user",
"description": "Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`.",
"tags": [
"repos"
],
"operationId": "repos/get-collaborator-permission-level",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-repository-permissions-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "collaborators"
},
"slug": "get-repository-permissions-for-a-user",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "collaborators",
"subcategoryLabel": "Collaborators",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Checks the repository permission of a collaborator. The possible repository permissions are admin, write, read, and none.
{\n \"permission\": \"admin\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/comments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/comments', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/comments', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List commit comments for a repository",
"description": "Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/).\n\nComments are ordered by ascending ID.",
"tags": [
"repos"
],
"operationId": "repos/list-commit-comments-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-commit-comments-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "comments"
},
"slug": "list-commit-comments-for-a-repository",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "comments",
"subcategoryLabel": "Comments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Commit Comments use these custom media types. You can read more about the use of media types in the API here.
\nComments are ordered by ascending ID.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/comments/1\",\n \"id\": 1,\n \"node_id\": \"MDEzOkNvbW1pdENvbW1lbnQx\",\n \"body\": \"Great stuff\",\n \"path\": \"file1.txt\",\n \"position\": 4,\n \"line\": 14,\n \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\",\n \"author_association\": \"COLLABORATOR\"\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/comments/{comment_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})\n"
}
],
"summary": "Get a commit comment",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/get-commit-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-commit-comment"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "comments"
},
"slug": "get-a-commit-comment",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "comments",
"subcategoryLabel": "Comments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/comments/1\",\n \"id\": 1,\n \"node_id\": \"MDEzOkNvbW1pdENvbW1lbnQx\",\n \"body\": \"Great stuff\",\n \"path\": \"file1.txt\",\n \"position\": 4,\n \"line\": 14,\n \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"author_association\": \"COLLABORATOR\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/comments/{comment_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42 \\\n -d '{\"body\":\"body\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42 \\\n -d '{\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n body: 'body'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n body: 'body'\n})\n"
}
],
"summary": "Update a commit comment",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/update-commit-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#update-a-commit-comment"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "Required. The contents of the comment
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The contents of the comment", "childParamsGroups": [] } }, "required": [ "body" ] }, "example": { "body": "Nice change" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "repos", "subcategory": "comments" }, "slug": "update-a-commit-comment", "category": "repos", "categoryLabel": "Repos", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", "notes": [], "descriptionHTML": "", "bodyParameters": [ { "type": "string", "description": "Required. The contents of the comment
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The contents of the comment", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/comments/1\",\n \"id\": 1,\n \"node_id\": \"MDEzOkNvbW1pdENvbW1lbnQx\",\n \"body\": \"Nice change\",\n \"path\": \"file1.txt\",\n \"position\": 4,\n \"line\": 14,\n \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"author_association\": \"COLLABORATOR\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/comments/{comment_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})\n"
}
],
"summary": "Delete a commit comment",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/delete-commit-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-a-commit-comment"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "comments"
},
"slug": "delete-a-commit-comment",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "comments",
"subcategoryLabel": "Comments",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/comments/{comment_id}/reactions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" }, { "name": "content", "description": "Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ] }, "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to a commit comment.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42/reactions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42/reactions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/comments/{comment_id}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/comments/{comment_id}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})\n"
}
],
"summary": "List reactions for a commit comment",
"description": "List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments).",
"tags": [
"reactions"
],
"operationId": "reactions/list-for-commit-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
},
"slug": "list-reactions-for-a-commit-comment",
"category": "reactions",
"categoryLabel": "Reactions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List the reactions to a commit comment.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/comments/{comment_id}/reactions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42/reactions \\\n -d '{\"content\":\"content\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42/reactions \\\n -d '{\"content\":\"content\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/comments/{comment_id}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n content: 'content'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/comments/{comment_id}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n content: 'content'\n})\n"
}
],
"summary": "Create reaction for a commit comment",
"description": "Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment.",
"tags": [
"reactions"
],
"operationId": "reactions/create-for-commit-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "Required. The reaction type to add to the commit comment.
", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment.", "childParamsGroups": [] } }, "required": [ "content" ] }, "example": { "content": "heart" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "reactions", "subcategory": null }, "slug": "create-reaction-for-a-commit-comment", "category": "reactions", "categoryLabel": "Reactions", "contentType": "application/json", "notes": [], "descriptionHTML": "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.
Required. The reaction type to add to the commit comment.
", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Reaction exists", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n"
},
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Reaction created",
"payload": "{\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n"
},
{
"httpStatusCode": "415",
"httpStatusMessage": "Unsupported Media Type",
"description": "Preview header missing"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" }, { "name": "reaction_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42/reactions/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42/reactions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n reaction_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n reaction_id: 42\n})\n"
}
],
"summary": "Delete a commit comment reaction",
"description": "**Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`.\n\nDelete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments).",
"tags": [
"reactions"
],
"operationId": "reactions/delete-for-commit-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
},
"slug": "delete-a-commit-comment-reaction",
"category": "reactions",
"categoryLabel": "Reactions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "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.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/commits", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "sha", "description": "SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`).", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "SHA or branch to start listing commits from. Default: the repository’s default branch (usually master).
Only commits containing this file path will be returned.
" }, { "name": "author", "description": "GitHub login or email address by which to filter by commit author.", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "GitHub login or email address by which to filter by commit author.
" }, { "name": "since", "description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", "in": "query", "required": false, "schema": { "type": "string", "format": "date-time" }, "descriptionHTML": "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Only commits before this date will be returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/commits', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/commits', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List commits",
"description": "**Signature verification object**\n\nThe response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:\n\n| Name | Type | Description |\n| ---- | ---- | ----------- |\n| `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |\n| `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |\n| `signature` | `string` | The signature that was extracted from the commit. |\n| `payload` | `string` | The value that was signed. |\n\nThese are the possible values for `reason` in the `verification` object:\n\n| Value | Description |\n| ----- | ----------- |\n| `expired_key` | The key that made the signature is expired. |\n| `not_signing_key` | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |\n| `gpgverify_error` | There was an error communicating with the signature verification service. |\n| `gpgverify_unavailable` | The signature verification service is currently unavailable. |\n| `unsigned` | The object does not include a signature. |\n| `unknown_signature_type` | A non-PGP signature was found in the commit. |\n| `no_user` | No user was associated with the `committer` email address in the commit. |\n| `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |\n| `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |\n| `unknown_key` | The key that made the signature has not been registered with any user's account. |\n| `malformed_signature` | There was an error parsing the signature. |\n| `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |\n| `valid` | None of the above errors applied, so the signature is considered to be verified. |",
"tags": [
"repos"
],
"operationId": "repos/list-commits",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-commits"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "commits"
},
"slug": "list-commits",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "commits",
"subcategoryLabel": "Commits",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Signature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description |
|---|---|---|
verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. |
reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. |
signature | string | The signature that was extracted from the commit. |
payload | string | The value that was signed. |
These are the possible values for reason in the verification object:
| Value | Description |
|---|---|
expired_key | The key that made the signature is expired. |
not_signing_key | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |
gpgverify_error | There was an error communicating with the signature verification service. |
gpgverify_unavailable | The signature verification service is currently unavailable. |
unsigned | The object does not include a signature. |
unknown_signature_type | A non-PGP signature was found in the commit. |
no_user | No user was associated with the committer email address in the commit. |
unverified_email | The committer email address in the commit was associated with a user, but the email address is not verified on her/his account. |
bad_email | The committer email address in the commit is not included in the identities of the PGP key that made the signature. |
unknown_key | The key that made the signature has not been registered with any user's account. |
malformed_signature | There was an error parsing the signature. |
invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
valid | None of the above errors applied, so the signature is considered to be verified. |
[\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n \"commit\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"author\": {\n \"name\": \"Monalisa Octocat\",\n \"email\": \"support@github.com\",\n \"date\": \"2011-04-14T16:00:49Z\"\n },\n \"committer\": {\n \"name\": \"Monalisa Octocat\",\n \"email\": \"support@github.com\",\n \"date\": \"2011-04-14T16:00:49Z\"\n },\n \"message\": \"Fix all the bugs\",\n \"tree\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n },\n \"comment_count\": 0,\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n }\n },\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"committer\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"parents\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n }\n ]\n }\n]\n"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Bad Request"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "409",
"httpStatusMessage": "Conflict",
"description": "Conflict"
},
{
"httpStatusCode": "500",
"httpStatusMessage": "Internal Server Error",
"description": "Internal Error"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "commit_sha",
"description": "commit_sha parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "commit_sha parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/branches-where-head", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/branches-where-head"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head', {\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head', {\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha'\n})\n"
}
],
"summary": "List branches for HEAD commit",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nReturns all branches where the given commit SHA is the HEAD, or latest commit for the branch.",
"tags": [
"repos"
],
"operationId": "repos/list-branches-for-head-commit",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-branches-for-head-commit"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "commits"
},
"slug": "list-branches-for-head-commit",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "commits",
"subcategoryLabel": "Commits",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nReturns all branches where the given commit SHA is the HEAD, or latest commit for the branch.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"name\": \"branch_5\",\n \"commit\": {\n \"sha\": \"c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\"\n },\n \"protected\": false\n }\n]\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/commits/{commit_sha}/comments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "commit_sha",
"description": "commit_sha parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "commit_sha parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/comments", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/comments"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/commits/{commit_sha}/comments', {\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/commits/{commit_sha}/comments', {\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha'\n})\n"
}
],
"summary": "List commit comments",
"description": "Use the `:commit_sha` to specify the commit that will have its comments listed.",
"tags": [
"repos"
],
"operationId": "repos/list-comments-for-commit",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-commit-comments"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "comments"
},
"slug": "list-commit-comments",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "comments",
"subcategoryLabel": "Comments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Use the :commit_sha to specify the commit that will have its comments listed.
[\n {\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/comments/1\",\n \"id\": 1,\n \"node_id\": \"MDEzOkNvbW1pdENvbW1lbnQx\",\n \"body\": \"Great stuff\",\n \"path\": \"file1.txt\",\n \"position\": 4,\n \"line\": 14,\n \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\",\n \"author_association\": \"COLLABORATOR\"\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/commits/{commit_sha}/comments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "commit_sha",
"description": "commit_sha parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "commit_sha parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/comments \\\n -d '{\"body\":\"body\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/comments \\\n -d '{\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/commits/{commit_sha}/comments', {\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha',\n body: 'body'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/commits/{commit_sha}/comments', {\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha',\n body: 'body'\n})\n"
}
],
"summary": "Create a commit comment",
"description": "Create a comment for a commit using its `:commit_sha`.\n\nThis endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.",
"tags": [
"repos"
],
"operationId": "repos/create-commit-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-a-commit-comment"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "Required. The contents of the comment.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The contents of the comment.", "childParamsGroups": [] }, "path": { "type": "string", "description": "Relative path of the file to comment on.
", "name": "path", "in": "body", "rawType": "string", "rawDescription": "Relative path of the file to comment on.", "childParamsGroups": [] }, "position": { "type": "integer", "description": "Line index in the diff to comment on.
", "name": "position", "in": "body", "rawType": "integer", "rawDescription": "Line index in the diff to comment on.", "childParamsGroups": [] }, "line": { "type": "integer", "description": "Deprecated. Use position parameter instead. Line number in the file to comment on.
", "name": "line", "in": "body", "rawType": "integer", "rawDescription": "**Deprecated**. Use **position** parameter instead. Line number in the file to comment on.", "childParamsGroups": [] } }, "required": [ "body" ] }, "example": { "body": "Great stuff", "path": "file1.txt", "position": 4, "line": 1 } } } }, "x-github": { "triggersNotification": true, "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "repos", "subcategory": "comments" }, "slug": "create-a-commit-comment", "category": "repos", "categoryLabel": "Repos", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", "notes": [], "descriptionHTML": "Create a comment for a commit using its :commit_sha.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.
", "bodyParameters": [ { "type": "string", "description": "Required. The contents of the comment.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The contents of the comment.", "childParamsGroups": [] }, { "type": "string", "description": "Relative path of the file to comment on.
", "name": "path", "in": "body", "rawType": "string", "rawDescription": "Relative path of the file to comment on.", "childParamsGroups": [] }, { "type": "integer", "description": "Line index in the diff to comment on.
", "name": "position", "in": "body", "rawType": "integer", "rawDescription": "Line index in the diff to comment on.", "childParamsGroups": [] }, { "type": "integer", "description": "Deprecated. Use position parameter instead. Line number in the file to comment on.
", "name": "line", "in": "body", "rawType": "integer", "rawDescription": "**Deprecated**. Use **position** parameter instead. Line number in the file to comment on.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/comments/1\",\n \"id\": 1,\n \"node_id\": \"MDEzOkNvbW1pdENvbW1lbnQx\",\n \"body\": \"Great stuff\",\n \"path\": \"file1.txt\",\n \"position\": 4,\n \"line\": 14,\n \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"author_association\": \"COLLABORATOR\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/commits/{commit_sha}/pulls",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "commit_sha",
"description": "commit_sha parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "commit_sha parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/pulls", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/pulls"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls', {\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls', {\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha'\n})\n"
}
],
"summary": "List pull requests associated with a commit",
"description": "Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint.",
"tags": [
"repos"
],
"operationId": "repos/list-pull-requests-associated-with-commit",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-pull-requests-associated-with-a-commit"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "commits"
},
"slug": "list-pull-requests-associated-with-a-commit",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "commits",
"subcategoryLabel": "Commits",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the List pull requests endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"id\": 1,\n \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"number\": 1347,\n \"state\": \"open\",\n \"locked\": true,\n \"title\": \"Amazing new feature\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Please pull these awesome changes in!\",\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"active_lock_reason\": \"too heated\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:01:12Z\",\n \"closed_at\": \"2011-01-26T19:01:12Z\",\n \"merged_at\": \"2011-01-26T19:01:12Z\",\n \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n {\n \"login\": \"hubot\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/hubot\",\n \"html_url\": \"https://github.com/hubot\",\n \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n }\n ],\n \"requested_reviewers\": [\n {\n \"login\": \"other_user\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/other_user\",\n \"html_url\": \"https://github.com/other_user\",\n \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"requested_teams\": [\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n ],\n \"head\": {\n \"label\": \"octocat:new-topic\",\n \"ref\": \"new-topic\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"repo\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n },\n \"base\": {\n \"label\": \"octocat:master\",\n \"ref\": \"master\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"repo\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n },\n \"_links\": {\n \"self\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n },\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n },\n \"issue\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n },\n \"comments\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n },\n \"review_comments\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n },\n \"review_comment\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n },\n \"commits\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n },\n \"statuses\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n }\n },\n \"author_association\": \"OWNER\",\n \"auto_merge\": null,\n \"draft\": false\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/commits/{ref}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "page",
"description": "Page number of the results to fetch.",
"in": "query",
"schema": {
"type": "integer",
"default": 1
},
"descriptionHTML": "Page number of the results to fetch.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "ref", "description": "ref parameter", "in": "path", "required": true, "schema": { "type": "string" }, "x-multi-segment": true, "descriptionHTML": "ref parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/commits/{ref}', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/commits/{ref}', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})\n"
}
],
"summary": "Get a commit",
"description": "Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.\n\n**Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.\n\nYou can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property.\n\nTo return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.\n\n**Signature verification object**\n\nThe response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:\n\n| Name | Type | Description |\n| ---- | ---- | ----------- |\n| `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |\n| `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |\n| `signature` | `string` | The signature that was extracted from the commit. |\n| `payload` | `string` | The value that was signed. |\n\nThese are the possible values for `reason` in the `verification` object:\n\n| Value | Description |\n| ----- | ----------- |\n| `expired_key` | The key that made the signature is expired. |\n| `not_signing_key` | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |\n| `gpgverify_error` | There was an error communicating with the signature verification service. |\n| `gpgverify_unavailable` | The signature verification service is currently unavailable. |\n| `unsigned` | The object does not include a signature. |\n| `unknown_signature_type` | A non-PGP signature was found in the commit. |\n| `no_user` | No user was associated with the `committer` email address in the commit. |\n| `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |\n| `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |\n| `unknown_key` | The key that made the signature has not been registered with any user's account. |\n| `malformed_signature` | There was an error parsing the signature. |\n| `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |\n| `valid` | None of the above errors applied, so the signature is considered to be verified. |",
"tags": [
"repos"
],
"operationId": "repos/get-commit",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-commit"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "commits"
},
"slug": "get-a-commit",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "commits",
"subcategoryLabel": "Commits",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns the contents of a single commit reference. You must have read access for the repository to use this endpoint.
Note: If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.
\nYou can pass the appropriate media type to fetch diff and patch formats. Diffs with binary data will have no patch property.
To return only the SHA-1 hash of the commit reference, you can provide the sha custom media type in the Accept header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.
Signature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description |
|---|---|---|
verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. |
reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. |
signature | string | The signature that was extracted from the commit. |
payload | string | The value that was signed. |
These are the possible values for reason in the verification object:
| Value | Description |
|---|---|
expired_key | The key that made the signature is expired. |
not_signing_key | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |
gpgverify_error | There was an error communicating with the signature verification service. |
gpgverify_unavailable | The signature verification service is currently unavailable. |
unsigned | The object does not include a signature. |
unknown_signature_type | A non-PGP signature was found in the commit. |
no_user | No user was associated with the committer email address in the commit. |
unverified_email | The committer email address in the commit was associated with a user, but the email address is not verified on her/his account. |
bad_email | The committer email address in the commit is not included in the identities of the PGP key that made the signature. |
unknown_key | The key that made the signature has not been registered with any user's account. |
malformed_signature | There was an error parsing the signature. |
invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
valid | None of the above errors applied, so the signature is considered to be verified. |
{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n \"commit\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"author\": {\n \"name\": \"Monalisa Octocat\",\n \"email\": \"mona@github.com\",\n \"date\": \"2011-04-14T16:00:49Z\"\n },\n \"committer\": {\n \"name\": \"Monalisa Octocat\",\n \"email\": \"mona@github.com\",\n \"date\": \"2011-04-14T16:00:49Z\"\n },\n \"message\": \"Fix all the bugs\",\n \"tree\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n },\n \"comment_count\": 0,\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n }\n },\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"committer\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"parents\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n }\n ],\n \"stats\": {\n \"additions\": 104,\n \"deletions\": 4,\n \"total\": 108\n },\n \"files\": [\n {\n \"filename\": \"file1.txt\",\n \"additions\": 10,\n \"deletions\": 2,\n \"changes\": 12,\n \"status\": \"modified\",\n \"raw_url\": \"https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt\",\n \"blob_url\": \"https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt\",\n \"patch\": \"@@ -29,7 +29,7 @@\\n.....\"\n }\n ]\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
},
{
"httpStatusCode": "500",
"httpStatusMessage": "Internal Server Error",
"description": "Internal Error"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/commits/{ref}/check-runs",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "ref",
"description": "ref parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "ref parameter
" }, { "name": "check_name", "description": "Returns check runs with the specified `name`.", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "Returns check runs with the specified name.
Returns check runs with the specified status. Can be one of queued, in_progress, or completed.
Filters check runs by their completed_at timestamp. Can be one of latest (returning the most recent check runs) or all.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" }, { "name": "app_id", "in": "query", "required": false, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/check-runs", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/check-runs"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/commits/{ref}/check-runs', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/commits/{ref}/check-runs', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})\n"
}
],
"summary": "List check runs for a Git reference",
"description": "**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.\n\nLists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository.",
"tags": [
"checks"
],
"operationId": "checks/list-for-ref",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "checks",
"subcategory": "runs"
},
"slug": "list-check-runs-for-a-git-reference",
"category": "checks",
"categoryLabel": "Checks",
"subcategory": "runs",
"subcategoryLabel": "Runs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.
Lists check runs for a commit ref. The ref can be a SHA, branch name, or a tag name. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the repo scope to get check runs in a private repository.
{\n \"total_count\": 1,\n \"check_runs\": [\n {\n \"id\": 4,\n \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n \"node_id\": \"MDg6Q2hlY2tSdW40\",\n \"external_id\": \"\",\n \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n \"details_url\": \"https://example.com\",\n \"status\": \"completed\",\n \"conclusion\": \"neutral\",\n \"started_at\": \"2018-05-04T01:14:52Z\",\n \"completed_at\": \"2018-05-04T01:14:52Z\",\n \"output\": {\n \"title\": \"Mighty Readme report\",\n \"summary\": \"There are 0 failures, 2 warnings, and 1 notice.\",\n \"text\": \"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.\",\n \"annotations_count\": 2,\n \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n },\n \"name\": \"mighty_readme\",\n \"check_suite\": {\n \"id\": 5\n },\n \"app\": {\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n },\n \"pull_requests\": [\n {\n \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n \"id\": 1934,\n \"number\": 3956,\n \"head\": {\n \"ref\": \"say-hello\",\n \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n \"repo\": {\n \"id\": 526,\n \"url\": \"https://api.github.com/repos/github/hello-world\",\n \"name\": \"hello-world\"\n }\n },\n \"base\": {\n \"ref\": \"master\",\n \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n \"repo\": {\n \"id\": 526,\n \"url\": \"https://api.github.com/repos/github/hello-world\",\n \"name\": \"hello-world\"\n }\n }\n }\n ]\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/commits/{ref}/check-suites",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "ref",
"description": "ref parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "ref parameter
" }, { "name": "app_id", "description": "Filters check suites by GitHub App `id`.", "in": "query", "required": false, "schema": { "type": "integer" }, "example": 1, "descriptionHTML": "Filters check suites by GitHub App id.
Returns check runs with the specified name.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/check-suites", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/check-suites"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/commits/{ref}/check-suites', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/commits/{ref}/check-suites', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})\n"
}
],
"summary": "List check suites for a Git reference",
"description": "**Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.\n\nLists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository.",
"tags": [
"checks"
],
"operationId": "checks/list-suites-for-ref",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "checks",
"subcategory": "suites"
},
"slug": "list-check-suites-for-a-git-reference",
"category": "checks",
"categoryLabel": "Checks",
"subcategory": "suites",
"subcategoryLabel": "Suites",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array and a null value for head_branch.
Lists check suites for a commit ref. The ref can be a SHA, branch name, or a tag name. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the repo scope to get check suites in a private repository.
{\n \"total_count\": 1,\n \"check_suites\": [\n {\n \"id\": 5,\n \"node_id\": \"MDEwOkNoZWNrU3VpdGU1\",\n \"head_branch\": \"master\",\n \"head_sha\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n \"status\": \"completed\",\n \"conclusion\": \"neutral\",\n \"url\": \"https://api.github.com/repos/github/hello-world/check-suites/5\",\n \"before\": \"146e867f55c26428e5f9fade55a9bbf5e95a7912\",\n \"after\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n \"pull_requests\": [],\n \"app\": {\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n },\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"delete_branch_on_merge\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n },\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"head_commit\": {\n \"id\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n \"tree_id\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n \"message\": \"Merge pull request #6 from Spaceghost/patch-1\\n\\nNew line at end of file.\",\n \"timestamp\": \"2016-10-10T00:00:00Z\",\n \"author\": {\n \"name\": \"The Octocat\",\n \"email\": \"octocat@nowhere.com\"\n },\n \"committer\": {\n \"name\": \"The Octocat\",\n \"email\": \"octocat@nowhere.com\"\n }\n },\n \"latest_check_runs_count\": 1,\n \"check_runs_url\": \"https://api.github.com/repos/octocat/Hello-World/check-suites/5/check-runs\"\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/commits/{ref}/status",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "ref",
"description": "ref parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "ref parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/status", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/status"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/commits/{ref}/status', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/commits/{ref}/status', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})\n"
}
],
"summary": "Get the combined status for a specific reference",
"description": "Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name.\n\n\nAdditionally, a combined `state` is returned. The `state` is one of:\n\n* **failure** if any of the contexts report as `error` or `failure`\n* **pending** if there are no statuses or a context is `pending`\n* **success** if the latest status for all contexts is `success`",
"tags": [
"repos"
],
"operationId": "repos/get-combined-status-for-ref",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-the-combined-status-for-a-specific-reference"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "statuses"
},
"slug": "get-the-combined-status-for-a-specific-reference",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "statuses",
"subcategoryLabel": "Statuses",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name.
\nAdditionally, a combined state is returned. The state is one of:
error or failurependingsuccess{\n \"state\": \"success\",\n \"statuses\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n \"id\": 1,\n \"node_id\": \"MDY6U3RhdHVzMQ==\",\n \"state\": \"success\",\n \"description\": \"Build has completed successfully\",\n \"target_url\": \"https://ci.example.com/1000/output\",\n \"context\": \"continuous-integration/jenkins\",\n \"created_at\": \"2012-07-20T01:19:13Z\",\n \"updated_at\": \"2012-07-20T01:19:13Z\"\n },\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n \"id\": 2,\n \"node_id\": \"MDY6U3RhdHVzMg==\",\n \"state\": \"success\",\n \"description\": \"Testing has completed successfully\",\n \"target_url\": \"https://ci.example.com/2000/output\",\n \"context\": \"security/brakeman\",\n \"created_at\": \"2012-08-20T01:19:13Z\",\n \"updated_at\": \"2012-08-20T01:19:13Z\"\n }\n ],\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"total_count\": 2,\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n },\n \"commit_url\": \"https://api.github.com/repos/octocat/Hello-World/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/6dcb09b5b57875f334f61aebed695e2e4193db5e/status\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/commits/{ref}/statuses",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "ref",
"description": "ref parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "ref parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/statuses", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/statuses"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/commits/{ref}/statuses', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/commits/{ref}/statuses', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})\n"
}
],
"summary": "List commit statuses for a reference",
"description": "Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one.\n\nThis resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`.",
"tags": [
"repos"
],
"operationId": "repos/list-commit-statuses-for-ref",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-commit-statuses-for-a-reference"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "statuses"
},
"slug": "list-commit-statuses-for-a-reference",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "statuses",
"subcategoryLabel": "Statuses",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one.
\nThis resource is also available via a legacy route: GET /repos/:owner/:repo/statuses/:ref.
[\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n \"id\": 1,\n \"node_id\": \"MDY6U3RhdHVzMQ==\",\n \"state\": \"success\",\n \"description\": \"Build has completed successfully\",\n \"target_url\": \"https://ci.example.com/1000/output\",\n \"context\": \"continuous-integration/jenkins\",\n \"created_at\": \"2012-07-20T01:19:13Z\",\n \"updated_at\": \"2012-07-20T01:19:13Z\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n }\n]\n"
},
{
"httpStatusCode": "301",
"httpStatusMessage": "Moved Permanently",
"description": "Moved permanently"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/community/profile",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/community/profile",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/community/profile"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/community/profile', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/community/profile', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get community profile metrics",
"description": "This endpoint will return all community profile metrics, including an\noverall health score, repository description, the presence of documentation, detected\ncode of conduct, detected license, and the presence of ISSUE\\_TEMPLATE, PULL\\_REQUEST\\_TEMPLATE,\nREADME, and CONTRIBUTING files.\n\nThe `health_percentage` score is defined as a percentage of how many of\nthese four documents are present: README, CONTRIBUTING, LICENSE, and\nCODE_OF_CONDUCT. For example, if all four documents are present, then\nthe `health_percentage` is `100`. If only one is present, then the\n`health_percentage` is `25`.\n\n`content_reports_enabled` is only returned for organization-owned repositories.",
"tags": [
"repos"
],
"operationId": "repos/get-community-profile-metrics",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-community-profile-metrics"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "community"
},
"slug": "get-community-profile-metrics",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "community",
"subcategoryLabel": "Community",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "This endpoint will return all community profile metrics, including an\noverall health score, repository description, the presence of documentation, detected\ncode of conduct, detected license, and the presence of ISSUE_TEMPLATE, PULL_REQUEST_TEMPLATE,\nREADME, and CONTRIBUTING files.
\nThe health_percentage score is defined as a percentage of how many of\nthese four documents are present: README, CONTRIBUTING, LICENSE, and\nCODE_OF_CONDUCT. For example, if all four documents are present, then\nthe health_percentage is 100. If only one is present, then the\nhealth_percentage is 25.
content_reports_enabled is only returned for organization-owned repositories.
{\n \"health_percentage\": 100,\n \"description\": \"My first repository on GitHub!\",\n \"documentation\": null,\n \"files\": {\n \"code_of_conduct\": {\n \"name\": \"Contributor Covenant\",\n \"key\": \"contributor_covenant\",\n \"url\": \"https://api.github.com/codes_of_conduct/contributor_covenant\",\n \"html_url\": \"https://github.com/octocat/Hello-World/blob/master/CODE_OF_CONDUCT.md\"\n },\n \"code_of_conduct_file\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/contents/CODE_OF_CONDUCT.md\",\n \"html_url\": \"https://github.com/octocat/Hello-World/blob/master/CODE_OF_CONDUCT.md\"\n },\n \"contributing\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/contents/CONTRIBUTING\",\n \"html_url\": \"https://github.com/octocat/Hello-World/blob/master/CONTRIBUTING\"\n },\n \"issue_template\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/contents/ISSUE_TEMPLATE\",\n \"html_url\": \"https://github.com/octocat/Hello-World/blob/master/ISSUE_TEMPLATE\"\n },\n \"pull_request_template\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/contents/PULL_REQUEST_TEMPLATE\",\n \"html_url\": \"https://github.com/octocat/Hello-World/blob/master/PULL_REQUEST_TEMPLATE\"\n },\n \"license\": {\n \"name\": \"MIT License\",\n \"key\": \"mit\",\n \"spdx_id\": \"MIT\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"html_url\": \"https://github.com/octocat/Hello-World/blob/master/LICENSE\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n },\n \"readme\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/contents/README.md\",\n \"html_url\": \"https://github.com/octocat/Hello-World/blob/master/README.md\"\n }\n },\n \"updated_at\": \"2017-02-28T19:09:29Z\",\n \"content_reports_enabled\": true\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/compare/{basehead}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "page",
"description": "Page number of the results to fetch.",
"in": "query",
"schema": {
"type": "integer",
"default": 1
},
"descriptionHTML": "Page number of the results to fetch.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "basehead", "description": "The base branch and head branch to compare. This parameter expects the format `{base}...{head}`.", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "The base branch and head branch to compare. This parameter expects the format {base}...{head}.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/compare/BASEHEAD"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/compare/{basehead}', {\n owner: 'octocat',\n repo: 'hello-world',\n basehead: 'basehead'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/compare/{basehead}', {\n owner: 'octocat',\n repo: 'hello-world',\n basehead: 'basehead'\n})\n"
}
],
"summary": "Compare two commits",
"description": "The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `The basehead param is comprised of two parts: base and head. Both must be branch names in repo. To compare branches across other repositories in the same network as repo, use the format <USERNAME>:branch.
The response from the API is equivalent to running the git log base..head command; however, commits are returned in chronological order. Pass the appropriate media type to fetch diff and patch formats.
The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a renamed status have a previous_filename field showing the previous filename of the file, and files with a modified status have a patch field showing the changes made to the file.
Working with large comparisons
\nTo process a response with a large number of commits, you can use (per_page or page) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see \"Traversing with pagination.\"
When calling this API without any paging parameters (per_page or page), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest.
Signature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description |
|---|---|---|
verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. |
reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. |
signature | string | The signature that was extracted from the commit. |
payload | string | The value that was signed. |
These are the possible values for reason in the verification object:
| Value | Description |
|---|---|
expired_key | The key that made the signature is expired. |
not_signing_key | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |
gpgverify_error | There was an error communicating with the signature verification service. |
gpgverify_unavailable | The signature verification service is currently unavailable. |
unsigned | The object does not include a signature. |
unknown_signature_type | A non-PGP signature was found in the commit. |
no_user | No user was associated with the committer email address in the commit. |
unverified_email | The committer email address in the commit was associated with a user, but the email address is not verified on her/his account. |
bad_email | The committer email address in the commit is not included in the identities of the PGP key that made the signature. |
unknown_key | The key that made the signature has not been registered with any user's account. |
malformed_signature | There was an error parsing the signature. |
invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
valid | None of the above errors applied, so the signature is considered to be verified. |
{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/compare/master...topic\",\n \"html_url\": \"https://github.com/octocat/Hello-World/compare/master...topic\",\n \"permalink_url\": \"https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/compare/master...topic.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/compare/master...topic.patch\",\n \"base_commit\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n \"commit\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"author\": {\n \"name\": \"Monalisa Octocat\",\n \"email\": \"mona@github.com\",\n \"date\": \"2011-04-14T16:00:49Z\"\n },\n \"committer\": {\n \"name\": \"Monalisa Octocat\",\n \"email\": \"mona@github.com\",\n \"date\": \"2011-04-14T16:00:49Z\"\n },\n \"message\": \"Fix all the bugs\",\n \"tree\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n },\n \"comment_count\": 0,\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n }\n },\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"committer\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"parents\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n }\n ]\n },\n \"merge_base_commit\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n \"commit\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"author\": {\n \"name\": \"Monalisa Octocat\",\n \"email\": \"mona@github.com\",\n \"date\": \"2011-04-14T16:00:49Z\"\n },\n \"committer\": {\n \"name\": \"Monalisa Octocat\",\n \"email\": \"mona@github.com\",\n \"date\": \"2011-04-14T16:00:49Z\"\n },\n \"message\": \"Fix all the bugs\",\n \"tree\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n },\n \"comment_count\": 0,\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n }\n },\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"committer\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"parents\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n }\n ]\n },\n \"status\": \"behind\",\n \"ahead_by\": 1,\n \"behind_by\": 2,\n \"total_commits\": 1,\n \"commits\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n \"commit\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"author\": {\n \"name\": \"Monalisa Octocat\",\n \"email\": \"mona@github.com\",\n \"date\": \"2011-04-14T16:00:49Z\"\n },\n \"committer\": {\n \"name\": \"Monalisa Octocat\",\n \"email\": \"mona@github.com\",\n \"date\": \"2011-04-14T16:00:49Z\"\n },\n \"message\": \"Fix all the bugs\",\n \"tree\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n },\n \"comment_count\": 0,\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n }\n },\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"committer\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"parents\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n }\n ]\n }\n ],\n \"files\": [\n {\n \"sha\": \"bbcd538c8e72b8c175046e27cc8f907076331401\",\n \"filename\": \"file1.txt\",\n \"status\": \"added\",\n \"additions\": 103,\n \"deletions\": 21,\n \"changes\": 124,\n \"blob_url\": \"https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt\",\n \"raw_url\": \"https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"patch\": \"@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test\"\n }\n ]\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "500",
"httpStatusMessage": "Internal Server Error",
"description": "Internal Error"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The owner of the repository. Determined from the repository full_name of the content_reference event.
The name of the repository. Determined from the repository full_name of the content_reference event.
The id of the content_reference event.
curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/content_references/42/attachments \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments', {\n owner: 'octocat',\n repo: 'hello-world',\n content_reference_id: 42,\n title: 'title',\n body: 'body',\n mediaType: {\n previews: [\n 'corsair'\n ]\n }\n})\n"
}
],
"summary": "Create a content attachment",
"description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/create-content-attachment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#create-a-content-attachment"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"title": {
"description": "Required. The title of the attachment
", "example": "Title of the attachment", "type": "string", "maxLength": 1024, "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title of the attachment", "childParamsGroups": [] }, "body": { "description": "Required. The body of the attachment
", "example": "Body of the attachment", "type": "string", "maxLength": 262144, "name": "body", "in": "body", "rawType": "string", "rawDescription": "The body of the attachment", "childParamsGroups": [] } }, "required": [ "title", "body" ], "type": "object" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "previews": [ { "required": true, "name": "corsair", "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```", "html": "To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.corsair-preview+json"
}
],
"category": "apps",
"subcategory": "installations"
},
"slug": "create-a-content-attachment",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "installations",
"subcategoryLabel": "Installations",
"contentType": "application/json",
"notes": [],
"descriptionHTML": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repository full_name of the content reference from the content_reference event to create an attachment.
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
\nYou must use an installation access token to access this endpoint.
", "bodyParameters": [ { "description": "Required. The title of the attachment
", "example": "Title of the attachment", "type": "string", "maxLength": 1024, "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title of the attachment", "childParamsGroups": [] }, { "description": "Required. The body of the attachment
", "example": "Body of the attachment", "type": "string", "maxLength": 262144, "name": "body", "in": "body", "rawType": "string", "rawDescription": "The body of the attachment", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
},
{
"httpStatusCode": "415",
"httpStatusMessage": "Unsupported Media Type",
"description": "Preview header missing"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/contents/{path}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "path",
"description": "path parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "path parameter
" }, { "name": "ref", "description": "The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`)", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "The name of the commit/branch/tag. Default: the repository’s default branch (usually master)
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/contents/PATH"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/contents/{path}', {\n owner: 'octocat',\n repo: 'hello-world',\n path: 'path'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/contents/{path}', {\n owner: 'octocat',\n repo: 'hello-world',\n path: 'path'\n})\n"
}
],
"summary": "Get repository content",
"description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/rest/reference/git#get-a-tree).\n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.",
"tags": [
"repos"
],
"operationId": "repos/get-content",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-repository-content"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "contents"
},
"slug": "get-repository-content",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "contents",
"subcategoryLabel": "Contents",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the contents of a file or directory in a repository. Specify the file path or directory in :path. If you omit\n:path, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories.
Files and symlinks support a custom media type for\nretrieving the raw content or rendered HTML (when supported). All content types support a custom media\ntype to ensure the content is returned in a consistent\nobject format.
\nNote:
\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\nshould be \"submodule\". This behavior exists in API v3 for backwards compatibility purposes.\nIn the next major version of the API, the type will be returned as \"submodule\".
\nIf the requested :path points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.
The submodule_git_url identifies the location of the submodule repository, and the sha identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.
If the submodule repository is not hosted on github.com, the Git URLs (git_url and _links[\"git\"]) and the\ngithub.com URLs (html_url and _links[\"html\"]) will have null values.
{\n \"type\": \"file\",\n \"encoding\": \"base64\",\n \"size\": 5362,\n \"name\": \"README.md\",\n \"path\": \"README.md\",\n \"content\": \"encoded content ...\",\n \"sha\": \"3d21ec53a331a6f037a91c368710b99387d012c1\",\n \"url\": \"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\",\n \"git_url\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\",\n \"html_url\": \"https://github.com/octokit/octokit.rb/blob/master/README.md\",\n \"download_url\": \"https://raw.githubusercontent.com/octokit/octokit.rb/master/README.md\",\n \"_links\": {\n \"git\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\",\n \"self\": \"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\",\n \"html\": \"https://github.com/octokit/octokit.rb/blob/master/README.md\"\n }\n}\n"
},
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response if content is a directory",
"payload": "[\n {\n \"type\": \"file\",\n \"size\": 625,\n \"name\": \"octokit.rb\",\n \"path\": \"lib/octokit.rb\",\n \"sha\": \"fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b\",\n \"url\": \"https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit.rb\",\n \"git_url\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b\",\n \"html_url\": \"https://github.com/octokit/octokit.rb/blob/master/lib/octokit.rb\",\n \"download_url\": \"https://raw.githubusercontent.com/octokit/octokit.rb/master/lib/octokit.rb\",\n \"_links\": {\n \"self\": \"https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit.rb\",\n \"git\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b\",\n \"html\": \"https://github.com/octokit/octokit.rb/blob/master/lib/octokit.rb\"\n }\n },\n {\n \"type\": \"dir\",\n \"size\": 0,\n \"name\": \"octokit\",\n \"path\": \"lib/octokit\",\n \"sha\": \"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n \"url\": \"https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit\",\n \"git_url\": \"https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n \"html_url\": \"https://github.com/octokit/octokit.rb/tree/master/lib/octokit\",\n \"download_url\": null,\n \"_links\": {\n \"self\": \"https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit\",\n \"git\": \"https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n \"html\": \"https://github.com/octokit/octokit.rb/tree/master/lib/octokit\"\n }\n }\n]\n"
},
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response if content is a symlink",
"payload": "{\n \"type\": \"symlink\",\n \"target\": \"/path/to/symlink/target\",\n \"size\": 23,\n \"name\": \"some-symlink\",\n \"path\": \"bin/some-symlink\",\n \"sha\": \"452a98979c88e093d682cab404a3ec82babebb48\",\n \"url\": \"https://api.github.com/repos/octokit/octokit.rb/contents/bin/some-symlink\",\n \"git_url\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/452a98979c88e093d682cab404a3ec82babebb48\",\n \"html_url\": \"https://github.com/octokit/octokit.rb/blob/master/bin/some-symlink\",\n \"download_url\": \"https://raw.githubusercontent.com/octokit/octokit.rb/master/bin/some-symlink\",\n \"_links\": {\n \"git\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/452a98979c88e093d682cab404a3ec82babebb48\",\n \"self\": \"https://api.github.com/repos/octokit/octokit.rb/contents/bin/some-symlink\",\n \"html\": \"https://github.com/octokit/octokit.rb/blob/master/bin/some-symlink\"\n }\n}\n"
},
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response if content is a submodule",
"payload": "{\n \"type\": \"submodule\",\n \"submodule_git_url\": \"git://github.com/jquery/qunit.git\",\n \"size\": 0,\n \"name\": \"qunit\",\n \"path\": \"test/qunit\",\n \"sha\": \"6ca3721222109997540bd6d9ccd396902e0ad2f9\",\n \"url\": \"https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master\",\n \"git_url\": \"https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9\",\n \"html_url\": \"https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9\",\n \"download_url\": null,\n \"_links\": {\n \"git\": \"https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9\",\n \"self\": \"https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master\",\n \"html\": \"https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9\"\n }\n}\n"
},
{
"httpStatusCode": "302",
"httpStatusMessage": "Found",
"description": "Found"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/contents/{path}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "path",
"description": "path parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "path parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/contents/PATH \\\n -d '{\"message\":\"message\",\"content\":\"content\"}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/contents/PATH \\\n -d '{\"message\":\"message\",\"content\":\"content\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/contents/{path}', {\n owner: 'octocat',\n repo: 'hello-world',\n path: 'path',\n message: 'message',\n content: 'content'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/contents/{path}', {\n owner: 'octocat',\n repo: 'hello-world',\n path: 'path',\n message: 'message',\n content: 'content'\n})\n"
}
],
"summary": "Create or update file contents",
"description": "Creates a new file or replaces an existing file in a repository.",
"tags": [
"repos"
],
"operationId": "repos/create-or-update-file-contents",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-or-update-file-contents"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Required. The commit message.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "The commit message.", "childParamsGroups": [] }, "content": { "type": "string", "description": "Required. The new file content, using Base64 encoding.
", "name": "content", "in": "body", "rawType": "string", "rawDescription": "The new file content, using Base64 encoding.", "childParamsGroups": [] }, "sha": { "type": "string", "description": "Required if you are updating a file. The blob SHA of the file being replaced.
", "name": "sha", "in": "body", "rawType": "string", "rawDescription": "**Required if you are updating a file**. The blob SHA of the file being replaced.", "childParamsGroups": [] }, "branch": { "type": "string", "description": "The branch name. Default: the repository’s default branch (usually master)
The person that committed the file. Default: the authenticated user.
", "properties": { "name": { "type": "string", "description": "Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
The author of the file. Default: The committer or the authenticated user if you omit committer.
Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
Creates a new file or replaces an existing file in a repository.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"content\": {\n \"name\": \"hello.txt\",\n \"path\": \"notes/hello.txt\",\n \"sha\": \"a56507ed892d05a37c6d6128c260937ea4d287bd\",\n \"size\": 9,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt\",\n \"html_url\": \"https://github.com/octocat/Hello-World/blob/master/notes/hello.txt\",\n \"git_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/a56507ed892d05a37c6d6128c260937ea4d287bd\",\n \"download_url\": \"https://raw.githubusercontent.com/octocat/HelloWorld/master/notes/hello.txt\",\n \"type\": \"file\",\n \"_links\": {\n \"self\": \"https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt\",\n \"git\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/a56507ed892d05a37c6d6128c260937ea4d287bd\",\n \"html\": \"https://github.com/octocat/Hello-World/blob/master/notes/hello.txt\"\n }\n },\n \"commit\": {\n \"sha\": \"18a43cd8e1e3a79c786e3d808a73d23b6d212b16\",\n \"node_id\": \"MDY6Q29tbWl0MThhNDNjZDhlMWUzYTc5Yzc4NmUzZDgwOGE3M2QyM2I2ZDIxMmIxNg==\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/18a43cd8e1e3a79c786e3d808a73d23b6d212b16\",\n \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/18a43cd8e1e3a79c786e3d808a73d23b6d212b16\",\n \"author\": {\n \"date\": \"2014-11-07T22:01:45Z\",\n \"name\": \"Monalisa Octocat\",\n \"email\": \"octocat@github.com\"\n },\n \"committer\": {\n \"date\": \"2014-11-07T22:01:45Z\",\n \"name\": \"Monalisa Octocat\",\n \"email\": \"octocat@github.com\"\n },\n \"message\": \"my commit message\",\n \"tree\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/9a21f8e2018f42ffcf369b24d2cd20bc25c9e66f\",\n \"sha\": \"9a21f8e2018f42ffcf369b24d2cd20bc25c9e66f\"\n },\n \"parents\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/da5a433788da5c255edad7979b328b67d79f53f6\",\n \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/da5a433788da5c255edad7979b328b67d79f53f6\",\n \"sha\": \"da5a433788da5c255edad7979b328b67d79f53f6\"\n }\n ],\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n }\n }\n}\n"
},
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response",
"payload": "{\n \"content\": {\n \"name\": \"hello.txt\",\n \"path\": \"notes/hello.txt\",\n \"sha\": \"95b966ae1c166bd92f8ae7d1c313e738c731dfc3\",\n \"size\": 9,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt\",\n \"html_url\": \"https://github.com/octocat/Hello-World/blob/master/notes/hello.txt\",\n \"git_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3\",\n \"download_url\": \"https://raw.githubusercontent.com/octocat/HelloWorld/master/notes/hello.txt\",\n \"type\": \"file\",\n \"_links\": {\n \"self\": \"https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt\",\n \"git\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3\",\n \"html\": \"https://github.com/octocat/Hello-World/blob/master/notes/hello.txt\"\n }\n },\n \"commit\": {\n \"sha\": \"7638417db6d59f3c431d3e1f261cc637155684cd\",\n \"node_id\": \"MDY6Q29tbWl0NzYzODQxN2RiNmQ1OWYzYzQzMWQzZTFmMjYxY2M2MzcxNTU2ODRjZA==\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\",\n \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd\",\n \"author\": {\n \"date\": \"2014-11-07T22:01:45Z\",\n \"name\": \"Monalisa Octocat\",\n \"email\": \"octocat@github.com\"\n },\n \"committer\": {\n \"date\": \"2014-11-07T22:01:45Z\",\n \"name\": \"Monalisa Octocat\",\n \"email\": \"octocat@github.com\"\n },\n \"message\": \"my commit message\",\n \"tree\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb\",\n \"sha\": \"691272480426f78a0138979dd3ce63b77f706feb\"\n },\n \"parents\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5\",\n \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5\",\n \"sha\": \"1acc419d4d6a9ce985db7be48c6349a0475975b5\"\n }\n ],\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n }\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "409",
"httpStatusMessage": "Conflict",
"description": "Conflict"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"type": "string",
"description": "Required. The commit message.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "The commit message.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The new file content, using Base64 encoding.
", "name": "content", "in": "body", "rawType": "string", "rawDescription": "The new file content, using Base64 encoding.", "childParamsGroups": [] }, { "type": "string", "description": "Required if you are updating a file. The blob SHA of the file being replaced.
", "name": "sha", "in": "body", "rawType": "string", "rawDescription": "**Required if you are updating a file**. The blob SHA of the file being replaced.", "childParamsGroups": [] }, { "type": "string", "description": "The branch name. Default: the repository’s default branch (usually master)
The person that committed the file. Default: the authenticated user.
", "properties": { "name": { "type": "string", "description": "Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
The author of the file. Default: The committer or the authenticated user if you omit committer.
Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
path parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/contents/PATH \\\n -d '{\"message\":\"message\",\"sha\":\"sha\"}'", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/contents/PATH \\\n -d '{\"message\":\"message\",\"sha\":\"sha\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/contents/{path}', {\n owner: 'octocat',\n repo: 'hello-world',\n path: 'path',\n message: 'message',\n sha: 'sha'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/contents/{path}', {\n owner: 'octocat',\n repo: 'hello-world',\n path: 'path',\n message: 'message',\n sha: 'sha'\n})\n"
}
],
"summary": "Delete a file",
"description": "Deletes a file in a repository.\n\nYou can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author.\n\nThe `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used.\n\nYou must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code.",
"tags": [
"repos"
],
"operationId": "repos/delete-file",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-a-file"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Required. The commit message.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "The commit message.", "childParamsGroups": [] }, "sha": { "type": "string", "description": "Required. The blob SHA of the file being replaced.
", "name": "sha", "in": "body", "rawType": "string", "rawDescription": "The blob SHA of the file being replaced.", "childParamsGroups": [] }, "branch": { "type": "string", "description": "The branch name. Default: the repository’s default branch (usually master)
object containing information about the committer.
", "properties": { "name": { "type": "string", "description": "The name of the author (or committer) of the commit
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author (or committer) of the commit", "childParamsGroups": [] }, "email": { "type": "string", "description": "The email of the author (or committer) of the commit
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author (or committer) of the commit", "childParamsGroups": [] } }, "name": "committer", "in": "body", "rawType": "object", "rawDescription": "object containing information about the committer.", "childParamsGroups": [ { "parentName": "committer", "parentType": "object", "id": "committer-object", "params": [ { "type": "string", "description": "The name of the author (or committer) of the commit
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author (or committer) of the commit", "childParamsGroups": [] }, { "type": "string", "description": "The email of the author (or committer) of the commit
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author (or committer) of the commit", "childParamsGroups": [] } ] } ] }, "author": { "type": "object", "description": "object containing information about the author.
", "properties": { "name": { "type": "string", "description": "The name of the author (or committer) of the commit
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author (or committer) of the commit", "childParamsGroups": [] }, "email": { "type": "string", "description": "The email of the author (or committer) of the commit
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author (or committer) of the commit", "childParamsGroups": [] } }, "name": "author", "in": "body", "rawType": "object", "rawDescription": "object containing information about the author.", "childParamsGroups": [ { "parentName": "author", "parentType": "object", "id": "author-object", "params": [ { "type": "string", "description": "The name of the author (or committer) of the commit
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author (or committer) of the commit", "childParamsGroups": [] }, { "type": "string", "description": "The email of the author (or committer) of the commit
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author (or committer) of the commit", "childParamsGroups": [] } ] } ] } }, "required": [ "message", "sha" ] }, "example": { "message": "my commit message", "committer": { "name": "Monalisa Octocat", "email": "octocat@github.com" }, "sha": "329688480d39049927147c162b9d2deaf885005f" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "repos", "subcategory": "contents" }, "slug": "delete-a-file", "category": "repos", "categoryLabel": "Repos", "subcategory": "contents", "subcategoryLabel": "Contents", "contentType": "application/json", "notes": [], "descriptionHTML": "Deletes a file in a repository.
\nYou can provide an additional committer parameter, which is an object containing information about the committer. Or, you can provide an author parameter, which is an object containing information about the author.
The author section is optional and is filled in with the committer information if omitted. If the committer information is omitted, the authenticated user's information is used.
You must provide values for both name and email, whether you choose to use author or committer. Otherwise, you'll receive a 422 status code.
{\n \"content\": null,\n \"commit\": {\n \"sha\": \"7638417db6d59f3c431d3e1f261cc637155684cd\",\n \"node_id\": \"MDY6Q29tbWl0NzYzODQxN2RiNmQ1OWYzYzQzMWQzZTFmMjYxY2M2MzcxNTU2ODRjZA==\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\",\n \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd\",\n \"author\": {\n \"date\": \"2014-11-07T22:01:45Z\",\n \"name\": \"Monalisa Octocat\",\n \"email\": \"octocat@github.com\"\n },\n \"committer\": {\n \"date\": \"2014-11-07T22:01:45Z\",\n \"name\": \"Monalisa Octocat\",\n \"email\": \"octocat@github.com\"\n },\n \"message\": \"my commit message\",\n \"tree\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb\",\n \"sha\": \"691272480426f78a0138979dd3ce63b77f706feb\"\n },\n \"parents\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5\",\n \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5\",\n \"sha\": \"1acc419d4d6a9ce985db7be48c6349a0475975b5\"\n }\n ],\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n }\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "409",
"httpStatusMessage": "Conflict",
"description": "Conflict"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
],
"bodyParameters": [
{
"type": "string",
"description": "Required. The commit message.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "The commit message.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The blob SHA of the file being replaced.
", "name": "sha", "in": "body", "rawType": "string", "rawDescription": "The blob SHA of the file being replaced.", "childParamsGroups": [] }, { "type": "string", "description": "The branch name. Default: the repository’s default branch (usually master)
object containing information about the committer.
", "properties": { "name": { "type": "string", "description": "The name of the author (or committer) of the commit
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author (or committer) of the commit", "childParamsGroups": [] }, "email": { "type": "string", "description": "The email of the author (or committer) of the commit
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author (or committer) of the commit", "childParamsGroups": [] } }, "name": "committer", "in": "body", "rawType": "object", "rawDescription": "object containing information about the committer.", "childParamsGroups": [ { "parentName": "committer", "parentType": "object", "id": "committer-object", "params": [ { "type": "string", "description": "The name of the author (or committer) of the commit
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author (or committer) of the commit", "childParamsGroups": [] }, { "type": "string", "description": "The email of the author (or committer) of the commit
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author (or committer) of the commit", "childParamsGroups": [] } ] } ] }, { "type": "object", "description": "object containing information about the author.
", "properties": { "name": { "type": "string", "description": "The name of the author (or committer) of the commit
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author (or committer) of the commit", "childParamsGroups": [] }, "email": { "type": "string", "description": "The email of the author (or committer) of the commit
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author (or committer) of the commit", "childParamsGroups": [] } }, "name": "author", "in": "body", "rawType": "object", "rawDescription": "object containing information about the author.", "childParamsGroups": [ { "parentName": "author", "parentType": "object", "id": "author-object", "params": [ { "type": "string", "description": "The name of the author (or committer) of the commit
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author (or committer) of the commit", "childParamsGroups": [] }, { "type": "string", "description": "The email of the author (or committer) of the commit
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author (or committer) of the commit", "childParamsGroups": [] } ] } ] } ] }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/contributors", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "anon", "description": "Set to `1` or `true` to include anonymous contributors in results.", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "Set to 1 or true to include anonymous contributors in results.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/contributors", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/contributors"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/contributors', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/contributors', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List repository contributors",
"description": "Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance.\n\nGitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information.",
"tags": [
"repos"
],
"operationId": "repos/list-contributors",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-repository-contributors"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
},
"slug": "list-repository-contributors",
"category": "repos",
"categoryLabel": "Repos",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance.
\nGitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "if repository contains content", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false,\n \"contributions\": 32\n }\n]\n"
},
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response if repository is empty"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/deployments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "sha",
"description": "The SHA recorded at creation time.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"default": "none"
},
"descriptionHTML": "The SHA recorded at creation time.
" }, { "name": "ref", "description": "The name of the ref. This can be a branch, tag, or SHA.", "in": "query", "required": false, "schema": { "type": "string", "default": "none" }, "descriptionHTML": "The name of the ref. This can be a branch, tag, or SHA.
" }, { "name": "task", "description": "The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`).", "in": "query", "required": false, "schema": { "type": "string", "default": "none" }, "descriptionHTML": "The name of the task for the deployment (e.g., deploy or deploy:migrations).
The name of the environment that was deployed to (e.g., staging or production).
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/deployments', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/deployments', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List deployments",
"description": "Simple filtering of deployments is available via query parameters:",
"tags": [
"repos"
],
"operationId": "repos/list-deployments",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-deployments"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "deployments"
},
"slug": "list-deployments",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "deployments",
"subcategoryLabel": "Deployments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Simple filtering of deployments is available via query parameters:
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/repos/octocat/example/deployments/1\",\n \"id\": 1,\n \"node_id\": \"MDEwOkRlcGxveW1lbnQx\",\n \"sha\": \"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n \"ref\": \"topic-branch\",\n \"task\": \"deploy\",\n \"payload\": {},\n \"original_environment\": \"staging\",\n \"environment\": \"production\",\n \"description\": \"Deploy request from hubot\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2012-07-20T01:19:13Z\",\n \"updated_at\": \"2012-07-20T01:19:13Z\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/example/deployments/1/statuses\",\n \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n \"transient_environment\": false,\n \"production_environment\": true\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/deployments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments \\\n -d '{\"ref\":\"ref\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments \\\n -d '{\"ref\":\"ref\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/deployments', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/deployments', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})\n"
}
],
"summary": "Create a deployment",
"description": "Deployments offer a few configurable parameters with certain defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them\nbefore we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is `production`.\n\nThe `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.\n\nBy default, [commit statuses](https://docs.github.com/rest/reference/repos#statuses) for every submitted context must be in a `success`\nstate. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.\n\nThe `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.\n\nThe `task` parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.\n\nUsers with `repo` or `repo_deployment` scopes can create a deployment for a given ref.\n\n#### Merged branch response\nYou will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:\n* Auto-merge option is enabled in the repository\n* Topic branch does not include the latest changes on the base branch, which is `master` in the response example\n* There are no merge conflicts\n\nIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.\n\n#### Merge conflict response\nThis error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't\nbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.\n\n#### Failed commit status checks\nThis error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.",
"tags": [
"repos"
],
"operationId": "repos/create-deployment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-a-deployment"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "Required. The ref to deploy. This can be a branch, tag, or SHA.
", "name": "ref", "in": "body", "rawType": "string", "rawDescription": "The ref to deploy. This can be a branch, tag, or SHA.", "childParamsGroups": [] }, "task": { "type": "string", "description": "Specifies a task to execute (e.g., deploy or deploy:migrations).
Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch.
", "default": true, "name": "auto_merge", "in": "body", "rawType": "boolean", "rawDescription": "Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch.", "childParamsGroups": [] }, "required_contexts": { "type": "array of strings", "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", "items": { "type": "string" }, "name": "required_contexts", "in": "body", "rawType": "array", "rawDescription": "The [status](https://docs.github.com/rest/reference/repos#statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", "childParamsGroups": [] }, "payload": { "oneOf": [ { "type": "object", "additionalProperties": true }, { "type": "string", "description": "JSON payload with extra information about the deployment.", "default": "" } ], "name": "payload", "in": "body", "description": "JSON payload with extra information about the deployment.
", "type": "object or string", "childParamsGroups": [] }, "environment": { "type": "string", "description": "Name for the target deployment environment (e.g., production, staging, qa).
Short description of the deployment.
", "default": "", "nullable": true, "name": "description", "in": "body", "rawType": "string", "rawDescription": "Short description of the deployment.", "childParamsGroups": [] }, "transient_environment": { "type": "boolean", "description": "Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: false
Specifies if the given environment is one that end-users directly interact with. Default: true when environment is production and false otherwise.
Deployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.
The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.
The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.
The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
{\n \"url\": \"https://api.github.com/repos/octocat/example/deployments/1\",\n \"id\": 1,\n \"node_id\": \"MDEwOkRlcGxveW1lbnQx\",\n \"sha\": \"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n \"ref\": \"topic-branch\",\n \"task\": \"deploy\",\n \"payload\": {},\n \"original_environment\": \"staging\",\n \"environment\": \"production\",\n \"description\": \"Deploy request from hubot\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2012-07-20T01:19:13Z\",\n \"updated_at\": \"2012-07-20T01:19:13Z\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/example/deployments/1/statuses\",\n \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n \"transient_environment\": false,\n \"production_environment\": true\n}\n"
},
{
"httpStatusCode": "202",
"httpStatusMessage": "Accepted",
"description": "Merged branch response",
"payload": "{\n \"message\": \"Auto-merged master into topic-branch on deployment.\"\n}\n"
},
{
"httpStatusCode": "409",
"httpStatusMessage": "Conflict",
"description": "Conflict when there is a merge conflict or the commit's status checks failed"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"type": "string",
"description": "Required. The ref to deploy. This can be a branch, tag, or SHA.
", "name": "ref", "in": "body", "rawType": "string", "rawDescription": "The ref to deploy. This can be a branch, tag, or SHA.", "childParamsGroups": [] }, { "type": "string", "description": "Specifies a task to execute (e.g., deploy or deploy:migrations).
Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch.
", "default": true, "name": "auto_merge", "in": "body", "rawType": "boolean", "rawDescription": "Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch.", "childParamsGroups": [] }, { "type": "array of strings", "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", "items": { "type": "string" }, "name": "required_contexts", "in": "body", "rawType": "array", "rawDescription": "The [status](https://docs.github.com/rest/reference/repos#statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", "childParamsGroups": [] }, { "oneOf": [ { "type": "object", "additionalProperties": true }, { "type": "string", "description": "JSON payload with extra information about the deployment.", "default": "" } ], "name": "payload", "in": "body", "description": "JSON payload with extra information about the deployment.
", "type": "object or string", "childParamsGroups": [] }, { "type": "string", "description": "Name for the target deployment environment (e.g., production, staging, qa).
Short description of the deployment.
", "default": "", "nullable": true, "name": "description", "in": "body", "rawType": "string", "rawDescription": "Short description of the deployment.", "childParamsGroups": [] }, { "type": "boolean", "description": "Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: false
Specifies if the given environment is one that end-users directly interact with. Default: true when environment is production and false otherwise.
deployment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/deployments/{deployment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n deployment_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/deployments/{deployment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n deployment_id: 42\n})\n"
}
],
"summary": "Get a deployment",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/get-deployment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-deployment"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "deployments"
},
"slug": "get-a-deployment",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "deployments",
"subcategoryLabel": "Deployments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"url\": \"https://api.github.com/repos/octocat/example/deployments/1\",\n \"id\": 1,\n \"node_id\": \"MDEwOkRlcGxveW1lbnQx\",\n \"sha\": \"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n \"ref\": \"topic-branch\",\n \"task\": \"deploy\",\n \"payload\": {},\n \"original_environment\": \"staging\",\n \"environment\": \"production\",\n \"description\": \"Deploy request from hubot\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2012-07-20T01:19:13Z\",\n \"updated_at\": \"2012-07-20T01:19:13Z\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/example/deployments/1/statuses\",\n \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n \"transient_environment\": false,\n \"production_environment\": true\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/deployments/{deployment_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "deployment_id",
"description": "deployment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "deployment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/deployments/{deployment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n deployment_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/deployments/{deployment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n deployment_id: 42\n})\n"
}
],
"summary": "Delete a deployment",
"description": "To ensure there can always be an active deployment, you can only delete an _inactive_ deployment. Anyone with `repo` or `repo_deployment` scopes can delete an inactive deployment.\n\nTo set a deployment as inactive, you must:\n\n* Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment.\n* Mark the active deployment as inactive by adding any non-successful deployment status.\n\nFor more information, see \"[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)\" and \"[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status).\"",
"tags": [
"repos"
],
"operationId": "repos/delete-deployment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-a-deployment"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "deployments"
},
"slug": "delete-a-deployment",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "deployments",
"subcategoryLabel": "Deployments",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [],
"descriptionHTML": "To ensure there can always be an active deployment, you can only delete an inactive deployment. Anyone with repo or repo_deployment scopes can delete an inactive deployment.
To set a deployment as inactive, you must:
\nFor more information, see \"Create a deployment\" and \"Create a deployment status.\"
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "deployment_id", "description": "deployment_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "deployment_id parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42/statuses", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42/statuses"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses', {\n owner: 'octocat',\n repo: 'hello-world',\n deployment_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses', {\n owner: 'octocat',\n repo: 'hello-world',\n deployment_id: 42\n})\n"
}
],
"summary": "List deployment statuses",
"description": "Users with pull access can view deployment statuses for a deployment:",
"tags": [
"repos"
],
"operationId": "repos/list-deployment-statuses",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-deployment-statuses"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "deployments"
},
"slug": "list-deployment-statuses",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "deployments",
"subcategoryLabel": "Deployments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Users with pull access can view deployment statuses for a deployment:
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/repos/octocat/example/deployments/42/statuses/1\",\n \"id\": 1,\n \"node_id\": \"MDE2OkRlcGxveW1lbnRTdGF0dXMx\",\n \"state\": \"success\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"description\": \"Deployment finished successfully.\",\n \"environment\": \"production\",\n \"target_url\": \"https://example.com/deployment/42/output\",\n \"created_at\": \"2012-07-20T01:19:13Z\",\n \"updated_at\": \"2012-07-20T01:19:13Z\",\n \"deployment_url\": \"https://api.github.com/repos/octocat/example/deployments/42\",\n \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n \"environment_url\": \"https://test-branch.lab.acme.com\",\n \"log_url\": \"https://example.com/deployment/42/output\"\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "deployment_id",
"description": "deployment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "deployment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42/statuses \\\n -d '{\"state\":\"state\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42/statuses \\\n -d '{\"state\":\"state\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses', {\n owner: 'octocat',\n repo: 'hello-world',\n deployment_id: 42,\n state: 'state'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses', {\n owner: 'octocat',\n repo: 'hello-world',\n deployment_id: 42,\n state: 'state'\n})\n"
}
],
"summary": "Create a deployment status",
"description": "Users with `push` access can create deployment statuses for a given deployment.\n\nGitHub Apps require `read & write` access to \"Deployments\" and `read-only` access to \"Repo contents\" (for private repos). OAuth Apps require the `repo_deployment` scope.",
"tags": [
"repos"
],
"operationId": "repos/create-deployment-status",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-a-deployment-status"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"state": {
"type": "string",
"description": "Required. The state of the status. Can be one of error, failure, inactive, in_progress, queued pending, or success. When you set a transient deployment to inactive, the deployment will be shown as destroyed in GitHub.
The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. Note: It's recommended to use the log_url parameter, which replaces target_url.
The full URL of the deployment's output. This parameter replaces target_url. We will continue to accept target_url to support legacy uses, but we recommend replacing target_url with log_url. Setting log_url will automatically set target_url to the same value. Default: \"\"
A short description of the status. The maximum description length is 140 characters.
", "default": "", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short description of the status. The maximum description length is 140 characters.", "childParamsGroups": [] }, "environment": { "type": "string", "description": "Name for the target deployment environment, which can be changed when setting a deploy status. For example, production, staging, or qa.
Sets the URL for accessing your environment. Default: \"\"
Adds a new inactive status to all prior non-transient, non-production environment deployments with the same repository and environment name as the created status's deployment. An inactive status is only added to deployments that had a success state. Default: true
Users with push access can create deployment statuses for a given deployment.
GitHub Apps require read & write access to \"Deployments\" and read-only access to \"Repo contents\" (for private repos). OAuth Apps require the repo_deployment scope.
Required. The state of the status. Can be one of error, failure, inactive, in_progress, queued pending, or success. When you set a transient deployment to inactive, the deployment will be shown as destroyed in GitHub.
The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. Note: It's recommended to use the log_url parameter, which replaces target_url.
The full URL of the deployment's output. This parameter replaces target_url. We will continue to accept target_url to support legacy uses, but we recommend replacing target_url with log_url. Setting log_url will automatically set target_url to the same value. Default: \"\"
A short description of the status. The maximum description length is 140 characters.
", "default": "", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short description of the status. The maximum description length is 140 characters.", "childParamsGroups": [] }, { "type": "string", "description": "Name for the target deployment environment, which can be changed when setting a deploy status. For example, production, staging, or qa.
Sets the URL for accessing your environment. Default: \"\"
Adds a new inactive status to all prior non-transient, non-production environment deployments with the same repository and environment name as the created status's deployment. An inactive status is only added to deployments that had a success state. Default: true
{\n \"url\": \"https://api.github.com/repos/octocat/example/deployments/42/statuses/1\",\n \"id\": 1,\n \"node_id\": \"MDE2OkRlcGxveW1lbnRTdGF0dXMx\",\n \"state\": \"success\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"description\": \"Deployment finished successfully.\",\n \"environment\": \"production\",\n \"target_url\": \"https://example.com/deployment/42/output\",\n \"created_at\": \"2012-07-20T01:19:13Z\",\n \"updated_at\": \"2012-07-20T01:19:13Z\",\n \"deployment_url\": \"https://api.github.com/repos/octocat/example/deployments/42\",\n \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n \"environment_url\": \"https://test-branch.lab.acme.com\",\n \"log_url\": \"https://example.com/deployment/42/output\"\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "deployment_id",
"description": "deployment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "deployment_id parameter
" }, { "name": "status_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42/statuses/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42/statuses/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n deployment_id: 42,\n status_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n deployment_id: 42,\n status_id: 42\n})\n"
}
],
"summary": "Get a deployment status",
"description": "Users with pull access can view a deployment status for a deployment:",
"tags": [
"repos"
],
"operationId": "repos/get-deployment-status",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-deployment-status"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "deployments"
},
"slug": "get-a-deployment-status",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "deployments",
"subcategoryLabel": "Deployments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Users with pull access can view a deployment status for a deployment:
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/example/deployments/42/statuses/1\",\n \"id\": 1,\n \"node_id\": \"MDE2OkRlcGxveW1lbnRTdGF0dXMx\",\n \"state\": \"success\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"description\": \"Deployment finished successfully.\",\n \"environment\": \"production\",\n \"target_url\": \"https://example.com/deployment/42/output\",\n \"created_at\": \"2012-07-20T01:19:13Z\",\n \"updated_at\": \"2012-07-20T01:19:13Z\",\n \"deployment_url\": \"https://api.github.com/repos/octocat/example/deployments/42\",\n \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n \"environment_url\": \"https://test-branch.lab.acme.com\",\n \"log_url\": \"https://example.com/deployment/42/output\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/dispatches",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/dispatches \\\n -d '{\"event_type\":\"event_type\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/dispatches \\\n -d '{\"event_type\":\"event_type\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/dispatches', {\n owner: 'octocat',\n repo: 'hello-world',\n event_type: 'event_type'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/dispatches', {\n owner: 'octocat',\n repo: 'hello-world',\n event_type: 'event_type'\n})\n"
}
],
"summary": "Create a repository dispatch event",
"description": "You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see \"[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch).\"\n\nThe `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow.\n\nThis endpoint requires write access to the repository by providing either:\n\n - Personal access tokens with `repo` scope. For more information, see \"[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)\" in the GitHub Help documentation.\n - GitHub Apps with both `metadata:read` and `contents:read&write` permissions.\n\nThis input example shows how you can use the `client_payload` as a test to debug your workflow.",
"tags": [
"repos"
],
"operationId": "repos/create-dispatch-event",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"event_type"
],
"properties": {
"event_type": {
"type": "string",
"description": "Required. A custom webhook event name.
", "minLength": 1, "maxLength": 100, "name": "event_type", "in": "body", "rawType": "string", "rawDescription": "A custom webhook event name.", "childParamsGroups": [] }, "client_payload": { "type": "object", "description": "JSON payload with extra information about the webhook event that your action or worklow may use.
", "additionalProperties": true, "maxProperties": 10, "name": "client_payload", "in": "body", "rawType": "object", "rawDescription": "JSON payload with extra information about the webhook event that your action or worklow may use.", "childParamsGroups": [] } } }, "example": { "event_type": "on-demand-test", "client_payload": { "unit": false, "integration": true } } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "repos", "subcategory": null }, "slug": "create-a-repository-dispatch-event", "category": "repos", "categoryLabel": "Repos", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "204", "httpStatusMessage": "No Content", "description": "Response" }, { "httpStatusCode": "422", "httpStatusMessage": "Unprocessable Entity", "description": "Validation failed" } ], "descriptionHTML": "You can use this endpoint to trigger a webhook event called repository_dispatch when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the repository_dispatch event occurs. For an example repository_dispatch webhook payload, see \"RepositoryDispatchEvent.\"
The client_payload parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the client_payload can include a message that a user would like to send using a GitHub Actions workflow. Or the client_payload can be used as a test to debug your workflow.
This endpoint requires write access to the repository by providing either:
\nrepo scope. For more information, see \"Creating a personal access token for the command line\" in the GitHub Help documentation.metadata:read and contents:read&write permissions.This input example shows how you can use the client_payload as a test to debug your workflow.
Required. A custom webhook event name.
", "minLength": 1, "maxLength": 100, "name": "event_type", "in": "body", "rawType": "string", "rawDescription": "A custom webhook event name.", "childParamsGroups": [] }, { "type": "object", "description": "JSON payload with extra information about the webhook event that your action or worklow may use.
", "additionalProperties": true, "maxProperties": 10, "name": "client_payload", "in": "body", "rawType": "object", "rawDescription": "JSON payload with extra information about the webhook event that your action or worklow may use.", "childParamsGroups": [] } ] }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/environments", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/environments", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/environments"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/environments', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/environments', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get all environments",
"description": "Get all environments for a repository.\n\nAnyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"repos"
],
"operationId": "repos/get-all-environments",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-all-environments"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "environments"
},
"slug": "get-all-environments",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "environments",
"subcategoryLabel": "Environments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Get all environments for a repository.
\nAnyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
{\n \"total_count\": 1,\n \"environments\": [\n {\n \"id\": 161088068,\n \"node_id\": \"MDExOkVudmlyb25tZW50MTYxMDg4MDY4\",\n \"name\": \"staging\",\n \"url\": \"https://api.github.com/repos/github/hello-world/environments/staging\",\n \"html_url\": \"https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging\",\n \"created_at\": \"2020-11-23T22:00:40Z\",\n \"updated_at\": \"2020-11-23T22:00:40Z\",\n \"protection_rules\": [\n {\n \"id\": 3736,\n \"node_id\": \"MDQ6R2F0ZTM3MzY=\",\n \"type\": \"wait_timer\",\n \"wait_timer\": 30\n },\n {\n \"id\": 3755,\n \"node_id\": \"MDQ6R2F0ZTM3NTU=\",\n \"type\": \"required_reviewers\",\n \"reviewers\": [\n {\n \"type\": \"User\",\n \"reviewer\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n },\n {\n \"type\": \"Team\",\n \"reviewer\": {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n }\n ]\n },\n {\n \"id\": 3756,\n \"node_id\": \"MDQ6R2F0ZTM3NTY=\",\n \"type\": \"branch_policy\"\n }\n ],\n \"deployment_branch_policy\": {\n \"protected_branches\": false,\n \"custom_branch_policies\": true\n }\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/environments/{environment_name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "environment_name",
"in": "path",
"required": true,
"description": "The name of the environment",
"schema": {
"type": "string"
},
"descriptionHTML": "The name of the environment
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/environments/ENVIRONMENT_NAME", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/environments/ENVIRONMENT_NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/environments/{environment_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n environment_name: 'environment_name'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/environments/{environment_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n environment_name: 'environment_name'\n})\n"
}
],
"summary": "Get an environment",
"description": "Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"repos"
],
"operationId": "repos/get-environment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-an-environment"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "environments"
},
"slug": "get-an-environment",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "environments",
"subcategoryLabel": "Environments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
{\n \"id\": 161088068,\n \"node_id\": \"MDExOkVudmlyb25tZW50MTYxMDg4MDY4\",\n \"name\": \"staging\",\n \"url\": \"https://api.github.com/repos/github/hello-world/environments/staging\",\n \"html_url\": \"https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging\",\n \"created_at\": \"2020-11-23T22:00:40Z\",\n \"updated_at\": \"2020-11-23T22:00:40Z\",\n \"protection_rules\": [\n {\n \"id\": 3736,\n \"node_id\": \"MDQ6R2F0ZTM3MzY=\",\n \"type\": \"wait_timer\",\n \"wait_timer\": 30\n },\n {\n \"id\": 3755,\n \"node_id\": \"MDQ6R2F0ZTM3NTU=\",\n \"type\": \"required_reviewers\",\n \"reviewers\": [\n {\n \"type\": \"User\",\n \"reviewer\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n },\n {\n \"type\": \"Team\",\n \"reviewer\": {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n }\n ]\n },\n {\n \"id\": 3756,\n \"node_id\": \"MDQ6R2F0ZTM3NTY=\",\n \"type\": \"branch_policy\"\n }\n ],\n \"deployment_branch_policy\": {\n \"protected_branches\": false,\n \"custom_branch_policies\": true\n }\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/environments/{environment_name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "environment_name",
"in": "path",
"required": true,
"description": "The name of the environment",
"schema": {
"type": "string"
},
"descriptionHTML": "The name of the environment
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/environments/ENVIRONMENT_NAME \\\n -d '{\"wait_timer\":42}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/environments/ENVIRONMENT_NAME \\\n -d '{\"wait_timer\":42}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/environments/{environment_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n environment_name: 'environment_name',\n wait_timer: 42\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/environments/{environment_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n environment_name: 'environment_name',\n wait_timer: 42\n})\n"
}
],
"summary": "Create or update an environment",
"description": "Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see \"[Environments](/actions/reference/environments#environment-protection-rules).\"\n\n**Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see \"[Environments](/actions/reference/environments#deployment-branches).\"\n\n**Note:** To create or update secrets for an environment, see \"[Secrets](/rest/reference/actions#secrets).\"\n\nYou must authenticate using an access token with the repo scope to use this endpoint.",
"tags": [
"repos"
],
"operationId": "repos/create-or-update-environment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-or-update-an-environment"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"nullable": true,
"properties": {
"wait_timer": {
"type": "integer",
"example": 30,
"description": "The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days).
", "name": "wait_timer", "in": "body", "rawType": "integer", "rawDescription": "The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days).", "childParamsGroups": [] }, "reviewers": { "type": "array of objects or nullable", "nullable": true, "description": "The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of reviewer. Must be one of: User or Team
The id of the user or team who can review the deployment
", "example": 4532992, "name": "id", "in": "body", "rawType": "integer", "rawDescription": "The id of the user or team who can review the deployment", "childParamsGroups": [] } } }, "name": "reviewers", "in": "body", "rawType": "array", "rawDescription": "The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.", "childParamsGroups": [ { "parentName": "reviewers", "parentType": "items", "id": "reviewers-items", "params": [ { "type": "string", "description": "The type of reviewer. Must be one of: User or Team
The id of the user or team who can review the deployment
", "example": 4532992, "name": "id", "in": "body", "rawType": "integer", "rawDescription": "The id of the user or team who can review the deployment", "childParamsGroups": [] } ] } ] }, "deployment_branch_policy": { "type": "object or nullable", "description": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to null.
Required. Whether only branches with branch protection rules can deploy to this environment. If protected_branches is true, custom_branch_policies must be false; if protected_branches is false, custom_branch_policies must be true.
Required. Whether only branches that match the specified name patterns can deploy to this environment. If custom_branch_policies is true, protected_branches must be false; if custom_branch_policies is false, protected_branches must be true.
Required. Whether only branches with branch protection rules can deploy to this environment. If protected_branches is true, custom_branch_policies must be false; if protected_branches is false, custom_branch_policies must be true.
Required. Whether only branches that match the specified name patterns can deploy to this environment. If custom_branch_policies is true, protected_branches must be false; if custom_branch_policies is false, protected_branches must be true.
Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see \"Environments.\"
\nNote: Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see \"Environments.\"
\nNote: To create or update secrets for an environment, see \"Secrets.\"
\nYou must authenticate using an access token with the repo scope to use this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 161088068,\n \"node_id\": \"MDExOkVudmlyb25tZW50MTYxMDg4MDY4\",\n \"name\": \"staging\",\n \"url\": \"https://api.github.com/repos/github/hello-world/environments/staging\",\n \"html_url\": \"https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging\",\n \"created_at\": \"2020-11-23T22:00:40Z\",\n \"updated_at\": \"2020-11-23T22:00:40Z\",\n \"protection_rules\": [\n {\n \"id\": 3736,\n \"node_id\": \"MDQ6R2F0ZTM3MzY=\",\n \"type\": \"wait_timer\",\n \"wait_timer\": 30\n },\n {\n \"id\": 3755,\n \"node_id\": \"MDQ6R2F0ZTM3NTU=\",\n \"type\": \"required_reviewers\",\n \"reviewers\": [\n {\n \"type\": \"User\",\n \"reviewer\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n },\n {\n \"type\": \"Team\",\n \"reviewer\": {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n }\n ]\n },\n {\n \"id\": 3756,\n \"node_id\": \"MDQ6R2F0ZTM3NTY=\",\n \"type\": \"branch_policy\"\n }\n ],\n \"deployment_branch_policy\": {\n \"protected_branches\": false,\n \"custom_branch_policies\": true\n }\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value"
}
],
"bodyParameters": [
{
"type": "integer",
"example": 30,
"description": "The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days).
", "name": "wait_timer", "in": "body", "rawType": "integer", "rawDescription": "The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days).", "childParamsGroups": [] }, { "type": "array of objects or nullable", "nullable": true, "description": "The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of reviewer. Must be one of: User or Team
The id of the user or team who can review the deployment
", "example": 4532992, "name": "id", "in": "body", "rawType": "integer", "rawDescription": "The id of the user or team who can review the deployment", "childParamsGroups": [] } } }, "name": "reviewers", "in": "body", "rawType": "array", "rawDescription": "The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.", "childParamsGroups": [ { "parentName": "reviewers", "parentType": "items", "id": "reviewers-items", "params": [ { "type": "string", "description": "The type of reviewer. Must be one of: User or Team
The id of the user or team who can review the deployment
", "example": 4532992, "name": "id", "in": "body", "rawType": "integer", "rawDescription": "The id of the user or team who can review the deployment", "childParamsGroups": [] } ] } ] }, { "type": "object or nullable", "description": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to null.
Required. Whether only branches with branch protection rules can deploy to this environment. If protected_branches is true, custom_branch_policies must be false; if protected_branches is false, custom_branch_policies must be true.
Required. Whether only branches that match the specified name patterns can deploy to this environment. If custom_branch_policies is true, protected_branches must be false; if custom_branch_policies is false, protected_branches must be true.
Required. Whether only branches with branch protection rules can deploy to this environment. If protected_branches is true, custom_branch_policies must be false; if protected_branches is false, custom_branch_policies must be true.
Required. Whether only branches that match the specified name patterns can deploy to this environment. If custom_branch_policies is true, protected_branches must be false; if custom_branch_policies is false, protected_branches must be true.
The name of the environment
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/environments/ENVIRONMENT_NAME", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/environments/ENVIRONMENT_NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/environments/{environment_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n environment_name: 'environment_name'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/environments/{environment_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n environment_name: 'environment_name'\n})\n"
}
],
"summary": "Delete an environment",
"description": "You must authenticate using an access token with the repo scope to use this endpoint.",
"tags": [
"repos"
],
"operationId": "repos/delete-an-environment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-an-environment"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "environments"
},
"slug": "delete-an-environment",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "environments",
"subcategoryLabel": "Environments",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Default response"
}
],
"bodyParameters": [],
"descriptionHTML": "You must authenticate using an access token with the repo scope to use this endpoint.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/events", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/events", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/events"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/events', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/events', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List repository events",
"description": "",
"tags": [
"activity"
],
"operationId": "activity/list-repo-events",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-repository-events"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "events"
},
"slug": "list-repository-events",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "events",
"subcategoryLabel": "Events",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/forks",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "sort",
"description": "The sort order. Can be either `newest`, `oldest`, or `stargazers`.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"newest",
"oldest",
"stargazers",
"watchers"
],
"default": "newest"
},
"descriptionHTML": "The sort order. Can be either newest, oldest, or stargazers.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/forks", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/forks"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/forks', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/forks', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List forks",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/list-forks",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-forks"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "forks"
},
"slug": "list-forks",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "forks",
"subcategoryLabel": "Forks",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": true,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"delete_branch_on_merge\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"spdx_id\": \"MIT\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n }\n }\n]\n"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Bad Request"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/forks",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/forks \\\n -d '{\"organization\":\"organization\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/forks \\\n -d '{\"organization\":\"organization\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/forks', {\n owner: 'octocat',\n repo: 'hello-world',\n organization: 'organization'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/forks', {\n owner: 'octocat',\n repo: 'hello-world',\n organization: 'organization'\n})\n"
}
],
"summary": "Create a fork",
"description": "Create a fork for the authenticated user.\n\n**Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api).",
"tags": [
"repos"
],
"operationId": "repos/create-fork",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-a-fork"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"nullable": true,
"properties": {
"organization": {
"type": "string",
"description": "Optional parameter to specify the organization name if forking into an organization.
", "name": "organization", "in": "body", "rawType": "string", "rawDescription": "Optional parameter to specify the organization name if forking into an organization.", "childParamsGroups": [] } } } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "repos", "subcategory": "forks" }, "slug": "create-a-fork", "category": "repos", "categoryLabel": "Repos", "subcategory": "forks", "subcategoryLabel": "Forks", "contentType": "application/json", "notes": [], "descriptionHTML": "Create a fork for the authenticated user.
\nNote: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact GitHub Support.
", "bodyParameters": [ { "type": "string", "description": "Optional parameter to specify the organization name if forking into an organization.
", "name": "organization", "in": "body", "rawType": "string", "rawDescription": "Optional parameter to specify the organization name if forking into an organization.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "202", "httpStatusMessage": "Accepted", "description": "Response", "payload": "{\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"language\": null,\n \"forks_count\": 9,\n \"forks\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"open_issues\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"pull\": true,\n \"push\": false,\n \"admin\": false\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n },\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"allow_forking\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"organization\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"Organization\",\n \"site_admin\": false\n },\n \"parent\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n },\n \"source\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n}\n"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Bad Request"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/git/blobs",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/blobs \\\n -d '{\"content\":\"content\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/blobs \\\n -d '{\"content\":\"content\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/git/blobs', {\n owner: 'octocat',\n repo: 'hello-world',\n content: 'content'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/git/blobs', {\n owner: 'octocat',\n repo: 'hello-world',\n content: 'content'\n})\n"
}
],
"summary": "Create a blob",
"description": "",
"tags": [
"git"
],
"operationId": "git/create-blob",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/git#create-a-blob"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "Required. The new blob's content.
", "name": "content", "in": "body", "rawType": "string", "rawDescription": "The new blob's content.", "childParamsGroups": [] }, "encoding": { "type": "string", "description": "The encoding used for content. Currently, \"utf-8\" and \"base64\" are supported.
Required. The new blob's content.
", "name": "content", "in": "body", "rawType": "string", "rawDescription": "The new blob's content.", "childParamsGroups": [] }, { "type": "string", "description": "The encoding used for content. Currently, \"utf-8\" and \"base64\" are supported.
{\n \"url\": \"https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\",\n \"sha\": \"3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "409",
"httpStatusMessage": "Conflict",
"description": "Conflict"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/git/blobs/{file_sha}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "file_sha",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/blobs/FILE_SHA",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/blobs/FILE_SHA"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/git/blobs/{file_sha}', {\n owner: 'octocat',\n repo: 'hello-world',\n file_sha: 'file_sha'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/git/blobs/{file_sha}', {\n owner: 'octocat',\n repo: 'hello-world',\n file_sha: 'file_sha'\n})\n"
}
],
"summary": "Get a blob",
"description": "The `content` in the response will always be Base64 encoded.\n\n_Note_: This API supports blobs up to 100 megabytes in size.",
"tags": [
"git"
],
"operationId": "git/get-blob",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/git#get-a-blob"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "git",
"subcategory": "blobs"
},
"slug": "get-a-blob",
"category": "git",
"categoryLabel": "Git",
"subcategory": "blobs",
"subcategoryLabel": "Blobs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "The content in the response will always be Base64 encoded.
Note: This API supports blobs up to 100 megabytes in size.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"content\": \"Q29udGVudCBvZiB0aGUgYmxvYg==\",\n \"encoding\": \"base64\",\n \"url\": \"https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\",\n \"sha\": \"3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\",\n \"size\": 19,\n \"node_id\": \"Q29udGVudCBvZiB0aGUgYmxvYg==\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/git/commits",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/commits \\\n -d '{\"message\":\"message\",\"tree\":\"tree\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/commits \\\n -d '{\"message\":\"message\",\"tree\":\"tree\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/git/commits', {\n owner: 'octocat',\n repo: 'hello-world',\n message: 'message',\n tree: 'tree'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/git/commits', {\n owner: 'octocat',\n repo: 'hello-world',\n message: 'message',\n tree: 'tree'\n})\n"
}
],
"summary": "Create a commit",
"description": "Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects).\n\n**Signature verification object**\n\nThe response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:\n\n| Name | Type | Description |\n| ---- | ---- | ----------- |\n| `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |\n| `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |\n| `signature` | `string` | The signature that was extracted from the commit. |\n| `payload` | `string` | The value that was signed. |\n\nThese are the possible values for `reason` in the `verification` object:\n\n| Value | Description |\n| ----- | ----------- |\n| `expired_key` | The key that made the signature is expired. |\n| `not_signing_key` | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |\n| `gpgverify_error` | There was an error communicating with the signature verification service. |\n| `gpgverify_unavailable` | The signature verification service is currently unavailable. |\n| `unsigned` | The object does not include a signature. |\n| `unknown_signature_type` | A non-PGP signature was found in the commit. |\n| `no_user` | No user was associated with the `committer` email address in the commit. |\n| `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |\n| `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |\n| `unknown_key` | The key that made the signature has not been registered with any user's account. |\n| `malformed_signature` | There was an error parsing the signature. |\n| `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |\n| `valid` | None of the above errors applied, so the signature is considered to be verified. |",
"tags": [
"git"
],
"operationId": "git/create-commit",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/git#create-a-commit"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Required. The commit message
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "The commit message", "childParamsGroups": [] }, "tree": { "type": "string", "description": "Required. The SHA of the tree object this commit points to
", "name": "tree", "in": "body", "rawType": "string", "rawDescription": "The SHA of the tree object this commit points to", "childParamsGroups": [] }, "parents": { "type": "array of strings", "description": "The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided.
", "items": { "type": "string" }, "name": "parents", "in": "body", "rawType": "array", "rawDescription": "The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided.", "childParamsGroups": [] }, "author": { "type": "object", "description": "Information about the author of the commit. By default, the author will be the authenticated user and the current date. See the author and committer object below for details.
Required. The name of the author (or committer) of the commit
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author (or committer) of the commit", "childParamsGroups": [] }, "email": { "type": "string", "description": "Required. The email of the author (or committer) of the commit
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author (or committer) of the commit", "childParamsGroups": [] }, "date": { "type": "string", "format": "date-time", "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Required. The name of the author (or committer) of the commit
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author (or committer) of the commit", "childParamsGroups": [] }, { "type": "string", "description": "Required. The email of the author (or committer) of the commit
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author (or committer) of the commit", "childParamsGroups": [] }, { "type": "string", "format": "date-time", "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Information about the person who is making the commit. By default, committer will use the information set in author. See the author and committer object below for details.
The name of the author (or committer) of the commit
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author (or committer) of the commit", "childParamsGroups": [] }, "email": { "type": "string", "description": "The email of the author (or committer) of the commit
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author (or committer) of the commit", "childParamsGroups": [] }, "date": { "type": "string", "format": "date-time", "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The name of the author (or committer) of the commit
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author (or committer) of the commit", "childParamsGroups": [] }, { "type": "string", "description": "The email of the author (or committer) of the commit
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author (or committer) of the commit", "childParamsGroups": [] }, { "type": "string", "format": "date-time", "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The PGP signature of the commit. GitHub adds the signature to the gpgsig header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a signature parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to use the command line to create signed commits.
Creates a new Git commit object.
\nSignature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description |
|---|---|---|
verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. |
reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. |
signature | string | The signature that was extracted from the commit. |
payload | string | The value that was signed. |
These are the possible values for reason in the verification object:
| Value | Description |
|---|---|
expired_key | The key that made the signature is expired. |
not_signing_key | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |
gpgverify_error | There was an error communicating with the signature verification service. |
gpgverify_unavailable | The signature verification service is currently unavailable. |
unsigned | The object does not include a signature. |
unknown_signature_type | A non-PGP signature was found in the commit. |
no_user | No user was associated with the committer email address in the commit. |
unverified_email | The committer email address in the commit was associated with a user, but the email address is not verified on her/his account. |
bad_email | The committer email address in the commit is not included in the identities of the PGP key that made the signature. |
unknown_key | The key that made the signature has not been registered with any user's account. |
malformed_signature | There was an error parsing the signature. |
invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
valid | None of the above errors applied, so the signature is considered to be verified. |
{\n \"sha\": \"7638417db6d59f3c431d3e1f261cc637155684cd\",\n \"node_id\": \"MDY6Q29tbWl0NzYzODQxN2RiNmQ1OWYzYzQzMWQzZTFmMjYxY2M2MzcxNTU2ODRjZA==\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\",\n \"author\": {\n \"date\": \"2014-11-07T22:01:45Z\",\n \"name\": \"Monalisa Octocat\",\n \"email\": \"octocat@github.com\"\n },\n \"committer\": {\n \"date\": \"2014-11-07T22:01:45Z\",\n \"name\": \"Monalisa Octocat\",\n \"email\": \"octocat@github.com\"\n },\n \"message\": \"my commit message\",\n \"tree\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/827efc6d56897b048c772eb4087f854f46256132\",\n \"sha\": \"827efc6d56897b048c772eb4087f854f46256132\"\n },\n \"parents\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7d1b31e74ee336d15cbd21741bc88a537ed063a0\",\n \"sha\": \"7d1b31e74ee336d15cbd21741bc88a537ed063a0\",\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/7d1b31e74ee336d15cbd21741bc88a537ed063a0\"\n }\n ],\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n },\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"type": "string",
"description": "Required. The commit message
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "The commit message", "childParamsGroups": [] }, { "type": "string", "description": "Required. The SHA of the tree object this commit points to
", "name": "tree", "in": "body", "rawType": "string", "rawDescription": "The SHA of the tree object this commit points to", "childParamsGroups": [] }, { "type": "array of strings", "description": "The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided.
", "items": { "type": "string" }, "name": "parents", "in": "body", "rawType": "array", "rawDescription": "The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided.", "childParamsGroups": [] }, { "type": "object", "description": "Information about the author of the commit. By default, the author will be the authenticated user and the current date. See the author and committer object below for details.
Required. The name of the author (or committer) of the commit
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author (or committer) of the commit", "childParamsGroups": [] }, "email": { "type": "string", "description": "Required. The email of the author (or committer) of the commit
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author (or committer) of the commit", "childParamsGroups": [] }, "date": { "type": "string", "format": "date-time", "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Required. The name of the author (or committer) of the commit
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author (or committer) of the commit", "childParamsGroups": [] }, { "type": "string", "description": "Required. The email of the author (or committer) of the commit
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author (or committer) of the commit", "childParamsGroups": [] }, { "type": "string", "format": "date-time", "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Information about the person who is making the commit. By default, committer will use the information set in author. See the author and committer object below for details.
The name of the author (or committer) of the commit
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author (or committer) of the commit", "childParamsGroups": [] }, "email": { "type": "string", "description": "The email of the author (or committer) of the commit
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author (or committer) of the commit", "childParamsGroups": [] }, "date": { "type": "string", "format": "date-time", "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The name of the author (or committer) of the commit
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author (or committer) of the commit", "childParamsGroups": [] }, { "type": "string", "description": "The email of the author (or committer) of the commit
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author (or committer) of the commit", "childParamsGroups": [] }, { "type": "string", "format": "date-time", "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The PGP signature of the commit. GitHub adds the signature to the gpgsig header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a signature parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to use the command line to create signed commits.
commit_sha parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/commits/COMMIT_SHA", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/commits/COMMIT_SHA"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/git/commits/{commit_sha}', {\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/git/commits/{commit_sha}', {\n owner: 'octocat',\n repo: 'hello-world',\n commit_sha: 'commit_sha'\n})\n"
}
],
"summary": "Get a commit",
"description": "Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects).\n\n**Signature verification object**\n\nThe response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:\n\n| Name | Type | Description |\n| ---- | ---- | ----------- |\n| `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |\n| `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |\n| `signature` | `string` | The signature that was extracted from the commit. |\n| `payload` | `string` | The value that was signed. |\n\nThese are the possible values for `reason` in the `verification` object:\n\n| Value | Description |\n| ----- | ----------- |\n| `expired_key` | The key that made the signature is expired. |\n| `not_signing_key` | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |\n| `gpgverify_error` | There was an error communicating with the signature verification service. |\n| `gpgverify_unavailable` | The signature verification service is currently unavailable. |\n| `unsigned` | The object does not include a signature. |\n| `unknown_signature_type` | A non-PGP signature was found in the commit. |\n| `no_user` | No user was associated with the `committer` email address in the commit. |\n| `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |\n| `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |\n| `unknown_key` | The key that made the signature has not been registered with any user's account. |\n| `malformed_signature` | There was an error parsing the signature. |\n| `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |\n| `valid` | None of the above errors applied, so the signature is considered to be verified. |",
"tags": [
"git"
],
"operationId": "git/get-commit",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/git#get-a-commit"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "git",
"subcategory": "commits"
},
"slug": "get-a-commit",
"category": "git",
"categoryLabel": "Git",
"subcategory": "commits",
"subcategoryLabel": "Commits",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a Git commit object.
\nSignature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description |
|---|---|---|
verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. |
reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. |
signature | string | The signature that was extracted from the commit. |
payload | string | The value that was signed. |
These are the possible values for reason in the verification object:
| Value | Description |
|---|---|
expired_key | The key that made the signature is expired. |
not_signing_key | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |
gpgverify_error | There was an error communicating with the signature verification service. |
gpgverify_unavailable | The signature verification service is currently unavailable. |
unsigned | The object does not include a signature. |
unknown_signature_type | A non-PGP signature was found in the commit. |
no_user | No user was associated with the committer email address in the commit. |
unverified_email | The committer email address in the commit was associated with a user, but the email address is not verified on her/his account. |
bad_email | The committer email address in the commit is not included in the identities of the PGP key that made the signature. |
unknown_key | The key that made the signature has not been registered with any user's account. |
malformed_signature | There was an error parsing the signature. |
invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
valid | None of the above errors applied, so the signature is considered to be verified. |
{\n \"sha\": \"7638417db6d59f3c431d3e1f261cc637155684cd\",\n \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\",\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd\",\n \"author\": {\n \"date\": \"2014-11-07T22:01:45Z\",\n \"name\": \"Monalisa Octocat\",\n \"email\": \"octocat@github.com\"\n },\n \"committer\": {\n \"date\": \"2014-11-07T22:01:45Z\",\n \"name\": \"Monalisa Octocat\",\n \"email\": \"octocat@github.com\"\n },\n \"message\": \"added readme, because im a good github citizen\",\n \"tree\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb\",\n \"sha\": \"691272480426f78a0138979dd3ce63b77f706feb\"\n },\n \"parents\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5\",\n \"sha\": \"1acc419d4d6a9ce985db7be48c6349a0475975b5\",\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd\"\n }\n ],\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/git/matching-refs/{ref}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "ref",
"description": "ref parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "ref parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/matching-refs/REF", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/matching-refs/REF"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/git/matching-refs/{ref}', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/git/matching-refs/{ref}', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})\n"
}
],
"summary": "List matching references",
"description": "Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/Returns an array of references from your Git database that match the supplied name. The :ref in the URL must be formatted as heads/<branch name> for branches and tags/<tag name> for tags. If the :ref doesn't exist in the repository, but existing refs start with :ref, they will be returned as an array.
When you use this endpoint without providing a :ref, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just heads and tags.
Note: You need to explicitly request a pull request to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see \"Checking mergeability of pull requests\".
\nIf you request matching references for a branch named feature but the branch feature doesn't exist, the response can still include other matching head refs that start with the word feature, such as featureA and featureB.
[\n {\n \"ref\": \"refs/heads/feature-a\",\n \"node_id\": \"MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlLWE=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/feature-a\",\n \"object\": {\n \"type\": \"commit\",\n \"sha\": \"aa218f56b14c9653891f9e74264a383fa43fefbd\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd\"\n }\n },\n {\n \"ref\": \"refs/heads/feature-b\",\n \"node_id\": \"MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlLWI=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/feature-b\",\n \"object\": {\n \"type\": \"commit\",\n \"sha\": \"612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac\"\n }\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/git/ref/{ref}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "ref",
"description": "ref parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "ref parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/ref/REF", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/ref/REF"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/git/ref/{ref}', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/git/ref/{ref}', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})\n"
}
],
"summary": "Get a reference",
"description": "Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/Returns a single reference from your Git database. The :ref in the URL must be formatted as heads/<branch name> for branches and tags/<tag name> for tags. If the :ref doesn't match an existing ref, a 404 is returned.
Note: You need to explicitly request a pull request to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see \"Checking mergeability of pull requests\".
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"ref\": \"refs/heads/featureA\",\n \"node_id\": \"MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlQQ==\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA\",\n \"object\": {\n \"type\": \"commit\",\n \"sha\": \"aa218f56b14c9653891f9e74264a383fa43fefbd\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd\"\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/git/refs",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/refs \\\n -d '{\"ref\":\"ref\",\"sha\":\"sha\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/refs \\\n -d '{\"ref\":\"ref\",\"sha\":\"sha\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/git/refs', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref',\n sha: 'sha'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/git/refs', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref',\n sha: 'sha'\n})\n"
}
],
"summary": "Create a reference",
"description": "Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches.",
"tags": [
"git"
],
"operationId": "git/create-ref",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/git#create-a-reference"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "Required. The name of the fully qualified reference (ie: refs/heads/master). If it doesn't start with 'refs' and have at least two slashes, it will be rejected.
Required. The SHA1 value for this reference.
", "name": "sha", "in": "body", "rawType": "string", "rawDescription": "The SHA1 value for this reference.", "childParamsGroups": [] }, "key": { "type": "string", "example": "\"refs/heads/newbranch\"", "name": "key", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } }, "required": [ "ref", "sha" ] }, "example": { "ref": "refs/heads/featureA", "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "git", "subcategory": "refs" }, "slug": "create-a-reference", "category": "git", "categoryLabel": "Git", "subcategory": "refs", "subcategoryLabel": "Refs", "contentType": "application/json", "notes": [], "descriptionHTML": "Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches.
", "bodyParameters": [ { "type": "string", "description": "Required. The name of the fully qualified reference (ie: refs/heads/master). If it doesn't start with 'refs' and have at least two slashes, it will be rejected.
Required. The SHA1 value for this reference.
", "name": "sha", "in": "body", "rawType": "string", "rawDescription": "The SHA1 value for this reference.", "childParamsGroups": [] }, { "type": "string", "example": "\"refs/heads/newbranch\"", "name": "key", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"ref\": \"refs/heads/featureA\",\n \"node_id\": \"MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlQQ==\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA\",\n \"object\": {\n \"type\": \"commit\",\n \"sha\": \"aa218f56b14c9653891f9e74264a383fa43fefbd\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd\"\n }\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/git/refs/{ref}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "ref",
"description": "ref parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "ref parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/refs/REF \\\n -d '{\"sha\":\"sha\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/refs/REF \\\n -d '{\"sha\":\"sha\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/git/refs/{ref}', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref',\n sha: 'sha'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/git/refs/{ref}', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref',\n sha: 'sha'\n})\n"
}
],
"summary": "Update a reference",
"description": "",
"tags": [
"git"
],
"operationId": "git/update-ref",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/git#update-a-reference"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"sha": {
"type": "string",
"description": "Required. The SHA1 value to set this reference to
", "name": "sha", "in": "body", "rawType": "string", "rawDescription": "The SHA1 value to set this reference to", "childParamsGroups": [] }, "force": { "type": "boolean", "description": "Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to false will make sure you're not overwriting work.
Required. The SHA1 value to set this reference to
", "name": "sha", "in": "body", "rawType": "string", "rawDescription": "The SHA1 value to set this reference to", "childParamsGroups": [] }, { "type": "boolean", "description": "Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to false will make sure you're not overwriting work.
{\n \"ref\": \"refs/heads/featureA\",\n \"node_id\": \"MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlQQ==\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA\",\n \"object\": {\n \"type\": \"commit\",\n \"sha\": \"aa218f56b14c9653891f9e74264a383fa43fefbd\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd\"\n }\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/git/refs/{ref}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "ref",
"description": "ref parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "ref parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/refs/REF", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/refs/REF"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/git/refs/{ref}', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/git/refs/{ref}', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})\n"
}
],
"summary": "Delete a reference",
"description": "",
"tags": [
"git"
],
"operationId": "git/delete-ref",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/git#delete-a-reference"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "git",
"subcategory": "refs"
},
"slug": "delete-a-reference",
"category": "git",
"categoryLabel": "Git",
"subcategory": "refs",
"subcategoryLabel": "Refs",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/git/tags",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/tags \\\n -d '{\"tag\":\"tag\",\"message\":\"message\",\"object\":\"object\",\"type\":\"type\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/tags \\\n -d '{\"tag\":\"tag\",\"message\":\"message\",\"object\":\"object\",\"type\":\"type\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/git/tags', {\n owner: 'octocat',\n repo: 'hello-world',\n tag: 'tag',\n message: 'message',\n object: 'object',\n type: 'type'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/git/tags', {\n owner: 'octocat',\n repo: 'hello-world',\n tag: 'tag',\n message: 'message',\n object: 'object',\n type: 'type'\n})\n"
}
],
"summary": "Create a tag object",
"description": "Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary.\n\n**Signature verification object**\n\nThe response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:\n\n| Name | Type | Description |\n| ---- | ---- | ----------- |\n| `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |\n| `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |\n| `signature` | `string` | The signature that was extracted from the commit. |\n| `payload` | `string` | The value that was signed. |\n\nThese are the possible values for `reason` in the `verification` object:\n\n| Value | Description |\n| ----- | ----------- |\n| `expired_key` | The key that made the signature is expired. |\n| `not_signing_key` | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |\n| `gpgverify_error` | There was an error communicating with the signature verification service. |\n| `gpgverify_unavailable` | The signature verification service is currently unavailable. |\n| `unsigned` | The object does not include a signature. |\n| `unknown_signature_type` | A non-PGP signature was found in the commit. |\n| `no_user` | No user was associated with the `committer` email address in the commit. |\n| `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |\n| `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |\n| `unknown_key` | The key that made the signature has not been registered with any user's account. |\n| `malformed_signature` | There was an error parsing the signature. |\n| `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |\n| `valid` | None of the above errors applied, so the signature is considered to be verified. |",
"tags": [
"git"
],
"operationId": "git/create-tag",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/git#create-a-tag-object"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"tag": {
"type": "string",
"description": "Required. The tag's name. This is typically a version (e.g., \"v0.0.1\").
", "name": "tag", "in": "body", "rawType": "string", "rawDescription": "The tag's name. This is typically a version (e.g., \"v0.0.1\").", "childParamsGroups": [] }, "message": { "type": "string", "description": "Required. The tag message.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "The tag message.", "childParamsGroups": [] }, "object": { "type": "string", "description": "Required. The SHA of the git object this is tagging.
", "name": "object", "in": "body", "rawType": "string", "rawDescription": "The SHA of the git object this is tagging.", "childParamsGroups": [] }, "type": { "type": "string", "description": "Required. The type of the object we're tagging. Normally this is a commit but it can also be a tree or a blob.
An object with information about the individual creating the tag.
", "properties": { "name": { "type": "string", "description": "Required. The name of the author of the tag
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author of the tag", "childParamsGroups": [] }, "email": { "type": "string", "description": "Required. The email of the author of the tag
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author of the tag", "childParamsGroups": [] }, "date": { "type": "string", "format": "date-time", "description": "When this object was tagged. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Required. The name of the author of the tag
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author of the tag", "childParamsGroups": [] }, { "type": "string", "description": "Required. The email of the author of the tag
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author of the tag", "childParamsGroups": [] }, { "type": "string", "format": "date-time", "description": "When this object was tagged. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then create the refs/tags/[tag] reference. If you want to create a lightweight tag, you only have to create the tag reference - this call would be unnecessary.
Signature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description |
|---|---|---|
verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. |
reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. |
signature | string | The signature that was extracted from the commit. |
payload | string | The value that was signed. |
These are the possible values for reason in the verification object:
| Value | Description |
|---|---|
expired_key | The key that made the signature is expired. |
not_signing_key | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |
gpgverify_error | There was an error communicating with the signature verification service. |
gpgverify_unavailable | The signature verification service is currently unavailable. |
unsigned | The object does not include a signature. |
unknown_signature_type | A non-PGP signature was found in the commit. |
no_user | No user was associated with the committer email address in the commit. |
unverified_email | The committer email address in the commit was associated with a user, but the email address is not verified on her/his account. |
bad_email | The committer email address in the commit is not included in the identities of the PGP key that made the signature. |
unknown_key | The key that made the signature has not been registered with any user's account. |
malformed_signature | There was an error parsing the signature. |
invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
valid | None of the above errors applied, so the signature is considered to be verified. |
{\n \"node_id\": \"MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw==\",\n \"tag\": \"v0.0.1\",\n \"sha\": \"940bd336248efae0f9ee5bc7b2d5c985887b16ac\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac\",\n \"message\": \"initial version\",\n \"tagger\": {\n \"name\": \"Monalisa Octocat\",\n \"email\": \"octocat@github.com\",\n \"date\": \"2014-11-07T22:01:45Z\"\n },\n \"object\": {\n \"type\": \"commit\",\n \"sha\": \"c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\"\n },\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n }\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"type": "string",
"description": "Required. The tag's name. This is typically a version (e.g., \"v0.0.1\").
", "name": "tag", "in": "body", "rawType": "string", "rawDescription": "The tag's name. This is typically a version (e.g., \"v0.0.1\").", "childParamsGroups": [] }, { "type": "string", "description": "Required. The tag message.
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "The tag message.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The SHA of the git object this is tagging.
", "name": "object", "in": "body", "rawType": "string", "rawDescription": "The SHA of the git object this is tagging.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The type of the object we're tagging. Normally this is a commit but it can also be a tree or a blob.
An object with information about the individual creating the tag.
", "properties": { "name": { "type": "string", "description": "Required. The name of the author of the tag
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author of the tag", "childParamsGroups": [] }, "email": { "type": "string", "description": "Required. The email of the author of the tag
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author of the tag", "childParamsGroups": [] }, "date": { "type": "string", "format": "date-time", "description": "When this object was tagged. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Required. The name of the author of the tag
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the author of the tag", "childParamsGroups": [] }, { "type": "string", "description": "Required. The email of the author of the tag
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The email of the author of the tag", "childParamsGroups": [] }, { "type": "string", "format": "date-time", "description": "When this object was tagged. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/tags/TAG_SHA"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/git/tags/{tag_sha}', {\n owner: 'octocat',\n repo: 'hello-world',\n tag_sha: 'tag_sha'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/git/tags/{tag_sha}', {\n owner: 'octocat',\n repo: 'hello-world',\n tag_sha: 'tag_sha'\n})\n"
}
],
"summary": "Get a tag",
"description": "**Signature verification object**\n\nThe response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:\n\n| Name | Type | Description |\n| ---- | ---- | ----------- |\n| `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |\n| `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |\n| `signature` | `string` | The signature that was extracted from the commit. |\n| `payload` | `string` | The value that was signed. |\n\nThese are the possible values for `reason` in the `verification` object:\n\n| Value | Description |\n| ----- | ----------- |\n| `expired_key` | The key that made the signature is expired. |\n| `not_signing_key` | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |\n| `gpgverify_error` | There was an error communicating with the signature verification service. |\n| `gpgverify_unavailable` | The signature verification service is currently unavailable. |\n| `unsigned` | The object does not include a signature. |\n| `unknown_signature_type` | A non-PGP signature was found in the commit. |\n| `no_user` | No user was associated with the `committer` email address in the commit. |\n| `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |\n| `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |\n| `unknown_key` | The key that made the signature has not been registered with any user's account. |\n| `malformed_signature` | There was an error parsing the signature. |\n| `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |\n| `valid` | None of the above errors applied, so the signature is considered to be verified. |",
"tags": [
"git"
],
"operationId": "git/get-tag",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/git#get-a-tag"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "git",
"subcategory": "tags"
},
"slug": "get-a-tag",
"category": "git",
"categoryLabel": "Git",
"subcategory": "tags",
"subcategoryLabel": "Tags",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Signature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description |
|---|---|---|
verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. |
reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. |
signature | string | The signature that was extracted from the commit. |
payload | string | The value that was signed. |
These are the possible values for reason in the verification object:
| Value | Description |
|---|---|
expired_key | The key that made the signature is expired. |
not_signing_key | The \"signing\" flag is not among the usage flags in the GPG key that made the signature. |
gpgverify_error | There was an error communicating with the signature verification service. |
gpgverify_unavailable | The signature verification service is currently unavailable. |
unsigned | The object does not include a signature. |
unknown_signature_type | A non-PGP signature was found in the commit. |
no_user | No user was associated with the committer email address in the commit. |
unverified_email | The committer email address in the commit was associated with a user, but the email address is not verified on her/his account. |
bad_email | The committer email address in the commit is not included in the identities of the PGP key that made the signature. |
unknown_key | The key that made the signature has not been registered with any user's account. |
malformed_signature | There was an error parsing the signature. |
invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
valid | None of the above errors applied, so the signature is considered to be verified. |
{\n \"node_id\": \"MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw==\",\n \"tag\": \"v0.0.1\",\n \"sha\": \"940bd336248efae0f9ee5bc7b2d5c985887b16ac\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac\",\n \"message\": \"initial version\",\n \"tagger\": {\n \"name\": \"Monalisa Octocat\",\n \"email\": \"octocat@github.com\",\n \"date\": \"2014-11-07T22:01:45Z\"\n },\n \"object\": {\n \"type\": \"commit\",\n \"sha\": \"c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\"\n },\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/git/trees",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/trees \\\n -d '{\"tree\":[{\"path\":\"path\",\"mode\":\"mode\",\"type\":\"type\",\"sha\":\"sha\",\"content\":\"content\"}]}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/trees \\\n -d '{\"tree\":[{\"path\":\"path\",\"mode\":\"mode\",\"type\":\"type\",\"sha\":\"sha\",\"content\":\"content\"}]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/git/trees', {\n owner: 'octocat',\n repo: 'hello-world',\n tree: [\n {\n path: 'path',\n mode: 'mode',\n type: 'type',\n sha: 'sha',\n content: 'content'\n }\n ]\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/git/trees', {\n owner: 'octocat',\n repo: 'hello-world',\n tree: [\n {\n path: 'path',\n mode: 'mode',\n type: 'type',\n sha: 'sha',\n content: 'content'\n }\n ]\n})\n"
}
],
"summary": "Create a tree",
"description": "The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure.\n\nIf you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see \"[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)\" and \"[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference).\"",
"tags": [
"git"
],
"operationId": "git/create-tree",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/git#create-a-tree"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"tree": {
"type": "array of objects",
"description": "Required. Objects (of path, mode, type, and sha) specifying a tree structure.
The file referenced in the tree.
", "name": "path", "in": "body", "rawType": "string", "rawDescription": "The file referenced in the tree.", "childParamsGroups": [] }, "mode": { "type": "string", "description": "The file mode; one of 100644 for file (blob), 100755 for executable (blob), 040000 for subdirectory (tree), 160000 for submodule (commit), or 120000 for a blob that specifies the path of a symlink.
Either blob, tree, or commit.
The SHA1 checksum ID of the object in the tree. Also called tree.sha. If the value is null then the file will be deleted.
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or tree.sha.
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
The file referenced in the tree.
", "name": "path", "in": "body", "rawType": "string", "rawDescription": "The file referenced in the tree.", "childParamsGroups": [] }, { "type": "string", "description": "The file mode; one of 100644 for file (blob), 100755 for executable (blob), 040000 for subdirectory (tree), 160000 for submodule (commit), or 120000 for a blob that specifies the path of a symlink.
Either blob, tree, or commit.
The SHA1 checksum ID of the object in the tree. Also called tree.sha. If the value is null then the file will be deleted.
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or tree.sha.
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by base_tree and entries defined in the tree parameter. Entries defined in the tree parameter will overwrite items from base_tree with the same path. If you're creating new changes on a branch, then normally you'd set base_tree to the SHA1 of the Git tree object of the current latest commit on the branch you're working on.\nIf not provided, GitHub will create a new Git tree object from only the entries defined in the tree parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the tree parameter will be listed as deleted by the new commit.
The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure.
\nIf you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see \"Create a commit\" and \"Update a reference.\"
", "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"sha\": \"cd8274d15fa3ae2ab983129fb037999f264ba9a7\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7\",\n \"tree\": [\n {\n \"path\": \"file.rb\",\n \"mode\": \"100644\",\n \"type\": \"blob\",\n \"size\": 132,\n \"sha\": \"7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b\"\n }\n ],\n \"truncated\": true\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"type": "array of objects",
"description": "Required. Objects (of path, mode, type, and sha) specifying a tree structure.
The file referenced in the tree.
", "name": "path", "in": "body", "rawType": "string", "rawDescription": "The file referenced in the tree.", "childParamsGroups": [] }, "mode": { "type": "string", "description": "The file mode; one of 100644 for file (blob), 100755 for executable (blob), 040000 for subdirectory (tree), 160000 for submodule (commit), or 120000 for a blob that specifies the path of a symlink.
Either blob, tree, or commit.
The SHA1 checksum ID of the object in the tree. Also called tree.sha. If the value is null then the file will be deleted.
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or tree.sha.
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
The file referenced in the tree.
", "name": "path", "in": "body", "rawType": "string", "rawDescription": "The file referenced in the tree.", "childParamsGroups": [] }, { "type": "string", "description": "The file mode; one of 100644 for file (blob), 100755 for executable (blob), 040000 for subdirectory (tree), 160000 for submodule (commit), or 120000 for a blob that specifies the path of a symlink.
Either blob, tree, or commit.
The SHA1 checksum ID of the object in the tree. Also called tree.sha. If the value is null then the file will be deleted.
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or tree.sha.
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by base_tree and entries defined in the tree parameter. Entries defined in the tree parameter will overwrite items from base_tree with the same path. If you're creating new changes on a branch, then normally you'd set base_tree to the SHA1 of the Git tree object of the current latest commit on the branch you're working on.\nIf not provided, GitHub will create a new Git tree object from only the entries defined in the tree parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the tree parameter will be listed as deleted by the new commit.
Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in :tree_sha. For example, setting recursive to any of the following will enable returning objects or subtrees: 0, 1, \"true\", and \"false\". Omit this parameter to prevent recursively returning objects or subtrees.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/trees/TREE_SHA"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/git/trees/{tree_sha}', {\n owner: 'octocat',\n repo: 'hello-world',\n tree_sha: 'tree_sha'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/git/trees/{tree_sha}', {\n owner: 'octocat',\n repo: 'hello-world',\n tree_sha: 'tree_sha'\n})\n"
}
],
"summary": "Get a tree",
"description": "Returns a single tree using the SHA1 value for that tree.\n\nIf `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time.",
"tags": [
"git"
],
"operationId": "git/get-tree",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/git#get-a-tree"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "git",
"subcategory": "trees"
},
"slug": "get-a-tree",
"category": "git",
"categoryLabel": "Git",
"subcategory": "trees",
"subcategoryLabel": "Trees",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns a single tree using the SHA1 value for that tree.
\nIf truncated is true in the response then the number of items in the tree array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time.
{\n \"sha\": \"9fb037999f264ba9a7fc6274d15fa3ae2ab98312\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/trees/9fb037999f264ba9a7fc6274d15fa3ae2ab98312\",\n \"tree\": [\n {\n \"path\": \"file.rb\",\n \"mode\": \"100644\",\n \"type\": \"blob\",\n \"size\": 30,\n \"sha\": \"44b4fc6d56897b048c772eb4087f854f46256132\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132\"\n },\n {\n \"path\": \"subdir\",\n \"mode\": \"040000\",\n \"type\": \"tree\",\n \"sha\": \"f484d249c660418515fb01c2b9662073663c242e\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/f484d249c660418515fb01c2b9662073663c242e\"\n },\n {\n \"path\": \"exec_file\",\n \"mode\": \"100755\",\n \"type\": \"blob\",\n \"size\": 75,\n \"sha\": \"45b983be36b73c0788dc9cbcb76cbb80fc7bb057\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/45b983be36b73c0788dc9cbcb76cbb80fc7bb057\"\n }\n ],\n \"truncated\": false\n}\n"
},
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response recursively retrieving a tree",
"payload": "{\n \"sha\": \"fc6274d15fa3ae2ab983129fb037999f264ba9a7\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/trees/fc6274d15fa3ae2ab983129fb037999f264ba9a7\",\n \"tree\": [\n {\n \"path\": \"subdir/file.txt\",\n \"mode\": \"100644\",\n \"type\": \"blob\",\n \"size\": 132,\n \"sha\": \"7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b\"\n }\n ],\n \"truncated\": false\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/hooks",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/hooks', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/hooks', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List repository webhooks",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/list-webhooks",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-repository-webhooks"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "webhooks"
},
"slug": "list-repository-webhooks",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"type\": \"Repository\",\n \"id\": 12345678,\n \"name\": \"web\",\n \"active\": true,\n \"events\": [\n \"push\",\n \"pull_request\"\n ],\n \"config\": {\n \"content_type\": \"json\",\n \"insecure_ssl\": \"0\",\n \"url\": \"https://example.com/webhook\"\n },\n \"updated_at\": \"2019-06-03T00:57:16Z\",\n \"created_at\": \"2019-06-03T00:57:16Z\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678\",\n \"test_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test\",\n \"ping_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings\",\n \"deliveries_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/deliveries\",\n \"last_response\": {\n \"code\": null,\n \"status\": \"unused\",\n \"message\": null\n }\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/hooks",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks \\\n -d '{\"name\":\"name\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/hooks', {\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/hooks', {\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})\n"
}
],
"summary": "Create a repository webhook",
"description": "Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can\nshare the same `config` as long as those webhooks do not have any `events` that overlap.",
"tags": [
"repos"
],
"operationId": "repos/create-webhook",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-a-repository-webhook"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"nullable": true,
"properties": {
"name": {
"type": "string",
"description": "Use web to create a webhook. Default: web. This parameter only accepts the value web.
Key/value pairs to provide settings for this webhook. These are defined below.
", "properties": { "url": { "type": "string", "description": "The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, "content_type": { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Determines what events the hook is triggered for.
", "default": [ "push" ], "items": { "type": "string" }, "name": "events", "in": "body", "rawType": "array", "rawDescription": "Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for.", "childParamsGroups": [] }, "active": { "type": "boolean", "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
Repositories can have multiple webhooks installed. Each webhook should have a unique config. Multiple webhooks can\nshare the same config as long as those webhooks do not have any events that overlap.
{\n \"type\": \"Repository\",\n \"id\": 12345678,\n \"name\": \"web\",\n \"active\": true,\n \"events\": [\n \"push\",\n \"pull_request\"\n ],\n \"config\": {\n \"content_type\": \"json\",\n \"insecure_ssl\": \"0\",\n \"url\": \"https://example.com/webhook\"\n },\n \"updated_at\": \"2019-06-03T00:57:16Z\",\n \"created_at\": \"2019-06-03T00:57:16Z\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678\",\n \"test_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test\",\n \"ping_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings\",\n \"deliveries_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/deliveries\",\n \"last_response\": {\n \"code\": null,\n \"status\": \"unused\",\n \"message\": null\n }\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"type": "string",
"description": "Use web to create a webhook. Default: web. This parameter only accepts the value web.
Key/value pairs to provide settings for this webhook. These are defined below.
", "properties": { "url": { "type": "string", "description": "The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, "content_type": { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Determines what events the hook is triggered for.
", "default": [ "push" ], "items": { "type": "string" }, "name": "events", "in": "body", "rawType": "array", "rawDescription": "Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for.", "childParamsGroups": [] }, { "type": "boolean", "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/hooks/{hook_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/hooks/{hook_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42\n})\n"
}
],
"summary": "Get a repository webhook",
"description": "Returns a webhook configured in a repository. To get only the webhook `config` properties, see \"[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository).\"",
"tags": [
"repos"
],
"operationId": "repos/get-webhook",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-repository-webhook"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "webhooks"
},
"slug": "get-a-repository-webhook",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns a webhook configured in a repository. To get only the webhook config properties, see \"Get a webhook configuration for a repository.\"
{\n \"type\": \"Repository\",\n \"id\": 12345678,\n \"name\": \"web\",\n \"active\": true,\n \"events\": [\n \"push\",\n \"pull_request\"\n ],\n \"config\": {\n \"content_type\": \"json\",\n \"insecure_ssl\": \"0\",\n \"url\": \"https://example.com/webhook\"\n },\n \"updated_at\": \"2019-06-03T00:57:16Z\",\n \"created_at\": \"2019-06-03T00:57:16Z\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678\",\n \"test_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test\",\n \"ping_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings\",\n \"deliveries_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/deliveries\",\n \"last_response\": {\n \"code\": null,\n \"status\": \"unused\",\n \"message\": null\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/hooks/{hook_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "hook_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42 \\\n -d '{\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\",\"address\":\"address\",\"room\":\"room\"}}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42 \\\n -d '{\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\",\"address\":\"address\",\"room\":\"room\"}}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/hooks/{hook_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42,\n config: {\n url: 'url',\n content_type: 'content_type',\n secret: 'secret',\n insecure_ssl: 'insecure_ssl',\n address: 'address',\n room: 'room'\n }\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/hooks/{hook_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42,\n config: {\n url: 'url',\n content_type: 'content_type',\n secret: 'secret',\n insecure_ssl: 'insecure_ssl',\n address: 'address',\n room: 'room'\n }\n})\n"
}
],
"summary": "Update a repository webhook",
"description": "Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use \"[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository).\"",
"tags": [
"repos"
],
"operationId": "repos/update-webhook",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#update-a-repository-webhook"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"config": {
"type": "object",
"description": "Key/value pairs to provide settings for this webhook. These are defined below.
", "properties": { "url": { "type": "string", "description": "Required. The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, "content_type": { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Required. The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Determines what events the hook is triggered for. This replaces the entire array of events.
", "default": [ "push" ], "items": { "type": "string" }, "name": "events", "in": "body", "rawType": "array", "rawDescription": "Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events.", "childParamsGroups": [] }, "add_events": { "type": "array of strings", "description": "Determines a list of events to be added to the list of events that the Hook triggers for.
", "items": { "type": "string" }, "name": "add_events", "in": "body", "rawType": "array", "rawDescription": "Determines a list of events to be added to the list of events that the Hook triggers for.", "childParamsGroups": [] }, "remove_events": { "type": "array of strings", "description": "Determines a list of events to be removed from the list of events that the Hook triggers for.
", "items": { "type": "string" }, "name": "remove_events", "in": "body", "rawType": "array", "rawDescription": "Determines a list of events to be removed from the list of events that the Hook triggers for.", "childParamsGroups": [] }, "active": { "type": "boolean", "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
Updates a webhook configured in a repository. If you previously had a secret set, you must provide the same secret or set a new secret or the secret will be removed. If you are only updating individual webhook config properties, use \"Update a webhook configuration for a repository.\"
{\n \"type\": \"Repository\",\n \"id\": 12345678,\n \"name\": \"web\",\n \"active\": true,\n \"events\": [\n \"push\",\n \"pull_request\"\n ],\n \"config\": {\n \"content_type\": \"json\",\n \"insecure_ssl\": \"0\",\n \"url\": \"https://example.com/webhook\"\n },\n \"updated_at\": \"2019-06-03T00:57:16Z\",\n \"created_at\": \"2019-06-03T00:57:16Z\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678\",\n \"test_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test\",\n \"ping_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings\",\n \"deliveries_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/deliveries\",\n \"last_response\": {\n \"code\": null,\n \"status\": \"unused\",\n \"message\": null\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"type": "object",
"description": "Key/value pairs to provide settings for this webhook. These are defined below.
", "properties": { "url": { "type": "string", "description": "Required. The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, "content_type": { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Required. The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Determines what events the hook is triggered for. This replaces the entire array of events.
", "default": [ "push" ], "items": { "type": "string" }, "name": "events", "in": "body", "rawType": "array", "rawDescription": "Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events.", "childParamsGroups": [] }, { "type": "array of strings", "description": "Determines a list of events to be added to the list of events that the Hook triggers for.
", "items": { "type": "string" }, "name": "add_events", "in": "body", "rawType": "array", "rawDescription": "Determines a list of events to be added to the list of events that the Hook triggers for.", "childParamsGroups": [] }, { "type": "array of strings", "description": "Determines a list of events to be removed from the list of events that the Hook triggers for.
", "items": { "type": "string" }, "name": "remove_events", "in": "body", "rawType": "array", "rawDescription": "Determines a list of events to be removed from the list of events that the Hook triggers for.", "childParamsGroups": [] }, { "type": "boolean", "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/hooks/{hook_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/hooks/{hook_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42\n})\n"
}
],
"summary": "Delete a repository webhook",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/delete-webhook",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-a-repository-webhook"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "webhooks"
},
"slug": "delete-a-repository-webhook",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/hooks/{hook_id}/config",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "hook_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/config",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/config"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/hooks/{hook_id}/config', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/hooks/{hook_id}/config', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42\n})\n"
}
],
"summary": "Get a webhook configuration for a repository",
"description": "Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use \"[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook).\"\n\nAccess tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission.",
"tags": [
"repos"
],
"operationId": "repos/get-webhook-config-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-webhook-configuration-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "webhooks"
},
"slug": "get-a-webhook-configuration-for-a-repository",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns the webhook configuration for a repository. To get more information about the webhook, including the active state and events, use \"Get a repository webhook.\"
Access tokens must have the read:repo_hook or repo scope, and GitHub Apps must have the repository_hooks:read permission.
{\n \"content_type\": \"json\",\n \"insecure_ssl\": \"0\",\n \"secret\": \"********\",\n \"url\": \"https://example.com/webhook\"\n}\n"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/hooks/{hook_id}/config",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "hook_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/config \\\n -d '{\"url\":\"url\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/config \\\n -d '{\"url\":\"url\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42,\n url: 'url'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42,\n url: 'url'\n})\n"
}
],
"summary": "Update a webhook configuration for a repository",
"description": "Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use \"[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook).\"\n\nAccess tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission.",
"tags": [
"repos"
],
"operationId": "repos/update-webhook-config-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#update-a-webhook-configuration-for-a-repository"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"url": {
"type": "string",
"description": "The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, "content_type": { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Updates the webhook configuration for a repository. To update more information about the webhook, including the active state and events, use \"Update a repository webhook.\"
Access tokens must have the write:repo_hook or repo scope, and GitHub Apps must have the repository_hooks:write permission.
{\n \"content_type\": \"json\",\n \"insecure_ssl\": \"0\",\n \"secret\": \"********\",\n \"url\": \"https://example.com/webhook\"\n}\n"
}
],
"bodyParameters": [
{
"type": "string",
"description": "The URL to which the payloads will be delivered.
", "example": "https://example.com/webhook", "format": "uri", "name": "url", "in": "body", "rawType": "string", "rawDescription": "The URL to which the payloads will be delivered.", "childParamsGroups": [] }, { "type": "string", "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.
Results per page (max 100)
" }, { "name": "cursor", "description": "Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors.", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the link header for the next and previous page cursors.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/deliveries"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42\n})\n"
}
],
"summary": "List deliveries for a repository webhook",
"description": "Returns a list of webhook deliveries for a webhook configured in a repository.",
"tags": [
"repos"
],
"operationId": "repos/list-webhook-deliveries",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-deliveries-for-a-repository-webhook"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "webhooks"
},
"slug": "list-deliveries-for-a-repository-webhook",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns a list of webhook deliveries for a webhook configured in a repository.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 12345678,\n \"guid\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"delivered_at\": \"2019-06-03T00:57:16Z\",\n \"redelivery\": false,\n \"duration\": 0.27,\n \"status\": \"OK\",\n \"status_code\": 200,\n \"event\": \"issues\",\n \"action\": \"opened\",\n \"installation_id\": 123,\n \"repository_id\": 456\n },\n {\n \"id\": 123456789,\n \"guid\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"delivered_at\": \"2019-06-04T00:57:16Z\",\n \"redelivery\": true,\n \"duration\": 0.28,\n \"status\": \"OK\",\n \"status_code\": 200,\n \"event\": \"issues\",\n \"action\": \"opened\",\n \"installation_id\": 123,\n \"repository_id\": 456\n }\n]\n"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Bad Request"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "hook_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "delivery_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/deliveries/42",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/deliveries/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42,\n delivery_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42,\n delivery_id: 42\n})\n"
}
],
"summary": "Get a delivery for a repository webhook",
"description": "Returns a delivery for a webhook configured in a repository.",
"tags": [
"repos"
],
"operationId": "repos/get-webhook-delivery",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-delivery-for-a-repository-webhook"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "webhooks"
},
"slug": "get-a-delivery-for-a-repository-webhook",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns a delivery for a webhook configured in a repository.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 12345678,\n \"guid\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"delivered_at\": \"2019-06-03T00:57:16Z\",\n \"redelivery\": false,\n \"duration\": 0.27,\n \"status\": \"OK\",\n \"status_code\": 200,\n \"event\": \"issues\",\n \"action\": \"opened\",\n \"installation_id\": 123,\n \"repository_id\": 456,\n \"url\": \"https://www.example.com\",\n \"request\": {\n \"headers\": {\n \"X-GitHub-Delivery\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"X-Hub-Signature-256\": \"sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"Accept\": \"*/*\",\n \"X-GitHub-Hook-ID\": \"42\",\n \"User-Agent\": \"GitHub-Hookshot/b8c71d8\",\n \"X-GitHub-Event\": \"issues\",\n \"X-GitHub-Hook-Installation-Target-ID\": \"123\",\n \"X-GitHub-Hook-Installation-Target-Type\": \"repository\",\n \"content-type\": \"application/json\",\n \"X-Hub-Signature\": \"sha1=a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\"\n },\n \"payload\": {\n \"action\": \"opened\",\n \"issue\": {\n \"body\": \"foo\"\n },\n \"repository\": {\n \"id\": 123\n }\n }\n },\n \"response\": {\n \"headers\": {\n \"Content-Type\": \"text/html;charset=utf-8\"\n },\n \"payload\": \"ok\"\n }\n}\n"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Bad Request"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "hook_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "delivery_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/deliveries/42/attempts",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/deliveries/42/attempts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42,\n delivery_id: 42\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42,\n delivery_id: 42\n})\n"
}
],
"summary": "Redeliver a delivery for a repository webhook",
"description": "Redeliver a webhook delivery for a webhook configured in a repository.",
"tags": [
"repos"
],
"operationId": "repos/redeliver-webhook-delivery",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#redeliver-a-delivery-for-a-repository-webhook"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "webhooks"
},
"slug": "redeliver-a-delivery-for-a-repository-webhook",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"responses": [
{
"httpStatusCode": "202",
"httpStatusMessage": "Accepted",
"description": "Accepted"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Bad Request"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [],
"descriptionHTML": "Redeliver a webhook delivery for a webhook configured in a repository.
" }, { "verb": "post", "requestPath": "/repos/{owner}/{repo}/hooks/{hook_id}/pings", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "hook_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/pings", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/pings"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/hooks/{hook_id}/pings', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/hooks/{hook_id}/pings', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42\n})\n"
}
],
"summary": "Ping a repository webhook",
"description": "This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook.",
"tags": [
"repos"
],
"operationId": "repos/ping-webhook",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#ping-a-repository-webhook"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "webhooks"
},
"slug": "ping-a-repository-webhook",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "This will trigger a ping event to be sent to the hook.
" }, { "verb": "post", "requestPath": "/repos/{owner}/{repo}/hooks/{hook_id}/tests", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "hook_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/tests", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/tests"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/hooks/{hook_id}/tests', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/hooks/{hook_id}/tests', {\n owner: 'octocat',\n repo: 'hello-world',\n hook_id: 42\n})\n"
}
],
"summary": "Test the push repository webhook",
"description": "This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated.\n\n**Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test`",
"tags": [
"repos"
],
"operationId": "repos/test-push-webhook",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#test-the-push-repository-webhook"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "webhooks"
},
"slug": "test-the-push-repository-webhook",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "webhooks",
"subcategoryLabel": "Webhooks",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "This will trigger the hook with the latest push to the current repository if the hook is subscribed to push events. If the hook is not subscribed to push events, the server will respond with 204 but no test POST will be generated.
Note: Previously /repos/:owner/:repo/hooks/:hook_id/test
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/import', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/import', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get an import status",
"description": "View the progress of an import.\n\n**Import status**\n\nThis section includes details about the possible values of the `status` field of the Import Progress response.\n\nAn import that does not have errors will progress through these steps:\n\n* `detecting` - the \"detection\" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL.\n* `importing` - the \"raw\" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import).\n* `mapping` - the \"rewrite\" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information.\n* `pushing` - the \"push\" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is \"Writing objects\".\n* `complete` - the import is complete, and the repository is ready on GitHub.\n\nIf there are problems, you will see one of these in the `status` field:\n\n* `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section.\n* `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information.\n* `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section.\n* `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL.\n* `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section.\n\n**The project_choices field**\n\nWhen multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type.\n\n**Git LFS related fields**\n\nThis section includes details about Git LFS related fields that may be present in the Import Progress response.\n\n* `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken.\n* `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step.\n* `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository.\n* `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a \"Get Large Files\" request.",
"tags": [
"migrations"
],
"operationId": "migrations/get-import-status",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#get-an-import-status"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "migrations",
"subcategory": "source-imports"
},
"slug": "get-an-import-status",
"category": "migrations",
"categoryLabel": "Migrations",
"subcategory": "source-imports",
"subcategoryLabel": "Source imports",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "View the progress of an import.
\nImport status
\nThis section includes details about the possible values of the status field of the Import Progress response.
An import that does not have errors will progress through these steps:
\ndetecting - the \"detection\" step of the import is in progress because the request did not include a vcs parameter. The import is identifying the type of source control present at the URL.importing - the \"raw\" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include commit_count (the total number of raw commits that will be imported) and percent (0 - 100, the current progress through the import).mapping - the \"rewrite\" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information.pushing - the \"push\" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include push_percent, which is the percent value reported by git push when it is \"Writing objects\".complete - the import is complete, and the repository is ready on GitHub.If there are problems, you will see one of these in the status field:
auth_failed - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the Update an import section.error - the import encountered an error. The import progress response will include the failed_step and an error message. Contact GitHub Support for more information.detection_needs_auth - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the Update an import section.detection_found_nothing - the importer didn't recognize any source control at the URL. To resolve, Cancel the import and retry with the correct URL.detection_found_multiple - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a project_choices field with the possible project choices as values. To update project choice, please see the Update an import section.The project_choices field
\nWhen multiple projects are found at the provided URL, the response hash will include a project_choices field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type.
Git LFS related fields
\nThis section includes details about Git LFS related fields that may be present in the Import Progress response.
\nuse_lfs - describes whether the import has been opted in or out of using Git LFS. The value can be opt_in, opt_out, or undecided if no action has been taken.has_large_files - the boolean value describing whether files larger than 100MB were found during the importing step.large_files_size - the total size in gigabytes of files larger than 100MB found in the originating repository.large_files_count - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a \"Get Large Files\" request.{\n \"vcs\": \"subversion\",\n \"use_lfs\": true,\n \"vcs_url\": \"http://svn.mycompany.com/svn/myproject\",\n \"status\": \"complete\",\n \"status_text\": \"Done\",\n \"has_large_files\": true,\n \"large_files_size\": 132331036,\n \"large_files_count\": 1,\n \"authors_count\": 4,\n \"url\": \"https://api.github.com/repos/octocat/socm/import\",\n \"html_url\": \"https://import.github.com/octocat/socm/import\",\n \"authors_url\": \"https://api.github.com/repos/octocat/socm/import/authors\",\n \"repository_url\": \"https://api.github.com/repos/octocat/socm\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/import",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import \\\n -d '{\"vcs_url\":\"vcs_url\"}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import \\\n -d '{\"vcs_url\":\"vcs_url\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/import', {\n owner: 'octocat',\n repo: 'hello-world',\n vcs_url: 'vcs_url'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/import', {\n owner: 'octocat',\n repo: 'hello-world',\n vcs_url: 'vcs_url'\n})\n"
}
],
"summary": "Start an import",
"description": "Start a source import to a GitHub repository using GitHub Importer.",
"tags": [
"migrations"
],
"operationId": "migrations/start-import",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#start-an-import"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"vcs_url": {
"type": "string",
"description": "Required. The URL of the originating repository.
", "name": "vcs_url", "in": "body", "rawType": "string", "rawDescription": "The URL of the originating repository.", "childParamsGroups": [] }, "vcs": { "type": "string", "description": "The originating VCS type. Can be one of subversion, git, mercurial, or tfvc. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response.
If authentication is required, the username to provide to vcs_url.
If authentication is required, the password to provide to vcs_url.
For a tfvc import, the name of the project that is being imported.
", "name": "tfvc_project", "in": "body", "rawType": "string", "rawDescription": "For a tfvc import, the name of the project that is being imported.", "childParamsGroups": [] } }, "required": [ "vcs_url" ] }, "example": { "vcs": "subversion", "vcs_url": "http://svn.mycompany.com/svn/myproject", "vcs_username": "octocat", "vcs_password": "secret" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "migrations", "subcategory": "source-imports" }, "slug": "start-an-import", "category": "migrations", "categoryLabel": "Migrations", "subcategory": "source-imports", "subcategoryLabel": "Source imports", "contentType": "application/json", "notes": [], "descriptionHTML": "Start a source import to a GitHub repository using GitHub Importer.
", "bodyParameters": [ { "type": "string", "description": "Required. The URL of the originating repository.
", "name": "vcs_url", "in": "body", "rawType": "string", "rawDescription": "The URL of the originating repository.", "childParamsGroups": [] }, { "type": "string", "description": "The originating VCS type. Can be one of subversion, git, mercurial, or tfvc. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response.
If authentication is required, the username to provide to vcs_url.
If authentication is required, the password to provide to vcs_url.
For a tfvc import, the name of the project that is being imported.
", "name": "tfvc_project", "in": "body", "rawType": "string", "rawDescription": "For a tfvc import, the name of the project that is being imported.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"vcs\": \"subversion\",\n \"use_lfs\": true,\n \"vcs_url\": \"http://svn.mycompany.com/svn/myproject\",\n \"status\": \"importing\",\n \"status_text\": \"Importing...\",\n \"has_large_files\": false,\n \"large_files_size\": 0,\n \"large_files_count\": 0,\n \"authors_count\": 0,\n \"commit_count\": 1042,\n \"url\": \"https://api.github.com/repos/octocat/socm/import\",\n \"html_url\": \"https://import.github.com/octocat/socm/import\",\n \"authors_url\": \"https://api.github.com/repos/octocat/socm/import/authors\",\n \"repository_url\": \"https://api.github.com/repos/octocat/socm\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/import",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import \\\n -d '{\"vcs_username\":\"vcs_username\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import \\\n -d '{\"vcs_username\":\"vcs_username\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/import', {\n owner: 'octocat',\n repo: 'hello-world',\n vcs_username: 'vcs_username'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/import', {\n owner: 'octocat',\n repo: 'hello-world',\n vcs_username: 'vcs_username'\n})\n"
}
],
"summary": "Update an import",
"description": "An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API\nrequest. If no parameters are provided, the import will be restarted.",
"tags": [
"migrations"
],
"operationId": "migrations/update-import",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#update-an-import"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"vcs_username": {
"type": "string",
"description": "The username to provide to the originating repository.
", "name": "vcs_username", "in": "body", "rawType": "string", "rawDescription": "The username to provide to the originating repository.", "childParamsGroups": [] }, "vcs_password": { "type": "string", "description": "The password to provide to the originating repository.
", "name": "vcs_password", "in": "body", "rawType": "string", "rawDescription": "The password to provide to the originating repository.", "childParamsGroups": [] }, "vcs": { "type": "string", "example": "\"git\"", "name": "vcs", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, "tfvc_project": { "type": "string", "example": "\"project1\"", "name": "tfvc_project", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } }, "nullable": true }, "examples": { "example-1": { "summary": "Example 1", "value": { "vcs_username": "octocat", "vcs_password": "secret" } } } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "migrations", "subcategory": "source-imports" }, "slug": "update-an-import", "category": "migrations", "categoryLabel": "Migrations", "subcategory": "source-imports", "subcategoryLabel": "Source imports", "contentType": "application/json", "notes": [], "descriptionHTML": "An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API\nrequest. If no parameters are provided, the import will be restarted.
", "bodyParameters": [ { "type": "string", "description": "The username to provide to the originating repository.
", "name": "vcs_username", "in": "body", "rawType": "string", "rawDescription": "The username to provide to the originating repository.", "childParamsGroups": [] }, { "type": "string", "description": "The password to provide to the originating repository.
", "name": "vcs_password", "in": "body", "rawType": "string", "rawDescription": "The password to provide to the originating repository.", "childParamsGroups": [] }, { "type": "string", "example": "\"git\"", "name": "vcs", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, { "type": "string", "example": "\"project1\"", "name": "tfvc_project", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Example 1", "payload": "{\n \"vcs\": \"subversion\",\n \"use_lfs\": true,\n \"vcs_url\": \"http://svn.mycompany.com/svn/myproject\",\n \"status\": \"detecting\",\n \"url\": \"https://api.github.com/repos/octocat/socm/import\",\n \"html_url\": \"https://import.github.com/octocat/socm/import\",\n \"authors_url\": \"https://api.github.com/repos/octocat/socm/import/authors\",\n \"repository_url\": \"https://api.github.com/repos/octocat/socm\"\n}\n"
},
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Example 2",
"payload": "{\n \"vcs\": \"tfvc\",\n \"use_lfs\": true,\n \"vcs_url\": \"http://tfs.mycompany.com/tfs/myproject\",\n \"tfvc_project\": \"project1\",\n \"status\": \"importing\",\n \"status_text\": \"Importing...\",\n \"has_large_files\": false,\n \"large_files_size\": 0,\n \"large_files_count\": 0,\n \"authors_count\": 0,\n \"commit_count\": 1042,\n \"url\": \"https://api.github.com/repos/octocat/socm/import\",\n \"html_url\": \"https://import.github.com/octocat/socm/import\",\n \"authors_url\": \"https://api.github.com/repos/octocat/socm/import/authors\",\n \"repository_url\": \"https://api.github.com/repos/octocat/socm\"\n}\n"
},
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"vcs\": \"subversion\",\n \"use_lfs\": true,\n \"vcs_url\": \"http://svn.mycompany.com/svn/myproject\",\n \"status\": \"importing\",\n \"status_text\": \"Importing...\",\n \"has_large_files\": false,\n \"large_files_size\": 0,\n \"large_files_count\": 0,\n \"authors_count\": 0,\n \"commit_count\": 1042,\n \"url\": \"https://api.github.com/repos/octocat/socm/import\",\n \"html_url\": \"https://import.github.com/octocat/socm/import\",\n \"authors_url\": \"https://api.github.com/repos/octocat/socm/import/authors\",\n \"repository_url\": \"https://api.github.com/repos/octocat/socm\"\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/import",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/import', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/import', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Cancel an import",
"description": "Stop an import for a repository.",
"tags": [
"migrations"
],
"operationId": "migrations/cancel-import",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#cancel-an-import"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "migrations",
"subcategory": "source-imports"
},
"slug": "cancel-an-import",
"category": "migrations",
"categoryLabel": "Migrations",
"subcategory": "source-imports",
"subcategoryLabel": "Source imports",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Stop an import for a repository.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/import/authors", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "since", "description": "A user ID. Only return users with an ID greater than this ID.", "in": "query", "required": false, "schema": { "type": "integer" }, "descriptionHTML": "A user ID. Only return users with an ID greater than this ID.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import/authors", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import/authors"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/import/authors', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/import/authors', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get commit authors",
"description": "Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username hubot into something like hubot <hubot@12341234-abab-fefe-8787-fedcba987654>.
This endpoint and the Map a commit author endpoint allow you to provide correct Git author information.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 2268557,\n \"remote_id\": \"nobody@fc7da526-431c-80fe-3c8c-c148ff18d7ef\",\n \"remote_name\": \"nobody\",\n \"email\": \"hubot@github.com\",\n \"name\": \"Hubot\",\n \"url\": \"https://api.github.com/repos/octocat/socm/import/authors/2268557\",\n \"import_url\": \"https://api.github.com/repos/octocat/socm/import\"\n },\n {\n \"id\": 2268558,\n \"remote_id\": \"svner@fc7da526-431c-80fe-3c8c-c148ff18d7ef\",\n \"remote_name\": \"svner\",\n \"email\": \"svner@fc7da526-431c-80fe-3c8c-c148ff18d7ef\",\n \"name\": \"svner\",\n \"url\": \"https://api.github.com/repos/octocat/socm/import/authors/2268558\",\n \"import_url\": \"https://api.github.com/repos/octocat/socm/import\"\n },\n {\n \"id\": 2268559,\n \"remote_id\": \"svner@example.com@fc7da526-431c-80fe-3c8c-c148ff18d7ef\",\n \"remote_name\": \"svner@example.com\",\n \"email\": \"svner@example.com@fc7da526-431c-80fe-3c8c-c148ff18d7ef\",\n \"name\": \"svner@example.com\",\n \"url\": \"https://api.github.com/repos/octocat/socm/import/authors/2268559\",\n \"import_url\": \"https://api.github.com/repos/octocat/socm/import\"\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/import/authors/{author_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "author_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import/authors/42 \\\n -d '{\"email\":\"octocat@github.com\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import/authors/42 \\\n -d '{\"email\":\"octocat@github.com\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/import/authors/{author_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n author_id: 42,\n email: 'octocat@github.com'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/import/authors/{author_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n author_id: 42,\n email: 'octocat@github.com'\n})\n"
}
],
"summary": "Map a commit author",
"description": "Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository.",
"tags": [
"migrations"
],
"operationId": "migrations/map-commit-author",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#map-a-commit-author"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "The new Git author email.
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The new Git author email.", "childParamsGroups": [] }, "name": { "type": "string", "description": "The new Git author name.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The new Git author name.", "childParamsGroups": [] } }, "additionalProperties": false }, "example": { "email": "hubot@github.com", "name": "Hubot the Robot" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "migrations", "subcategory": "source-imports" }, "slug": "map-a-commit-author", "category": "migrations", "categoryLabel": "Migrations", "subcategory": "source-imports", "subcategoryLabel": "Source imports", "contentType": "application/json", "notes": [], "descriptionHTML": "Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository.
", "bodyParameters": [ { "type": "string", "description": "The new Git author email.
", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The new Git author email.", "childParamsGroups": [] }, { "type": "string", "description": "The new Git author name.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The new Git author name.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 2268557,\n \"remote_id\": \"nobody@fc7da526-431c-80fe-3c8c-c148ff18d7ef\",\n \"remote_name\": \"nobody\",\n \"email\": \"hubot@github.com\",\n \"name\": \"Hubot\",\n \"url\": \"https://api.github.com/repos/octocat/socm/import/authors/2268557\",\n \"import_url\": \"https://api.github.com/repos/octocat/socm/import\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/import/large_files",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import/large_files",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import/large_files"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/import/large_files', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/import/large_files', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get large files",
"description": "List files larger than 100MB found during the import",
"tags": [
"migrations"
],
"operationId": "migrations/get-large-files",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#get-large-files"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "migrations",
"subcategory": "source-imports"
},
"slug": "get-large-files",
"category": "migrations",
"categoryLabel": "Migrations",
"subcategory": "source-imports",
"subcategoryLabel": "Source imports",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List files larger than 100MB found during the import
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"ref_name\": \"refs/heads/master\",\n \"path\": \"foo/bar/1\",\n \"oid\": \"d3d9446802a44259755d38e6d163e820\",\n \"size\": 10485760\n },\n {\n \"ref_name\": \"refs/heads/master\",\n \"path\": \"foo/bar/2\",\n \"oid\": \"6512bd43d9caa6e02c990b0a82652dca\",\n \"size\": 11534336\n },\n {\n \"ref_name\": \"refs/heads/master\",\n \"path\": \"foo/bar/3\",\n \"oid\": \"c20ad4d76fe97759aa27a0c99bff6710\",\n \"size\": 12582912\n }\n]\n"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/import/lfs",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import/lfs \\\n -d '{\"use_lfs\":\"use_lfs\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/import/lfs \\\n -d '{\"use_lfs\":\"use_lfs\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/import/lfs', {\n owner: 'octocat',\n repo: 'hello-world',\n use_lfs: 'use_lfs'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/import/lfs', {\n owner: 'octocat',\n repo: 'hello-world',\n use_lfs: 'use_lfs'\n})\n"
}
],
"summary": "Update Git LFS preference",
"description": "You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://help.github.com/articles/versioning-large-files/).",
"tags": [
"migrations"
],
"operationId": "migrations/set-lfs-preference",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#update-git-lfs-preference"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"use_lfs": {
"type": "string",
"description": "Required. Can be one of opt_in (large files will be stored using Git LFS) or opt_out (large files will be removed during the import).
You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by Git LFS. You can learn more about our LFS feature and working with large files on our help site.
", "bodyParameters": [ { "type": "string", "description": "Required. Can be one of opt_in (large files will be stored using Git LFS) or opt_out (large files will be removed during the import).
{\n \"vcs\": \"subversion\",\n \"use_lfs\": true,\n \"vcs_url\": \"http://svn.mycompany.com/svn/myproject\",\n \"status\": \"complete\",\n \"status_text\": \"Done\",\n \"has_large_files\": true,\n \"large_files_size\": 132331036,\n \"large_files_count\": 1,\n \"authors_count\": 4,\n \"url\": \"https://api.github.com/repos/octocat/socm/import\",\n \"html_url\": \"https://import.github.com/octocat/socm/import\",\n \"authors_url\": \"https://api.github.com/repos/octocat/socm/import/authors\",\n \"repository_url\": \"https://api.github.com/repos/octocat/socm\"\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/installation",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/installation",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/installation"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/installation', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/installation', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get a repository installation for the authenticated app",
"description": "Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-repo-installation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": null
},
"slug": "get-a-repository-installation-for-the-authenticated-app",
"category": "apps",
"categoryLabel": "Apps",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to.
\nYou must use a JWT to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"account\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"html_url\": \"https://github.com/github\",\n \"followers_url\": \"https://api.github.com/users/github/followers\",\n \"following_url\": \"https://api.github.com/users/github/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/github/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/github/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/github/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/github/orgs\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"received_events_url\": \"https://api.github.com/users/github/received_events\",\n \"type\": \"Organization\",\n \"site_admin\": false\n },\n \"repository_selection\": \"all\",\n \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n \"repositories_url\": \"https://api.github.com/installation/repositories\",\n \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n \"app_id\": 1,\n \"target_id\": 1,\n \"target_type\": \"Organization\",\n \"permissions\": {\n \"checks\": \"write\",\n \"metadata\": \"read\",\n \"contents\": \"read\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ],\n \"created_at\": \"2018-02-09T20:51:14Z\",\n \"updated_at\": \"2018-02-09T20:51:14Z\",\n \"single_file_name\": \"config.yml\",\n \"has_multiple_single_files\": true,\n \"single_file_paths\": [\n \"config.yml\",\n \".github/issue_TEMPLATE.md\"\n ],\n \"app_slug\": \"github-actions\",\n \"suspended_at\": null,\n \"suspended_by\": null\n}\n"
},
{
"httpStatusCode": "301",
"httpStatusMessage": "Moved Permanently",
"description": "Moved permanently"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/interaction-limits",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/interaction-limits",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/interaction-limits"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/interaction-limits', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/interaction-limits', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get interaction restrictions for a repository",
"description": "Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response.",
"tags": [
"interactions"
],
"operationId": "interactions/get-restrictions-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "interactions",
"subcategory": "repos"
},
"slug": "get-interaction-restrictions-for-a-repository",
"category": "interactions",
"categoryLabel": "Interactions",
"subcategory": "repos",
"subcategoryLabel": "Repos",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"limit\": \"collaborators_only\",\n \"origin\": \"repository\",\n \"expires_at\": \"2018-08-17T04:18:39Z\"\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/interaction-limits",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/interaction-limits \\\n -d '{\"limit\":\"limit\"}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/interaction-limits \\\n -d '{\"limit\":\"limit\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/interaction-limits', {\n owner: 'octocat',\n repo: 'hello-world',\n limit: 'limit'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/interaction-limits', {\n owner: 'octocat',\n repo: 'hello-world',\n limit: 'limit'\n})\n"
}
],
"summary": "Set interaction restrictions for a repository",
"description": "Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository.",
"tags": [
"interactions"
],
"operationId": "interactions/set-restrictions-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"title": "Interaction Restrictions",
"description": "Limit interactions to a specific type of user for a specified duration",
"type": "object",
"properties": {
"limit": {
"type": "string",
"description": "Required. The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: existing_users, contributors_only, collaborators_only.
The duration of the interaction restriction. Can be one of: one_day, three_days, one_week, one_month, six_months. Default: one_day.
Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a 409 Conflict response and will not be able to use this endpoint to change the interaction limit for a single repository.
Required. The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: existing_users, contributors_only, collaborators_only.
The duration of the interaction restriction. Can be one of: one_day, three_days, one_week, one_month, six_months. Default: one_day.
{\n \"limit\": \"collaborators_only\",\n \"origin\": \"repository\",\n \"expires_at\": \"2018-08-17T04:18:39Z\"\n}\n"
},
{
"httpStatusCode": "409",
"httpStatusMessage": "Conflict",
"description": "Response"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/interaction-limits",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/interaction-limits",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/interaction-limits"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/interaction-limits', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/interaction-limits', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Remove interaction restrictions for a repository",
"description": "Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository.",
"tags": [
"interactions"
],
"operationId": "interactions/remove-restrictions-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "interactions",
"subcategory": "repos"
},
"slug": "remove-interaction-restrictions-for-a-repository",
"category": "interactions",
"categoryLabel": "Interactions",
"subcategory": "repos",
"subcategoryLabel": "Repos",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "409",
"httpStatusMessage": "Conflict",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a 409 Conflict response and will not be able to use this endpoint to change the interaction limit for a single repository.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/invitations", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/invitations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/invitations', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/invitations', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List repository invitations",
"description": "When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations.",
"tags": [
"repos"
],
"operationId": "repos/list-invitations",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-repository-invitations"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "invitations"
},
"slug": "list-repository-invitations",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "invitations",
"subcategoryLabel": "Invitations",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n },\n \"invitee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"inviter\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"permissions\": \"write\",\n \"created_at\": \"2016-06-13T14:52:50-05:00\",\n \"url\": \"https://api.github.com/user/repository_invitations/1296269\",\n \"html_url\": \"https://github.com/octocat/Hello-World/invitations\",\n \"node_id\": \"MDQ6VXNlcjE=\"\n }\n]\n"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/invitations/{invitation_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "invitation_id",
"description": "invitation_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "invitation_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/invitations/42 \\\n -d '{\"permissions\":\"permissions\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/invitations/42 \\\n -d '{\"permissions\":\"permissions\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/invitations/{invitation_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n invitation_id: 42,\n permissions: 'permissions'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/invitations/{invitation_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n invitation_id: 42,\n permissions: 'permissions'\n})\n"
}
],
"summary": "Update a repository invitation",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/update-invitation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#update-a-repository-invitation"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"permissions": {
"type": "string",
"description": "The permissions that the associated user will have on the repository. Valid values are read, write, maintain, triage, and admin.
The permissions that the associated user will have on the repository. Valid values are read, write, maintain, triage, and admin.
{\n \"id\": 1,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n },\n \"invitee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"inviter\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"permissions\": \"write\",\n \"created_at\": \"2016-06-13T14:52:50-05:00\",\n \"expired\": false,\n \"url\": \"https://api.github.com/user/repository_invitations/1296269\",\n \"html_url\": \"https://github.com/octocat/Hello-World/invitations\"\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/invitations/{invitation_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "invitation_id",
"description": "invitation_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "invitation_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/invitations/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/invitations/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/invitations/{invitation_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n invitation_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/invitations/{invitation_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n invitation_id: 42\n})\n"
}
],
"summary": "Delete a repository invitation",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/delete-invitation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-a-repository-invitation"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "invitations"
},
"slug": "delete-a-repository-invitation",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "invitations",
"subcategoryLabel": "Invitations",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/issues",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "milestone",
"description": "If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned.",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"descriptionHTML": "If an integer is passed, it should refer to a milestone by its number field. If the string * is passed, issues with any milestone are accepted. If the string none is passed, issues without milestones are returned.
Indicates the state of the issues to return. Can be either open, closed, or all.
Can be the name of a user. Pass in none for issues with no assigned user, and * for issues assigned to any user.
The user that created the issue.
" }, { "name": "mentioned", "description": "A user that's mentioned in the issue.", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "A user that's mentioned in the issue.
" }, { "name": "labels", "description": "A list of comma separated label names. Example: `bug,ui,@high`", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "A list of comma separated label names. Example: bug,ui,@high
What to sort results by. Can be either created, updated, comments.
One of asc (ascending) or desc (descending).
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/issues', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/issues', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List repository issues",
"description": "List issues in a repository.\n\n**Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe `pull_request` key. Be aware that the `id` of a pull request returned from \"Issues\" endpoints will be an _issue id_. To find out the pull\nrequest id, use the \"[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)\" endpoint.",
"tags": [
"issues"
],
"operationId": "issues/list-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-repository-issues"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": null
},
"slug": "list-repository-issues",
"category": "issues",
"categoryLabel": "Issues",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List issues in a repository.
\nNote: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe pull_request key. Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull\nrequest id, use the \"List pull requests\" endpoint.
[\n {\n \"id\": 1,\n \"node_id\": \"MDU6SXNzdWUx\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n \"number\": 1347,\n \"state\": \"open\",\n \"title\": \"Found a bug\",\n \"body\": \"I'm having a problem with this.\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"locked\": true,\n \"active_lock_reason\": \"too heated\",\n \"comments\": 0,\n \"pull_request\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n },\n \"closed_at\": null,\n \"created_at\": \"2011-04-22T13:33:48Z\",\n \"updated_at\": \"2011-04-22T13:33:48Z\",\n \"closed_by\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"author_association\": \"COLLABORATOR\"\n }\n]\n"
},
{
"httpStatusCode": "301",
"httpStatusMessage": "Moved Permanently",
"description": "Moved permanently"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/issues",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues \\\n -d '{\"title\":\"title\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues \\\n -d '{\"title\":\"title\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/issues', {\n owner: 'octocat',\n repo: 'hello-world',\n title: 'title'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/issues', {\n owner: 'octocat',\n repo: 'hello-world',\n title: 'title'\n})\n"
}
],
"summary": "Create an issue",
"description": "Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://help.github.com/articles/disabling-issues/), the API returns a `410 Gone` status.\n\nThis endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.",
"tags": [
"issues"
],
"operationId": "issues/create",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#create-an-issue"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"description": "Required. The title of the issue.
", "name": "title", "in": "body", "rawDescription": "The title of the issue.", "type": "string or integer", "childParamsGroups": [] }, "body": { "type": "string", "description": "The contents of the issue.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The contents of the issue.", "childParamsGroups": [] }, "assignee": { "type": "string or nullable", "description": "Login for the user that this issue should be assigned to. NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. This field is deprecated.
", "nullable": true, "name": "assignee", "in": "body", "rawType": "string", "rawDescription": "Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_", "childParamsGroups": [] }, "milestone": { "oneOf": [ { "type": "string" }, { "type": "integer", "description": "The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._" } ], "nullable": true, "name": "milestone", "in": "body", "description": "The number of the milestone to associate this issue with. NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise.
Labels to associate with this issue. NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise.
", "items": { "oneOf": [ { "type": "string" }, { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "color": { "type": "string", "nullable": true } } } ] }, "name": "labels", "in": "body", "rawType": "array", "rawDescription": "Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._", "childParamsGroups": [] }, "assignees": { "type": "array of strings", "description": "Logins for Users to assign to this issue. NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise.
", "items": { "type": "string" }, "name": "assignees", "in": "body", "rawType": "array", "rawDescription": "Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._", "childParamsGroups": [] } }, "required": [ "title" ] }, "example": { "title": "Found a bug", "body": "I'm having a problem with this.", "assignees": [ "octocat" ], "milestone": 1, "labels": [ "bug" ] } } } }, "x-github": { "triggersNotification": true, "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "issues", "subcategory": null }, "slug": "create-an-issue", "category": "issues", "categoryLabel": "Issues", "contentType": "application/json", "notes": [], "descriptionHTML": "Any user with pull access to a repository can create an issue. If issues are disabled in the repository, the API returns a 410 Gone status.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.
", "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDU6SXNzdWUx\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n \"number\": 1347,\n \"state\": \"open\",\n \"title\": \"Found a bug\",\n \"body\": \"I'm having a problem with this.\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"locked\": true,\n \"active_lock_reason\": \"too heated\",\n \"comments\": 0,\n \"pull_request\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n },\n \"closed_at\": null,\n \"created_at\": \"2011-04-22T13:33:48Z\",\n \"updated_at\": \"2011-04-22T13:33:48Z\",\n \"closed_by\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"author_association\": \"COLLABORATOR\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
],
"bodyParameters": [
{
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"description": "Required. The title of the issue.
", "name": "title", "in": "body", "rawDescription": "The title of the issue.", "type": "string or integer", "childParamsGroups": [] }, { "type": "string", "description": "The contents of the issue.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The contents of the issue.", "childParamsGroups": [] }, { "type": "string or nullable", "description": "Login for the user that this issue should be assigned to. NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. This field is deprecated.
", "nullable": true, "name": "assignee", "in": "body", "rawType": "string", "rawDescription": "Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_", "childParamsGroups": [] }, { "oneOf": [ { "type": "string" }, { "type": "integer", "description": "The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._" } ], "nullable": true, "name": "milestone", "in": "body", "description": "The number of the milestone to associate this issue with. NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise.
Labels to associate with this issue. NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise.
", "items": { "oneOf": [ { "type": "string" }, { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "color": { "type": "string", "nullable": true } } } ] }, "name": "labels", "in": "body", "rawType": "array", "rawDescription": "Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._", "childParamsGroups": [] }, { "type": "array of strings", "description": "Logins for Users to assign to this issue. NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise.
", "items": { "type": "string" }, "name": "assignees", "in": "body", "rawType": "array", "rawDescription": "Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._", "childParamsGroups": [] } ] }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/issues/comments", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "sort", "description": "One of `created` (when the repository was starred) or `updated` (when it was last pushed to).", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "created", "updated" ], "default": "created" }, "descriptionHTML": "One of created (when the repository was starred) or updated (when it was last pushed to).
Either asc or desc. Ignored without the sort parameter.
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/issues/comments', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/issues/comments', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List issue comments for a repository",
"description": "By default, Issue Comments are ordered by ascending ID.",
"tags": [
"issues"
],
"operationId": "issues/list-comments-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "comments"
},
"slug": "list-issue-comments-for-a-repository",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "comments",
"subcategoryLabel": "Comments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "By default, Issue Comments are ordered by ascending ID.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"node_id\": \"MDEyOklzc3VlQ29tbWVudDE=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\",\n \"body\": \"Me too\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\",\n \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"author_association\": \"COLLABORATOR\"\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/issues/comments/{comment_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/issues/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/issues/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})\n"
}
],
"summary": "Get an issue comment",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/get-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#get-an-issue-comment"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "comments"
},
"slug": "get-an-issue-comment",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "comments",
"subcategoryLabel": "Comments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"id\": 1,\n \"node_id\": \"MDEyOklzc3VlQ29tbWVudDE=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\",\n \"body\": \"Me too\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\",\n \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"author_association\": \"COLLABORATOR\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/issues/comments/{comment_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42 \\\n -d '{\"body\":\"body\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42 \\\n -d '{\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n body: 'body'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n body: 'body'\n})\n"
}
],
"summary": "Update an issue comment",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/update-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#update-an-issue-comment"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "Required. The contents of the comment.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The contents of the comment.", "childParamsGroups": [] } }, "required": [ "body" ] }, "example": { "body": "Me too" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "issues", "subcategory": "comments" }, "slug": "update-an-issue-comment", "category": "issues", "categoryLabel": "Issues", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", "notes": [], "descriptionHTML": "", "bodyParameters": [ { "type": "string", "description": "Required. The contents of the comment.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The contents of the comment.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDEyOklzc3VlQ29tbWVudDE=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\",\n \"body\": \"Me too\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\",\n \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"author_association\": \"COLLABORATOR\"\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/issues/comments/{comment_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})\n"
}
],
"summary": "Delete an issue comment",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/delete-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#delete-an-issue-comment"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "comments"
},
"slug": "delete-an-issue-comment",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "comments",
"subcategoryLabel": "Comments",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" }, { "name": "content", "description": "Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ] }, "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to an issue comment.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42/reactions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42/reactions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})\n"
}
],
"summary": "List reactions for an issue comment",
"description": "List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments).",
"tags": [
"reactions"
],
"operationId": "reactions/list-for-issue-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
},
"slug": "list-reactions-for-an-issue-comment",
"category": "reactions",
"categoryLabel": "Reactions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List the reactions to an issue comment.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42/reactions \\\n -d '{\"content\":\"content\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42/reactions \\\n -d '{\"content\":\"content\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n content: 'content'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n content: 'content'\n})\n"
}
],
"summary": "Create reaction for an issue comment",
"description": "Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment.",
"tags": [
"reactions"
],
"operationId": "reactions/create-for-issue-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "Required. The reaction type to add to the issue comment.
", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment.", "childParamsGroups": [] } }, "required": [ "content" ] }, "example": { "content": "heart" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "reactions", "subcategory": null }, "slug": "create-reaction-for-an-issue-comment", "category": "reactions", "categoryLabel": "Reactions", "contentType": "application/json", "notes": [], "descriptionHTML": "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.
Required. The reaction type to add to the issue comment.
", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Reaction exists", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n"
},
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Reaction created",
"payload": "{\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" }, { "name": "reaction_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42/reactions/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42/reactions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n reaction_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n reaction_id: 42\n})\n"
}
],
"summary": "Delete an issue comment reaction",
"description": "**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`.\n\nDelete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments).",
"tags": [
"reactions"
],
"operationId": "reactions/delete-for-issue-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
},
"slug": "delete-an-issue-comment-reaction",
"category": "reactions",
"categoryLabel": "Reactions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "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.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/issues/events", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/events", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/events"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/issues/events', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/issues/events', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List issue events for a repository",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/list-events-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "events"
},
"slug": "list-issue-events-for-a-repository",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "events",
"subcategoryLabel": "Events",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"id\": 1,\n \"node_id\": \"MDEwOklzc3VlRXZlbnQx\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events/1\",\n \"actor\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"event\": \"closed\",\n \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"commit_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"issue\": {\n \"id\": 1,\n \"node_id\": \"MDU6SXNzdWUx\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n \"number\": 1347,\n \"state\": \"open\",\n \"title\": \"Found a bug\",\n \"body\": \"I'm having a problem with this.\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"locked\": true,\n \"active_lock_reason\": \"too heated\",\n \"comments\": 0,\n \"pull_request\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n },\n \"closed_at\": null,\n \"created_at\": \"2011-04-22T13:33:48Z\",\n \"updated_at\": \"2011-04-22T13:33:48Z\",\n \"author_association\": \"COLLABORATOR\"\n }\n }\n]\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/issues/events/{event_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "event_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/events/42",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/events/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/issues/events/{event_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n event_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/issues/events/{event_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n event_id: 42\n})\n"
}
],
"summary": "Get an issue event",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/get-event",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#get-an-issue-event"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "events"
},
"slug": "get-an-issue-event",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "events",
"subcategoryLabel": "Events",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"id\": 1,\n \"node_id\": \"MDEwOklzc3VlRXZlbnQx\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events/1\",\n \"actor\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"event\": \"closed\",\n \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"commit_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"issue\": {\n \"id\": 1,\n \"node_id\": \"MDU6SXNzdWUx\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n \"number\": 1347,\n \"state\": \"open\",\n \"title\": \"Found a bug\",\n \"body\": \"I'm having a problem with this.\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"locked\": true,\n \"performed_via_github_app\": {\n \"id\": 1,\n \"slug\": \"octoapp\",\n \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"name\": \"Octocat App\",\n \"description\": \"\",\n \"external_url\": \"https://example.com\",\n \"html_url\": \"https://github.com/apps/octoapp\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"permissions\": {\n \"metadata\": \"read\",\n \"contents\": \"read\",\n \"issues\": \"write\",\n \"single_file\": \"write\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ]\n },\n \"comments\": 0,\n \"pull_request\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n },\n \"closed_at\": null,\n \"created_at\": \"2011-04-22T13:33:48Z\",\n \"updated_at\": \"2011-04-22T13:33:48Z\",\n \"author_association\": \"COLLABORATOR\"\n }\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/issues/{issue_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "issue_number",
"description": "issue_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "issue_number parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})\n"
}
],
"summary": "Get an issue",
"description": "The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was\n[transferred](https://help.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If\nthe issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API\nreturns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read\naccess, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe\nto the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook.\n\n**Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe `pull_request` key. Be aware that the `id` of a pull request returned from \"Issues\" endpoints will be an _issue id_. To find out the pull\nrequest id, use the \"[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)\" endpoint.",
"tags": [
"issues"
],
"operationId": "issues/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#get-an-issue"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": null
},
"slug": "get-an-issue",
"category": "issues",
"categoryLabel": "Issues",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "The API returns a 301 Moved Permanently status if the issue was\ntransferred to another repository. If\nthe issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API\nreturns a 404 Not Found status. If the issue was deleted from a repository where the authenticated user has read\naccess, the API returns a 410 Gone status. To receive webhook events for transferred and deleted issues, subscribe\nto the issues webhook.
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe pull_request key. Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull\nrequest id, use the \"List pull requests\" endpoint.
{\n \"id\": 1,\n \"node_id\": \"MDU6SXNzdWUx\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n \"number\": 1347,\n \"state\": \"open\",\n \"title\": \"Found a bug\",\n \"body\": \"I'm having a problem with this.\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"locked\": true,\n \"active_lock_reason\": \"too heated\",\n \"comments\": 0,\n \"pull_request\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n },\n \"closed_at\": null,\n \"created_at\": \"2011-04-22T13:33:48Z\",\n \"updated_at\": \"2011-04-22T13:33:48Z\",\n \"closed_by\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"author_association\": \"COLLABORATOR\"\n}\n"
},
{
"httpStatusCode": "301",
"httpStatusMessage": "Moved Permanently",
"description": "Moved permanently"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/issues/{issue_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "issue_number",
"description": "issue_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "issue_number parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42 \\\n -d '{\"title\":\"title\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42 \\\n -d '{\"title\":\"title\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/issues/{issue_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n title: 'title'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/issues/{issue_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n title: 'title'\n})\n"
}
],
"summary": "Update an issue",
"description": "Issue owners and users with push access can edit an issue.",
"tags": [
"issues"
],
"operationId": "issues/update",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues/#update-an-issue"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"description": "The title of the issue.
", "nullable": true, "name": "title", "in": "body", "rawDescription": "The title of the issue.", "type": "string or integer or nullable", "childParamsGroups": [] }, "body": { "type": "string or nullable", "description": "The contents of the issue.
", "nullable": true, "name": "body", "in": "body", "rawType": "string", "rawDescription": "The contents of the issue.", "childParamsGroups": [] }, "assignee": { "type": "string or nullable", "nullable": true, "description": "Login for the user that this issue should be assigned to. This field is deprecated.
", "name": "assignee", "in": "body", "rawType": "string", "rawDescription": "Login for the user that this issue should be assigned to. **This field is deprecated.**", "childParamsGroups": [] }, "state": { "type": "string", "description": "State of the issue. Either open or closed.
The number of the milestone to associate this issue with or null to remove current. NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise.
Labels to associate with this issue. Pass one or more Labels to replace the set of Labels on this Issue. Send an empty array ([]) to clear all Labels from the Issue. NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise.
Logins for Users to assign to this issue. Pass one or more user logins to replace the set of assignees on this Issue. Send an empty array ([]) to clear all assignees from the Issue. NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise.
Issue owners and users with push access can edit an issue.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDU6SXNzdWUx\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n \"number\": 1347,\n \"state\": \"open\",\n \"title\": \"Found a bug\",\n \"body\": \"I'm having a problem with this.\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"locked\": true,\n \"active_lock_reason\": \"too heated\",\n \"comments\": 0,\n \"pull_request\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n },\n \"closed_at\": null,\n \"created_at\": \"2011-04-22T13:33:48Z\",\n \"updated_at\": \"2011-04-22T13:33:48Z\",\n \"closed_by\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"author_association\": \"COLLABORATOR\"\n}\n"
},
{
"httpStatusCode": "301",
"httpStatusMessage": "Moved Permanently",
"description": "Moved permanently"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
],
"bodyParameters": [
{
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"description": "The title of the issue.
", "nullable": true, "name": "title", "in": "body", "rawDescription": "The title of the issue.", "type": "string or integer or nullable", "childParamsGroups": [] }, { "type": "string or nullable", "description": "The contents of the issue.
", "nullable": true, "name": "body", "in": "body", "rawType": "string", "rawDescription": "The contents of the issue.", "childParamsGroups": [] }, { "type": "string or nullable", "nullable": true, "description": "Login for the user that this issue should be assigned to. This field is deprecated.
", "name": "assignee", "in": "body", "rawType": "string", "rawDescription": "Login for the user that this issue should be assigned to. **This field is deprecated.**", "childParamsGroups": [] }, { "type": "string", "description": "State of the issue. Either open or closed.
The number of the milestone to associate this issue with or null to remove current. NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise.
Labels to associate with this issue. Pass one or more Labels to replace the set of Labels on this Issue. Send an empty array ([]) to clear all Labels from the Issue. NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise.
Logins for Users to assign to this issue. Pass one or more user logins to replace the set of assignees on this Issue. Send an empty array ([]) to clear all assignees from the Issue. NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise.
issue_number parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/assignees \\\n -d '{\"assignees\":[\"assignees\"]}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/assignees \\\n -d '{\"assignees\":[\"assignees\"]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/assignees', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n assignees: [\n 'assignees'\n ]\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/assignees', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n assignees: [\n 'assignees'\n ]\n})\n"
}
],
"summary": "Add assignees to an issue",
"description": "Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.",
"tags": [
"issues"
],
"operationId": "issues/add-assignees",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"assignees": {
"type": "array of strings",
"description": "Usernames of people to assign this issue to. NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise.
", "items": { "type": "string" }, "name": "assignees", "in": "body", "rawType": "array", "rawDescription": "Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._", "childParamsGroups": [] } } }, "example": { "assignees": [ "hubot", "other_user" ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "issues", "subcategory": "assignees" }, "slug": "add-assignees-to-an-issue", "category": "issues", "categoryLabel": "Issues", "subcategory": "assignees", "subcategoryLabel": "Assignees", "contentType": "application/json", "notes": [], "descriptionHTML": "Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.
", "bodyParameters": [ { "type": "array of strings", "description": "Usernames of people to assign this issue to. NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise.
", "items": { "type": "string" }, "name": "assignees", "in": "body", "rawType": "array", "rawDescription": "Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDU6SXNzdWUx\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n \"number\": 1347,\n \"state\": \"open\",\n \"title\": \"Found a bug\",\n \"body\": \"I'm having a problem with this.\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"locked\": true,\n \"active_lock_reason\": \"too heated\",\n \"comments\": 0,\n \"pull_request\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n },\n \"closed_at\": null,\n \"created_at\": \"2011-04-22T13:33:48Z\",\n \"updated_at\": \"2011-04-22T13:33:48Z\",\n \"closed_by\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"author_association\": \"COLLABORATOR\"\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/issues/{issue_number}/assignees",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "issue_number",
"description": "issue_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "issue_number parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/assignees \\\n -d '{\"assignees\":[\"assignees\"]}'", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/assignees \\\n -d '{\"assignees\":[\"assignees\"]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n assignees: [\n 'assignees'\n ]\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n assignees: [\n 'assignees'\n ]\n})\n"
}
],
"summary": "Remove assignees from an issue",
"description": "Removes one or more assignees from an issue.",
"tags": [
"issues"
],
"operationId": "issues/remove-assignees",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue"
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"assignees": {
"type": "array of strings",
"description": "Usernames of assignees to remove from an issue. NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise.
", "items": { "type": "string" }, "name": "assignees", "in": "body", "rawType": "array", "rawDescription": "Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._", "childParamsGroups": [] } } }, "example": { "assignees": [ "hubot", "other_user" ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "issues", "subcategory": "assignees" }, "slug": "remove-assignees-from-an-issue", "category": "issues", "categoryLabel": "Issues", "subcategory": "assignees", "subcategoryLabel": "Assignees", "contentType": "application/json", "notes": [], "descriptionHTML": "Removes one or more assignees from an issue.
", "bodyParameters": [ { "type": "array of strings", "description": "Usernames of assignees to remove from an issue. NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise.
", "items": { "type": "string" }, "name": "assignees", "in": "body", "rawType": "array", "rawDescription": "Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDU6SXNzdWUx\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n \"number\": 1347,\n \"state\": \"open\",\n \"title\": \"Found a bug\",\n \"body\": \"I'm having a problem with this.\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"locked\": true,\n \"active_lock_reason\": \"too heated\",\n \"comments\": 0,\n \"pull_request\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n },\n \"closed_at\": null,\n \"created_at\": \"2011-04-22T13:33:48Z\",\n \"updated_at\": \"2011-04-22T13:33:48Z\",\n \"closed_by\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"author_association\": \"COLLABORATOR\"\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/issues/{issue_number}/comments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "issue_number",
"description": "issue_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "issue_number parameter
" }, { "name": "since", "description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", "in": "query", "required": false, "schema": { "type": "string", "format": "date-time" }, "descriptionHTML": "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/comments", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/comments"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/comments', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/comments', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})\n"
}
],
"summary": "List issue comments",
"description": "Issue Comments are ordered by ascending ID.",
"tags": [
"issues"
],
"operationId": "issues/list-comments",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-issue-comments"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "comments"
},
"slug": "list-issue-comments",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "comments",
"subcategoryLabel": "Comments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Issue Comments are ordered by ascending ID.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"node_id\": \"MDEyOklzc3VlQ29tbWVudDE=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\",\n \"body\": \"Me too\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\",\n \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"author_association\": \"COLLABORATOR\"\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/issues/{issue_number}/comments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "issue_number",
"description": "issue_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "issue_number parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/comments \\\n -d '{\"body\":\"body\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/comments \\\n -d '{\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/comments', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n body: 'body'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/comments', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n body: 'body'\n})\n"
}
],
"summary": "Create an issue comment",
"description": "This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.",
"tags": [
"issues"
],
"operationId": "issues/create-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#create-an-issue-comment"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "Required. The contents of the comment.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The contents of the comment.", "childParamsGroups": [] } }, "required": [ "body" ] }, "example": { "body": "Me too" } } } }, "x-github": { "triggersNotification": true, "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "issues", "subcategory": "comments" }, "slug": "create-an-issue-comment", "category": "issues", "categoryLabel": "Issues", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", "notes": [], "descriptionHTML": "This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.
", "bodyParameters": [ { "type": "string", "description": "Required. The contents of the comment.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The contents of the comment.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDEyOklzc3VlQ29tbWVudDE=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\",\n \"body\": \"Me too\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\",\n \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"author_association\": \"COLLABORATOR\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/issues/{issue_number}/events",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "issue_number",
"description": "issue_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "issue_number parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/events", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/events"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/events', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/events', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})\n"
}
],
"summary": "List issue events",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/list-events",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-issue-events"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "events"
},
"slug": "list-issue-events",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "events",
"subcategoryLabel": "Events",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"id\": 1,\n \"node_id\": \"MDEwOklzc3VlRXZlbnQx\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events/1\",\n \"actor\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"event\": \"closed\",\n \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"commit_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"performed_via_github_app\": null,\n \"label\": {\n \"name\": \"label\",\n \"color\": \"red\"\n }\n }\n]\n"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/issues/{issue_number}/labels",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "issue_number",
"description": "issue_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "issue_number parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/labels', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/labels', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})\n"
}
],
"summary": "List labels for an issue",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/list-labels-on-issue",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-labels-for-an-issue"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "labels"
},
"slug": "list-labels-for-an-issue",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "labels",
"subcategoryLabel": "Labels",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n },\n {\n \"id\": 208045947,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDc=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/enhancement\",\n \"name\": \"enhancement\",\n \"description\": \"New feature or request\",\n \"color\": \"a2eeef\",\n \"default\": false\n }\n]\n"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/issues/{issue_number}/labels",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "issue_number",
"description": "issue_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "issue_number parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/labels', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/labels', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})\n"
}
],
"summary": "Add labels to an issue",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/add-labels",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#add-labels-to-an-issue"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"labels": {
"type": "array of strings",
"minItems": 1,
"description": "The names of the labels to add to the issue. You can pass an empty array to remove all labels. Note: Alternatively, you can pass a single label as a string or an array of labels directly, but GitHub recommends passing an object with the labels key.
The names of the labels to add to the issue. You can pass an empty array to remove all labels. Note: Alternatively, you can pass a single label as a string or an array of labels directly, but GitHub recommends passing an object with the labels key.
[\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n },\n {\n \"id\": 208045947,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDc=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/enhancement\",\n \"name\": \"enhancement\",\n \"description\": \"New feature or request\",\n \"color\": \"a2eeef\",\n \"default\": false\n }\n]\n"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/issues/{issue_number}/labels",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "issue_number",
"description": "issue_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "issue_number parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/issues/{issue_number}/labels', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/issues/{issue_number}/labels', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})\n"
}
],
"summary": "Set labels for an issue",
"description": "Removes any previous labels and sets the new labels for an issue.",
"tags": [
"issues"
],
"operationId": "issues/set-labels",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#set-labels-for-an-issue"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"labels": {
"type": "array of strings",
"minItems": 1,
"description": "The names of the labels to add to the issue. You can pass an empty array to remove all labels. Note: Alternatively, you can pass a single label as a string or an array of labels directly, but GitHub recommends passing an object with the labels key.
Removes any previous labels and sets the new labels for an issue.
", "bodyParameters": [ { "type": "array of strings", "minItems": 1, "description": "The names of the labels to add to the issue. You can pass an empty array to remove all labels. Note: Alternatively, you can pass a single label as a string or an array of labels directly, but GitHub recommends passing an object with the labels key.
[\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n },\n {\n \"id\": 208045947,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDc=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/enhancement\",\n \"name\": \"enhancement\",\n \"description\": \"New feature or request\",\n \"color\": \"a2eeef\",\n \"default\": false\n }\n]\n"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/issues/{issue_number}/labels",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "issue_number",
"description": "issue_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "issue_number parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})\n"
}
],
"summary": "Remove all labels from an issue",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/remove-all-labels",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "labels"
},
"slug": "remove-all-labels-from-an-issue",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "labels",
"subcategoryLabel": "Labels",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "issue_number",
"description": "issue_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "issue_number parameter
" }, { "name": "name", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels/NAME", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels/NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n name: 'name'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n name: 'name'\n})\n"
}
],
"summary": "Remove a label from an issue",
"description": "Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist.",
"tags": [
"issues"
],
"operationId": "issues/remove-label",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "labels"
},
"slug": "remove-a-label-from-an-issue",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "labels",
"subcategoryLabel": "Labels",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a 404 Not Found status if the label does not exist.
[\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/issues/{issue_number}/lock",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "issue_number",
"description": "issue_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "issue_number parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/lock \\\n -d '{\"lock_reason\":\"lock_reason\"}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/lock \\\n -d '{\"lock_reason\":\"lock_reason\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/issues/{issue_number}/lock', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n lock_reason: 'lock_reason'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/issues/{issue_number}/lock', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n lock_reason: 'lock_reason'\n})\n"
}
],
"summary": "Lock an issue",
"description": "Users with push access can lock an issue or pull request's conversation.\n\nNote that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"",
"tags": [
"issues"
],
"operationId": "issues/lock",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#lock-an-issue"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"nullable": true,
"properties": {
"lock_reason": {
"type": "string",
"description": "The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons:
\n* off-topic
\n* too heated
\n* resolved
\n* spam
Users with push access can lock an issue or pull request's conversation.
\nNote that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons:
\n* off-topic
\n* too heated
\n* resolved
\n* spam
issue_number parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/lock", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/lock"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})\n"
}
],
"summary": "Unlock an issue",
"description": "Users with push access can unlock an issue's conversation.",
"tags": [
"issues"
],
"operationId": "issues/unlock",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#unlock-an-issue"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": null
},
"slug": "unlock-an-issue",
"category": "issues",
"categoryLabel": "Issues",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Users with push access can unlock an issue's conversation.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/issues/{issue_number}/reactions", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "issue_number", "description": "issue_number parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "issue_number parameter
" }, { "name": "content", "description": "Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ] }, "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to an issue.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/reactions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/reactions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})\n"
}
],
"summary": "List reactions for an issue",
"description": "List the reactions to an [issue](https://docs.github.com/rest/reference/issues).",
"tags": [
"reactions"
],
"operationId": "reactions/list-for-issue",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
},
"slug": "list-reactions-for-an-issue",
"category": "reactions",
"categoryLabel": "Reactions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List the reactions to an issue.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/issues/{issue_number}/reactions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "issue_number",
"description": "issue_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "issue_number parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/reactions \\\n -d '{\"content\":\"content\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/reactions \\\n -d '{\"content\":\"content\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n content: 'content'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n content: 'content'\n})\n"
}
],
"summary": "Create reaction for an issue",
"description": "Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue.",
"tags": [
"reactions"
],
"operationId": "reactions/create-for-issue",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "Required. The reaction type to add to the issue.
", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue.", "childParamsGroups": [] } }, "required": [ "content" ] }, "example": { "content": "heart" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "reactions", "subcategory": null }, "slug": "create-reaction-for-an-issue", "category": "reactions", "categoryLabel": "Reactions", "contentType": "application/json", "notes": [], "descriptionHTML": "Create a reaction to an issue. A response with an HTTP 200 status means that you already added the reaction type to this issue.
Required. The reaction type to add to the issue.
", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n"
},
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response",
"payload": "{\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "issue_number",
"description": "issue_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "issue_number parameter
" }, { "name": "reaction_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/reactions/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/reactions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n reaction_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42,\n reaction_id: 42\n})\n"
}
],
"summary": "Delete an issue reaction",
"description": "**Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`.\n\nDelete a reaction to an [issue](https://docs.github.com/rest/reference/issues/).",
"tags": [
"reactions"
],
"operationId": "reactions/delete-for-issue",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
},
"slug": "delete-an-issue-reaction",
"category": "reactions",
"categoryLabel": "Reactions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "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.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/issues/{issue_number}/timeline", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "issue_number", "description": "issue_number parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "issue_number parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/timeline", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/timeline"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/timeline', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/timeline', {\n owner: 'octocat',\n repo: 'hello-world',\n issue_number: 42\n})\n"
}
],
"summary": "List timeline events for an issue",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/list-events-for-timeline",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "timeline"
},
"slug": "list-timeline-events-for-an-issue",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "timeline",
"subcategoryLabel": "Timeline",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/keys",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/keys', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/keys', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List deploy keys",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/list-deploy-keys",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-deploy-keys"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "keys"
},
"slug": "list-deploy-keys",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "keys",
"subcategoryLabel": "Keys",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"id\": 1,\n \"key\": \"ssh-rsa AAA...\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/keys/1\",\n \"title\": \"octocat@octomac\",\n \"verified\": true,\n \"created_at\": \"2014-12-10T15:53:42Z\",\n \"read_only\": true\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/keys",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys \\\n -d '{\"key\":\"key\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys \\\n -d '{\"key\":\"key\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/keys', {\n owner: 'octocat',\n repo: 'hello-world',\n key: 'key'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/keys', {\n owner: 'octocat',\n repo: 'hello-world',\n key: 'key'\n})\n"
}
],
"summary": "Create a deploy key",
"description": "You can create a read-only deploy key.",
"tags": [
"repos"
],
"operationId": "repos/create-deploy-key",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-a-deploy-key"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "A name for the key.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "A name for the key.", "childParamsGroups": [] }, "key": { "type": "string", "description": "Required. The contents of the key.
", "name": "key", "in": "body", "rawType": "string", "rawDescription": "The contents of the key.", "childParamsGroups": [] }, "read_only": { "type": "boolean", "description": "If true, the key will only be able to read repository contents. Otherwise, the key will be able to read and write.
Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see \"Repository permission levels for an organization\" and \"Permission levels for a user account repository.\"
", "name": "read_only", "in": "body", "rawType": "boolean", "rawDescription": "If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. \n \nDeploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see \"[Repository permission levels for an organization](https://help.github.com/articles/repository-permission-levels-for-an-organization/)\" and \"[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/).\"", "childParamsGroups": [] } }, "required": [ "key" ] }, "example": { "title": "octocat@octomac", "key": "ssh-rsa AAA...", "read_only": true } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "repos", "subcategory": "keys" }, "slug": "create-a-deploy-key", "category": "repos", "categoryLabel": "Repos", "subcategory": "keys", "subcategoryLabel": "Keys", "contentType": "application/json", "notes": [], "descriptionHTML": "You can create a read-only deploy key.
", "bodyParameters": [ { "type": "string", "description": "A name for the key.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "A name for the key.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The contents of the key.
", "name": "key", "in": "body", "rawType": "string", "rawDescription": "The contents of the key.", "childParamsGroups": [] }, { "type": "boolean", "description": "If true, the key will only be able to read repository contents. Otherwise, the key will be able to read and write.
Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see \"Repository permission levels for an organization\" and \"Permission levels for a user account repository.\"
", "name": "read_only", "in": "body", "rawType": "boolean", "rawDescription": "If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. \n \nDeploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see \"[Repository permission levels for an organization](https://help.github.com/articles/repository-permission-levels-for-an-organization/)\" and \"[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/).\"", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 1,\n \"key\": \"ssh-rsa AAA...\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/keys/1\",\n \"title\": \"octocat@octomac\",\n \"verified\": true,\n \"created_at\": \"2014-12-10T15:53:42Z\",\n \"read_only\": true\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/keys/{key_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "key_id",
"description": "key_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "key_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/keys/{key_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n key_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/keys/{key_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n key_id: 42\n})\n"
}
],
"summary": "Get a deploy key",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/get-deploy-key",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-deploy-key"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "keys"
},
"slug": "get-a-deploy-key",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "keys",
"subcategoryLabel": "Keys",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"id\": 1,\n \"key\": \"ssh-rsa AAA...\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/keys/1\",\n \"title\": \"octocat@octomac\",\n \"verified\": true,\n \"created_at\": \"2014-12-10T15:53:42Z\",\n \"read_only\": true\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/keys/{key_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "key_id",
"description": "key_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "key_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/keys/{key_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n key_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/keys/{key_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n key_id: 42\n})\n"
}
],
"summary": "Delete a deploy key",
"description": "Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead.",
"tags": [
"repos"
],
"operationId": "repos/delete-deploy-key",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-a-deploy-key"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "keys"
},
"slug": "delete-a-deploy-key",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "keys",
"subcategoryLabel": "Keys",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/labels", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/labels", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/labels"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/labels', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/labels', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List labels for a repository",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/list-labels-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-labels-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "labels"
},
"slug": "list-labels-for-a-repository",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "labels",
"subcategoryLabel": "Labels",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n },\n {\n \"id\": 208045947,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDc=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/enhancement\",\n \"name\": \"enhancement\",\n \"description\": \"New feature or request\",\n \"color\": \"a2eeef\",\n \"default\": false\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/labels",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/labels \\\n -d '{\"name\":\"name\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/labels \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/labels', {\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/labels', {\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})\n"
}
],
"summary": "Create a label",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/create-label",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#create-a-label"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Required. The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing :strawberry: will render the emoji
. For a full list of available emoji and codes, see \"Emoji cheat sheet.\"
The hexadecimal color code for the label, without the leading #.
A short description of the label.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short description of the label.", "childParamsGroups": [] } }, "required": [ "name" ] }, "example": { "name": "bug", "description": "Something isn't working", "color": "f29513" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "issues", "subcategory": "labels" }, "slug": "create-a-label", "category": "issues", "categoryLabel": "Issues", "subcategory": "labels", "subcategoryLabel": "Labels", "contentType": "application/json", "notes": [], "descriptionHTML": "", "bodyParameters": [ { "type": "string", "description": "Required. The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing :strawberry: will render the emoji
. For a full list of available emoji and codes, see \"Emoji cheat sheet.\"
The hexadecimal color code for the label, without the leading #.
A short description of the label.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short description of the label.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/labels/{name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "name",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/labels/NAME",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/labels/NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/labels/{name}', {\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/labels/{name}', {\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})\n"
}
],
"summary": "Get a label",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/get-label",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#get-a-label"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "labels"
},
"slug": "get-a-label",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "labels",
"subcategoryLabel": "Labels",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/labels/{name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "name",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/labels/NAME \\\n -d '{\"new_name\":\"new_name\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/labels/NAME \\\n -d '{\"new_name\":\"new_name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/labels/{name}', {\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name',\n new_name: 'new_name'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/labels/{name}', {\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name',\n new_name: 'new_name'\n})\n"
}
],
"summary": "Update a label",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/update-label",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#update-a-label"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"new_name": {
"type": "string",
"description": "The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing :strawberry: will render the emoji
. For a full list of available emoji and codes, see \"Emoji cheat sheet.\"
The hexadecimal color code for the label, without the leading #.
A short description of the label.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short description of the label.", "childParamsGroups": [] } } }, "example": { "new_name": "bug :bug:", "description": "Small bug fix required", "color": "b01f26" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "issues", "subcategory": "labels" }, "slug": "update-a-label", "category": "issues", "categoryLabel": "Issues", "subcategory": "labels", "subcategoryLabel": "Labels", "contentType": "application/json", "notes": [], "descriptionHTML": "", "bodyParameters": [ { "type": "string", "description": "The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing :strawberry: will render the emoji
. For a full list of available emoji and codes, see \"Emoji cheat sheet.\"
The hexadecimal color code for the label, without the leading #.
A short description of the label.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short description of the label.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug%20:bug:\",\n \"name\": \"bug :bug:\",\n \"description\": \"Small bug fix required\",\n \"color\": \"b01f26\",\n \"default\": true\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/labels/{name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "name",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/labels/NAME",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/labels/NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/labels/{name}', {\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/labels/{name}', {\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})\n"
}
],
"summary": "Delete a label",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/delete-label",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#delete-a-label"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "labels"
},
"slug": "delete-a-label",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "labels",
"subcategoryLabel": "Labels",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/languages",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/languages",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/languages"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/languages', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/languages', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List repository languages",
"description": "Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language.",
"tags": [
"repos"
],
"operationId": "repos/list-languages",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-repository-languages"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
},
"slug": "list-repository-languages",
"category": "repos",
"categoryLabel": "Repos",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"C\": 78769,\n \"Python\": 7769\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/lfs",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/lfs",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/lfs"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/lfs', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/lfs', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Enable Git LFS for a repository",
"description": "**Note:** The Git LFS API endpoints are currently in beta and are subject to change.",
"operationId": "repos/enable-lfs-for-repo",
"tags": [
"repos"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "repos",
"subcategory": "lfs"
},
"slug": "enable-git-lfs-for-a-repository",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "lfs",
"subcategoryLabel": "Lfs",
"notes": [],
"responses": [
{
"httpStatusCode": "202",
"httpStatusMessage": "Accepted",
"description": "Accepted"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "We will return a 403 with one of the following messages:\n\n- Git LFS support not enabled because Git LFS is globally disabled.\n- Git LFS support not enabled because Git LFS is disabled for the root repository in the network.\n- Git LFS support not enabled because Git LFS is disabled for Note: The Git LFS API endpoints are currently in beta and are subject to change.
" }, { "verb": "delete", "requestPath": "/repos/{owner}/{repo}/lfs", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/lfs", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/lfs"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/lfs', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/lfs', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Disable Git LFS for a repository",
"description": "**Note:** The Git LFS API endpoints are currently in beta and are subject to change.",
"operationId": "repos/disable-lfs-for-repo",
"tags": [
"repos"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "repos",
"subcategory": "lfs"
},
"slug": "disable-git-lfs-for-a-repository",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "lfs",
"subcategoryLabel": "Lfs",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Note: The Git LFS API endpoints are currently in beta and are subject to change.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/license", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/license", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/license"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/license', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/license', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get the license for a repository",
"description": "This method returns the contents of the repository's license file, if one is detected.\n\nSimilar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML.",
"tags": [
"licenses"
],
"operationId": "licenses/get-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "licenses",
"subcategory": null
},
"slug": "get-the-license-for-a-repository",
"category": "licenses",
"categoryLabel": "Licenses",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "This method returns the contents of the repository's license file, if one is detected.
\nSimilar to Get repository content, this method also supports custom media types for retrieving the raw license content or rendered license HTML.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"name\": \"LICENSE\",\n \"path\": \"LICENSE\",\n \"sha\": \"401c59dcc4570b954dd6d345e76199e1f4e76266\",\n \"size\": 1077,\n \"url\": \"https://api.github.com/repos/benbalter/gman/contents/LICENSE?ref=master\",\n \"html_url\": \"https://github.com/benbalter/gman/blob/master/LICENSE\",\n \"git_url\": \"https://api.github.com/repos/benbalter/gman/git/blobs/401c59dcc4570b954dd6d345e76199e1f4e76266\",\n \"download_url\": \"https://raw.githubusercontent.com/benbalter/gman/master/LICENSE?lab=true\",\n \"type\": \"file\",\n \"content\": \"VGhlIE1JVCBMaWNlbnNlIChNSVQpCgpDb3B5cmlnaHQgKGMpIDIwMTMgQmVu\\nIEJhbHRlcgoKUGVybWlzc2lvbiBpcyBoZXJlYnkgZ3JhbnRlZCwgZnJlZSBv\\nZiBjaGFyZ2UsIHRvIGFueSBwZXJzb24gb2J0YWluaW5nIGEgY29weSBvZgp0\\naGlzIHNvZnR3YXJlIGFuZCBhc3NvY2lhdGVkIGRvY3VtZW50YXRpb24gZmls\\nZXMgKHRoZSAiU29mdHdhcmUiKSwgdG8gZGVhbCBpbgp0aGUgU29mdHdhcmUg\\nd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nIHdpdGhvdXQgbGltaXRh\\ndGlvbiB0aGUgcmlnaHRzIHRvCnVzZSwgY29weSwgbW9kaWZ5LCBtZXJnZSwg\\ncHVibGlzaCwgZGlzdHJpYnV0ZSwgc3VibGljZW5zZSwgYW5kL29yIHNlbGwg\\nY29waWVzIG9mCnRoZSBTb2Z0d2FyZSwgYW5kIHRvIHBlcm1pdCBwZXJzb25z\\nIHRvIHdob20gdGhlIFNvZnR3YXJlIGlzIGZ1cm5pc2hlZCB0byBkbyBzbywK\\nc3ViamVjdCB0byB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbnM6CgpUaGUgYWJv\\ndmUgY29weXJpZ2h0IG5vdGljZSBhbmQgdGhpcyBwZXJtaXNzaW9uIG5vdGlj\\nZSBzaGFsbCBiZSBpbmNsdWRlZCBpbiBhbGwKY29waWVzIG9yIHN1YnN0YW50\\naWFsIHBvcnRpb25zIG9mIHRoZSBTb2Z0d2FyZS4KClRIRSBTT0ZUV0FSRSBJ\\nUyBQUk9WSURFRCAiQVMgSVMiLCBXSVRIT1VUIFdBUlJBTlRZIE9GIEFOWSBL\\nSU5ELCBFWFBSRVNTIE9SCklNUExJRUQsIElOQ0xVRElORyBCVVQgTk9UIExJ\\nTUlURUQgVE8gVEhFIFdBUlJBTlRJRVMgT0YgTUVSQ0hBTlRBQklMSVRZLCBG\\nSVRORVNTCkZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSBBTkQgTk9OSU5GUklO\\nR0VNRU5ULiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUgQVVUSE9SUyBPUgpDT1BZ\\nUklHSFQgSE9MREVSUyBCRSBMSUFCTEUgRk9SIEFOWSBDTEFJTSwgREFNQUdF\\nUyBPUiBPVEhFUiBMSUFCSUxJVFksIFdIRVRIRVIKSU4gQU4gQUNUSU9OIE9G\\nIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwgQVJJU0lORyBGUk9NLCBP\\nVVQgT0YgT1IgSU4KQ09OTkVDVElPTiBXSVRIIFRIRSBTT0ZUV0FSRSBPUiBU\\nSEUgVVNFIE9SIE9USEVSIERFQUxJTkdTIElOIFRIRSBTT0ZUV0FSRS4K\\n\",\n \"encoding\": \"base64\",\n \"_links\": {\n \"self\": \"https://api.github.com/repos/benbalter/gman/contents/LICENSE?ref=master\",\n \"git\": \"https://api.github.com/repos/benbalter/gman/git/blobs/401c59dcc4570b954dd6d345e76199e1f4e76266\",\n \"html\": \"https://github.com/benbalter/gman/blob/master/LICENSE\"\n },\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"spdx_id\": \"MIT\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n }\n}\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/merge-upstream",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/merge-upstream \\\n -d '{\"branch\":\"branch\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/merge-upstream \\\n -d '{\"branch\":\"branch\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/merge-upstream', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/merge-upstream', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch'\n})\n"
}
],
"summary": "Sync a fork branch with the upstream repository",
"description": "**Note:** This endpoint is currently in beta and subject to change.\n\nSync a branch of a forked repository to keep it up-to-date with the upstream repository.",
"tags": [
"repos"
],
"operationId": "repos/merge-upstream",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#sync-a-fork-branch-with-the-upstream-repository"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"branch": {
"type": "string",
"description": "Required. The name of the branch which should be updated to match upstream.
", "name": "branch", "in": "body", "rawType": "string", "rawDescription": "The name of the branch which should be updated to match upstream.", "childParamsGroups": [] } }, "required": [ "branch" ] }, "example": { "branch": "main" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "repos", "subcategory": "branches" }, "slug": "sync-a-fork-branch-with-the-upstream-repository", "category": "repos", "categoryLabel": "Repos", "subcategory": "branches", "subcategoryLabel": "Branches", "contentType": "application/json", "notes": [], "descriptionHTML": "Note: This endpoint is currently in beta and subject to change.
\nSync a branch of a forked repository to keep it up-to-date with the upstream repository.
", "bodyParameters": [ { "type": "string", "description": "Required. The name of the branch which should be updated to match upstream.
", "name": "branch", "in": "body", "rawType": "string", "rawDescription": "The name of the branch which should be updated to match upstream.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "The branch has been successfully synced with the upstream repository", "payload": "{\n \"message\": \"Successfully fetched and fast-forwarded from upstream defunkt:main\",\n \"merge_type\": \"fast-forward\",\n \"base_branch\": \"defunkt:main\"\n}\n"
},
{
"httpStatusCode": "409",
"httpStatusMessage": "Conflict",
"description": "The branch could not be synced because of a merge conflict"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "The branch could not be synced for some other reason"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/merges",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/merges \\\n -d '{\"base\":\"base\",\"head\":\"head\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/merges \\\n -d '{\"base\":\"base\",\"head\":\"head\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/merges', {\n owner: 'octocat',\n repo: 'hello-world',\n base: 'base',\n head: 'head'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/merges', {\n owner: 'octocat',\n repo: 'hello-world',\n base: 'base',\n head: 'head'\n})\n"
}
],
"summary": "Merge a branch",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/merge",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#merge-a-branch"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"base": {
"type": "string",
"description": "Required. The name of the base branch that the head will be merged into.
", "name": "base", "in": "body", "rawType": "string", "rawDescription": "The name of the base branch that the head will be merged into.", "childParamsGroups": [] }, "head": { "type": "string", "description": "Required. The head to merge. This can be a branch name or a commit SHA1.
", "name": "head", "in": "body", "rawType": "string", "rawDescription": "The head to merge. This can be a branch name or a commit SHA1.", "childParamsGroups": [] }, "commit_message": { "type": "string", "description": "Commit message to use for the merge commit. If omitted, a default message will be used.
", "name": "commit_message", "in": "body", "rawType": "string", "rawDescription": "Commit message to use for the merge commit. If omitted, a default message will be used.", "childParamsGroups": [] } }, "required": [ "base", "head" ] }, "example": { "base": "master", "head": "cool_feature", "commit_message": "Shipped cool_feature!" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "repos", "subcategory": "merging" }, "slug": "merge-a-branch", "category": "repos", "categoryLabel": "Repos", "subcategory": "merging", "subcategoryLabel": "Merging", "contentType": "application/json", "notes": [], "descriptionHTML": "", "bodyParameters": [ { "type": "string", "description": "Required. The name of the base branch that the head will be merged into.
", "name": "base", "in": "body", "rawType": "string", "rawDescription": "The name of the base branch that the head will be merged into.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The head to merge. This can be a branch name or a commit SHA1.
", "name": "head", "in": "body", "rawType": "string", "rawDescription": "The head to merge. This can be a branch name or a commit SHA1.", "childParamsGroups": [] }, { "type": "string", "description": "Commit message to use for the merge commit. If omitted, a default message will be used.
", "name": "commit_message", "in": "body", "rawType": "string", "rawDescription": "Commit message to use for the merge commit. If omitted, a default message will be used.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Successful Response (The resulting merge commit)", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n \"commit\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"author\": {\n \"name\": \"Monalisa Octocat\",\n \"email\": \"mona@github.com\",\n \"date\": \"2011-04-14T16:00:49Z\"\n },\n \"committer\": {\n \"name\": \"Monalisa Octocat\",\n \"email\": \"mona@github.com\",\n \"date\": \"2011-04-14T16:00:49Z\"\n },\n \"message\": \"Fix all the bugs\",\n \"tree\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n },\n \"comment_count\": 0,\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n }\n },\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"committer\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"parents\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n }\n ],\n \"stats\": {\n \"additions\": 104,\n \"deletions\": 4,\n \"total\": 108\n },\n \"files\": [\n {\n \"filename\": \"file1.txt\",\n \"additions\": 10,\n \"deletions\": 2,\n \"changes\": 12,\n \"status\": \"modified\",\n \"raw_url\": \"https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt\",\n \"blob_url\": \"https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt\",\n \"patch\": \"@@ -29,7 +29,7 @@\\n.....\"\n }\n ]\n}\n"
},
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response when already merged"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found when the base or head does not exist"
},
{
"httpStatusCode": "409",
"httpStatusMessage": "Conflict",
"description": "Conflict when there is a merge conflict"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/milestones",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "state",
"description": "The state of the milestone. Either `open`, `closed`, or `all`.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"open",
"closed",
"all"
],
"default": "open"
},
"descriptionHTML": "The state of the milestone. Either open, closed, or all.
What to sort results by. Either due_on or completeness.
The direction of the sort. Either asc or desc.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/milestones', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/milestones', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List milestones",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/list-milestones",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-milestones"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "milestones"
},
"slug": "list-milestones",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "milestones",
"subcategoryLabel": "Milestones",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/milestones",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones \\\n -d '{\"title\":\"title\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones \\\n -d '{\"title\":\"title\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/milestones', {\n owner: 'octocat',\n repo: 'hello-world',\n title: 'title'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/milestones', {\n owner: 'octocat',\n repo: 'hello-world',\n title: 'title'\n})\n"
}
],
"summary": "Create a milestone",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/create-milestone",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#create-a-milestone"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Required. The title of the milestone.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title of the milestone.", "childParamsGroups": [] }, "state": { "type": "string", "description": "The state of the milestone. Either open or closed.
A description of the milestone.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A description of the milestone.", "childParamsGroups": [] }, "due_on": { "type": "string", "format": "date-time", "description": "The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Required. The title of the milestone.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title of the milestone.", "childParamsGroups": [] }, { "type": "string", "description": "The state of the milestone. Either open or closed.
A description of the milestone.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A description of the milestone.", "childParamsGroups": [] }, { "type": "string", "format": "date-time", "description": "The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/milestones/{milestone_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "milestone_number",
"description": "milestone_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "milestone_number parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/milestones/{milestone_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n milestone_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/milestones/{milestone_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n milestone_number: 42\n})\n"
}
],
"summary": "Get a milestone",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/get-milestone",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#get-a-milestone"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "milestones"
},
"slug": "get-a-milestone",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "milestones",
"subcategoryLabel": "Milestones",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/milestones/{milestone_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "milestone_number",
"description": "milestone_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "milestone_number parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42 \\\n -d '{\"title\":\"title\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42 \\\n -d '{\"title\":\"title\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/milestones/{milestone_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n milestone_number: 42,\n title: 'title'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/milestones/{milestone_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n milestone_number: 42,\n title: 'title'\n})\n"
}
],
"summary": "Update a milestone",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/update-milestone",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#update-a-milestone"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The title of the milestone.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title of the milestone.", "childParamsGroups": [] }, "state": { "type": "string", "description": "The state of the milestone. Either open or closed.
A description of the milestone.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A description of the milestone.", "childParamsGroups": [] }, "due_on": { "type": "string", "format": "date-time", "description": "The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The title of the milestone.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title of the milestone.", "childParamsGroups": [] }, { "type": "string", "description": "The state of the milestone. Either open or closed.
A description of the milestone.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A description of the milestone.", "childParamsGroups": [] }, { "type": "string", "format": "date-time", "description": "The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/milestones/{milestone_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "milestone_number",
"description": "milestone_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "milestone_number parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/milestones/{milestone_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n milestone_number: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/milestones/{milestone_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n milestone_number: 42\n})\n"
}
],
"summary": "Delete a milestone",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/delete-milestone",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#delete-a-milestone"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "milestones"
},
"slug": "delete-a-milestone",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "milestones",
"subcategoryLabel": "Milestones",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/milestones/{milestone_number}/labels",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "milestone_number",
"description": "milestone_number parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "milestone_number parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42/labels", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42/labels"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels', {\n owner: 'octocat',\n repo: 'hello-world',\n milestone_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels', {\n owner: 'octocat',\n repo: 'hello-world',\n milestone_number: 42\n})\n"
}
],
"summary": "List labels for issues in a milestone",
"description": "",
"tags": [
"issues"
],
"operationId": "issues/list-labels-for-milestone",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "labels"
},
"slug": "list-labels-for-issues-in-a-milestone",
"category": "issues",
"categoryLabel": "Issues",
"subcategory": "labels",
"subcategoryLabel": "Labels",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n },\n {\n \"id\": 208045947,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDc=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/enhancement\",\n \"name\": \"enhancement\",\n \"description\": \"New feature or request\",\n \"color\": \"a2eeef\",\n \"default\": false\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/notifications",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "all",
"description": "If `true`, show notifications marked as read.",
"in": "query",
"required": false,
"schema": {
"type": "boolean",
"default": false
},
"descriptionHTML": "If true, show notifications marked as read.
If true, only shows notifications in which the user is directly participating or mentioned.
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/notifications", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/notifications"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/notifications', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/notifications', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List repository notifications for the authenticated user",
"description": "List all notifications for the current user.",
"tags": [
"activity"
],
"operationId": "activity/list-repo-notifications-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "notifications"
},
"slug": "list-repository-notifications-for-the-authenticated-user",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "notifications",
"subcategoryLabel": "Notifications",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List all notifications for the current user.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": \"1\",\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n },\n \"subject\": {\n \"title\": \"Greetings\",\n \"url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/123\",\n \"latest_comment_url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/comments/123\",\n \"type\": \"Issue\"\n },\n \"reason\": \"subscribed\",\n \"unread\": true,\n \"updated_at\": \"2014-11-07T22:01:45Z\",\n \"last_read_at\": \"2014-11-07T22:01:45Z\",\n \"url\": \"https://api.github.com/notifications/threads/1\",\n \"subscription_url\": \"https://api.github.com/notifications/threads/1/subscription\"\n }\n]\n"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/notifications",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/notifications \\\n -d '{\"last_read_at\":\"last_read_at\"}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/notifications \\\n -d '{\"last_read_at\":\"last_read_at\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/notifications', {\n owner: 'octocat',\n repo: 'hello-world',\n last_read_at: 'last_read_at'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/notifications', {\n owner: 'octocat',\n repo: 'hello-world',\n last_read_at: 'last_read_at'\n})\n"
}
],
"summary": "Mark repository notifications as read",
"description": "Marks all notifications in a repository as \"read\" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as \"read.\" To check whether any \"unread\" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`.",
"tags": [
"activity"
],
"operationId": "activity/mark-repo-notifications-as-read",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"last_read_at": {
"type": "string",
"format": "date-time",
"description": "Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Default: The current timestamp.
Marks all notifications in a repository as \"read\" removes them from the default view on GitHub. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub will run an asynchronous process to mark notifications as \"read.\" To check whether any \"unread\" notifications remain, you can use the List repository notifications for the authenticated user endpoint and pass the query parameter all=false.
Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Default: The current timestamp.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pages', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pages', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get a GitHub Pages site",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/get-pages",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-github-pages-site"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "pages"
},
"slug": "get-a-github-pages-site",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "pages",
"subcategoryLabel": "Pages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"url\": \"https://api.github.com/repos/github/developer.github.com/pages\",\n \"status\": \"built\",\n \"cname\": \"developer.github.com\",\n \"custom_404\": false,\n \"html_url\": \"https://developer.github.com\",\n \"source\": {\n \"branch\": \"master\",\n \"path\": \"/\"\n },\n \"public\": true,\n \"https_certificate\": {\n \"state\": \"approved\",\n \"description\": \"Certificate is approved\",\n \"domains\": [\n \"developer.github.com\"\n ],\n \"expires_at\": \"2021-05-22\"\n },\n \"https_enforced\": true\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/pages",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages \\\n -d '{\"source\":{\"branch\":\"branch\",\"path\":\"path\"}}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages \\\n -d '{\"source\":{\"branch\":\"branch\",\"path\":\"path\"}}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/pages', {\n owner: 'octocat',\n repo: 'hello-world',\n source: {\n branch: 'branch',\n path: 'path'\n }\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/pages', {\n owner: 'octocat',\n repo: 'hello-world',\n source: {\n branch: 'branch',\n path: 'path'\n }\n})\n"
}
],
"summary": "Create a GitHub Pages site",
"description": "Configures a GitHub Pages site. For more information, see \"[About GitHub Pages](/github/working-with-github-pages/about-github-pages).\"",
"tags": [
"repos"
],
"operationId": "repos/create-pages-site",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-a-github-pages-site"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "The source branch and directory used to publish your Pages site.",
"nullable": true,
"properties": {
"source": {
"type": "object",
"description": "Required. The source branch and directory used to publish your Pages site.
", "properties": { "branch": { "type": "string", "description": "Required. The repository branch used to publish your site's source files.
", "name": "branch", "in": "body", "rawType": "string", "rawDescription": "The repository branch used to publish your site's source files.", "childParamsGroups": [] }, "path": { "type": "string", "description": "The repository directory that includes the source files for the Pages site. Allowed paths are / or /docs. Default: /
Required. The repository branch used to publish your site's source files.
", "name": "branch", "in": "body", "rawType": "string", "rawDescription": "The repository branch used to publish your site's source files.", "childParamsGroups": [] }, { "type": "string", "description": "The repository directory that includes the source files for the Pages site. Allowed paths are / or /docs. Default: /
Configures a GitHub Pages site. For more information, see \"About GitHub Pages.\"
", "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/github/developer.github.com/pages\",\n \"status\": \"built\",\n \"cname\": \"developer.github.com\",\n \"custom_404\": false,\n \"html_url\": \"https://developer.github.com\",\n \"source\": {\n \"branch\": \"master\",\n \"path\": \"/\"\n },\n \"public\": true,\n \"https_certificate\": {\n \"state\": \"approved\",\n \"description\": \"Certificate is approved\",\n \"domains\": [\n \"developer.github.com\"\n ],\n \"expires_at\": \"2021-05-22\"\n },\n \"https_enforced\": true\n}\n"
},
{
"httpStatusCode": "409",
"httpStatusMessage": "Conflict",
"description": "Conflict"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"type": "object",
"description": "Required. The source branch and directory used to publish your Pages site.
", "properties": { "branch": { "type": "string", "description": "Required. The repository branch used to publish your site's source files.
", "name": "branch", "in": "body", "rawType": "string", "rawDescription": "The repository branch used to publish your site's source files.", "childParamsGroups": [] }, "path": { "type": "string", "description": "The repository directory that includes the source files for the Pages site. Allowed paths are / or /docs. Default: /
Required. The repository branch used to publish your site's source files.
", "name": "branch", "in": "body", "rawType": "string", "rawDescription": "The repository branch used to publish your site's source files.", "childParamsGroups": [] }, { "type": "string", "description": "The repository directory that includes the source files for the Pages site. Allowed paths are / or /docs. Default: /
curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages \\\n -d '{\"cname\":\"cname\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/pages', {\n owner: 'octocat',\n repo: 'hello-world',\n cname: 'cname'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/pages', {\n owner: 'octocat',\n repo: 'hello-world',\n cname: 'cname'\n})\n"
}
],
"summary": "Update information about a GitHub Pages site",
"description": "Updates information for a GitHub Pages site. For more information, see \"[About GitHub Pages](/github/working-with-github-pages/about-github-pages).",
"tags": [
"repos"
],
"operationId": "repos/update-information-about-pages-site",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#update-information-about-a-github-pages-site"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"cname": {
"type": "string or nullable",
"description": "Specify a custom domain for the repository. Sending a null value will remove the custom domain. For more about custom domains, see \"Using a custom domain with GitHub Pages.\"
Specify whether HTTPS should be enforced for the repository.
", "name": "https_enforced", "in": "body", "rawType": "boolean", "rawDescription": "Specify whether HTTPS should be enforced for the repository.", "childParamsGroups": [] }, "public": { "type": "boolean", "description": "Configures access controls for the GitHub Pages site. If public is set to true, the site is accessible to anyone on the internet. If set to false, the site will only be accessible to users who have at least read access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to internal visibility. This feature is only available to repositories in an organization on an Enterprise plan.
Updates information for a GitHub Pages site. For more information, see \"About GitHub Pages.
", "bodyParameters": [ { "type": "string or nullable", "description": "Specify a custom domain for the repository. Sending a null value will remove the custom domain. For more about custom domains, see \"Using a custom domain with GitHub Pages.\"
Specify whether HTTPS should be enforced for the repository.
", "name": "https_enforced", "in": "body", "rawType": "boolean", "rawDescription": "Specify whether HTTPS should be enforced for the repository.", "childParamsGroups": [] }, { "type": "boolean", "description": "Configures access controls for the GitHub Pages site. If public is set to true, the site is accessible to anyone on the internet. If set to false, the site will only be accessible to users who have at least read access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to internal visibility. This feature is only available to repositories in an organization on an Enterprise plan.
curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/pages', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/pages', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Delete a GitHub Pages site",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/delete-pages-site",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-a-github-pages-site"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "pages"
},
"slug": "delete-a-github-pages-site",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "pages",
"subcategoryLabel": "Pages",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/pages/builds",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/builds", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/builds"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pages/builds', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pages/builds', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List GitHub Pages builds",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/list-pages-builds",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-github-pages-builds"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "pages"
},
"slug": "list-github-pages-builds",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "pages",
"subcategoryLabel": "Pages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"url\": \"https://api.github.com/repos/github/developer.github.com/pages/builds/5472601\",\n \"status\": \"built\",\n \"error\": {\n \"message\": null\n },\n \"pusher\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"commit\": \"351391cdcb88ffae71ec3028c91f375a8036a26b\",\n \"duration\": 2104,\n \"created_at\": \"2014-02-10T19:00:49Z\",\n \"updated_at\": \"2014-02-10T19:00:51Z\"\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/pages/builds",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/builds",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/builds"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/pages/builds', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/pages/builds', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Request a GitHub Pages build",
"description": "You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures.\n\nBuild requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes.",
"tags": [
"repos"
],
"operationId": "repos/request-pages-build",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#request-a-github-pages-build"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "pages"
},
"slug": "request-a-github-pages-build",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "pages",
"subcategoryLabel": "Pages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures.
\nBuild requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes.
", "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/github/developer.github.com/pages/builds/latest\",\n \"status\": \"queued\"\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/pages/builds/latest",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/builds/latest",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/builds/latest"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pages/builds/latest', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pages/builds/latest', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get latest Pages build",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/get-latest-pages-build",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-latest-pages-build"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "pages"
},
"slug": "get-latest-pages-build",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "pages",
"subcategoryLabel": "Pages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"url\": \"https://api.github.com/repos/github/developer.github.com/pages/builds/5472601\",\n \"status\": \"built\",\n \"error\": {\n \"message\": null\n },\n \"pusher\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"commit\": \"351391cdcb88ffae71ec3028c91f375a8036a26b\",\n \"duration\": 2104,\n \"created_at\": \"2014-02-10T19:00:49Z\",\n \"updated_at\": \"2014-02-10T19:00:51Z\"\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/pages/builds/{build_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "build_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/builds/42",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/builds/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pages/builds/{build_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n build_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pages/builds/{build_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n build_id: 42\n})\n"
}
],
"summary": "Get GitHub Pages build",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/get-pages-build",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-github-pages-build"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "pages"
},
"slug": "get-github-pages-build",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "pages",
"subcategoryLabel": "Pages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"url\": \"https://api.github.com/repos/github/developer.github.com/pages/builds/5472601\",\n \"status\": \"built\",\n \"error\": {\n \"message\": null\n },\n \"pusher\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"commit\": \"351391cdcb88ffae71ec3028c91f375a8036a26b\",\n \"duration\": 2104,\n \"created_at\": \"2014-02-10T19:00:49Z\",\n \"updated_at\": \"2014-02-10T19:00:51Z\"\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/pages/health",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/health",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/health"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pages/health', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pages/health', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get a DNS health check for GitHub Pages",
"description": "Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages.\n\nThe first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response.\n\nUsers must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint.",
"tags": [
"repos"
],
"operationId": "repos/get-pages-health-check",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-dns-health-check-for-github-pages"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "pages"
},
"slug": "get-a-dns-health-check-for-github-pages",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "pages",
"subcategoryLabel": "Pages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a health check of the DNS settings for the CNAME record configured for a repository's GitHub Pages.
The first request to this endpoint returns a 202 Accepted status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a 200 OK status with the health check results in the response.
Users must have admin or owner permissions. GitHub Apps must have the pages:write and administration:write permission to use this endpoint.
{\n \"domain\": {\n \"host\": \"example.com\",\n \"uri\": \"http://example.com/\",\n \"nameservers\": \"default\",\n \"dns_resolves\": true,\n \"is_proxied\": false,\n \"is_cloudflare_ip\": false,\n \"is_fastly_ip\": false,\n \"is_old_ip_address\": false,\n \"is_a_record\": true,\n \"has_cname_record\": false,\n \"has_mx_records_present\": false,\n \"is_valid_domain\": true,\n \"is_apex_domain\": true,\n \"should_be_a_record\": true,\n \"is_cname_to_github_user_domain\": false,\n \"is_cname_to_pages_dot_github_dot_com\": false,\n \"is_cname_to_fastly\": false,\n \"is_pointed_to_github_pages_ip\": true,\n \"is_non_github_pages_ip_present\": false,\n \"is_pages_domain\": false,\n \"is_served_by_pages\": true,\n \"is_valid\": true,\n \"reason\": null,\n \"responds_to_https\": true,\n \"enforces_https\": true,\n \"https_error\": null,\n \"is_https_eligible\": true,\n \"caa_error\": null\n },\n \"alt_domain\": {\n \"host\": \"www.example.com\",\n \"uri\": \"http://www.example.com/\",\n \"nameservers\": \"default\",\n \"dns_resolves\": true,\n \"is_proxied\": false,\n \"is_cloudflare_ip\": false,\n \"is_fastly_ip\": false,\n \"is_old_ip_address\": false,\n \"is_a_record\": true,\n \"has_cname_record\": false,\n \"has_mx_records_present\": false,\n \"is_valid_domain\": true,\n \"is_apex_domain\": true,\n \"should_be_a_record\": true,\n \"is_cname_to_github_user_domain\": false,\n \"is_cname_to_pages_dot_github_dot_com\": false,\n \"is_cname_to_fastly\": false,\n \"is_pointed_to_github_pages_ip\": true,\n \"is_non_github_pages_ip_present\": false,\n \"is_pages_domain\": false,\n \"is_served_by_pages\": true,\n \"is_valid\": true,\n \"reason\": null,\n \"responds_to_https\": true,\n \"enforces_https\": true,\n \"https_error\": null,\n \"is_https_eligible\": true,\n \"caa_error\": null\n }\n}\n"
},
{
"httpStatusCode": "202",
"httpStatusMessage": "Accepted",
"description": "Empty response"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Custom domains are not available for GitHub Pages"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "There isn't a CNAME for this page"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/projects",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "state",
"description": "Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"open",
"closed",
"all"
],
"default": "open"
},
"descriptionHTML": "Indicates the state of the projects to return. Can be either open, closed, or all.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/projects", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/projects"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/projects', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/projects', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List repository projects",
"description": "Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.",
"tags": [
"projects"
],
"operationId": "projects/list-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#list-repository-projects"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": null
},
"slug": "list-repository-projects",
"category": "projects",
"categoryLabel": "Projects",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the projects in a repository. Returns a 404 Not Found status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
[\n {\n \"owner_url\": \"https://api.github.com/repos/api-playground/projects-test\",\n \"url\": \"https://api.github.com/projects/1002604\",\n \"html_url\": \"https://github.com/api-playground/projects-test/projects/1\",\n \"columns_url\": \"https://api.github.com/projects/1002604/columns\",\n \"id\": 1002604,\n \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDQ=\",\n \"name\": \"Projects Documentation\",\n \"body\": \"Developer documentation project for the developer site.\",\n \"number\": 1,\n \"state\": \"open\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\"\n }\n]\n"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/projects",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/projects \\\n -d '{\"name\":\"name\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/projects \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/projects', {\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/projects', {\n owner: 'octocat',\n repo: 'hello-world',\n name: 'name'\n})\n"
}
],
"summary": "Create a repository project",
"description": "Creates a repository project board. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.",
"tags": [
"projects"
],
"operationId": "projects/create-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#create-a-repository-project"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Required. The name of the project.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the project.", "childParamsGroups": [] }, "body": { "type": "string", "description": "The description of the project.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The description of the project.", "childParamsGroups": [] } }, "required": [ "name" ] }, "example": { "name": "Projects Documentation", "body": "Developer documentation project for the developer site." } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "projects", "subcategory": null }, "slug": "create-a-repository-project", "category": "projects", "categoryLabel": "Projects", "contentType": "application/json", "notes": [], "descriptionHTML": "Creates a repository project board. Returns a 404 Not Found status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
Required. The name of the project.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the project.", "childParamsGroups": [] }, { "type": "string", "description": "The description of the project.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The description of the project.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"owner_url\": \"https://api.github.com/repos/api-playground/projects-test\",\n \"url\": \"https://api.github.com/projects/1002604\",\n \"html_url\": \"https://github.com/api-playground/projects-test/projects/1\",\n \"columns_url\": \"https://api.github.com/projects/1002604/columns\",\n \"id\": 1002604,\n \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDQ=\",\n \"name\": \"Projects Documentation\",\n \"body\": \"Developer documentation project for the developer site.\",\n \"number\": 1,\n \"state\": \"open\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\"\n}\n"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "410",
"httpStatusMessage": "Gone",
"description": "Gone"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/pulls",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "state",
"description": "Either `open`, `closed`, or `all` to filter by state.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"open",
"closed",
"all"
],
"default": "open"
},
"descriptionHTML": "Either open, closed, or all to filter by state.
Filter pulls by head user or head organization and branch name in the format of user:ref-name or organization:ref-name. For example: github:new-script-format or octocat:test-branch.
Filter pulls by base branch name. Example: gh-pages.
What to sort results by. Can be either created, updated, popularity (comment count) or long-running (age, filtering by pulls updated in the last month).
The direction of the sort. Can be either asc or desc. Default: desc when sort is created or sort is not specified, otherwise asc.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pulls', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pulls', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List pull requests",
"description": "Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"pulls"
],
"operationId": "pulls/list",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#list-pull-requests"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "pulls",
"subcategory": null
},
"slug": "list-pull-requests",
"category": "pulls",
"categoryLabel": "Pulls",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"id\": 1,\n \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"number\": 1347,\n \"state\": \"open\",\n \"locked\": true,\n \"title\": \"Amazing new feature\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Please pull these awesome changes in!\",\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"active_lock_reason\": \"too heated\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:01:12Z\",\n \"closed_at\": \"2011-01-26T19:01:12Z\",\n \"merged_at\": \"2011-01-26T19:01:12Z\",\n \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n {\n \"login\": \"hubot\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/hubot\",\n \"html_url\": \"https://github.com/hubot\",\n \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n }\n ],\n \"requested_reviewers\": [\n {\n \"login\": \"other_user\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/other_user\",\n \"html_url\": \"https://github.com/other_user\",\n \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"requested_teams\": [\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n ],\n \"head\": {\n \"label\": \"octocat:new-topic\",\n \"ref\": \"new-topic\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"repo\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n },\n \"base\": {\n \"label\": \"octocat:master\",\n \"ref\": \"master\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"repo\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n },\n \"_links\": {\n \"self\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n },\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n },\n \"issue\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n },\n \"comments\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n },\n \"review_comments\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n },\n \"review_comment\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n },\n \"commits\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n },\n \"statuses\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n }\n },\n \"author_association\": \"OWNER\",\n \"auto_merge\": null,\n \"draft\": false\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/pulls",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls \\\n -d '{\"head\":\"head\",\"base\":\"base\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls \\\n -d '{\"head\":\"head\",\"base\":\"base\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/pulls', {\n owner: 'octocat',\n repo: 'hello-world',\n head: 'head',\n base: 'base'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/pulls', {\n owner: 'octocat',\n repo: 'hello-world',\n head: 'head',\n base: 'base'\n})\n"
}
],
"summary": "Create a pull request",
"description": "Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nTo open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.\n\nYou can create a new pull request.\n\nThis endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)\" for details.",
"tags": [
"pulls"
],
"operationId": "pulls/create",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#create-a-pull-request"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The title of the new pull request.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title of the new pull request.", "childParamsGroups": [] }, "head": { "type": "string", "description": "Required. The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace head with a user like this: username:branch.
Required. The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository.
", "name": "base", "in": "body", "rawType": "string", "rawDescription": "The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository.", "childParamsGroups": [] }, "body": { "type": "string", "description": "The contents of the pull request.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The contents of the pull request.", "childParamsGroups": [] }, "maintainer_can_modify": { "type": "boolean", "description": "Indicates whether maintainers can modify the pull request.
", "name": "maintainer_can_modify", "in": "body", "rawType": "boolean", "rawDescription": "Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.", "childParamsGroups": [] }, "draft": { "type": "boolean", "description": "Indicates whether the pull request is a draft. See \"Draft Pull Requests\" in the GitHub Help documentation to learn more.
", "name": "draft", "in": "body", "rawType": "boolean", "rawDescription": "Indicates whether the pull request is a draft. See \"[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)\" in the GitHub Help documentation to learn more.", "childParamsGroups": [] }, "issue": { "type": "integer", "example": 1, "name": "issue", "in": "body", "rawType": "integer", "description": "", "childParamsGroups": [] } }, "required": [ "head", "base" ] }, "example": { "title": "Amazing new feature", "body": "Please pull these awesome changes in!", "head": "octocat:new-feature", "base": "master" } } } }, "x-github": { "triggersNotification": true, "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "pulls", "subcategory": null }, "slug": "create-a-pull-request", "category": "pulls", "categoryLabel": "Pulls", "contentType": "application/json", "notes": [], "descriptionHTML": "Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nTo open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.
\nYou can create a new pull request.
\nThis endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.
", "bodyParameters": [ { "type": "string", "description": "The title of the new pull request.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title of the new pull request.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace head with a user like this: username:branch.
Required. The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository.
", "name": "base", "in": "body", "rawType": "string", "rawDescription": "The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository.", "childParamsGroups": [] }, { "type": "string", "description": "The contents of the pull request.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The contents of the pull request.", "childParamsGroups": [] }, { "type": "boolean", "description": "Indicates whether maintainers can modify the pull request.
", "name": "maintainer_can_modify", "in": "body", "rawType": "boolean", "rawDescription": "Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.", "childParamsGroups": [] }, { "type": "boolean", "description": "Indicates whether the pull request is a draft. See \"Draft Pull Requests\" in the GitHub Help documentation to learn more.
", "name": "draft", "in": "body", "rawType": "boolean", "rawDescription": "Indicates whether the pull request is a draft. See \"[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)\" in the GitHub Help documentation to learn more.", "childParamsGroups": [] }, { "type": "integer", "example": 1, "name": "issue", "in": "body", "rawType": "integer", "description": "", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"id\": 1,\n \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"number\": 1347,\n \"state\": \"open\",\n \"locked\": true,\n \"title\": \"Amazing new feature\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Please pull these awesome changes in!\",\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"active_lock_reason\": \"too heated\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:01:12Z\",\n \"closed_at\": \"2011-01-26T19:01:12Z\",\n \"merged_at\": \"2011-01-26T19:01:12Z\",\n \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n {\n \"login\": \"hubot\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/hubot\",\n \"html_url\": \"https://github.com/hubot\",\n \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n }\n ],\n \"requested_reviewers\": [\n {\n \"login\": \"other_user\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/other_user\",\n \"html_url\": \"https://github.com/other_user\",\n \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"requested_teams\": [\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n }\n ],\n \"head\": {\n \"label\": \"octocat:new-topic\",\n \"ref\": \"new-topic\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"repo\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_merge_commit\": true,\n \"allow_forking\": true,\n \"forks\": 123,\n \"open_issues\": 123,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n },\n \"watchers\": 123\n }\n },\n \"base\": {\n \"label\": \"octocat:master\",\n \"ref\": \"master\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"repo\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_merge_commit\": true,\n \"forks\": 123,\n \"open_issues\": 123,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n },\n \"watchers\": 123\n }\n },\n \"_links\": {\n \"self\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n },\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n },\n \"issue\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n },\n \"comments\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n },\n \"review_comments\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n },\n \"review_comment\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n },\n \"commits\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n },\n \"statuses\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n }\n },\n \"author_association\": \"OWNER\",\n \"auto_merge\": null,\n \"draft\": false,\n \"merged\": false,\n \"mergeable\": true,\n \"rebaseable\": true,\n \"mergeable_state\": \"clean\",\n \"merged_by\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"comments\": 10,\n \"review_comments\": 0,\n \"maintainer_can_modify\": true,\n \"commits\": 3,\n \"additions\": 100,\n \"deletions\": 3,\n \"changed_files\": 5\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/pulls/comments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "sort",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"created",
"updated",
"created_at"
]
},
"descriptionHTML": ""
},
{
"name": "direction",
"description": "Can be either `asc` or `desc`. Ignored without `sort` parameter.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
},
"descriptionHTML": "Can be either asc or desc. Ignored without sort parameter.
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pulls/comments', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pulls/comments', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List review comments in a repository",
"description": "Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID.",
"tags": [
"pulls"
],
"operationId": "pulls/list-review-comments-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "pulls",
"subcategory": "comments"
},
"slug": "list-review-comments-in-a-repository",
"category": "pulls",
"categoryLabel": "Pulls",
"subcategory": "comments",
"subcategoryLabel": "Comments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n \"pull_request_review_id\": 42,\n \"id\": 10,\n \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n \"path\": \"file1.txt\",\n \"position\": 1,\n \"original_position\": 4,\n \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n \"in_reply_to_id\": 8,\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Great stuff!\",\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n \"author_association\": \"NONE\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n },\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n },\n \"pull_request\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n }\n },\n \"start_line\": 1,\n \"original_start_line\": 1,\n \"start_side\": \"RIGHT\",\n \"line\": 2,\n \"original_line\": 2,\n \"side\": \"RIGHT\"\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/pulls/comments/{comment_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pulls/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pulls/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})\n"
}
],
"summary": "Get a review comment for a pull request",
"description": "Provides details for a review comment.",
"tags": [
"pulls"
],
"operationId": "pulls/get-review-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "pulls",
"subcategory": "comments"
},
"slug": "get-a-review-comment-for-a-pull-request",
"category": "pulls",
"categoryLabel": "Pulls",
"subcategory": "comments",
"subcategoryLabel": "Comments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Provides details for a review comment.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n \"pull_request_review_id\": 42,\n \"id\": 10,\n \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n \"path\": \"file1.txt\",\n \"position\": 1,\n \"original_position\": 4,\n \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n \"in_reply_to_id\": 8,\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Great stuff!\",\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n \"author_association\": \"NONE\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n },\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n },\n \"pull_request\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n }\n },\n \"start_line\": 1,\n \"original_start_line\": 1,\n \"start_side\": \"RIGHT\",\n \"line\": 2,\n \"original_line\": 2,\n \"side\": \"RIGHT\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/pulls/comments/{comment_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42 \\\n -d '{\"body\":\"body\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42 \\\n -d '{\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n body: 'body'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n body: 'body'\n})\n"
}
],
"summary": "Update a review comment for a pull request",
"description": "Enables you to edit a review comment.",
"tags": [
"pulls"
],
"operationId": "pulls/update-review-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "Required. The text of the reply to the review comment.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The text of the reply to the review comment.", "childParamsGroups": [] } }, "required": [ "body" ] }, "example": { "body": "I like this too!" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "pulls", "subcategory": "comments" }, "slug": "update-a-review-comment-for-a-pull-request", "category": "pulls", "categoryLabel": "Pulls", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", "notes": [], "descriptionHTML": "Enables you to edit a review comment.
", "bodyParameters": [ { "type": "string", "description": "Required. The text of the reply to the review comment.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The text of the reply to the review comment.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n \"pull_request_review_id\": 42,\n \"id\": 10,\n \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n \"path\": \"file1.txt\",\n \"position\": 1,\n \"original_position\": 4,\n \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n \"in_reply_to_id\": 8,\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Great stuff!\",\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n \"author_association\": \"NONE\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n },\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n },\n \"pull_request\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n }\n },\n \"start_line\": 1,\n \"original_start_line\": 1,\n \"start_side\": \"RIGHT\",\n \"line\": 2,\n \"original_line\": 2,\n \"side\": \"RIGHT\"\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/pulls/comments/{comment_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})\n"
}
],
"summary": "Delete a review comment for a pull request",
"description": "Deletes a review comment.",
"tags": [
"pulls"
],
"operationId": "pulls/delete-review-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "pulls",
"subcategory": "comments"
},
"slug": "delete-a-review-comment-for-a-pull-request",
"category": "pulls",
"categoryLabel": "Pulls",
"subcategory": "comments",
"subcategoryLabel": "Comments",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes a review comment.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "comment_id", "description": "comment_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "comment_id parameter
" }, { "name": "content", "description": "Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a pull request review comment.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ] }, "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to a pull request review comment.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42/reactions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42/reactions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42\n})\n"
}
],
"summary": "List reactions for a pull request review comment",
"description": "List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments).",
"tags": [
"reactions"
],
"operationId": "reactions/list-for-pull-request-review-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
},
"slug": "list-reactions-for-a-pull-request-review-comment",
"category": "reactions",
"categoryLabel": "Reactions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List the reactions to a pull request review comment.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42/reactions \\\n -d '{\"content\":\"content\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42/reactions \\\n -d '{\"content\":\"content\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n content: 'content'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n content: 'content'\n})\n"
}
],
"summary": "Create reaction for a pull request review comment",
"description": "Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment.",
"tags": [
"reactions"
],
"operationId": "reactions/create-for-pull-request-review-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "Required. The reaction type to add to the pull request review comment.
", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment.", "childParamsGroups": [] } }, "required": [ "content" ] }, "example": { "content": "heart" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "reactions", "subcategory": null }, "slug": "create-reaction-for-a-pull-request-review-comment", "category": "reactions", "categoryLabel": "Reactions", "contentType": "application/json", "notes": [], "descriptionHTML": "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.
Required. The reaction type to add to the pull request review comment.
", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Reaction exists", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n"
},
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Reaction created",
"payload": "{\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" }, { "name": "reaction_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42/reactions/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42/reactions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n reaction_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n comment_id: 42,\n reaction_id: 42\n})\n"
}
],
"summary": "Delete a pull request comment reaction",
"description": "**Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.`\n\nDelete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments).",
"tags": [
"reactions"
],
"operationId": "reactions/delete-for-pull-request-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
},
"slug": "delete-a-pull-request-comment-reaction",
"category": "reactions",
"categoryLabel": "Reactions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "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.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "pull_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})\n"
}
],
"summary": "Get a pull request",
"description": "Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nLists details of a pull request by providing its number.\n\nWhen you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see \"[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)\".\n\nThe value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit.\n\nThe value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request:\n\n* If merged as a [merge commit](https://help.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit.\n* If merged via a [squash](https://help.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch.\n* If [rebased](https://help.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to.\n\nPass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.",
"tags": [
"pulls"
],
"operationId": "pulls/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#get-a-pull-request"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "pulls",
"subcategory": null
},
"slug": "get-a-pull-request",
"category": "pulls",
"categoryLabel": "Pulls",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nLists details of a pull request by providing its number.
\nWhen you get, create, or edit a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the mergeable key. For more information, see \"Checking mergeability of pull requests\".
The value of the mergeable attribute can be true, false, or null. If the value is null, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-null value for the mergeable attribute in the response. If mergeable is true, then merge_commit_sha will be the SHA of the test merge commit.
The value of the merge_commit_sha attribute changes depending on the state of the pull request. Before merging a pull request, the merge_commit_sha attribute holds the SHA of the test merge commit. After merging a pull request, the merge_commit_sha attribute changes depending on how you merged the pull request:
merge_commit_sha represents the SHA of the merge commit.merge_commit_sha represents the SHA of the squashed commit on the base branch.merge_commit_sha represents the commit that the base branch was updated to.Pass the appropriate media type to fetch diff and patch formats.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"id\": 1,\n \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"number\": 1347,\n \"state\": \"open\",\n \"locked\": true,\n \"title\": \"Amazing new feature\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Please pull these awesome changes in!\",\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"active_lock_reason\": \"too heated\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:01:12Z\",\n \"closed_at\": \"2011-01-26T19:01:12Z\",\n \"merged_at\": \"2011-01-26T19:01:12Z\",\n \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n {\n \"login\": \"hubot\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/hubot\",\n \"html_url\": \"https://github.com/hubot\",\n \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n }\n ],\n \"requested_reviewers\": [\n {\n \"login\": \"other_user\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/other_user\",\n \"html_url\": \"https://github.com/other_user\",\n \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"requested_teams\": [\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n }\n ],\n \"head\": {\n \"label\": \"octocat:new-topic\",\n \"ref\": \"new-topic\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"repo\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_merge_commit\": true,\n \"allow_forking\": true,\n \"forks\": 123,\n \"open_issues\": 123,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n },\n \"watchers\": 123\n }\n },\n \"base\": {\n \"label\": \"octocat:master\",\n \"ref\": \"master\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"repo\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_merge_commit\": true,\n \"forks\": 123,\n \"open_issues\": 123,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n },\n \"watchers\": 123\n }\n },\n \"_links\": {\n \"self\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n },\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n },\n \"issue\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n },\n \"comments\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n },\n \"review_comments\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n },\n \"review_comment\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n },\n \"commits\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n },\n \"statuses\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n }\n },\n \"author_association\": \"OWNER\",\n \"auto_merge\": null,\n \"draft\": false,\n \"merged\": false,\n \"mergeable\": true,\n \"rebaseable\": true,\n \"mergeable_state\": \"clean\",\n \"merged_by\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"comments\": 10,\n \"review_comments\": 0,\n \"maintainer_can_modify\": true,\n \"commits\": 3,\n \"additions\": 100,\n \"deletions\": 3,\n \"changed_files\": 5\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "500",
"httpStatusMessage": "Internal Server Error",
"description": "Internal Error"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42 \\\n -d '{\"title\":\"title\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42 \\\n -d '{\"title\":\"title\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/pulls/{pull_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n title: 'title'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/pulls/{pull_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n title: 'title'\n})\n"
}
],
"summary": "Update a pull request",
"description": "Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nTo open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.",
"tags": [
"pulls"
],
"operationId": "pulls/update",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls/#update-a-pull-request"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The title of the pull request.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title of the pull request.", "childParamsGroups": [] }, "body": { "type": "string", "description": "The contents of the pull request.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The contents of the pull request.", "childParamsGroups": [] }, "state": { "type": "string", "description": "State of this Pull Request. Either open or closed.
The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.
", "name": "base", "in": "body", "rawType": "string", "rawDescription": "The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.", "childParamsGroups": [] }, "maintainer_can_modify": { "type": "boolean", "description": "Indicates whether maintainers can modify the pull request.
", "name": "maintainer_can_modify", "in": "body", "rawType": "boolean", "rawDescription": "Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.", "childParamsGroups": [] } } }, "example": { "title": "new title", "body": "updated body", "state": "open", "base": "master" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "pulls", "subcategory": null }, "slug": "update-a-pull-request", "category": "pulls", "categoryLabel": "Pulls", "contentType": "application/json", "notes": [], "descriptionHTML": "Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nTo open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.
", "bodyParameters": [ { "type": "string", "description": "The title of the pull request.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The title of the pull request.", "childParamsGroups": [] }, { "type": "string", "description": "The contents of the pull request.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The contents of the pull request.", "childParamsGroups": [] }, { "type": "string", "description": "State of this Pull Request. Either open or closed.
The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.
", "name": "base", "in": "body", "rawType": "string", "rawDescription": "The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.", "childParamsGroups": [] }, { "type": "boolean", "description": "Indicates whether maintainers can modify the pull request.
", "name": "maintainer_can_modify", "in": "body", "rawType": "boolean", "rawDescription": "Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"id\": 1,\n \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"number\": 1347,\n \"state\": \"open\",\n \"locked\": true,\n \"title\": \"Amazing new feature\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Please pull these awesome changes in!\",\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"active_lock_reason\": \"too heated\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:01:12Z\",\n \"closed_at\": \"2011-01-26T19:01:12Z\",\n \"merged_at\": \"2011-01-26T19:01:12Z\",\n \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n {\n \"login\": \"hubot\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/hubot\",\n \"html_url\": \"https://github.com/hubot\",\n \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n }\n ],\n \"requested_reviewers\": [\n {\n \"login\": \"other_user\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/other_user\",\n \"html_url\": \"https://github.com/other_user\",\n \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"requested_teams\": [\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n }\n ],\n \"head\": {\n \"label\": \"octocat:new-topic\",\n \"ref\": \"new-topic\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"repo\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_merge_commit\": true,\n \"allow_forking\": true,\n \"forks\": 123,\n \"open_issues\": 123,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n },\n \"watchers\": 123\n }\n },\n \"base\": {\n \"label\": \"octocat:master\",\n \"ref\": \"master\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"repo\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_merge_commit\": true,\n \"forks\": 123,\n \"open_issues\": 123,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n },\n \"watchers\": 123\n }\n },\n \"_links\": {\n \"self\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n },\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n },\n \"issue\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n },\n \"comments\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n },\n \"review_comments\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n },\n \"review_comment\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n },\n \"commits\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n },\n \"statuses\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n }\n },\n \"author_association\": \"OWNER\",\n \"auto_merge\": null,\n \"draft\": false,\n \"merged\": false,\n \"mergeable\": true,\n \"rebaseable\": true,\n \"mergeable_state\": \"clean\",\n \"merged_by\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"comments\": 10,\n \"review_comments\": 0,\n \"maintainer_can_modify\": true,\n \"commits\": 3,\n \"additions\": 100,\n \"deletions\": 3,\n \"changed_files\": 5\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/comments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "sort",
"description": "One of `created` (when the repository was starred) or `updated` (when it was last pushed to).",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"created",
"updated"
],
"default": "created"
},
"descriptionHTML": "One of created (when the repository was starred) or updated (when it was last pushed to).
Can be either asc or desc. Ignored without sort parameter.
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/comments", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/comments"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/comments', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/comments', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})\n"
}
],
"summary": "List review comments on a pull request",
"description": "Lists all review comments for a pull request. By default, review comments are in ascending order by ID.",
"tags": [
"pulls"
],
"operationId": "pulls/list-review-comments",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "pulls",
"subcategory": "comments"
},
"slug": "list-review-comments-on-a-pull-request",
"category": "pulls",
"categoryLabel": "Pulls",
"subcategory": "comments",
"subcategoryLabel": "Comments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all review comments for a pull request. By default, review comments are in ascending order by ID.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n \"pull_request_review_id\": 42,\n \"id\": 10,\n \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n \"path\": \"file1.txt\",\n \"position\": 1,\n \"original_position\": 4,\n \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n \"in_reply_to_id\": 8,\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Great stuff!\",\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n \"author_association\": \"NONE\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n },\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n },\n \"pull_request\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n }\n },\n \"start_line\": 1,\n \"original_start_line\": 1,\n \"start_side\": \"RIGHT\",\n \"line\": 2,\n \"original_line\": 2,\n \"side\": \"RIGHT\"\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/comments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/comments \\\n -d '{\"body\":\"body\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/comments \\\n -d '{\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/comments', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n body: 'body'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/comments', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n body: 'body'\n})\n"
}
],
"summary": "Create a review comment for a pull request",
"description": "\nCreates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see \"[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment).\" We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff.\n\nYou can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required.\n\n**Note:** The position value equals the number of lines down from the first \"@@\" hunk header in the file you want to add a comment. The line just below the \"@@\" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.\n\nThis endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.",
"tags": [
"pulls"
],
"operationId": "pulls/create-review-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "Required. The text of the review comment.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The text of the review comment.", "childParamsGroups": [] }, "commit_id": { "type": "string", "description": "The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the position.
The relative path to the file that necessitates a comment.
", "name": "path", "in": "body", "rawType": "string", "rawDescription": "The relative path to the file that necessitates a comment.", "childParamsGroups": [] }, "position": { "type": "integer", "description": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above.
", "name": "position", "in": "body", "rawType": "integer", "rawDescription": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above.", "childParamsGroups": [] }, "side": { "type": "string", "description": "In a split diff view, the side of the diff that the pull request's changes appear on. Can be LEFT or RIGHT. Use LEFT for deletions that appear in red. Use RIGHT for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see \"Diff view options\" in the GitHub Help documentation.
The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to.
", "name": "line", "in": "body", "rawType": "integer", "rawDescription": "The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to.", "childParamsGroups": [] }, "start_line": { "type": "integer", "description": "Required when using multi-line comments. The start_line is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see \"Commenting on a pull request\" in the GitHub Help documentation.
Required when using multi-line comments. The start_side is the starting side of the diff that the comment applies to. Can be LEFT or RIGHT. To learn more about multi-line comments, see \"Commenting on a pull request\" in the GitHub Help documentation. See side in this table for additional context.
Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see \"Create an issue comment.\" We recommend creating a review comment using line, side, and optionally start_line and start_side if your comment applies to more than one line in the pull request diff.
You can still create a review comment using the position parameter. When you use position, the line, side, start_line, and start_side parameters are not required.
Note: The position value equals the number of lines down from the first \"@@\" hunk header in the file you want to add a comment. The line just below the \"@@\" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
\nThis endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.
", "bodyParameters": [ { "type": "string", "description": "Required. The text of the review comment.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The text of the review comment.", "childParamsGroups": [] }, { "type": "string", "description": "The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the position.
The relative path to the file that necessitates a comment.
", "name": "path", "in": "body", "rawType": "string", "rawDescription": "The relative path to the file that necessitates a comment.", "childParamsGroups": [] }, { "type": "integer", "description": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above.
", "name": "position", "in": "body", "rawType": "integer", "rawDescription": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above.", "childParamsGroups": [] }, { "type": "string", "description": "In a split diff view, the side of the diff that the pull request's changes appear on. Can be LEFT or RIGHT. Use LEFT for deletions that appear in red. Use RIGHT for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see \"Diff view options\" in the GitHub Help documentation.
The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to.
", "name": "line", "in": "body", "rawType": "integer", "rawDescription": "The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to.", "childParamsGroups": [] }, { "type": "integer", "description": "Required when using multi-line comments. The start_line is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see \"Commenting on a pull request\" in the GitHub Help documentation.
Required when using multi-line comments. The start_side is the starting side of the diff that the comment applies to. Can be LEFT or RIGHT. To learn more about multi-line comments, see \"Commenting on a pull request\" in the GitHub Help documentation. See side in this table for additional context.
{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n \"pull_request_review_id\": 42,\n \"id\": 10,\n \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n \"path\": \"file1.txt\",\n \"position\": 1,\n \"original_position\": 4,\n \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n \"in_reply_to_id\": 8,\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Great stuff!\",\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n \"author_association\": \"NONE\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n },\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n },\n \"pull_request\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n }\n },\n \"start_line\": 1,\n \"original_start_line\": 1,\n \"start_side\": \"RIGHT\",\n \"line\": 2,\n \"original_line\": 2,\n \"side\": \"RIGHT\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "comment_id",
"description": "comment_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "comment_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/comments/42/replies \\\n -d '{\"body\":\"body\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/comments/42/replies \\\n -d '{\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n comment_id: 42,\n body: 'body'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n comment_id: 42,\n body: 'body'\n})\n"
}
],
"summary": "Create a reply for a review comment",
"description": "Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported.\n\nThis endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.",
"tags": [
"pulls"
],
"operationId": "pulls/create-reply-for-review-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "Required. The text of the review comment.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The text of the review comment.", "childParamsGroups": [] } }, "required": [ "body" ] }, "example": { "body": "Great stuff!" } } } }, "x-github": { "triggersNotification": true, "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "pulls", "subcategory": "comments" }, "slug": "create-a-reply-for-a-review-comment", "category": "pulls", "categoryLabel": "Pulls", "subcategory": "comments", "subcategoryLabel": "Comments", "contentType": "application/json", "notes": [], "descriptionHTML": "Creates a reply to a review comment for a pull request. For the comment_id, provide the ID of the review comment you are replying to. This must be the ID of a top-level review comment, not a reply to that comment. Replies to replies are not supported.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.
", "bodyParameters": [ { "type": "string", "description": "Required. The text of the review comment.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The text of the review comment.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n \"pull_request_review_id\": 42,\n \"id\": 10,\n \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n \"path\": \"file1.txt\",\n \"position\": 1,\n \"original_position\": 4,\n \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n \"in_reply_to_id\": 426899381,\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Great stuff!\",\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n \"author_association\": \"NONE\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n },\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n },\n \"pull_request\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n }\n },\n \"start_line\": 1,\n \"original_start_line\": 1,\n \"start_side\": \"RIGHT\",\n \"line\": 2,\n \"original_line\": 2,\n \"side\": \"RIGHT\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/commits",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/commits", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/commits"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/commits', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/commits', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})\n"
}
],
"summary": "List commits on a pull request",
"description": "Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint.",
"tags": [
"pulls"
],
"operationId": "pulls/list-commits",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "pulls",
"subcategory": null
},
"slug": "list-commits-on-a-pull-request",
"category": "pulls",
"categoryLabel": "Pulls",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the List commits endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n \"commit\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"author\": {\n \"name\": \"Monalisa Octocat\",\n \"email\": \"support@github.com\",\n \"date\": \"2011-04-14T16:00:49Z\"\n },\n \"committer\": {\n \"name\": \"Monalisa Octocat\",\n \"email\": \"support@github.com\",\n \"date\": \"2011-04-14T16:00:49Z\"\n },\n \"message\": \"Fix all the bugs\",\n \"tree\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n },\n \"comment_count\": 0,\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n }\n },\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"committer\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"parents\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n }\n ]\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/files",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/files", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/files"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/files', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/files', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})\n"
}
],
"summary": "List pull requests files",
"description": "**Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.",
"tags": [
"pulls"
],
"operationId": "pulls/list-files",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#list-pull-requests-files"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "pulls",
"subcategory": null
},
"slug": "list-pull-requests-files",
"category": "pulls",
"categoryLabel": "Pulls",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Note: Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"sha\": \"bbcd538c8e72b8c175046e27cc8f907076331401\",\n \"filename\": \"file1.txt\",\n \"status\": \"added\",\n \"additions\": 103,\n \"deletions\": 21,\n \"changes\": 124,\n \"blob_url\": \"https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt\",\n \"raw_url\": \"https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"patch\": \"@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test\"\n }\n]\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
},
{
"httpStatusCode": "500",
"httpStatusMessage": "Internal Server Error",
"description": "Internal Error"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/merge",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/merge",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/merge"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/merge', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/merge', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})\n"
}
],
"summary": "Check if a pull request has been merged",
"description": "",
"tags": [
"pulls"
],
"operationId": "pulls/check-if-merged",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "pulls",
"subcategory": null
},
"slug": "check-if-a-pull-request-has-been-merged",
"category": "pulls",
"categoryLabel": "Pulls",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response if pull request has been merged"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if pull request has not been merged"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/merge",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/merge \\\n -d '{\"commit_title\":\"commit_title\"}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/merge \\\n -d '{\"commit_title\":\"commit_title\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n commit_title: 'commit_title'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n commit_title: 'commit_title'\n})\n"
}
],
"summary": "Merge a pull request",
"description": "This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.",
"tags": [
"pulls"
],
"operationId": "pulls/merge",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#merge-a-pull-request"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"nullable": true,
"properties": {
"commit_title": {
"type": "string",
"description": "Title for the automatic commit message.
", "name": "commit_title", "in": "body", "rawType": "string", "rawDescription": "Title for the automatic commit message.", "childParamsGroups": [] }, "commit_message": { "type": "string", "description": "Extra detail to append to automatic commit message.
", "name": "commit_message", "in": "body", "rawType": "string", "rawDescription": "Extra detail to append to automatic commit message.", "childParamsGroups": [] }, "sha": { "type": "string", "description": "SHA that pull request head must match to allow merge.
", "name": "sha", "in": "body", "rawType": "string", "rawDescription": "SHA that pull request head must match to allow merge.", "childParamsGroups": [] }, "merge_method": { "type": "string", "description": "Merge method to use. Possible values are merge, squash or rebase. Default is merge.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.
", "bodyParameters": [ { "type": "string", "description": "Title for the automatic commit message.
", "name": "commit_title", "in": "body", "rawType": "string", "rawDescription": "Title for the automatic commit message.", "childParamsGroups": [] }, { "type": "string", "description": "Extra detail to append to automatic commit message.
", "name": "commit_message", "in": "body", "rawType": "string", "rawDescription": "Extra detail to append to automatic commit message.", "childParamsGroups": [] }, { "type": "string", "description": "SHA that pull request head must match to allow merge.
", "name": "sha", "in": "body", "rawType": "string", "rawDescription": "SHA that pull request head must match to allow merge.", "childParamsGroups": [] }, { "type": "string", "description": "Merge method to use. Possible values are merge, squash or rebase. Default is merge.
{\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"merged\": true,\n \"message\": \"Pull Request successfully merged\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "405",
"httpStatusMessage": "Method Not Allowed",
"description": "Method Not Allowed if merge cannot be performed",
"payload": "{\n \"message\": \"Pull Request is not mergeable\"\n}\n"
},
{
"httpStatusCode": "409",
"httpStatusMessage": "Conflict",
"description": "Conflict if sha was provided and pull request head did not match",
"payload": "{\n \"message\": \"Head branch was modified. Review and try the merge again.\"\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/requested_reviewers", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/requested_reviewers"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})\n"
}
],
"summary": "List requested reviewers for a pull request",
"description": "",
"tags": [
"pulls"
],
"operationId": "pulls/list-requested-reviewers",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#list-requested-reviewers-for-a-pull-request"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "pulls",
"subcategory": "review-requests"
},
"slug": "list-requested-reviewers-for-a-pull-request",
"category": "pulls",
"categoryLabel": "Pulls",
"subcategory": "review-requests",
"subcategoryLabel": "Review requests",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"users\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"teams\": [\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n ]\n}\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/requested_reviewers \\\n -d '{\"reviewers\":[\"reviewers\"]}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/requested_reviewers \\\n -d '{\"reviewers\":[\"reviewers\"]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n reviewers: [\n 'reviewers'\n ]\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n reviewers: [\n 'reviewers'\n ]\n})\n"
}
],
"summary": "Request reviewers for a pull request",
"description": "This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.",
"tags": [
"pulls"
],
"operationId": "pulls/request-reviewers",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"reviewers": {
"type": "array of strings",
"description": "An array of user logins that will be requested.
An array of team slugs that will be requested.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.
", "bodyParameters": [ { "type": "array of strings", "description": "An array of user logins that will be requested.
An array of team slugs that will be requested.
{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"id\": 1,\n \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"number\": 1347,\n \"state\": \"open\",\n \"locked\": true,\n \"title\": \"Amazing new feature\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Please pull these awesome changes in!\",\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"active_lock_reason\": \"too heated\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:01:12Z\",\n \"closed_at\": \"2011-01-26T19:01:12Z\",\n \"merged_at\": \"2011-01-26T19:01:12Z\",\n \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n {\n \"login\": \"hubot\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/hubot\",\n \"html_url\": \"https://github.com/hubot\",\n \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n }\n ],\n \"requested_reviewers\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n {\n \"login\": \"hubot\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/hubot\",\n \"html_url\": \"https://github.com/hubot\",\n \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n {\n \"login\": \"other_user\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/other_user\",\n \"html_url\": \"https://github.com/other_user\",\n \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"requested_teams\": [\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n ],\n \"head\": {\n \"label\": \"octocat:new-topic\",\n \"ref\": \"new-topic\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"repo\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n },\n \"base\": {\n \"label\": \"octocat:master\",\n \"ref\": \"master\",\n \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"repo\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n },\n \"_links\": {\n \"self\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n },\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n },\n \"issue\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n },\n \"comments\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n },\n \"review_comments\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n },\n \"review_comment\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n },\n \"commits\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n },\n \"statuses\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n }\n },\n \"author_association\": \"OWNER\",\n \"auto_merge\": null,\n \"draft\": false\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Unprocessable Entity if user is not a collaborator"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/requested_reviewers \\\n -d '{\"reviewers\":[\"reviewers\"]}'",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/requested_reviewers \\\n -d '{\"reviewers\":[\"reviewers\"]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n reviewers: [\n 'reviewers'\n ]\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n reviewers: [\n 'reviewers'\n ]\n})\n"
}
],
"summary": "Remove requested reviewers from a pull request",
"description": "",
"tags": [
"pulls"
],
"operationId": "pulls/remove-requested-reviewers",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"reviewers": {
"type": "array of strings",
"description": "Required. An array of user logins that will be removed.
An array of team slugs that will be removed.
Required. An array of user logins that will be removed.
An array of team slugs that will be removed.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42\n})\n"
}
],
"summary": "List reviews for a pull request",
"description": "The list of reviews returns in chronological order.",
"tags": [
"pulls"
],
"operationId": "pulls/list-reviews",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "pulls",
"subcategory": "reviews"
},
"slug": "list-reviews-for-a-pull-request",
"category": "pulls",
"categoryLabel": "Pulls",
"subcategory": "reviews",
"subcategoryLabel": "Reviews",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "The list of reviews returns in chronological order.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "The list of reviews returns in chronological order.", "payload": "[\n {\n \"id\": 80,\n \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Here is the body for the review.\",\n \"state\": \"APPROVED\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n \"_links\": {\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n },\n \"pull_request\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n }\n },\n \"submitted_at\": \"2019-11-17T17:43:43Z\",\n \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n \"author_association\": \"COLLABORATOR\"\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews \\\n -d '{\"commit_id\":\"commit_id\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews \\\n -d '{\"commit_id\":\"commit_id\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n commit_id: 'commit_id'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n commit_id: 'commit_id'\n})\n"
}
],
"summary": "Create a review for a pull request",
"description": "This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\nPull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response.\n\n**Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint.\n\nThe `position` value equals the number of lines down from the first \"@@\" hunk header in the file you want to add a comment. The line just below the \"@@\" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.",
"tags": [
"pulls"
],
"operationId": "pulls/create-review",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"commit_id": {
"type": "string",
"description": "The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the position. Defaults to the most recent commit in the pull request when you do not specify a value.
Required when using REQUEST_CHANGES or COMMENT for the event parameter. The body text of the pull request review.
The review action you want to perform. The review actions include: APPROVE, REQUEST_CHANGES, or COMMENT. By leaving this blank, you set the review action state to PENDING, which means you will need to submit the pull request review when you are ready.
Use the following table to specify the location, destination, and contents of the draft review comment.
", "items": { "type": "object", "properties": { "path": { "type": "string", "description": "Required. The relative path to the file that necessitates a review comment.
", "name": "path", "in": "body", "rawType": "string", "rawDescription": "The relative path to the file that necessitates a review comment.", "childParamsGroups": [] }, "position": { "type": "integer", "description": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.
", "name": "position", "in": "body", "rawType": "integer", "rawDescription": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.", "childParamsGroups": [] }, "body": { "type": "string", "description": "Required. Text of the review comment.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "Text of the review comment.", "childParamsGroups": [] }, "line": { "type": "integer", "example": 28, "name": "line", "in": "body", "rawType": "integer", "description": "", "childParamsGroups": [] }, "side": { "type": "string", "example": "RIGHT", "name": "side", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, "start_line": { "type": "integer", "example": 26, "name": "start_line", "in": "body", "rawType": "integer", "description": "", "childParamsGroups": [] }, "start_side": { "type": "string", "example": "LEFT", "name": "start_side", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } }, "required": [ "path", "body" ] }, "name": "comments", "in": "body", "rawType": "array", "rawDescription": "Use the following table to specify the location, destination, and contents of the draft review comment.", "childParamsGroups": [ { "parentName": "comments", "parentType": "items", "id": "comments-items", "params": [ { "type": "string", "description": "Required. The relative path to the file that necessitates a review comment.
", "name": "path", "in": "body", "rawType": "string", "rawDescription": "The relative path to the file that necessitates a review comment.", "childParamsGroups": [] }, { "type": "integer", "description": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.
", "name": "position", "in": "body", "rawType": "integer", "rawDescription": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.", "childParamsGroups": [] }, { "type": "string", "description": "Required. Text of the review comment.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "Text of the review comment.", "childParamsGroups": [] }, { "type": "integer", "example": 28, "name": "line", "in": "body", "rawType": "integer", "description": "", "childParamsGroups": [] }, { "type": "string", "example": "RIGHT", "name": "side", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, { "type": "integer", "example": 26, "name": "start_line", "in": "body", "rawType": "integer", "description": "", "childParamsGroups": [] }, { "type": "string", "example": "LEFT", "name": "start_side", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ] } ] } } }, "example": { "commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091", "body": "This is close to perfect! Please address the suggested inline change.", "event": "REQUEST_CHANGES", "comments": [ { "path": "file.md", "position": 6, "body": "Please add more information here, and fix this typo." } ] } } } }, "x-github": { "triggersNotification": true, "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "pulls", "subcategory": "reviews" }, "slug": "create-a-review-for-a-pull-request", "category": "pulls", "categoryLabel": "Pulls", "subcategory": "reviews", "subcategoryLabel": "Reviews", "contentType": "application/json", "notes": [], "descriptionHTML": "This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.
\nPull request reviews created in the PENDING state do not include the submitted_at property in the response.
Note: To comment on a specific line in a file, you need to first determine the position of that line in the diff. The GitHub REST API v3 offers the application/vnd.github.v3.diff media type. To see a pull request diff, add this media type to the Accept header of a call to the single pull request endpoint.
The position value equals the number of lines down from the first \"@@\" hunk header in the file you want to add a comment. The line just below the \"@@\" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
{\n \"id\": 80,\n \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"This is close to perfect! Please address the suggested inline change.\",\n \"state\": \"CHANGES_REQUESTED\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n \"_links\": {\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n },\n \"pull_request\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n }\n },\n \"submitted_at\": \"2019-11-17T17:43:43Z\",\n \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n \"author_association\": \"COLLABORATOR\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"type": "string",
"description": "The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the position. Defaults to the most recent commit in the pull request when you do not specify a value.
Required when using REQUEST_CHANGES or COMMENT for the event parameter. The body text of the pull request review.
The review action you want to perform. The review actions include: APPROVE, REQUEST_CHANGES, or COMMENT. By leaving this blank, you set the review action state to PENDING, which means you will need to submit the pull request review when you are ready.
Use the following table to specify the location, destination, and contents of the draft review comment.
", "items": { "type": "object", "properties": { "path": { "type": "string", "description": "Required. The relative path to the file that necessitates a review comment.
", "name": "path", "in": "body", "rawType": "string", "rawDescription": "The relative path to the file that necessitates a review comment.", "childParamsGroups": [] }, "position": { "type": "integer", "description": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.
", "name": "position", "in": "body", "rawType": "integer", "rawDescription": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.", "childParamsGroups": [] }, "body": { "type": "string", "description": "Required. Text of the review comment.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "Text of the review comment.", "childParamsGroups": [] }, "line": { "type": "integer", "example": 28, "name": "line", "in": "body", "rawType": "integer", "description": "", "childParamsGroups": [] }, "side": { "type": "string", "example": "RIGHT", "name": "side", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, "start_line": { "type": "integer", "example": 26, "name": "start_line", "in": "body", "rawType": "integer", "description": "", "childParamsGroups": [] }, "start_side": { "type": "string", "example": "LEFT", "name": "start_side", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } }, "required": [ "path", "body" ] }, "name": "comments", "in": "body", "rawType": "array", "rawDescription": "Use the following table to specify the location, destination, and contents of the draft review comment.", "childParamsGroups": [ { "parentName": "comments", "parentType": "items", "id": "comments-items", "params": [ { "type": "string", "description": "Required. The relative path to the file that necessitates a review comment.
", "name": "path", "in": "body", "rawType": "string", "rawDescription": "The relative path to the file that necessitates a review comment.", "childParamsGroups": [] }, { "type": "integer", "description": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.
", "name": "position", "in": "body", "rawType": "integer", "rawDescription": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.", "childParamsGroups": [] }, { "type": "string", "description": "Required. Text of the review comment.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "Text of the review comment.", "childParamsGroups": [] }, { "type": "integer", "example": 28, "name": "line", "in": "body", "rawType": "integer", "description": "", "childParamsGroups": [] }, { "type": "string", "example": "RIGHT", "name": "side", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, { "type": "integer", "example": 26, "name": "start_line", "in": "body", "rawType": "integer", "description": "", "childParamsGroups": [] }, { "type": "string", "example": "LEFT", "name": "start_side", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ] } ] } ] }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "pull_number", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "review_id", "description": "review_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "review_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42\n})\n"
}
],
"summary": "Get a review for a pull request",
"description": "",
"tags": [
"pulls"
],
"operationId": "pulls/get-review",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "pulls",
"subcategory": "reviews"
},
"slug": "get-a-review-for-a-pull-request",
"category": "pulls",
"categoryLabel": "Pulls",
"subcategory": "reviews",
"subcategoryLabel": "Reviews",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"id\": 80,\n \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Here is the body for the review.\",\n \"state\": \"APPROVED\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n \"_links\": {\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n },\n \"pull_request\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n }\n },\n \"submitted_at\": \"2019-11-17T17:43:43Z\",\n \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n \"author_association\": \"COLLABORATOR\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "review_id",
"description": "review_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "review_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42 \\\n -d '{\"body\":\"body\"}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42 \\\n -d '{\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42,\n body: 'body'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42,\n body: 'body'\n})\n"
}
],
"summary": "Update a review for a pull request",
"description": "Update the review summary comment with new text.",
"tags": [
"pulls"
],
"operationId": "pulls/update-review",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "Required. The body text of the pull request review.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The body text of the pull request review.", "childParamsGroups": [] } }, "required": [ "body" ] }, "example": { "body": "This is close to perfect! Please address the suggested inline change. And add more about this." } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "pulls", "subcategory": "reviews" }, "slug": "update-a-review-for-a-pull-request", "category": "pulls", "categoryLabel": "Pulls", "subcategory": "reviews", "subcategoryLabel": "Reviews", "contentType": "application/json", "notes": [], "descriptionHTML": "Update the review summary comment with new text.
", "bodyParameters": [ { "type": "string", "description": "Required. The body text of the pull request review.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The body text of the pull request review.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 80,\n \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"This is close to perfect! Please address the suggested inline change. And add more about this.\",\n \"state\": \"CHANGES_REQUESTED\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n \"_links\": {\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n },\n \"pull_request\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n }\n },\n \"submitted_at\": \"2019-11-17T17:43:43Z\",\n \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n \"author_association\": \"COLLABORATOR\"\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "review_id",
"description": "review_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "review_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42\n})\n"
}
],
"summary": "Delete a pending review for a pull request",
"description": "",
"tags": [
"pulls"
],
"operationId": "pulls/delete-pending-review",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "pulls",
"subcategory": "reviews"
},
"slug": "delete-a-pending-review-for-a-pull-request",
"category": "pulls",
"categoryLabel": "Pulls",
"subcategory": "reviews",
"subcategoryLabel": "Reviews",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"id\": 80,\n \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"This is close to perfect! Please address the suggested inline change.\",\n \"state\": \"CHANGES_REQUESTED\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n \"_links\": {\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n },\n \"pull_request\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n }\n },\n \"submitted_at\": \"2019-11-17T17:43:43Z\",\n \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n \"author_association\": \"COLLABORATOR\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "review_id",
"description": "review_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "review_id parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/comments", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/comments"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42\n})\n"
}
],
"summary": "List comments for a pull request review",
"description": "List comments for a specific pull request review.",
"tags": [
"pulls"
],
"operationId": "pulls/list-comments-for-review",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "pulls",
"subcategory": "reviews"
},
"slug": "list-comments-for-a-pull-request-review",
"category": "pulls",
"categoryLabel": "Pulls",
"subcategory": "reviews",
"subcategoryLabel": "Reviews",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List comments for a specific pull request review.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n \"pull_request_review_id\": 42,\n \"id\": 10,\n \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n \"path\": \"file1.txt\",\n \"position\": 1,\n \"original_position\": 4,\n \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n \"in_reply_to_id\": 8,\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Great stuff!\",\n \"created_at\": \"2011-04-14T16:00:49Z\",\n \"updated_at\": \"2011-04-14T16:00:49Z\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n \"author_association\": \"NONE\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n },\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n },\n \"pull_request\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n }\n }\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "review_id",
"description": "review_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "review_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/dismissals \\\n -d '{\"message\":\"message\"}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/dismissals \\\n -d '{\"message\":\"message\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42,\n message: 'message'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42,\n message: 'message'\n})\n"
}
],
"summary": "Dismiss a review for a pull request",
"description": "**Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews.",
"tags": [
"pulls"
],
"operationId": "pulls/dismiss-review",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Required. The message for the pull request review dismissal
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "The message for the pull request review dismissal", "childParamsGroups": [] }, "event": { "type": "string", "example": "\"APPROVE\"", "name": "event", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } }, "required": [ "message" ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "pulls", "subcategory": "reviews" }, "slug": "dismiss-a-review-for-a-pull-request", "category": "pulls", "categoryLabel": "Pulls", "subcategory": "reviews", "subcategoryLabel": "Reviews", "contentType": "application/json", "notes": [], "descriptionHTML": "Note: To dismiss a pull request review on a protected branch, you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews.
", "bodyParameters": [ { "type": "string", "description": "Required. The message for the pull request review dismissal
", "name": "message", "in": "body", "rawType": "string", "rawDescription": "The message for the pull request review dismissal", "childParamsGroups": [] }, { "type": "string", "example": "\"APPROVE\"", "name": "event", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 80,\n \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Here is the body for the review.\",\n \"state\": \"DISMISSED\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n \"_links\": {\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n },\n \"pull_request\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n }\n },\n \"submitted_at\": \"2019-11-17T17:43:43Z\",\n \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n \"author_association\": \"COLLABORATOR\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "review_id",
"description": "review_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "review_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/events \\\n -d '{\"event\":\"event\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/events \\\n -d '{\"event\":\"event\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42,\n event: 'event'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n review_id: 42,\n event: 'event'\n})\n"
}
],
"summary": "Submit a review for a pull request",
"description": "",
"tags": [
"pulls"
],
"operationId": "pulls/submit-review",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "The body text of the pull request review
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The body text of the pull request review", "childParamsGroups": [] }, "event": { "type": "string", "description": "Required. The review action you want to perform. The review actions include: APPROVE, REQUEST_CHANGES, or COMMENT. When you leave this blank, the API returns HTTP 422 (Unrecognizable entity) and sets the review action state to PENDING, which means you will need to re-submit the pull request review using a review action.
The body text of the pull request review
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The body text of the pull request review", "childParamsGroups": [] }, { "type": "string", "description": "Required. The review action you want to perform. The review actions include: APPROVE, REQUEST_CHANGES, or COMMENT. When you leave this blank, the API returns HTTP 422 (Unrecognizable entity) and sets the review action state to PENDING, which means you will need to re-submit the pull request review using a review action.
{\n \"id\": 80,\n \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Here is the body for the review.\",\n \"state\": \"APPROVED\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n \"_links\": {\n \"html\": {\n \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n },\n \"pull_request\": {\n \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n }\n },\n \"submitted_at\": \"2019-11-17T17:43:43Z\",\n \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n \"author_association\": \"COLLABORATOR\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "pull_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/update-branch \\\n -d '{\"expected_head_sha\":\"expected_head_sha\"}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/update-branch \\\n -d '{\"expected_head_sha\":\"expected_head_sha\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n expected_head_sha: 'expected_head_sha'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n expected_head_sha: 'expected_head_sha'\n})\n"
}
],
"summary": "Update a pull request branch",
"description": "Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.",
"tags": [
"pulls"
],
"operationId": "pulls/update-branch",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"nullable": true,
"properties": {
"expected_head_sha": {
"type": "string",
"description": "The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a 422 Unprocessable Entity status. You can use the \"List commits\" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref.
Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.
", "bodyParameters": [ { "type": "string", "description": "The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a 422 Unprocessable Entity status. You can use the \"List commits\" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref.
{\n \"message\": \"Updating pull request branch.\",\n \"url\": \"https://github.com/repos/octocat/Hello-World/pulls/53\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/readme",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "ref",
"description": "The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`)",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"descriptionHTML": "The name of the commit/branch/tag. Default: the repository’s default branch (usually master)
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/readme"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/readme', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/readme', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get a repository README",
"description": "Gets the preferred README for a repository.\n\nREADMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML.",
"tags": [
"repos"
],
"operationId": "repos/get-readme",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-repository-readme"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "contents"
},
"slug": "get-a-repository-readme",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "contents",
"subcategoryLabel": "Contents",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the preferred README for a repository.
\nREADMEs support custom media types for retrieving the raw content or rendered HTML.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"type\": \"file\",\n \"encoding\": \"base64\",\n \"size\": 5362,\n \"name\": \"README.md\",\n \"path\": \"README.md\",\n \"content\": \"encoded content ...\",\n \"sha\": \"3d21ec53a331a6f037a91c368710b99387d012c1\",\n \"url\": \"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\",\n \"git_url\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\",\n \"html_url\": \"https://github.com/octokit/octokit.rb/blob/master/README.md\",\n \"download_url\": \"https://raw.githubusercontent.com/octokit/octokit.rb/master/README.md\",\n \"_links\": {\n \"git\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\",\n \"self\": \"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\",\n \"html\": \"https://github.com/octokit/octokit.rb/blob/master/README.md\"\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/readme/{dir}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "dir",
"description": "The alternate path to look for a README file",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "The alternate path to look for a README file
" }, { "name": "ref", "description": "The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`)", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "The name of the commit/branch/tag. Default: the repository’s default branch (usually master)
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/readme/DIR"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/readme/{dir}', {\n owner: 'octocat',\n repo: 'hello-world',\n dir: 'dir'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/readme/{dir}', {\n owner: 'octocat',\n repo: 'hello-world',\n dir: 'dir'\n})\n"
}
],
"summary": "Get a repository README for a directory",
"description": "Gets the README from a repository directory.\n\nREADMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML.",
"tags": [
"repos"
],
"operationId": "repos/get-readme-in-directory",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "contents"
},
"slug": "get-a-repository-readme-for-a-directory",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "contents",
"subcategoryLabel": "Contents",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the README from a repository directory.
\nREADMEs support custom media types for retrieving the raw content or rendered HTML.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"type\": \"file\",\n \"encoding\": \"base64\",\n \"size\": 5362,\n \"name\": \"README.md\",\n \"path\": \"README.md\",\n \"content\": \"encoded content ...\",\n \"sha\": \"3d21ec53a331a6f037a91c368710b99387d012c1\",\n \"url\": \"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\",\n \"git_url\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\",\n \"html_url\": \"https://github.com/octokit/octokit.rb/blob/master/README.md\",\n \"download_url\": \"https://raw.githubusercontent.com/octokit/octokit.rb/master/README.md\",\n \"_links\": {\n \"git\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\",\n \"self\": \"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\",\n \"html\": \"https://github.com/octokit/octokit.rb/blob/master/README.md\"\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/releases",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/releases', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/releases', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List releases",
"description": "This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/reference/repos#list-repository-tags).\n\nInformation about published releases are available to everyone. Only users with push access will receive listings for draft releases.",
"tags": [
"repos"
],
"operationId": "repos/list-releases",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-releases"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "releases"
},
"slug": "list-releases",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "releases",
"subcategoryLabel": "Releases",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the Repository Tags API.
\nInformation about published releases are available to everyone. Only users with push access will receive listings for draft releases.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n \"id\": 1,\n \"node_id\": \"MDc6UmVsZWFzZTE=\",\n \"tag_name\": \"v1.0.0\",\n \"target_commitish\": \"master\",\n \"name\": \"v1.0.0\",\n \"body\": \"Description of the release\",\n \"draft\": false,\n \"prerelease\": false,\n \"created_at\": \"2013-02-27T19:35:32Z\",\n \"published_at\": \"2013-02-27T19:35:32Z\",\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assets\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n \"id\": 1,\n \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n \"name\": \"example.zip\",\n \"label\": \"short description\",\n \"state\": \"uploaded\",\n \"content_type\": \"application/zip\",\n \"size\": 1024,\n \"download_count\": 42,\n \"created_at\": \"2013-02-27T19:35:32Z\",\n \"updated_at\": \"2013-02-27T19:35:32Z\",\n \"uploader\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n }\n ]\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/releases",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases \\\n -d '{\"tag_name\":\"tag_name\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases \\\n -d '{\"tag_name\":\"tag_name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/releases', {\n owner: 'octocat',\n repo: 'hello-world',\n tag_name: 'tag_name'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/releases', {\n owner: 'octocat',\n repo: 'hello-world',\n tag_name: 'tag_name'\n})\n"
}
],
"summary": "Create a release",
"description": "Users with push access to the repository can create a release.\n\nThis endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.",
"tags": [
"repos"
],
"operationId": "repos/create-release",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-a-release"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"tag_name": {
"type": "string",
"description": "Required. The name of the tag.
", "name": "tag_name", "in": "body", "rawType": "string", "rawDescription": "The name of the tag.", "childParamsGroups": [] }, "target_commitish": { "type": "string", "description": "Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually master).
The name of the release.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the release.", "childParamsGroups": [] }, "body": { "type": "string", "description": "Text describing the contents of the tag.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "Text describing the contents of the tag.", "childParamsGroups": [] }, "draft": { "type": "boolean", "description": "true to create a draft (unpublished) release, false to create a published one.
true to identify the release as a prerelease. false to identify the release as a full release.
If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see \"Managing categories for discussions in your repository.\"
", "name": "discussion_category_name", "in": "body", "rawType": "string", "rawDescription": "If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see \"[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository).\"", "childParamsGroups": [] }, "generate_release_notes": { "type": "boolean", "description": "Whether to automatically generate the name and body for this release. If name is specified, the specified name will be used; otherwise, a name will be automatically generated. If body is specified, the body will be pre-pended to the automatically generated notes.
Users with push access to the repository can create a release.
\nThis endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.
", "bodyParameters": [ { "type": "string", "description": "Required. The name of the tag.
", "name": "tag_name", "in": "body", "rawType": "string", "rawDescription": "The name of the tag.", "childParamsGroups": [] }, { "type": "string", "description": "Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually master).
The name of the release.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the release.", "childParamsGroups": [] }, { "type": "string", "description": "Text describing the contents of the tag.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "Text describing the contents of the tag.", "childParamsGroups": [] }, { "type": "boolean", "description": "true to create a draft (unpublished) release, false to create a published one.
true to identify the release as a prerelease. false to identify the release as a full release.
If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see \"Managing categories for discussions in your repository.\"
", "name": "discussion_category_name", "in": "body", "rawType": "string", "rawDescription": "If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see \"[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository).\"", "childParamsGroups": [] }, { "type": "boolean", "description": "Whether to automatically generate the name and body for this release. If name is specified, the specified name will be used; otherwise, a name will be automatically generated. If body is specified, the body will be pre-pended to the automatically generated notes.
{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n \"discussion_url\": \"https://github.com/octocat/Hello-World/discussions/90\",\n \"id\": 1,\n \"node_id\": \"MDc6UmVsZWFzZTE=\",\n \"tag_name\": \"v1.0.0\",\n \"target_commitish\": \"master\",\n \"name\": \"v1.0.0\",\n \"body\": \"Description of the release\",\n \"draft\": false,\n \"prerelease\": false,\n \"created_at\": \"2013-02-27T19:35:32Z\",\n \"published_at\": \"2013-02-27T19:35:32Z\",\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assets\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n \"id\": 1,\n \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n \"name\": \"example.zip\",\n \"label\": \"short description\",\n \"state\": \"uploaded\",\n \"content_type\": \"application/zip\",\n \"size\": 1024,\n \"download_count\": 42,\n \"created_at\": \"2013-02-27T19:35:32Z\",\n \"updated_at\": \"2013-02-27T19:35:32Z\",\n \"uploader\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n }\n ]\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if the discussion category name is invalid"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/releases/assets/{asset_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "asset_id",
"description": "asset_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "asset_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/assets/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/assets/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/releases/assets/{asset_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n asset_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/releases/assets/{asset_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n asset_id: 42\n})\n"
}
],
"summary": "Get a release asset",
"description": "To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response.",
"tags": [
"repos"
],
"operationId": "repos/get-release-asset",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-release-asset"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "releases"
},
"slug": "get-a-release-asset",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "releases",
"subcategoryLabel": "Releases",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "To download the asset's binary content, set the Accept header of the request to application/octet-stream. The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a 200 or 302 response.
{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n \"id\": 1,\n \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n \"name\": \"example.zip\",\n \"label\": \"short description\",\n \"state\": \"uploaded\",\n \"content_type\": \"application/zip\",\n \"size\": 1024,\n \"download_count\": 42,\n \"created_at\": \"2013-02-27T19:35:32Z\",\n \"updated_at\": \"2013-02-27T19:35:32Z\",\n \"uploader\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n}\n"
},
{
"httpStatusCode": "302",
"httpStatusMessage": "Found",
"description": "Found"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "415",
"httpStatusMessage": "Unsupported Media Type",
"description": "Preview header missing"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/releases/assets/{asset_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "asset_id",
"description": "asset_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "asset_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/assets/42 \\\n -d '{\"name\":\"name\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/assets/42 \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n asset_id: 42,\n name: 'name'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n asset_id: 42,\n name: 'name'\n})\n"
}
],
"summary": "Update a release asset",
"description": "Users with push access to the repository can edit a release asset.",
"tags": [
"repos"
],
"operationId": "repos/update-release-asset",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#update-a-release-asset"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The file name of the asset.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The file name of the asset.", "childParamsGroups": [] }, "label": { "type": "string", "description": "An alternate short description of the asset. Used in place of the filename.
", "name": "label", "in": "body", "rawType": "string", "rawDescription": "An alternate short description of the asset. Used in place of the filename.", "childParamsGroups": [] }, "state": { "type": "string", "example": "\"uploaded\"", "name": "state", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } } }, "example": { "name": "foo-1.0.0-osx.zip", "label": "Mac binary" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "repos", "subcategory": "releases" }, "slug": "update-a-release-asset", "category": "repos", "categoryLabel": "Repos", "subcategory": "releases", "subcategoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "Users with push access to the repository can edit a release asset.
", "bodyParameters": [ { "type": "string", "description": "The file name of the asset.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The file name of the asset.", "childParamsGroups": [] }, { "type": "string", "description": "An alternate short description of the asset. Used in place of the filename.
", "name": "label", "in": "body", "rawType": "string", "rawDescription": "An alternate short description of the asset. Used in place of the filename.", "childParamsGroups": [] }, { "type": "string", "example": "\"uploaded\"", "name": "state", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n \"id\": 1,\n \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n \"name\": \"example.zip\",\n \"label\": \"short description\",\n \"state\": \"uploaded\",\n \"content_type\": \"application/zip\",\n \"size\": 1024,\n \"download_count\": 42,\n \"created_at\": \"2013-02-27T19:35:32Z\",\n \"updated_at\": \"2013-02-27T19:35:32Z\",\n \"uploader\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/releases/assets/{asset_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "asset_id",
"description": "asset_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "asset_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/assets/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/assets/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n asset_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n asset_id: 42\n})\n"
}
],
"summary": "Delete a release asset",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/delete-release-asset",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-a-release-asset"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "releases"
},
"slug": "delete-a-release-asset",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "releases",
"subcategoryLabel": "Releases",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/releases/generate-notes",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/generate-notes \\\n -d '{\"tag_name\":\"tag_name\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/generate-notes \\\n -d '{\"tag_name\":\"tag_name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/releases/generate-notes', {\n owner: 'octocat',\n repo: 'hello-world',\n tag_name: 'tag_name'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/releases/generate-notes', {\n owner: 'octocat',\n repo: 'hello-world',\n tag_name: 'tag_name'\n})\n"
}
],
"summary": "Generate release notes content for a release",
"description": "Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release.",
"tags": [
"repos"
],
"operationId": "repos/generate-release-notes",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#generate-release-notes"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"tag_name": {
"type": "string",
"description": "Required. The tag name for the release. This can be an existing tag or a new one.
", "name": "tag_name", "in": "body", "rawType": "string", "rawDescription": "The tag name for the release. This can be an existing tag or a new one.", "childParamsGroups": [] }, "target_commitish": { "type": "string", "description": "Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists.
", "name": "target_commitish", "in": "body", "rawType": "string", "rawDescription": "Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists.", "childParamsGroups": [] }, "previous_tag_name": { "type": "string", "description": "The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release.
", "name": "previous_tag_name", "in": "body", "rawType": "string", "rawDescription": "The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release.", "childParamsGroups": [] }, "configuration_file_path": { "type": "string", "description": "Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used.
", "name": "configuration_file_path", "in": "body", "rawType": "string", "rawDescription": "Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used.", "childParamsGroups": [] } }, "required": [ "tag_name" ] }, "example": { "tag_name": "v1.0.0", "target_commitish": "main", "previous_tag_name": "v0.9.2", "configuration_file_path": ".github/custom_release_config.yml" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "repos", "subcategory": "releases" }, "slug": "generate-release-notes-content-for-a-release", "category": "repos", "categoryLabel": "Repos", "subcategory": "releases", "subcategoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "Generate a name and body describing a release. The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release.
", "bodyParameters": [ { "type": "string", "description": "Required. The tag name for the release. This can be an existing tag or a new one.
", "name": "tag_name", "in": "body", "rawType": "string", "rawDescription": "The tag name for the release. This can be an existing tag or a new one.", "childParamsGroups": [] }, { "type": "string", "description": "Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists.
", "name": "target_commitish", "in": "body", "rawType": "string", "rawDescription": "Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists.", "childParamsGroups": [] }, { "type": "string", "description": "The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release.
", "name": "previous_tag_name", "in": "body", "rawType": "string", "rawDescription": "The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release.", "childParamsGroups": [] }, { "type": "string", "description": "Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used.
", "name": "configuration_file_path", "in": "body", "rawType": "string", "rawDescription": "Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Name and body of generated release notes", "payload": "{\n \"name\": \"Release v1.0.0 is now available!\",\n \"body\": \"##Changes in Release v1.0.0 ... ##Contributors @monalisa\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/releases/latest",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/latest",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/latest"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/releases/latest', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/releases/latest', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get the latest release",
"description": "View the latest published full release for the repository.\n\nThe latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published.",
"tags": [
"repos"
],
"operationId": "repos/get-latest-release",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-the-latest-release"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "releases"
},
"slug": "get-the-latest-release",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "releases",
"subcategoryLabel": "Releases",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "View the latest published full release for the repository.
\nThe latest release is the most recent non-prerelease, non-draft release, sorted by the created_at attribute. The created_at attribute is the date of the commit used for the release, and not the date when the release was drafted or published.
{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n \"discussion_url\": \"https://github.com/octocat/Hello-World/discussions/90\",\n \"id\": 1,\n \"node_id\": \"MDc6UmVsZWFzZTE=\",\n \"tag_name\": \"v1.0.0\",\n \"target_commitish\": \"master\",\n \"name\": \"v1.0.0\",\n \"body\": \"Description of the release\",\n \"draft\": false,\n \"prerelease\": false,\n \"created_at\": \"2013-02-27T19:35:32Z\",\n \"published_at\": \"2013-02-27T19:35:32Z\",\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assets\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n \"id\": 1,\n \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n \"name\": \"example.zip\",\n \"label\": \"short description\",\n \"state\": \"uploaded\",\n \"content_type\": \"application/zip\",\n \"size\": 1024,\n \"download_count\": 42,\n \"created_at\": \"2013-02-27T19:35:32Z\",\n \"updated_at\": \"2013-02-27T19:35:32Z\",\n \"uploader\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/releases/tags/{tag}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "tag",
"description": "tag parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": "tag parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/tags/TAG", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/tags/TAG"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/releases/tags/{tag}', {\n owner: 'octocat',\n repo: 'hello-world',\n tag: 'tag'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/releases/tags/{tag}', {\n owner: 'octocat',\n repo: 'hello-world',\n tag: 'tag'\n})\n"
}
],
"summary": "Get a release by tag name",
"description": "Get a published release with the specified tag.",
"tags": [
"repos"
],
"operationId": "repos/get-release-by-tag",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "releases"
},
"slug": "get-a-release-by-tag-name",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "releases",
"subcategoryLabel": "Releases",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Get a published release with the specified tag.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n \"discussion_url\": \"https://github.com/octocat/Hello-World/discussions/90\",\n \"id\": 1,\n \"node_id\": \"MDc6UmVsZWFzZTE=\",\n \"tag_name\": \"v1.0.0\",\n \"target_commitish\": \"master\",\n \"name\": \"v1.0.0\",\n \"body\": \"Description of the release\",\n \"draft\": false,\n \"prerelease\": false,\n \"created_at\": \"2013-02-27T19:35:32Z\",\n \"published_at\": \"2013-02-27T19:35:32Z\",\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assets\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n \"id\": 1,\n \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n \"name\": \"example.zip\",\n \"label\": \"short description\",\n \"state\": \"uploaded\",\n \"content_type\": \"application/zip\",\n \"size\": 1024,\n \"download_count\": 42,\n \"created_at\": \"2013-02-27T19:35:32Z\",\n \"updated_at\": \"2013-02-27T19:35:32Z\",\n \"uploader\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n }\n ]\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/releases/{release_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "release_id",
"description": "release_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "release_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/releases/{release_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/releases/{release_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42\n})\n"
}
],
"summary": "Get a release",
"description": "**Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia).",
"tags": [
"repos"
],
"operationId": "repos/get-release",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-release"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "releases"
},
"slug": "get-a-release",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "releases",
"subcategoryLabel": "Releases",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Note: This returns an upload_url key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource.
{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n \"discussion_url\": \"https://github.com/octocat/Hello-World/discussions/90\",\n \"id\": 1,\n \"node_id\": \"MDc6UmVsZWFzZTE=\",\n \"tag_name\": \"v1.0.0\",\n \"target_commitish\": \"master\",\n \"name\": \"v1.0.0\",\n \"body\": \"Description of the release\",\n \"draft\": false,\n \"prerelease\": false,\n \"created_at\": \"2013-02-27T19:35:32Z\",\n \"published_at\": \"2013-02-27T19:35:32Z\",\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assets\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n \"id\": 1,\n \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n \"name\": \"example.zip\",\n \"label\": \"short description\",\n \"state\": \"uploaded\",\n \"content_type\": \"application/zip\",\n \"size\": 1024,\n \"download_count\": 42,\n \"created_at\": \"2013-02-27T19:35:32Z\",\n \"updated_at\": \"2013-02-27T19:35:32Z\",\n \"uploader\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n }\n ]\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/releases/{release_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "release_id",
"description": "release_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "release_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42 \\\n -d '{\"tag_name\":\"tag_name\"}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42 \\\n -d '{\"tag_name\":\"tag_name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/releases/{release_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42,\n tag_name: 'tag_name'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/releases/{release_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42,\n tag_name: 'tag_name'\n})\n"
}
],
"summary": "Update a release",
"description": "Users with push access to the repository can edit a release.",
"tags": [
"repos"
],
"operationId": "repos/update-release",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#update-a-release"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"tag_name": {
"type": "string",
"description": "The name of the tag.
", "name": "tag_name", "in": "body", "rawType": "string", "rawDescription": "The name of the tag.", "childParamsGroups": [] }, "target_commitish": { "type": "string", "description": "Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually master).
The name of the release.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the release.", "childParamsGroups": [] }, "body": { "type": "string", "description": "Text describing the contents of the tag.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "Text describing the contents of the tag.", "childParamsGroups": [] }, "draft": { "type": "boolean", "description": "true makes the release a draft, and false publishes the release.
true to identify the release as a prerelease, false to identify the release as a full release.
If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see \"Managing categories for discussions in your repository.\"
", "name": "discussion_category_name", "in": "body", "rawType": "string", "rawDescription": "If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see \"[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository).\"", "childParamsGroups": [] } } }, "example": { "tag_name": "v1.0.0", "target_commitish": "master", "name": "v1.0.0", "body": "Description of the release", "draft": false, "prerelease": false } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "repos", "subcategory": "releases" }, "slug": "update-a-release", "category": "repos", "categoryLabel": "Repos", "subcategory": "releases", "subcategoryLabel": "Releases", "contentType": "application/json", "notes": [], "descriptionHTML": "Users with push access to the repository can edit a release.
", "bodyParameters": [ { "type": "string", "description": "The name of the tag.
", "name": "tag_name", "in": "body", "rawType": "string", "rawDescription": "The name of the tag.", "childParamsGroups": [] }, { "type": "string", "description": "Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually master).
The name of the release.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the release.", "childParamsGroups": [] }, { "type": "string", "description": "Text describing the contents of the tag.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "Text describing the contents of the tag.", "childParamsGroups": [] }, { "type": "boolean", "description": "true makes the release a draft, and false publishes the release.
true to identify the release as a prerelease, false to identify the release as a full release.
If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see \"Managing categories for discussions in your repository.\"
", "name": "discussion_category_name", "in": "body", "rawType": "string", "rawDescription": "If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see \"[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository).\"", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n \"discussion_url\": \"https://github.com/octocat/Hello-World/discussions/90\",\n \"id\": 1,\n \"node_id\": \"MDc6UmVsZWFzZTE=\",\n \"tag_name\": \"v1.0.0\",\n \"target_commitish\": \"master\",\n \"name\": \"v1.0.0\",\n \"body\": \"Description of the release\",\n \"draft\": false,\n \"prerelease\": false,\n \"created_at\": \"2013-02-27T19:35:32Z\",\n \"published_at\": \"2013-02-27T19:35:32Z\",\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assets\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n \"id\": 1,\n \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n \"name\": \"example.zip\",\n \"label\": \"short description\",\n \"state\": \"uploaded\",\n \"content_type\": \"application/zip\",\n \"size\": 1024,\n \"download_count\": 42,\n \"created_at\": \"2013-02-27T19:35:32Z\",\n \"updated_at\": \"2013-02-27T19:35:32Z\",\n \"uploader\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n }\n ]\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if the discussion category name is invalid"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/releases/{release_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "release_id",
"description": "release_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "release_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/releases/{release_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/releases/{release_id}', {\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42\n})\n"
}
],
"summary": "Delete a release",
"description": "Users with push access to the repository can delete a release.",
"tags": [
"repos"
],
"operationId": "repos/delete-release",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-a-release"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "releases"
},
"slug": "delete-a-release",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "releases",
"subcategoryLabel": "Releases",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Users with push access to the repository can delete a release.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/releases/{release_id}/assets", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "release_id", "description": "release_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "release_id parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42/assets", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42/assets"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/releases/{release_id}/assets', {\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/releases/{release_id}/assets', {\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42\n})\n"
}
],
"summary": "List release assets",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/list-release-assets",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-release-assets"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "releases"
},
"slug": "list-release-assets",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "releases",
"subcategoryLabel": "Releases",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n \"id\": 1,\n \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n \"name\": \"example.zip\",\n \"label\": \"short description\",\n \"state\": \"uploaded\",\n \"content_type\": \"application/zip\",\n \"size\": 1024,\n \"download_count\": 42,\n \"created_at\": \"2013-02-27T19:35:32Z\",\n \"updated_at\": \"2013-02-27T19:35:32Z\",\n \"uploader\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/releases/{release_id}/assets",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "release_id",
"description": "release_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "release_id parameter
" }, { "name": "name", "in": "query", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "label", "in": "query", "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42/assets", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42/assets"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/releases/{release_id}/assets', {\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42,\n name: 'name'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/releases/{release_id}/assets', {\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42,\n name: 'name'\n})\n"
}
],
"summary": "Upload a release asset",
"description": "This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in\nthe response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset.\n\nYou need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint.\n\nMost libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: \n\n`application/zip`\n\nGitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.\n\nWhen an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted.\n\n**Notes:**\n* GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The \"[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)\"\nendpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api).\n* If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset.",
"tags": [
"repos"
],
"operationId": "repos/upload-release-asset",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#upload-a-release-asset"
},
"servers": [
{
"url": "{origin}",
"variables": {
"origin": {
"default": "https://uploads.github.com",
"description": "The URL origin (protocol + host name + port) is included in `upload_url` returned in the response of the \"Create a release\" endpoint"
}
}
}
],
"requestBody": {
"required": false,
"content": {
"*/*": {
"schema": {
"type": "string",
"description": "The raw file data"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "releases"
},
"slug": "upload-a-release-asset",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "releases",
"subcategoryLabel": "Releases",
"contentType": "*/*",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "This endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\n{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n \"id\": 1,\n \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n \"name\": \"example.zip\",\n \"label\": \"short description\",\n \"state\": \"uploaded\",\n \"content_type\": \"application/zip\",\n \"size\": 1024,\n \"download_count\": 42,\n \"created_at\": \"2013-02-27T19:35:32Z\",\n \"updated_at\": \"2013-02-27T19:35:32Z\",\n \"uploader\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Response if you upload an asset with the same filename as another uploaded asset"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/releases/{release_id}/reactions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "release_id",
"description": "release_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "release_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42/reactions \\\n -d '{\"content\":\"content\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42/reactions \\\n -d '{\"content\":\"content\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/releases/{release_id}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42,\n content: 'content'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/releases/{release_id}/reactions', {\n owner: 'octocat',\n repo: 'hello-world',\n release_id: 42,\n content: 'content'\n})\n"
}
],
"summary": "Create reaction for a release",
"description": "Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release.",
"tags": [
"reactions"
],
"operationId": "reactions/create-for-release",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "Required. The reaction type to add to the release.
", "enum": [ "+1", "laugh", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release.", "childParamsGroups": [] } }, "required": [ "content" ] }, "example": { "content": "heart" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "reactions", "subcategory": null }, "slug": "create-reaction-for-a-release", "category": "reactions", "categoryLabel": "Reactions", "contentType": "application/json", "notes": [], "descriptionHTML": "Create a reaction to a release. A response with a Status: 200 OK means that you already added the reaction type to this release.
Required. The reaction type to add to the release.
", "enum": [ "+1", "laugh", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Reaction exists", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n"
},
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Reaction created",
"payload": "{\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/secret-scanning/alerts",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "state",
"in": "query",
"description": "Set to `open` or `resolved` to only list secret scanning alerts in a specific state.",
"required": false,
"schema": {
"type": "string",
"enum": [
"open",
"resolved"
]
},
"descriptionHTML": "Set to open or resolved to only list secret scanning alerts in a specific state.
A comma-separated list of secret types to return. By default all secret types are returned. See \"About secret scanning for private repositories\" for a complete list of secret types (API slug).
" }, { "name": "resolution", "in": "query", "description": "A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`.", "required": false, "schema": { "type": "string" }, "descriptionHTML": "A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are false_positive, wont_fix, revoked, pattern_edited, pattern_deleted or used_in_tests.
Page number of the results to fetch.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/secret-scanning/alerts", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/secret-scanning/alerts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/secret-scanning/alerts', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/secret-scanning/alerts', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List secret scanning alerts for a repository",
"description": "Lists all secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope.\n\nGitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.",
"tags": [
"secret-scanning"
],
"operationId": "secret-scanning/list-alerts-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "secret-scanning",
"subcategory": null
},
"slug": "list-secret-scanning-alerts-for-a-repository",
"category": "secret-scanning",
"categoryLabel": "Secret scanning",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the repo scope or security_events scope.
GitHub Apps must have the secret_scanning_alerts read permission to use this endpoint.
[\n {\n \"number\": 2,\n \"created_at\": \"2020-11-06T18:48:51Z\",\n \"url\": \"https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/2\",\n \"html_url\": \"https://github.com/owner/private-repo/security/secret-scanning/2\",\n \"state\": \"resolved\",\n \"resolution\": \"false_positive\",\n \"resolved_at\": \"2020-11-07T02:47:13Z\",\n \"resolved_by\": {\n \"login\": \"monalisa\",\n \"id\": 2,\n \"node_id\": \"MDQ6VXNlcjI=\",\n \"avatar_url\": \"https://alambic.github.com/avatars/u/2?\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/monalisa\",\n \"html_url\": \"https://github.com/monalisa\",\n \"followers_url\": \"https://api.github.com/users/monalisa/followers\",\n \"following_url\": \"https://api.github.com/users/monalisa/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/monalisa/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/monalisa/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/monalisa/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/monalisa/orgs\",\n \"repos_url\": \"https://api.github.com/users/monalisa/repos\",\n \"events_url\": \"https://api.github.com/users/monalisa/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/monalisa/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"secret_type\": \"adafruit_io_key\",\n \"secret\": \"aio_XXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\n },\n {\n \"number\": 1,\n \"created_at\": \"2020-11-06T18:18:30Z\",\n \"url\": \"https://api.github.com/repos/owner/repo/secret-scanning/alerts/1\",\n \"html_url\": \"https://github.com/owner/repo/security/secret-scanning/1\",\n \"state\": \"open\",\n \"resolution\": null,\n \"resolved_at\": null,\n \"resolved_by\": null,\n \"secret_type\": \"mailchimp_api_key\",\n \"secret\": \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2\"\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Repository is public or secret scanning is disabled for the repository"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "alert_number",
"in": "path",
"description": "The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation.",
"required": true,
"schema": {
"type": "integer",
"description": "The security alert number.",
"readOnly": true,
"nullable": false
},
"descriptionHTML": "The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the number field in the response from the GET /repos/{owner}/{repo}/code-scanning/alerts operation.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/secret-scanning/alerts/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n alert_number: 42\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n alert_number: 42\n})\n"
}
],
"summary": "Get a secret scanning alert",
"description": "Gets a single secret scanning alert detected in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope.\n\nGitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.",
"tags": [
"secret-scanning"
],
"operationId": "secret-scanning/get-alert",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "secret-scanning",
"subcategory": null
},
"slug": "get-a-secret-scanning-alert",
"category": "secret-scanning",
"categoryLabel": "Secret scanning",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a single secret scanning alert detected in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the repo scope or security_events scope.
GitHub Apps must have the secret_scanning_alerts read permission to use this endpoint.
{\n \"number\": 42,\n \"created_at\": \"2020-11-06T18:18:30Z\",\n \"url\": \"https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/42\",\n \"html_url\": \"https://github.com/owner/private-repo/security/secret-scanning/42\",\n \"state\": \"open\",\n \"resolution\": null,\n \"resolved_at\": null,\n \"resolved_by\": null,\n \"secret_type\": \"mailchimp_api_key\",\n \"secret\": \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Repository is public, or secret scanning is disabled for the repository, or the resource is not found"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "patch",
"requestPath": "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "alert_number",
"in": "path",
"description": "The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation.",
"required": true,
"schema": {
"type": "integer",
"description": "The security alert number.",
"readOnly": true,
"nullable": false
},
"descriptionHTML": "The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the number field in the response from the GET /repos/{owner}/{repo}/code-scanning/alerts operation.
curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/secret-scanning/alerts/42 \\\n -d '{\"state\":\"state\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n alert_number: 42,\n state: 'state'\n})",
"html": "await octokit.request('PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}', {\n owner: 'octocat',\n repo: 'hello-world',\n alert_number: 42,\n state: 'state'\n})\n"
}
],
"summary": "Update a secret scanning alert",
"description": "Updates the status of a secret scanning alert in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope.\n\nGitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint.",
"operationId": "secret-scanning/update-alert",
"tags": [
"secret-scanning"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"state": {
"description": "Required. Sets the state of the secret scanning alert. Can be either open or resolved. You must provide resolution when you set the state to resolved.
Required when the state is resolved. The reason for resolving the alert. Can be one of false_positive, wont_fix, revoked, or used_in_tests.
Updates the status of a secret scanning alert in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the repo scope or security_events scope.
GitHub Apps must have the secret_scanning_alerts write permission to use this endpoint.
Required. Sets the state of the secret scanning alert. Can be either open or resolved. You must provide resolution when you set the state to resolved.
Required when the state is resolved. The reason for resolving the alert. Can be one of false_positive, wont_fix, revoked, or used_in_tests.
{\n \"number\": 42,\n \"created_at\": \"2020-11-06T18:18:30Z\",\n \"url\": \"https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/42\",\n \"html_url\": \"https://github.com/owner/private-repo/security/secret-scanning/42\",\n \"state\": \"resolved\",\n \"resolution\": \"used_in_tests\",\n \"resolved_at\": \"2020-11-16T22:42:07Z\",\n \"resolved_by\": {\n \"login\": \"monalisa\",\n \"id\": 2,\n \"node_id\": \"MDQ6VXNlcjI=\",\n \"avatar_url\": \"https://alambic.github.com/avatars/u/2?\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/monalisa\",\n \"html_url\": \"https://github.com/monalisa\",\n \"followers_url\": \"https://api.github.com/users/monalisa/followers\",\n \"following_url\": \"https://api.github.com/users/monalisa/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/monalisa/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/monalisa/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/monalisa/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/monalisa/orgs\",\n \"repos_url\": \"https://api.github.com/users/monalisa/repos\",\n \"events_url\": \"https://api.github.com/users/monalisa/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/monalisa/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"secret_type\": \"mailchimp_api_key\",\n \"secret\": \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Repository is public, or secret scanning is disabled for the repository, or the resource is not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "State does not match the resolution"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/stargazers",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stargazers", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stargazers"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/stargazers', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/stargazers', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List stargazers",
"description": "Lists the people that have starred the repository.\n\nYou can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header:",
"tags": [
"activity"
],
"operationId": "activity/list-stargazers-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-stargazers"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "starring"
},
"slug": "list-stargazers",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "starring",
"subcategoryLabel": "Starring",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the people that have starred the repository.
\nYou can also find out when stars were created by passing the following custom media type via the Accept header:
[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
},
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Alternative response with star creation timestamps",
"payload": "[\n {\n \"starred_at\": \"2011-01-16T19:06:43Z\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n }\n]\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/stats/code_frequency",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stats/code_frequency",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stats/code_frequency"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/stats/code_frequency', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/stats/code_frequency', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get the weekly commit activity",
"description": "Returns a weekly aggregate of the number of additions and deletions pushed to a repository.",
"tags": [
"repos"
],
"operationId": "repos/get-code-frequency-stats",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-the-weekly-commit-activity"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "statistics"
},
"slug": "get-the-weekly-commit-activity",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "statistics",
"subcategoryLabel": "Statistics",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Returns a weekly aggregate of the number of additions and deletions pushed to a repository.", "payload": "[\n [\n 1302998400,\n 1124,\n -435\n ]\n]\n"
},
{
"httpStatusCode": "202",
"httpStatusMessage": "Accepted",
"description": "Accepted"
},
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "A header with no content is returned."
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/stats/commit_activity",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stats/commit_activity",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stats/commit_activity"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/stats/commit_activity', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/stats/commit_activity', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get the last year of commit activity",
"description": "Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`.",
"tags": [
"repos"
],
"operationId": "repos/get-commit-activity-stats",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-the-last-year-of-commit-activity"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "statistics"
},
"slug": "get-the-last-year-of-commit-activity",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "statistics",
"subcategoryLabel": "Statistics",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns the last year of commit activity grouped by week. The days array is a group of commits per day, starting on Sunday.
[\n {\n \"days\": [\n 0,\n 3,\n 26,\n 20,\n 39,\n 1,\n 0\n ],\n \"total\": 89,\n \"week\": 1336280400\n }\n]\n"
},
{
"httpStatusCode": "202",
"httpStatusMessage": "Accepted",
"description": "Accepted"
},
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "A header with no content is returned."
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/stats/contributors",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stats/contributors",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stats/contributors"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/stats/contributors', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/stats/contributors', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get all contributor commit activity",
"description": "\nReturns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information:\n\n* `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time).\n* `a` - Number of additions\n* `d` - Number of deletions\n* `c` - Number of commits",
"tags": [
"repos"
],
"operationId": "repos/get-contributors-stats",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-all-contributor-commit-activity"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "statistics"
},
"slug": "get-all-contributor-commit-activity",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "statistics",
"subcategoryLabel": "Statistics",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns the total number of commits authored by the contributor. In addition, the response includes a Weekly Hash (weeks array) with the following information:
w - Start of the week, given as a Unix timestamp.a - Number of additionsd - Number of deletionsc - Number of commits[\n {\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"total\": 135,\n \"weeks\": [\n {\n \"w\": 1367712000,\n \"a\": 6898,\n \"d\": 77,\n \"c\": 10\n }\n ]\n }\n]\n"
},
{
"httpStatusCode": "202",
"httpStatusMessage": "Accepted",
"description": "Accepted"
},
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "A header with no content is returned."
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/stats/participation",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stats/participation",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stats/participation"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/stats/participation', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/stats/participation', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get the weekly commit count",
"description": "Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`.\n\nThe array order is oldest week (index 0) to most recent week.",
"tags": [
"repos"
],
"operationId": "repos/get-participation-stats",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-the-weekly-commit-count"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "statistics"
},
"slug": "get-the-weekly-commit-count",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "statistics",
"subcategoryLabel": "Statistics",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns the total commit counts for the owner and total commit counts in all. all is everyone combined, including the owner in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract owner from all.
The array order is oldest week (index 0) to most recent week.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "The array order is oldest week (index 0) to most recent week.", "payload": "{\n \"all\": [\n 11,\n 21,\n 15,\n 2,\n 8,\n 1,\n 8,\n 23,\n 17,\n 21,\n 11,\n 10,\n 33,\n 91,\n 38,\n 34,\n 22,\n 23,\n 32,\n 3,\n 43,\n 87,\n 71,\n 18,\n 13,\n 5,\n 13,\n 16,\n 66,\n 27,\n 12,\n 45,\n 110,\n 117,\n 13,\n 8,\n 18,\n 9,\n 19,\n 26,\n 39,\n 12,\n 20,\n 31,\n 46,\n 91,\n 45,\n 10,\n 24,\n 9,\n 29,\n 7\n ],\n \"owner\": [\n 3,\n 2,\n 3,\n 0,\n 2,\n 0,\n 5,\n 14,\n 7,\n 9,\n 1,\n 5,\n 0,\n 48,\n 19,\n 2,\n 0,\n 1,\n 10,\n 2,\n 23,\n 40,\n 35,\n 8,\n 8,\n 2,\n 10,\n 6,\n 30,\n 0,\n 2,\n 9,\n 53,\n 104,\n 3,\n 3,\n 10,\n 4,\n 7,\n 11,\n 21,\n 4,\n 4,\n 22,\n 26,\n 63,\n 11,\n 2,\n 14,\n 1,\n 10,\n 3\n ]\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/stats/punch_card",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stats/punch_card",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stats/punch_card"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/stats/punch_card', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/stats/punch_card', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get the hourly commit count for each day",
"description": "Each array contains the day number, hour number, and number of commits:\n\n* `0-6`: Sunday - Saturday\n* `0-23`: Hour of day\n* Number of commits\n\nFor example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits.",
"tags": [
"repos"
],
"operationId": "repos/get-punch-card-stats",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-the-hourly-commit-count-for-each-day"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "statistics"
},
"slug": "get-the-hourly-commit-count-for-each-day",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "statistics",
"subcategoryLabel": "Statistics",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Each array contains the day number, hour number, and number of commits:
\n0-6: Sunday - Saturday0-23: Hour of dayFor example, [2, 14, 25] indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits.
[\n [\n 0,\n 0,\n 5\n ],\n [\n 0,\n 1,\n 43\n ],\n [\n 0,\n 2,\n 21\n ]\n]\n"
},
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "A header with no content is returned."
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/statuses/{sha}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "sha",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-multi-segment": true,
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/statuses/SHA \\\n -d '{\"state\":\"state\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/statuses/SHA \\\n -d '{\"state\":\"state\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/statuses/{sha}', {\n owner: 'octocat',\n repo: 'hello-world',\n sha: 'sha',\n state: 'state'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/statuses/{sha}', {\n owner: 'octocat',\n repo: 'hello-world',\n sha: 'sha',\n state: 'state'\n})\n"
}
],
"summary": "Create a commit status",
"description": "Users with push access in a repository can create commit statuses for a given SHA.\n\nNote: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error.",
"tags": [
"repos"
],
"operationId": "repos/create-commit-status",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-a-commit-status"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"state": {
"type": "string",
"description": "Required. The state of the status. Can be one of error, failure, pending, or success.
The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status.
\nFor example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA:
\nhttp://ci.example.com/user/repo/build/sha
A short description of the status.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short description of the status.", "childParamsGroups": [] }, "context": { "type": "string", "description": "A string label to differentiate this status from the status of other systems. This field is case-insensitive.
", "default": "default", "name": "context", "in": "body", "rawType": "string", "rawDescription": "A string label to differentiate this status from the status of other systems. This field is case-insensitive.", "childParamsGroups": [] } }, "required": [ "state" ] }, "example": { "state": "success", "target_url": "https://example.com/build/status", "description": "The build succeeded!", "context": "continuous-integration/jenkins" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "repos", "subcategory": "statuses" }, "slug": "create-a-commit-status", "category": "repos", "categoryLabel": "Repos", "subcategory": "statuses", "subcategoryLabel": "Statuses", "contentType": "application/json", "notes": [], "descriptionHTML": "Users with push access in a repository can create commit statuses for a given SHA.
\nNote: there is a limit of 1000 statuses per sha and context within a repository. Attempts to create more than 1000 statuses will result in a validation error.
Required. The state of the status. Can be one of error, failure, pending, or success.
The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status.
\nFor example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA:
\nhttp://ci.example.com/user/repo/build/sha
A short description of the status.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short description of the status.", "childParamsGroups": [] }, { "type": "string", "description": "A string label to differentiate this status from the status of other systems. This field is case-insensitive.
", "default": "default", "name": "context", "in": "body", "rawType": "string", "rawDescription": "A string label to differentiate this status from the status of other systems. This field is case-insensitive.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n \"id\": 1,\n \"node_id\": \"MDY6U3RhdHVzMQ==\",\n \"state\": \"success\",\n \"description\": \"Build has completed successfully\",\n \"target_url\": \"https://ci.example.com/1000/output\",\n \"context\": \"continuous-integration/jenkins\",\n \"created_at\": \"2012-07-20T01:19:13Z\",\n \"updated_at\": \"2012-07-20T01:19:13Z\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/subscribers",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/subscribers", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/subscribers"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/subscribers', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/subscribers', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List watchers",
"description": "Lists the people watching the specified repository.",
"tags": [
"activity"
],
"operationId": "activity/list-watchers-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-watchers"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "watching"
},
"slug": "list-watchers",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "watching",
"subcategoryLabel": "Watching",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the people watching the specified repository.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/subscription",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/subscription",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/subscription"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/subscription', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/subscription', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get a repository subscription",
"description": "",
"tags": [
"activity"
],
"operationId": "activity/get-repo-subscription",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#get-a-repository-subscription"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "watching"
},
"slug": "get-a-repository-subscription",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "watching",
"subcategoryLabel": "Watching",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "if you subscribe to the repository",
"payload": "{\n \"subscribed\": true,\n \"ignored\": false,\n \"reason\": null,\n \"created_at\": \"2012-10-06T21:34:12Z\",\n \"url\": \"https://api.github.com/repos/octocat/example/subscription\",\n \"repository_url\": \"https://api.github.com/repos/octocat/example\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if you don't subscribe to the repository"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/subscription",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/subscription \\\n -d '{\"subscribed\":true}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/subscription \\\n -d '{\"subscribed\":true}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/subscription', {\n owner: 'octocat',\n repo: 'hello-world',\n subscribed: true\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/subscription', {\n owner: 'octocat',\n repo: 'hello-world',\n subscribed: true\n})\n"
}
],
"summary": "Set a repository subscription",
"description": "If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely.",
"tags": [
"activity"
],
"operationId": "activity/set-repo-subscription",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#set-a-repository-subscription"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"subscribed": {
"type": "boolean",
"description": "Determines if notifications should be received from this repository.
", "name": "subscribed", "in": "body", "rawType": "boolean", "rawDescription": "Determines if notifications should be received from this repository.", "childParamsGroups": [] }, "ignored": { "type": "boolean", "description": "Determines if all notifications should be blocked from this repository.
", "name": "ignored", "in": "body", "rawType": "boolean", "rawDescription": "Determines if all notifications should be blocked from this repository.", "childParamsGroups": [] } } } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "activity", "subcategory": "watching" }, "slug": "set-a-repository-subscription", "category": "activity", "categoryLabel": "Activity", "subcategory": "watching", "subcategoryLabel": "Watching", "contentType": "application/json", "notes": [], "descriptionHTML": "If you would like to watch a repository, set subscribed to true. If you would like to ignore notifications made within a repository, set ignored to true. If you would like to stop watching a repository, delete the repository's subscription completely.
Determines if notifications should be received from this repository.
", "name": "subscribed", "in": "body", "rawType": "boolean", "rawDescription": "Determines if notifications should be received from this repository.", "childParamsGroups": [] }, { "type": "boolean", "description": "Determines if all notifications should be blocked from this repository.
", "name": "ignored", "in": "body", "rawType": "boolean", "rawDescription": "Determines if all notifications should be blocked from this repository.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"subscribed\": true,\n \"ignored\": false,\n \"reason\": null,\n \"created_at\": \"2012-10-06T21:34:12Z\",\n \"url\": \"https://api.github.com/repos/octocat/example/subscription\",\n \"repository_url\": \"https://api.github.com/repos/octocat/example\"\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/repos/{owner}/{repo}/subscription",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/subscription",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/subscription"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/subscription', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/subscription', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Delete a repository subscription",
"description": "This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/reference/activity#set-a-repository-subscription).",
"tags": [
"activity"
],
"operationId": "activity/delete-repo-subscription",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#delete-a-repository-subscription"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "watching"
},
"slug": "delete-a-repository-subscription",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "watching",
"subcategoryLabel": "Watching",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, set the repository's subscription manually.
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/tags", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/tags", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/tags"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/tags', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/tags', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List repository tags",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/list-tags",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-repository-tags"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
},
"slug": "list-repository-tags",
"category": "repos",
"categoryLabel": "Repos",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"name\": \"v0.1\",\n \"commit\": {\n \"sha\": \"c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\"\n },\n \"zipball_url\": \"https://github.com/octocat/Hello-World/zipball/v0.1\",\n \"tarball_url\": \"https://github.com/octocat/Hello-World/tarball/v0.1\",\n \"node_id\": \"MDQ6VXNlcjE=\"\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/tarball/{ref}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "ref",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/tarball/REF",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/tarball/REF"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/tarball/{ref}', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/tarball/{ref}', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})\n"
}
],
"summary": "Download a repository archive (tar)",
"description": "Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually\n`master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use\nthe `Location` header to make a second `GET` request.\n**Note**: For private repositories, these links are temporary and expire after five minutes.",
"tags": [
"repos"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#download-a-repository-archive"
},
"operationId": "repos/download-tarball-archive",
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "contents"
},
"slug": "download-a-repository-archive-tar",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "contents",
"subcategoryLabel": "Contents",
"notes": [],
"responses": [
{
"httpStatusCode": "302",
"httpStatusMessage": "Found",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Gets a redirect URL to download a tar archive for a repository. If you omit :ref, the repository’s default branch (usually\nmaster) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use\nthe Location header to make a second GET request.\nNote: For private repositories, these links are temporary and expire after five minutes.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/teams", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/teams"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/teams', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/teams', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "List repository teams",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/list-teams",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-repository-teams"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
},
"slug": "list-repository-teams",
"category": "repos",
"categoryLabel": "Repos",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/topics",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "page",
"description": "Page number of the results to fetch.",
"in": "query",
"schema": {
"type": "integer",
"default": 1
},
"descriptionHTML": "Page number of the results to fetch.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/topics", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/topics"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/topics', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/topics', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get all repository topics",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/get-all-topics",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-all-repository-topics"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
},
"slug": "get-all-repository-topics",
"category": "repos",
"categoryLabel": "Repos",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"names\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ]\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "put",
"requestPath": "/repos/{owner}/{repo}/topics",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/topics \\\n -d '{\"names\":[\"names\"]}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/topics \\\n -d '{\"names\":[\"names\"]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/topics', {\n owner: 'octocat',\n repo: 'hello-world',\n names: [\n 'names'\n ]\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/topics', {\n owner: 'octocat',\n repo: 'hello-world',\n names: [\n 'names'\n ]\n})\n"
}
],
"summary": "Replace all repository topics",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/replace-all-topics",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#replace-all-repository-topics"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"names": {
"type": "array of strings",
"description": "Required. An array of topics to add to the repository. Pass one or more topics to replace the set of existing topics. Send an empty array ([]) to clear all topics from the repository. Note: Topic names cannot contain uppercase letters.
Required. An array of topics to add to the repository. Pass one or more topics to replace the set of existing topics. Send an empty array ([]) to clear all topics from the repository. Note: Topic names cannot contain uppercase letters.
{\n \"names\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ]\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/traffic/clones",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per",
"description": "Must be one of: `day`, `week`.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"",
"day",
"week"
],
"default": "day"
},
"descriptionHTML": "Must be one of: day, week.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/traffic/clones"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/traffic/clones', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/traffic/clones', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get repository clones",
"description": "Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.",
"tags": [
"repos"
],
"operationId": "repos/get-clones",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-repository-clones"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "traffic"
},
"slug": "get-repository-clones",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "traffic",
"subcategoryLabel": "Traffic",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"count\": 173,\n \"uniques\": 128,\n \"clones\": [\n {\n \"timestamp\": \"2016-10-10T00:00:00Z\",\n \"count\": 2,\n \"uniques\": 1\n },\n {\n \"timestamp\": \"2016-10-11T00:00:00Z\",\n \"count\": 17,\n \"uniques\": 16\n },\n {\n \"timestamp\": \"2016-10-12T00:00:00Z\",\n \"count\": 21,\n \"uniques\": 15\n },\n {\n \"timestamp\": \"2016-10-13T00:00:00Z\",\n \"count\": 8,\n \"uniques\": 7\n },\n {\n \"timestamp\": \"2016-10-14T00:00:00Z\",\n \"count\": 5,\n \"uniques\": 5\n },\n {\n \"timestamp\": \"2016-10-15T00:00:00Z\",\n \"count\": 2,\n \"uniques\": 2\n },\n {\n \"timestamp\": \"2016-10-16T00:00:00Z\",\n \"count\": 8,\n \"uniques\": 7\n },\n {\n \"timestamp\": \"2016-10-17T00:00:00Z\",\n \"count\": 26,\n \"uniques\": 15\n },\n {\n \"timestamp\": \"2016-10-18T00:00:00Z\",\n \"count\": 19,\n \"uniques\": 17\n },\n {\n \"timestamp\": \"2016-10-19T00:00:00Z\",\n \"count\": 19,\n \"uniques\": 14\n },\n {\n \"timestamp\": \"2016-10-20T00:00:00Z\",\n \"count\": 19,\n \"uniques\": 15\n },\n {\n \"timestamp\": \"2016-10-21T00:00:00Z\",\n \"count\": 9,\n \"uniques\": 7\n },\n {\n \"timestamp\": \"2016-10-22T00:00:00Z\",\n \"count\": 5,\n \"uniques\": 5\n },\n {\n \"timestamp\": \"2016-10-23T00:00:00Z\",\n \"count\": 6,\n \"uniques\": 5\n },\n {\n \"timestamp\": \"2016-10-24T00:00:00Z\",\n \"count\": 7,\n \"uniques\": 5\n }\n ]\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/traffic/popular/paths",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/traffic/popular/paths",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/traffic/popular/paths"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/traffic/popular/paths', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/traffic/popular/paths', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get top referral paths",
"description": "Get the top 10 popular contents over the last 14 days.",
"tags": [
"repos"
],
"operationId": "repos/get-top-paths",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-top-referral-paths"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "traffic"
},
"slug": "get-top-referral-paths",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "traffic",
"subcategoryLabel": "Traffic",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Get the top 10 popular contents over the last 14 days.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"path\": \"/github/hubot\",\n \"title\": \"github/hubot: A customizable life embetterment robot.\",\n \"count\": 3542,\n \"uniques\": 2225\n },\n {\n \"path\": \"/github/hubot/blob/master/docs/scripting.md\",\n \"title\": \"hubot/scripting.md at master · github/hubot · GitHub\",\n \"count\": 1707,\n \"uniques\": 804\n },\n {\n \"path\": \"/github/hubot/tree/master/docs\",\n \"title\": \"hubot/docs at master · github/hubot · GitHub\",\n \"count\": 685,\n \"uniques\": 435\n },\n {\n \"path\": \"/github/hubot/tree/master/src\",\n \"title\": \"hubot/src at master · github/hubot · GitHub\",\n \"count\": 577,\n \"uniques\": 347\n },\n {\n \"path\": \"/github/hubot/blob/master/docs/index.md\",\n \"title\": \"hubot/index.md at master · github/hubot · GitHub\",\n \"count\": 379,\n \"uniques\": 259\n },\n {\n \"path\": \"/github/hubot/blob/master/docs/adapters.md\",\n \"title\": \"hubot/adapters.md at master · github/hubot · GitHub\",\n \"count\": 354,\n \"uniques\": 201\n },\n {\n \"path\": \"/github/hubot/tree/master/examples\",\n \"title\": \"hubot/examples at master · github/hubot · GitHub\",\n \"count\": 340,\n \"uniques\": 260\n },\n {\n \"path\": \"/github/hubot/blob/master/docs/deploying/heroku.md\",\n \"title\": \"hubot/heroku.md at master · github/hubot · GitHub\",\n \"count\": 324,\n \"uniques\": 217\n },\n {\n \"path\": \"/github/hubot/blob/master/src/robot.coffee\",\n \"title\": \"hubot/robot.coffee at master · github/hubot · GitHub\",\n \"count\": 293,\n \"uniques\": 191\n },\n {\n \"path\": \"/github/hubot/blob/master/LICENSE.md\",\n \"title\": \"hubot/LICENSE.md at master · github/hubot · GitHub\",\n \"count\": 281,\n \"uniques\": 222\n }\n]\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/traffic/popular/referrers",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/traffic/popular/referrers",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/traffic/popular/referrers"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/traffic/popular/referrers', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/traffic/popular/referrers', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get top referral sources",
"description": "Get the top 10 referrers over the last 14 days.",
"tags": [
"repos"
],
"operationId": "repos/get-top-referrers",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-top-referral-sources"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "traffic"
},
"slug": "get-top-referral-sources",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "traffic",
"subcategoryLabel": "Traffic",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Get the top 10 referrers over the last 14 days.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"referrer\": \"Google\",\n \"count\": 4,\n \"uniques\": 3\n },\n {\n \"referrer\": \"stackoverflow.com\",\n \"count\": 2,\n \"uniques\": 2\n },\n {\n \"referrer\": \"eggsonbread.com\",\n \"count\": 1,\n \"uniques\": 1\n },\n {\n \"referrer\": \"yandex.ru\",\n \"count\": 1,\n \"uniques\": 1\n }\n]\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/traffic/views",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per",
"description": "Must be one of: `day`, `week`.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"",
"day",
"week"
],
"default": "day"
},
"descriptionHTML": "Must be one of: day, week.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/traffic/views"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/traffic/views', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/traffic/views', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Get page views",
"description": "Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.",
"tags": [
"repos"
],
"operationId": "repos/get-views",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-page-views"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "traffic"
},
"slug": "get-page-views",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "traffic",
"subcategoryLabel": "Traffic",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"count\": 14850,\n \"uniques\": 3782,\n \"views\": [\n {\n \"timestamp\": \"2016-10-10T00:00:00Z\",\n \"count\": 440,\n \"uniques\": 143\n },\n {\n \"timestamp\": \"2016-10-11T00:00:00Z\",\n \"count\": 1308,\n \"uniques\": 414\n },\n {\n \"timestamp\": \"2016-10-12T00:00:00Z\",\n \"count\": 1486,\n \"uniques\": 452\n },\n {\n \"timestamp\": \"2016-10-13T00:00:00Z\",\n \"count\": 1170,\n \"uniques\": 401\n },\n {\n \"timestamp\": \"2016-10-14T00:00:00Z\",\n \"count\": 868,\n \"uniques\": 266\n },\n {\n \"timestamp\": \"2016-10-15T00:00:00Z\",\n \"count\": 495,\n \"uniques\": 157\n },\n {\n \"timestamp\": \"2016-10-16T00:00:00Z\",\n \"count\": 524,\n \"uniques\": 175\n },\n {\n \"timestamp\": \"2016-10-17T00:00:00Z\",\n \"count\": 1263,\n \"uniques\": 412\n },\n {\n \"timestamp\": \"2016-10-18T00:00:00Z\",\n \"count\": 1402,\n \"uniques\": 417\n },\n {\n \"timestamp\": \"2016-10-19T00:00:00Z\",\n \"count\": 1394,\n \"uniques\": 424\n },\n {\n \"timestamp\": \"2016-10-20T00:00:00Z\",\n \"count\": 1492,\n \"uniques\": 448\n },\n {\n \"timestamp\": \"2016-10-21T00:00:00Z\",\n \"count\": 1153,\n \"uniques\": 332\n },\n {\n \"timestamp\": \"2016-10-22T00:00:00Z\",\n \"count\": 566,\n \"uniques\": 168\n },\n {\n \"timestamp\": \"2016-10-23T00:00:00Z\",\n \"count\": 675,\n \"uniques\": 184\n },\n {\n \"timestamp\": \"2016-10-24T00:00:00Z\",\n \"count\": 614,\n \"uniques\": 237\n }\n ]\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/transfer",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/transfer \\\n -d '{\"new_owner\":\"new_owner\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/transfer \\\n -d '{\"new_owner\":\"new_owner\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/transfer', {\n owner: 'octocat',\n repo: 'hello-world',\n new_owner: 'new_owner'\n})",
"html": "await octokit.request('POST /repos/{owner}/{repo}/transfer', {\n owner: 'octocat',\n repo: 'hello-world',\n new_owner: 'new_owner'\n})\n"
}
],
"summary": "Transfer a repository",
"description": "A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://help.github.com/articles/about-repository-transfers/).",
"tags": [
"repos"
],
"operationId": "repos/transfer",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#transfer-a-repository"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"new_owner": {
"type": "string",
"description": "Required. The username or organization name the repository will be transferred to.
", "name": "new_owner", "in": "body", "rawType": "string", "rawDescription": "The username or organization name the repository will be transferred to.", "childParamsGroups": [] }, "team_ids": { "type": "array of integers", "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.
", "items": { "type": "integer" }, "name": "team_ids", "in": "body", "rawType": "array", "rawDescription": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.", "childParamsGroups": [] } }, "required": [ "new_owner" ] }, "example": { "new_owner": "github", "team_ids": [ 12, 345 ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "repos", "subcategory": null }, "slug": "transfer-a-repository", "category": "repos", "categoryLabel": "Repos", "contentType": "application/json", "notes": [], "descriptionHTML": "A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original owner, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see about repository transfers.
Required. The username or organization name the repository will be transferred to.
", "name": "new_owner", "in": "body", "rawType": "string", "rawDescription": "The username or organization name the repository will be transferred to.", "childParamsGroups": [] }, { "type": "array of integers", "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.
", "items": { "type": "integer" }, "name": "team_ids", "in": "body", "rawType": "array", "rawDescription": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "202", "httpStatusMessage": "Accepted", "description": "Response", "payload": "{\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"allow_forking\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n }\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/vulnerability-alerts",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/vulnerability-alerts",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/vulnerability-alerts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/vulnerability-alerts', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/vulnerability-alerts', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Check if vulnerability alerts are enabled for a repository",
"description": "Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see \"[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)\".",
"tags": [
"repos"
],
"operationId": "repos/check-vulnerability-alerts",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "repos",
"subcategory": null
},
"slug": "check-if-vulnerability-alerts-are-enabled-for-a-repository",
"category": "repos",
"categoryLabel": "Repos",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response if repository is enabled with vulnerability alerts"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if repository is not enabled with vulnerability alerts"
}
],
"bodyParameters": [],
"descriptionHTML": "Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see \"About security alerts for vulnerable dependencies\".
" }, { "verb": "put", "requestPath": "/repos/{owner}/{repo}/vulnerability-alerts", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/vulnerability-alerts", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/vulnerability-alerts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repos/{owner}/{repo}/vulnerability-alerts', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('PUT /repos/{owner}/{repo}/vulnerability-alerts', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Enable vulnerability alerts",
"description": "Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see \"[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)\".",
"tags": [
"repos"
],
"operationId": "repos/enable-vulnerability-alerts",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
},
"slug": "enable-vulnerability-alerts",
"category": "repos",
"categoryLabel": "Repos",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see \"About security alerts for vulnerable dependencies\".
" }, { "verb": "delete", "requestPath": "/repos/{owner}/{repo}/vulnerability-alerts", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/vulnerability-alerts", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/vulnerability-alerts"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repos/{owner}/{repo}/vulnerability-alerts', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('DELETE /repos/{owner}/{repo}/vulnerability-alerts', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Disable vulnerability alerts",
"description": "Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see \"[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)\".",
"tags": [
"repos"
],
"operationId": "repos/disable-vulnerability-alerts",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
},
"slug": "disable-vulnerability-alerts",
"category": "repos",
"categoryLabel": "Repos",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see \"About security alerts for vulnerable dependencies\".
" }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/zipball/{ref}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "owner", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "repo", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "ref", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/zipball/REF", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/zipball/REF"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repos/{owner}/{repo}/zipball/{ref}', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})",
"html": "await octokit.request('GET /repos/{owner}/{repo}/zipball/{ref}', {\n owner: 'octocat',\n repo: 'hello-world',\n ref: 'ref'\n})\n"
}
],
"summary": "Download a repository archive (zip)",
"description": "Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually\n`master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use\nthe `Location` header to make a second `GET` request.\n**Note**: For private repositories, these links are temporary and expire after five minutes.",
"tags": [
"repos"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#download-a-repository-archive"
},
"operationId": "repos/download-zipball-archive",
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "contents"
},
"slug": "download-a-repository-archive-zip",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "contents",
"subcategoryLabel": "Contents",
"notes": [],
"responses": [
{
"httpStatusCode": "302",
"httpStatusMessage": "Found",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Gets a redirect URL to download a zip archive for a repository. If you omit :ref, the repository’s default branch (usually\nmaster) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use\nthe Location header to make a second GET request.\nNote: For private repositories, these links are temporary and expire after five minutes.
curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/TEMPLATE_OWNER/TEMPLATE_REPO/generate \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{template_owner}/{template_repo}/generate', {\n template_owner: 'template_owner',\n template_repo: 'template_repo',\n name: 'name'\n})",
"html": "await octokit.request('POST /repos/{template_owner}/{template_repo}/generate', {\n template_owner: 'template_owner',\n template_repo: 'template_repo',\n name: 'name'\n})\n"
}
],
"summary": "Create a repository using a template",
"description": "Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.\n* `repo` scope to create a private repository",
"tags": [
"repos"
],
"operationId": "repos/create-using-template",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"owner": {
"type": "string",
"description": "The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.
", "name": "owner", "in": "body", "rawType": "string", "rawDescription": "The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.", "childParamsGroups": [] }, "name": { "type": "string", "description": "Required. The name of the new repository.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the new repository.", "childParamsGroups": [] }, "description": { "type": "string", "description": "A short description of the new repository.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short description of the new repository.", "childParamsGroups": [] }, "include_all_branches": { "type": "boolean", "description": "Set to true to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: false.
Either true to create a new private repository or false to create a new public one.
Creates a new repository using a repository template. Use the template_owner and template_repo route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the Get a repository endpoint and check that the is_template key is true.
OAuth scope requirements
\nWhen using OAuth, authorizations must include:
\npublic_repo scope or repo scope to create a public repository. Note: For GitHub AE, use repo scope to create an internal repository.repo scope to create a private repositoryThe organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.
", "name": "owner", "in": "body", "rawType": "string", "rawDescription": "The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The name of the new repository.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the new repository.", "childParamsGroups": [] }, { "type": "string", "description": "A short description of the new repository.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short description of the new repository.", "childParamsGroups": [] }, { "type": "boolean", "description": "Set to true to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: false.
Either true to create a new private repository or false to create a new public one.
{\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"forks\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"open_issues\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"allow_auto_merge\": false,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n }\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repositories",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "since",
"description": "A repository ID. Only return repositories with an ID greater than this ID.",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"descriptionHTML": "A repository ID. Only return repositories with an ID greater than this ID.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repositories", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repositories"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repositories')",
"html": "await octokit.request('GET /repositories')\n"
}
],
"summary": "List public repositories",
"description": "Lists all public repositories in the order that they were created.\n\nNote:\n- For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise.\n- Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories.",
"tags": [
"repos"
],
"operationId": "repos/list-public",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-public-repositories"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
},
"slug": "list-public-repositories",
"category": "repos",
"categoryLabel": "Repos",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all public repositories in the order that they were created.
\nNote:
\nsince parameter. Use the Link header to get the URL for the next page of repositories.[\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/repositories/{repository_id}/environments/{environment_name}/secrets",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "repository_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "environment_name",
"in": "path",
"required": true,
"description": "The name of the environment",
"schema": {
"type": "string"
},
"descriptionHTML": "The name of the environment
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repositories/42/environments/ENVIRONMENT_NAME/secrets", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repositories/42/environments/ENVIRONMENT_NAME/secrets"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repositories/{repository_id}/environments/{environment_name}/secrets', {\n repository_id: 42,\n environment_name: 'environment_name'\n})",
"html": "await octokit.request('GET /repositories/{repository_id}/environments/{environment_name}/secrets', {\n repository_id: 42,\n environment_name: 'environment_name'\n})\n"
}
],
"summary": "List environment secrets",
"description": "Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-environment-secrets",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-environment-secrets"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
},
"slug": "list-environment-secrets",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "secrets",
"subcategoryLabel": "Secrets",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the secrets repository permission to use this endpoint.
{\n \"total_count\": 2,\n \"secrets\": [\n {\n \"name\": \"GH_TOKEN\",\n \"created_at\": \"2019-08-10T14:59:22Z\",\n \"updated_at\": \"2020-01-10T14:59:22Z\"\n },\n {\n \"name\": \"GIST_ID\",\n \"created_at\": \"2020-01-10T10:59:22Z\",\n \"updated_at\": \"2020-01-11T11:59:22Z\"\n }\n ]\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repositories/{repository_id}/environments/{environment_name}/secrets/public-key",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "repository_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "environment_name",
"in": "path",
"required": true,
"description": "The name of the environment",
"schema": {
"type": "string"
},
"descriptionHTML": "The name of the environment
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repositories/42/environments/ENVIRONMENT_NAME/secrets/public-key", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repositories/42/environments/ENVIRONMENT_NAME/secrets/public-key"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key', {\n repository_id: 42,\n environment_name: 'environment_name'\n})",
"html": "await octokit.request('GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key', {\n repository_id: 42,\n environment_name: 'environment_name'\n})\n"
}
],
"summary": "Get an environment public key",
"description": "Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-environment-public-key",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-an-environment-public-key"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
},
"slug": "get-an-environment-public-key",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "secrets",
"subcategoryLabel": "Secrets",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the secrets repository permission to use this endpoint.
{\n \"key_id\": \"012345678912345678\",\n \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\"\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "repository_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "environment_name",
"in": "path",
"required": true,
"description": "The name of the environment",
"schema": {
"type": "string"
},
"descriptionHTML": "The name of the environment
" }, { "name": "secret_name", "description": "secret_name parameter", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "secret_name parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repositories/42/environments/ENVIRONMENT_NAME/secrets/SECRET_NAME", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repositories/42/environments/ENVIRONMENT_NAME/secrets/SECRET_NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}', {\n repository_id: 42,\n environment_name: 'environment_name',\n secret_name: 'secret_name'\n})",
"html": "await octokit.request('GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}', {\n repository_id: 42,\n environment_name: 'environment_name',\n secret_name: 'secret_name'\n})\n"
}
],
"summary": "Get an environment secret",
"description": "Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-environment-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-an-environment-secret"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
},
"slug": "get-an-environment-secret",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "secrets",
"subcategoryLabel": "Secrets",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the secrets repository permission to use this endpoint.
{\n \"name\": \"GH_TOKEN\",\n \"created_at\": \"2019-08-10T14:59:22Z\",\n \"updated_at\": \"2020-01-10T14:59:22Z\"\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "repository_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "environment_name",
"in": "path",
"required": true,
"description": "The name of the environment",
"schema": {
"type": "string"
},
"descriptionHTML": "The name of the environment
" }, { "name": "secret_name", "description": "secret_name parameter", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "secret_name parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repositories/42/environments/ENVIRONMENT_NAME/secrets/SECRET_NAME \\\n -d '{\"encrypted_value\":\"encrypted_value\",\"key_id\":\"key_id\"}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repositories/42/environments/ENVIRONMENT_NAME/secrets/SECRET_NAME \\\n -d '{\"encrypted_value\":\"encrypted_value\",\"key_id\":\"key_id\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}', {\n repository_id: 42,\n environment_name: 'environment_name',\n secret_name: 'secret_name',\n encrypted_value: 'encrypted_value',\n key_id: 'key_id'\n})",
"html": "await octokit.request('PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}', {\n repository_id: 42,\n environment_name: 'environment_name',\n secret_name: 'secret_name',\n encrypted_value: 'encrypted_value',\n key_id: 'key_id'\n})\n"
}
],
"summary": "Create or update an environment secret",
"description": "Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access\ntoken with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use\nthis endpoint.\n\n#### Example encrypting a secret using Node.js\n\nEncrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.\n\n```\nconst sodium = require('tweetsodium');\n\nconst key = \"base64-encoded-public-key\";\nconst value = \"plain-text-secret\";\n\n// Convert the message and key to Uint8Array's (Buffer implements that interface)\nconst messageBytes = Buffer.from(value);\nconst keyBytes = Buffer.from(key, 'base64');\n\n// Encrypt using LibSodium.\nconst encryptedBytes = sodium.seal(messageBytes, keyBytes);\n\n// Base64 the encrypted secret\nconst encrypted = Buffer.from(encryptedBytes).toString('base64');\n\nconsole.log(encrypted);\n```\n\n\n#### Example encrypting a secret using Python\n\nEncrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3.\n\n```\nfrom base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n```\n\n#### Example encrypting a secret using C#\n\nEncrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.\n\n```\nvar secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n```\n\n#### Example encrypting a secret using Ruby\n\nEncrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.\n\n```ruby\nrequire \"rbnacl\"\nrequire \"base64\"\n\nkey = Base64.decode64(\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\")\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(\"my_secret\")\n\n# Print the base64 encoded secret\nputs Base64.strict_encode64(encrypted_secret)\n```",
"tags": [
"actions"
],
"operationId": "actions/create-or-update-environment-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"encrypted_value": {
"type": "string",
"description": "Required. Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an environment public key endpoint.
", "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", "rawDescription": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint.", "childParamsGroups": [] }, "key_id": { "type": "string", "description": "Required. ID of the key you used to encrypt the secret.
", "name": "key_id", "in": "body", "rawType": "string", "rawDescription": "ID of the key you used to encrypt the secret.", "childParamsGroups": [] } }, "required": [ "encrypted_value", "key_id" ] }, "example": { "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "actions", "subcategory": "secrets" }, "slug": "create-or-update-an-environment-secret", "category": "actions", "categoryLabel": "Actions", "subcategory": "secrets", "subcategoryLabel": "Secrets", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response when creating a secret" }, { "httpStatusCode": "204", "httpStatusMessage": "No Content", "description": "Response when updating a secret" } ], "descriptionHTML": "Creates or updates an environment secret with an encrypted value. Encrypt your secret using\nLibSodium. You must authenticate using an access\ntoken with the repo scope to use this endpoint. GitHub Apps must have the secrets repository permission to use\nthis endpoint.
Encrypt your secret using the tweetsodium library.
\nconst sodium = require('tweetsodium');\n\nconst key = \"base64-encoded-public-key\";\nconst value = \"plain-text-secret\";\n\n// Convert the message and key to Uint8Array's (Buffer implements that interface)\nconst messageBytes = Buffer.from(value);\nconst keyBytes = Buffer.from(key, 'base64');\n\n// Encrypt using LibSodium.\nconst encryptedBytes = sodium.seal(messageBytes, keyBytes);\n\n// Base64 the encrypted secret\nconst encrypted = Buffer.from(encryptedBytes).toString('base64');\n\nconsole.log(encrypted);\n\nEncrypt your secret using pynacl with Python 3.
\nfrom base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n\nEncrypt your secret using the Sodium.Core package.
\nvar secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n\nEncrypt your secret using the rbnacl gem.
\nrequire \"rbnacl\"\nrequire \"base64\"\n\nkey = Base64.decode64(\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\")\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(\"my_secret\")\n\n# Print the base64 encoded secret\nputs Base64.strict_encode64(encrypted_secret)\n",
"bodyParameters": [
{
"type": "string",
"description": "Required. Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an environment public key endpoint.
", "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", "rawDescription": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint.", "childParamsGroups": [] }, { "type": "string", "description": "Required. ID of the key you used to encrypt the secret.
", "name": "key_id", "in": "body", "rawType": "string", "rawDescription": "ID of the key you used to encrypt the secret.", "childParamsGroups": [] } ] }, { "verb": "delete", "requestPath": "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "repository_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "environment_name", "in": "path", "required": true, "description": "The name of the environment", "schema": { "type": "string" }, "descriptionHTML": "The name of the environment
" }, { "name": "secret_name", "description": "secret_name parameter", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "secret_name parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repositories/42/environments/ENVIRONMENT_NAME/secrets/SECRET_NAME", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repositories/42/environments/ENVIRONMENT_NAME/secrets/SECRET_NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}', {\n repository_id: 42,\n environment_name: 'environment_name',\n secret_name: 'secret_name'\n})",
"html": "await octokit.request('DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}', {\n repository_id: 42,\n environment_name: 'environment_name',\n secret_name: 'secret_name'\n})\n"
}
],
"summary": "Delete an environment secret",
"description": "Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-environment-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-an-environment-secret"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
},
"slug": "delete-an-environment-secret",
"category": "actions",
"categoryLabel": "Actions",
"subcategory": "secrets",
"subcategoryLabel": "Secrets",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Default response"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes a secret in an environment using the secret name. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the secrets repository permission to use this endpoint.
The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "startIndex", "description": "Used for pagination: the index of the first result to return.", "in": "query", "required": false, "schema": { "type": "integer" }, "descriptionHTML": "Used for pagination: the index of the first result to return.
" }, { "name": "count", "description": "Used for pagination: the number of results to return.", "in": "query", "required": false, "schema": { "type": "integer" }, "descriptionHTML": "Used for pagination: the number of results to return.
" }, { "name": "filter", "description": "filter results", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "filter results
" }, { "name": "excludedAttributes", "description": "attributes to exclude", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "attributes to exclude
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /scim/v2/enterprises/{enterprise}/Groups', {\n enterprise: 'enterprise'\n})",
"html": "await octokit.request('GET /scim/v2/enterprises/{enterprise}/Groups', {\n enterprise: 'enterprise'\n})\n"
}
],
"summary": "List provisioned SCIM groups for an enterprise",
"description": "**Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.",
"operationId": "enterprise-admin/list-provisioned-groups-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#list-provisioned-scim-groups-for-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": true,
"category": "enterprise-admin",
"subcategory": "scim"
},
"slug": "list-provisioned-scim-groups-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "scim",
"subcategoryLabel": "Scim",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"schemas\": [\n \"urn:ietf:params:scim:api:messages:2.0:ListResponse\"\n ],\n \"totalResults\": 2,\n \"itemsPerPage\": 2,\n \"startIndex\": 1,\n \"Resources\": [\n {\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:Group\"\n ],\n \"id\": \"abcd27f8-a9aa-11ea-8221-f59b2be9cccc\",\n \"externalId\": null,\n \"displayName\": \"octo-org\",\n \"members\": [\n {\n \"value\": \"92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"$ref\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"display\": \"octocat@github.com\"\n },\n {\n \"value\": \"aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5\",\n \"$ref\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Users/aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5\",\n \"display\": \"hubot@example.com\"\n }\n ],\n \"meta\": {\n \"resourceType\": \"Group\",\n \"created\": \"2020-06-09T03:10:17.000+10:00\",\n \"lastModified\": \"2020-06-09T03:10:17.000+10:00\",\n \"location\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Groups/abcd27f8-a9aa-11ea-8221-f59b2be9cccc\"\n }\n },\n {\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:Group\"\n ],\n \"id\": \"5e75bbbb-aa1a-11ea-8644-75ff655cdddd\",\n \"externalId\": null,\n \"displayName\": \"octo-docs-org\",\n \"members\": [\n {\n \"value\": \"92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"$ref\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"display\": \"octocat@github.com\"\n }\n ],\n \"meta\": {\n \"resourceType\": \"Group\",\n \"created\": \"2020-06-09T16:28:01.000+10:00\",\n \"lastModified\": \"2020-06-09T16:28:01.000+10:00\",\n \"location\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Groups/5e75bbbb-aa1a-11ea-8644-75ff655cdddd\"\n }\n }\n ]\n}\n"
}
]
},
{
"verb": "post",
"requestPath": "/scim/v2/enterprises/{enterprise}/Groups",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups \\\n -d '{\"schemas\":[\"schemas\"],\"displayName\":\"displayName\"}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups \\\n -d '{\"schemas\":[\"schemas\"],\"displayName\":\"displayName\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /scim/v2/enterprises/{enterprise}/Groups', {\n enterprise: 'enterprise',\n schemas: [\n 'schemas'\n ],\n displayName: 'displayName'\n})",
"html": "await octokit.request('POST /scim/v2/enterprises/{enterprise}/Groups', {\n enterprise: 'enterprise',\n schemas: [\n 'schemas'\n ],\n displayName: 'displayName'\n})\n"
}
],
"summary": "Provision a SCIM enterprise group and invite users",
"description": "**Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.\n\nProvision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to.",
"operationId": "enterprise-admin/provision-and-invite-enterprise-group",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#provision-a-scim-enterprise-group-and-invite-users"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"schemas": {
"type": "array of strings",
"description": "Required. The SCIM schema URIs.
", "items": { "type": "string" }, "name": "schemas", "in": "body", "rawType": "array", "rawDescription": "The SCIM schema URIs.", "childParamsGroups": [] }, "displayName": { "type": "string", "description": "Required. The name of the SCIM group. This must match the GitHub organization that the group maps to.
", "name": "displayName", "in": "body", "rawType": "string", "rawDescription": "The name of the SCIM group. This must match the GitHub organization that the group maps to.", "childParamsGroups": [] }, "members": { "type": "array of objects", "items": { "type": "object", "properties": { "value": { "type": "string", "description": "Required. The SCIM user ID for a user.
", "name": "value", "in": "body", "rawType": "string", "rawDescription": "The SCIM user ID for a user.", "childParamsGroups": [] } }, "required": [ "value" ] }, "name": "members", "in": "body", "rawType": "array", "description": "", "childParamsGroups": [ { "parentName": "members", "parentType": "items", "id": "members-items", "params": [ { "type": "string", "description": "Required. The SCIM user ID for a user.
", "name": "value", "in": "body", "rawType": "string", "rawDescription": "The SCIM user ID for a user.", "childParamsGroups": [] } ] } ] } }, "required": [ "schemas", "displayName" ] }, "example": { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "displayName": "octo-org", "members": [ { "value": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc" }, { "value": "aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5" } ] } } } }, "x-github": { "enabledForGitHubApps": true, "githubCloudOnly": true, "category": "enterprise-admin", "subcategory": "scim" }, "slug": "provision-a-scim-enterprise-group-and-invite-users", "category": "enterprise-admin", "categoryLabel": "Enterprise admin", "subcategory": "scim", "subcategoryLabel": "Scim", "contentType": "application/json", "notes": [], "descriptionHTML": "Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
\nProvision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to.
", "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:Group\"\n ],\n \"id\": \"abcd27f8-a9aa-11ea-8221-f59b2be9cccc\",\n \"externalId\": null,\n \"displayName\": \"octo-org\",\n \"members\": [\n {\n \"value\": \"92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"$ref\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"display\": \"octocat@github.com\"\n },\n {\n \"value\": \"aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5\",\n \"$ref\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Users/aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5\",\n \"display\": \"hubot@example.com\"\n }\n ],\n \"meta\": {\n \"resourceType\": \"Group\",\n \"created\": \"2020-06-09T03:10:17.000+10:0\",\n \"lastModified\": \"2020-06-09T03:10:17.000+10:00\",\n \"location\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Groups/abcd27f8-a9aa-11ea-8221-f59b2be9cccc\"\n }\n}\n"
}
],
"bodyParameters": [
{
"type": "array of strings",
"description": "Required. The SCIM schema URIs.
", "items": { "type": "string" }, "name": "schemas", "in": "body", "rawType": "array", "rawDescription": "The SCIM schema URIs.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The name of the SCIM group. This must match the GitHub organization that the group maps to.
", "name": "displayName", "in": "body", "rawType": "string", "rawDescription": "The name of the SCIM group. This must match the GitHub organization that the group maps to.", "childParamsGroups": [] }, { "type": "array of objects", "items": { "type": "object", "properties": { "value": { "type": "string", "description": "Required. The SCIM user ID for a user.
", "name": "value", "in": "body", "rawType": "string", "rawDescription": "The SCIM user ID for a user.", "childParamsGroups": [] } }, "required": [ "value" ] }, "name": "members", "in": "body", "rawType": "array", "description": "", "childParamsGroups": [ { "parentName": "members", "parentType": "items", "id": "members-items", "params": [ { "type": "string", "description": "Required. The SCIM user ID for a user.
", "name": "value", "in": "body", "rawType": "string", "rawDescription": "The SCIM user ID for a user.", "childParamsGroups": [] } ] } ] } ] }, { "verb": "get", "requestPath": "/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "enterprise", "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "scim_group_id", "description": "Identifier generated by the GitHub SCIM endpoint.", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "Identifier generated by the GitHub SCIM endpoint.
" }, { "name": "excludedAttributes", "description": "Attributes to exclude.", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "Attributes to exclude.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n enterprise: 'enterprise',\n scim_group_id: 'scim_group_id'\n})",
"html": "await octokit.request('GET /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n enterprise: 'enterprise',\n scim_group_id: 'scim_group_id'\n})\n"
}
],
"summary": "Get SCIM provisioning information for an enterprise group",
"description": "**Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.",
"operationId": "enterprise-admin/get-provisioning-information-for-enterprise-group",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#get-scim-provisioning-information-for-an-enterprise-group"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": true,
"category": "enterprise-admin",
"subcategory": "scim"
},
"slug": "get-scim-provisioning-information-for-an-enterprise-group",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "scim",
"subcategoryLabel": "Scim",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:Group\"\n ],\n \"id\": \"abcd27f8-a9aa-11ea-8221-f59b2be9cccc\",\n \"externalId\": null,\n \"displayName\": \"octo-org\",\n \"members\": [\n {\n \"value\": \"92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"$ref\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"display\": \"octocat@github.com\"\n },\n {\n \"value\": \"aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5\",\n \"$ref\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Users/aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5\",\n \"display\": \"hubot@example.com\"\n }\n ],\n \"meta\": {\n \"resourceType\": \"Group\",\n \"created\": \"2020-06-09T03:10:17.000+10:0\",\n \"lastModified\": \"2020-06-09T03:10:17.000+10:00\",\n \"location\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Groups/abcd27f8-a9aa-11ea-8221-f59b2be9cccc\"\n }\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "scim_group_id", "description": "Identifier generated by the GitHub SCIM endpoint.", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "Identifier generated by the GitHub SCIM endpoint.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \\\n -d '{\"schemas\":[\"schemas\"],\"displayName\":\"displayName\"}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \\\n -d '{\"schemas\":[\"schemas\"],\"displayName\":\"displayName\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n enterprise: 'enterprise',\n scim_group_id: 'scim_group_id',\n schemas: [\n 'schemas'\n ],\n displayName: 'displayName'\n})",
"html": "await octokit.request('PUT /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n enterprise: 'enterprise',\n scim_group_id: 'scim_group_id',\n schemas: [\n 'schemas'\n ],\n displayName: 'displayName'\n})\n"
}
],
"summary": "Set SCIM information for a provisioned enterprise group",
"description": "**Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.\n\nReplaces an existing provisioned group’s information. You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead.",
"operationId": "enterprise-admin/set-information-for-provisioned-enterprise-group",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#set-scim-information-for-a-provisioned-enterprise-group"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"schemas": {
"type": "array of strings",
"description": "Required. The SCIM schema URIs.
", "items": { "type": "string" }, "name": "schemas", "in": "body", "rawType": "array", "rawDescription": "The SCIM schema URIs.", "childParamsGroups": [] }, "displayName": { "type": "string", "description": "Required. The name of the SCIM group. This must match the GitHub organization that the group maps to.
", "name": "displayName", "in": "body", "rawType": "string", "rawDescription": "The name of the SCIM group. This must match the GitHub organization that the group maps to.", "childParamsGroups": [] }, "members": { "type": "array of objects", "items": { "type": "object", "properties": { "value": { "type": "string", "description": "Required. The SCIM user ID for a user.
", "name": "value", "in": "body", "rawType": "string", "rawDescription": "The SCIM user ID for a user.", "childParamsGroups": [] } }, "required": [ "value" ] }, "name": "members", "in": "body", "rawType": "array", "description": "", "childParamsGroups": [ { "parentName": "members", "parentType": "items", "id": "members-items", "params": [ { "type": "string", "description": "Required. The SCIM user ID for a user.
", "name": "value", "in": "body", "rawType": "string", "rawDescription": "The SCIM user ID for a user.", "childParamsGroups": [] } ] } ] } }, "required": [ "schemas", "displayName" ] }, "example": { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "displayName": "octo-org", "members": [ { "value": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc" }, { "value": "aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5" } ] } } } }, "x-github": { "enabledForGitHubApps": true, "githubCloudOnly": true, "category": "enterprise-admin", "subcategory": "scim" }, "slug": "set-scim-information-for-a-provisioned-enterprise-group", "category": "enterprise-admin", "categoryLabel": "Enterprise admin", "subcategory": "scim", "subcategoryLabel": "Scim", "contentType": "application/json", "notes": [], "descriptionHTML": "Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
\nReplaces an existing provisioned group’s information. You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the Update an attribute for a SCIM enterprise group endpoint instead.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:Group\"\n ],\n \"id\": \"abcd27f8-a9aa-11ea-8221-f59b2be9cccc\",\n \"externalId\": null,\n \"displayName\": \"octo-org\",\n \"members\": [\n {\n \"value\": \"92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"$ref\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"display\": \"octocat@github.com\"\n },\n {\n \"value\": \"aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5\",\n \"$ref\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Users/aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5\",\n \"display\": \"hubot@example.com\"\n }\n ],\n \"meta\": {\n \"resourceType\": \"Group\",\n \"created\": \"2020-06-09T03:10:17.000+10:0\",\n \"lastModified\": \"2020-06-09T03:10:17.000+10:00\",\n \"location\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Groups/abcd27f8-a9aa-11ea-8221-f59b2be9cccc\"\n }\n}\n"
}
],
"bodyParameters": [
{
"type": "array of strings",
"description": "Required. The SCIM schema URIs.
", "items": { "type": "string" }, "name": "schemas", "in": "body", "rawType": "array", "rawDescription": "The SCIM schema URIs.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The name of the SCIM group. This must match the GitHub organization that the group maps to.
", "name": "displayName", "in": "body", "rawType": "string", "rawDescription": "The name of the SCIM group. This must match the GitHub organization that the group maps to.", "childParamsGroups": [] }, { "type": "array of objects", "items": { "type": "object", "properties": { "value": { "type": "string", "description": "Required. The SCIM user ID for a user.
", "name": "value", "in": "body", "rawType": "string", "rawDescription": "The SCIM user ID for a user.", "childParamsGroups": [] } }, "required": [ "value" ] }, "name": "members", "in": "body", "rawType": "array", "description": "", "childParamsGroups": [ { "parentName": "members", "parentType": "items", "id": "members-items", "params": [ { "type": "string", "description": "Required. The SCIM user ID for a user.
", "name": "value", "in": "body", "rawType": "string", "rawDescription": "The SCIM user ID for a user.", "childParamsGroups": [] } ] } ] } ] }, { "verb": "patch", "requestPath": "/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "enterprise", "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "scim_group_id", "description": "Identifier generated by the GitHub SCIM endpoint.", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "Identifier generated by the GitHub SCIM endpoint.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \\\n -d '{\"schemas\":[\"schemas\"],\"Operations\":[{\"op\":\"op\",\"path\":\"path\",\"value\":\"value\"}]}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \\\n -d '{\"schemas\":[\"schemas\"],\"Operations\":[{\"op\":\"op\",\"path\":\"path\",\"value\":\"value\"}]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n enterprise: 'enterprise',\n scim_group_id: 'scim_group_id',\n schemas: [\n 'schemas'\n ],\n Operations: [\n {\n op: 'op',\n path: 'path',\n value: 'value'\n }\n ]\n})",
"html": "await octokit.request('PATCH /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n enterprise: 'enterprise',\n scim_group_id: 'scim_group_id',\n schemas: [\n 'schemas'\n ],\n Operations: [\n {\n op: 'op',\n path: 'path',\n value: 'value'\n }\n ]\n})\n"
}
],
"summary": "Update an attribute for a SCIM enterprise group",
"description": "**Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.\n\nAllows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).",
"operationId": "enterprise-admin/update-attribute-for-enterprise-group",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#update-an-attribute-for-a-scim-enterprise-group"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"schemas": {
"type": "array of strings",
"description": "Required. The SCIM schema URIs.
", "items": { "type": "string" }, "name": "schemas", "in": "body", "rawType": "array", "rawDescription": "The SCIM schema URIs.", "childParamsGroups": [] }, "Operations": { "type": "array of objects", "description": "Required. Array of SCIM operations.
", "minItems": 1, "items": { "type": "object", "properties": { "op": { "type": "string", "enum": [ "add", "Add", "remove", "Remove", "replace", "Replace" ], "name": "op", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, "path": { "type": "string", "name": "path", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, "value": { "oneOf": [ { "type": "string" }, { "type": "object" }, { "type": "array" } ], "name": "value", "in": "body", "type": "string or object or array", "description": "", "childParamsGroups": [] } }, "required": [ "op" ] }, "name": "Operations", "in": "body", "rawType": "array", "rawDescription": "Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2).", "childParamsGroups": [ { "parentName": "Operations", "parentType": "items", "id": "operations-items", "params": [ { "type": "string", "enum": [ "add", "Add", "remove", "Remove", "replace", "Replace" ], "name": "op", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, { "type": "string", "name": "path", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, { "oneOf": [ { "type": "string" }, { "type": "object" }, { "type": "array" } ], "name": "value", "in": "body", "type": "string or object or array", "description": "", "childParamsGroups": [] } ] } ] } }, "required": [ "schemas", "Operations" ] }, "example": { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:PatchOp" ], "Operations": [ { "op": "remove", "path": "members", "value": [ { "value": "aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5" } ] } ] } } } }, "x-github": { "enabledForGitHubApps": true, "githubCloudOnly": true, "category": "enterprise-admin", "subcategory": "scim" }, "slug": "update-an-attribute-for-a-scim-enterprise-group", "category": "enterprise-admin", "categoryLabel": "Enterprise admin", "subcategory": "scim", "subcategoryLabel": "Scim", "contentType": "application/json", "notes": [], "descriptionHTML": "Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
\nAllows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the SCIM specification.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:Group\"\n ],\n \"id\": \"abcd27f8-a9aa-11ea-8221-f59b2be9cccc\",\n \"externalId\": null,\n \"displayName\": \"octo-org\",\n \"members\": [\n {\n \"value\": \"92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"$ref\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"display\": \"octocat@github.com\"\n }\n ],\n \"meta\": {\n \"resourceType\": \"Group\",\n \"created\": \"2020-06-09T03:10:17.000+10:00\",\n \"lastModified\": \"2020-06-09T03:10:17.000+10:00\",\n \"location\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Groups/abcd27f8-a9aa-11ea-8221-f59b2be9cccc\"\n }\n}\n"
}
],
"bodyParameters": [
{
"type": "array of strings",
"description": "Required. The SCIM schema URIs.
", "items": { "type": "string" }, "name": "schemas", "in": "body", "rawType": "array", "rawDescription": "The SCIM schema URIs.", "childParamsGroups": [] }, { "type": "array of objects", "description": "Required. Array of SCIM operations.
", "minItems": 1, "items": { "type": "object", "properties": { "op": { "type": "string", "enum": [ "add", "Add", "remove", "Remove", "replace", "Replace" ], "name": "op", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, "path": { "type": "string", "name": "path", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, "value": { "oneOf": [ { "type": "string" }, { "type": "object" }, { "type": "array" } ], "name": "value", "in": "body", "type": "string or object or array", "description": "", "childParamsGroups": [] } }, "required": [ "op" ] }, "name": "Operations", "in": "body", "rawType": "array", "rawDescription": "Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2).", "childParamsGroups": [ { "parentName": "Operations", "parentType": "items", "id": "operations-items", "params": [ { "type": "string", "enum": [ "add", "Add", "remove", "Remove", "replace", "Replace" ], "name": "op", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, { "type": "string", "name": "path", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, { "oneOf": [ { "type": "string" }, { "type": "object" }, { "type": "array" } ], "name": "value", "in": "body", "type": "string or object or array", "description": "", "childParamsGroups": [] } ] } ] } ] }, { "verb": "delete", "requestPath": "/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "enterprise", "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "scim_group_id", "description": "Identifier generated by the GitHub SCIM endpoint.", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "Identifier generated by the GitHub SCIM endpoint.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n enterprise: 'enterprise',\n scim_group_id: 'scim_group_id'\n})",
"html": "await octokit.request('DELETE /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n enterprise: 'enterprise',\n scim_group_id: 'scim_group_id'\n})\n"
}
],
"summary": "Delete a SCIM group from an enterprise",
"description": "**Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.",
"operationId": "enterprise-admin/delete-scim-group-from-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#delete-a-scim-group-from-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": true,
"category": "enterprise-admin",
"subcategory": "scim"
},
"slug": "delete-a-scim-group-from-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "scim",
"subcategoryLabel": "Scim",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
" }, { "verb": "get", "requestPath": "/scim/v2/enterprises/{enterprise}/Users", "serverUrl": "https://api.github.com", "parameters": [ { "name": "enterprise", "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "startIndex", "description": "Used for pagination: the index of the first result to return.", "in": "query", "required": false, "schema": { "type": "integer" }, "descriptionHTML": "Used for pagination: the index of the first result to return.
" }, { "name": "count", "description": "Used for pagination: the number of results to return.", "in": "query", "required": false, "schema": { "type": "integer" }, "descriptionHTML": "Used for pagination: the number of results to return.
" }, { "name": "filter", "description": "filter results", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "filter results
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /scim/v2/enterprises/{enterprise}/Users', {\n enterprise: 'enterprise'\n})",
"html": "await octokit.request('GET /scim/v2/enterprises/{enterprise}/Users', {\n enterprise: 'enterprise'\n})\n"
}
],
"summary": "List SCIM provisioned identities for an enterprise",
"description": "**Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.\n\nRetrieves a paginated list of all provisioned enterprise members, including pending invitations.\n\nWhen a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member:\n - When a user with a SCIM-provisioned external identity is removed from an enterprise, the account's metadata is preserved to allow the user to re-join the organization in the future.\n - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted).\n - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO.\n\nThe returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO:\n\n1. The user is granted access by the IdP and is not a member of the GitHub enterprise.\n\n1. The user attempts to access the GitHub enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub account.\n\n1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account:\n - If the user signs in, their GitHub account is linked to this entry.\n - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub enterprise, and the external identity `null` entry remains in place.",
"operationId": "enterprise-admin/list-provisioned-identities-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#list-scim-provisioned-identities-for-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": true,
"category": "enterprise-admin",
"subcategory": "scim"
},
"slug": "list-scim-provisioned-identities-for-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "scim",
"subcategoryLabel": "Scim",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
\nRetrieves a paginated list of all provisioned enterprise members, including pending invitations.
\nWhen a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member:
\nThe returned list of external identities can include an entry for a null user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO:
The user is granted access by the IdP and is not a member of the GitHub enterprise.
\nThe user attempts to access the GitHub enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub account.
\nAfter successfully authenticating with the SAML SSO IdP, the null external identity entry is created and the user is prompted to sign in to their GitHub account:
null entry remains in place.{\n \"schemas\": [\n \"urn:ietf:params:scim:api:messages:2.0:ListResponse\"\n ],\n \"totalResults\": 2,\n \"itemsPerPage\": 2,\n \"startIndex\": 1,\n \"Resources\": [\n {\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:User\"\n ],\n \"id\": \"92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"externalId\": \"00dowz5dr9oSfDFRA0h7\",\n \"userName\": \"octocat@github.com\",\n \"name\": {\n \"givenName\": \"Mona\",\n \"familyName\": \"Octocat\"\n },\n \"emails\": [\n {\n \"value\": \"octocat@github.com\",\n \"primary\": true,\n \"type\": \"work\"\n }\n ],\n \"groups\": [\n {\n \"value\": \"468dd3fa-a1d6-11ea-9031-15a1f0d7811d\"\n }\n ],\n \"active\": true,\n \"meta\": {\n \"resourceType\": \"User\",\n \"created\": \"2020-05-30T04:02:34.000+10:00\",\n \"lastModified\": \"2020-05-30T04:05:04.000+10:00\",\n \"location\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\"\n }\n },\n {\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:User\"\n ],\n \"id\": \"e18b8c34-a6b2-11ea-9d70-54abbd1c8fd5\",\n \"externalId\": \"sdfoiausdofiua\",\n \"userName\": \"hubot@example.com\",\n \"name\": {\n \"givenName\": \"hu\",\n \"familyName\": \"bot\"\n },\n \"emails\": [\n {\n \"value\": \"hubot@example.com\",\n \"type\": \"work\",\n \"primary\": true\n }\n ],\n \"groups\": [],\n \"active\": true,\n \"meta\": {\n \"resourceType\": \"User\",\n \"created\": \"2020-06-05T08:29:40.000+10:00\",\n \"lastModified\": \"2020-06-05T08:30:19.000+10:00\",\n \"location\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Users/e18b8c34-a6b2-11ea-9d70-54abbd1c8fd5\"\n }\n }\n ]\n}\n"
}
]
},
{
"verb": "post",
"requestPath": "/scim/v2/enterprises/{enterprise}/Users",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users \\\n -d '{\"schemas\":[\"schemas\"],\"userName\":\"userName\",\"name\":{\"givenName\":\"givenName\",\"familyName\":\"familyName\"},\"emails\":[\"octocat@github.com\"]}'", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users \\\n -d '{\"schemas\":[\"schemas\"],\"userName\":\"userName\",\"name\":{\"givenName\":\"givenName\",\"familyName\":\"familyName\"},\"emails\":[\"octocat@github.com\"]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /scim/v2/enterprises/{enterprise}/Users', {\n enterprise: 'enterprise',\n schemas: [\n 'schemas'\n ],\n userName: 'userName',\n name: {\n givenName: 'givenName',\n familyName: 'familyName'\n },\n emails: [\n 'octocat@github.com'\n ]\n})",
"html": "await octokit.request('POST /scim/v2/enterprises/{enterprise}/Users', {\n enterprise: 'enterprise',\n schemas: [\n 'schemas'\n ],\n userName: 'userName',\n name: {\n givenName: 'givenName',\n familyName: 'familyName'\n },\n emails: [\n 'octocat@github.com'\n ]\n})\n"
}
],
"summary": "Provision and invite a SCIM enterprise user",
"description": "**Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.\n\nProvision enterprise membership for a user, and send organization invitation emails to the email address.\n\nYou can optionally include the groups a user will be invited to join. If you do not provide a list of `groups`, the user is provisioned for the enterprise, but no organization invitation emails will be sent.",
"operationId": "enterprise-admin/provision-and-invite-enterprise-user",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#provision-and-invite-a-scim-enterprise-user"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"schemas": {
"type": "array of strings",
"description": "Required. The SCIM schema URIs.
", "items": { "type": "string" }, "name": "schemas", "in": "body", "rawType": "array", "rawDescription": "The SCIM schema URIs.", "childParamsGroups": [] }, "userName": { "type": "string", "description": "Required. The username for the user.
", "name": "userName", "in": "body", "rawType": "string", "rawDescription": "The username for the user.", "childParamsGroups": [] }, "name": { "type": "object", "properties": { "givenName": { "type": "string", "description": "Required. The first name of the user.
", "name": "givenName", "in": "body", "rawType": "string", "rawDescription": "The first name of the user.", "childParamsGroups": [] }, "familyName": { "type": "string", "description": "Required. The last name of the user.
", "name": "familyName", "in": "body", "rawType": "string", "rawDescription": "The last name of the user.", "childParamsGroups": [] } }, "required": [ "givenName", "familyName" ], "name": "name", "in": "body", "rawType": "object", "description": "Required.
", "childParamsGroups": [ { "parentName": "name", "parentType": "object", "id": "name-object", "params": [ { "type": "string", "description": "Required. The first name of the user.
", "name": "givenName", "in": "body", "rawType": "string", "rawDescription": "The first name of the user.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The last name of the user.
", "name": "familyName", "in": "body", "rawType": "string", "rawDescription": "The last name of the user.", "childParamsGroups": [] } ] } ] }, "emails": { "type": "array of objects", "description": "Required. List of user emails.
", "items": { "type": "object", "properties": { "value": { "type": "string", "description": "Required. The email address.
", "name": "value", "in": "body", "rawType": "string", "rawDescription": "The email address.", "childParamsGroups": [] }, "type": { "type": "string", "description": "Required. The type of email address.
", "name": "type", "in": "body", "rawType": "string", "rawDescription": "The type of email address.", "childParamsGroups": [] }, "primary": { "type": "boolean", "description": "Required. Whether this email address is the primary address.
", "name": "primary", "in": "body", "rawType": "boolean", "rawDescription": "Whether this email address is the primary address.", "childParamsGroups": [] } }, "required": [ "value", "type", "primary" ] }, "name": "emails", "in": "body", "rawType": "array", "rawDescription": "List of user emails.", "childParamsGroups": [ { "parentName": "emails", "parentType": "items", "id": "emails-items", "params": [ { "type": "string", "description": "Required. The email address.
", "name": "value", "in": "body", "rawType": "string", "rawDescription": "The email address.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The type of email address.
", "name": "type", "in": "body", "rawType": "string", "rawDescription": "The type of email address.", "childParamsGroups": [] }, { "type": "boolean", "description": "Required. Whether this email address is the primary address.
", "name": "primary", "in": "body", "rawType": "boolean", "rawDescription": "Whether this email address is the primary address.", "childParamsGroups": [] } ] } ] }, "groups": { "type": "array of objects", "description": "List of SCIM group IDs the user is a member of.
", "items": { "type": "object", "properties": { "value": { "type": "string", "name": "value", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } } }, "name": "groups", "in": "body", "rawType": "array", "rawDescription": "List of SCIM group IDs the user is a member of.", "childParamsGroups": [ { "parentName": "groups", "parentType": "items", "id": "groups-items", "params": [ { "type": "string", "name": "value", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ] } ] } }, "required": [ "schemas", "userName", "name", "emails" ] }, "example": { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "userName": "mona.octocat@okta.example.com", "name": { "familyName": "Octocat", "givenName": "Mona" }, "emails": [ { "value": "mona.octocat@okta.example.com", "type": "work", "primary": true } ], "groups": [ { "value": "468dd3fa-a1d6-11ea-9031-15a1f0d7811d" } ] } } } }, "x-github": { "enabledForGitHubApps": true, "githubCloudOnly": true, "category": "enterprise-admin", "subcategory": "scim" }, "slug": "provision-and-invite-a-scim-enterprise-user", "category": "enterprise-admin", "categoryLabel": "Enterprise admin", "subcategory": "scim", "subcategoryLabel": "Scim", "contentType": "application/json", "notes": [], "descriptionHTML": "Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
\nProvision enterprise membership for a user, and send organization invitation emails to the email address.
\nYou can optionally include the groups a user will be invited to join. If you do not provide a list of groups, the user is provisioned for the enterprise, but no organization invitation emails will be sent.
{\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:User\"\n ],\n \"id\": \"92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"externalId\": \"00dowz5dr9oSfDFRA0h7\",\n \"userName\": \"mona.octocat@okta.example.com\",\n \"name\": {\n \"givenName\": \"Mona\",\n \"familyName\": \"Octocat\"\n },\n \"emails\": [\n {\n \"value\": \"mona.octocat@okta.example.com\",\n \"type\": \"work\",\n \"primary\": true\n }\n ],\n \"groups\": [\n {\n \"value\": \"468dd3fa-a1d6-11ea-9031-15a1f0d7811d\"\n }\n ],\n \"active\": true,\n \"meta\": {\n \"resourceType\": \"User\",\n \"created\": \"2017-03-09T16:11:13-05:00\",\n \"lastModified\": \"2017-03-09T16:11:13-05:00\",\n \"location\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\"\n }\n}\n"
}
],
"bodyParameters": [
{
"type": "array of strings",
"description": "Required. The SCIM schema URIs.
", "items": { "type": "string" }, "name": "schemas", "in": "body", "rawType": "array", "rawDescription": "The SCIM schema URIs.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The username for the user.
", "name": "userName", "in": "body", "rawType": "string", "rawDescription": "The username for the user.", "childParamsGroups": [] }, { "type": "object", "properties": { "givenName": { "type": "string", "description": "Required. The first name of the user.
", "name": "givenName", "in": "body", "rawType": "string", "rawDescription": "The first name of the user.", "childParamsGroups": [] }, "familyName": { "type": "string", "description": "Required. The last name of the user.
", "name": "familyName", "in": "body", "rawType": "string", "rawDescription": "The last name of the user.", "childParamsGroups": [] } }, "required": [ "givenName", "familyName" ], "name": "name", "in": "body", "rawType": "object", "description": "Required.
", "childParamsGroups": [ { "parentName": "name", "parentType": "object", "id": "name-object", "params": [ { "type": "string", "description": "Required. The first name of the user.
", "name": "givenName", "in": "body", "rawType": "string", "rawDescription": "The first name of the user.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The last name of the user.
", "name": "familyName", "in": "body", "rawType": "string", "rawDescription": "The last name of the user.", "childParamsGroups": [] } ] } ] }, { "type": "array of objects", "description": "Required. List of user emails.
", "items": { "type": "object", "properties": { "value": { "type": "string", "description": "Required. The email address.
", "name": "value", "in": "body", "rawType": "string", "rawDescription": "The email address.", "childParamsGroups": [] }, "type": { "type": "string", "description": "Required. The type of email address.
", "name": "type", "in": "body", "rawType": "string", "rawDescription": "The type of email address.", "childParamsGroups": [] }, "primary": { "type": "boolean", "description": "Required. Whether this email address is the primary address.
", "name": "primary", "in": "body", "rawType": "boolean", "rawDescription": "Whether this email address is the primary address.", "childParamsGroups": [] } }, "required": [ "value", "type", "primary" ] }, "name": "emails", "in": "body", "rawType": "array", "rawDescription": "List of user emails.", "childParamsGroups": [ { "parentName": "emails", "parentType": "items", "id": "emails-items", "params": [ { "type": "string", "description": "Required. The email address.
", "name": "value", "in": "body", "rawType": "string", "rawDescription": "The email address.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The type of email address.
", "name": "type", "in": "body", "rawType": "string", "rawDescription": "The type of email address.", "childParamsGroups": [] }, { "type": "boolean", "description": "Required. Whether this email address is the primary address.
", "name": "primary", "in": "body", "rawType": "boolean", "rawDescription": "Whether this email address is the primary address.", "childParamsGroups": [] } ] } ] }, { "type": "array of objects", "description": "List of SCIM group IDs the user is a member of.
", "items": { "type": "object", "properties": { "value": { "type": "string", "name": "value", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } } }, "name": "groups", "in": "body", "rawType": "array", "rawDescription": "List of SCIM group IDs the user is a member of.", "childParamsGroups": [ { "parentName": "groups", "parentType": "items", "id": "groups-items", "params": [ { "type": "string", "name": "value", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ] } ] } ] }, { "verb": "get", "requestPath": "/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "enterprise", "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "scim_user_id", "description": "scim_user_id parameter", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "scim_user_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users/SCIM_USER_ID", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users/SCIM_USER_ID"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}', {\n enterprise: 'enterprise',\n scim_user_id: 'scim_user_id'\n})",
"html": "await octokit.request('GET /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}', {\n enterprise: 'enterprise',\n scim_user_id: 'scim_user_id'\n})\n"
}
],
"summary": "Get SCIM provisioning information for an enterprise user",
"description": "**Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.",
"operationId": "enterprise-admin/get-provisioning-information-for-enterprise-user",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#get-scim-provisioning-information-for-an-enterprise-user"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": true,
"category": "enterprise-admin",
"subcategory": "scim"
},
"slug": "get-scim-provisioning-information-for-an-enterprise-user",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "scim",
"subcategoryLabel": "Scim",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:User\"\n ],\n \"id\": \"92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"externalId\": \"00dowz5dr9oSfDFRA0h7\",\n \"userName\": \"mona.octocat@okta.example.com\",\n \"name\": {\n \"givenName\": \"Mona\",\n \"familyName\": \"Octocat\"\n },\n \"emails\": [\n {\n \"value\": \"mona.octocat@okta.example.com\",\n \"type\": \"work\",\n \"primary\": true\n }\n ],\n \"groups\": [\n {\n \"value\": \"468dd3fa-a1d6-11ea-9031-15a1f0d7811d\"\n }\n ],\n \"active\": true,\n \"meta\": {\n \"resourceType\": \"User\",\n \"created\": \"2017-03-09T16:11:13-05:00\",\n \"lastModified\": \"2017-03-09T16:11:13-05:00\",\n \"location\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\"\n }\n}\n"
}
]
},
{
"verb": "put",
"requestPath": "/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "scim_user_id", "description": "scim_user_id parameter", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "scim_user_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users/SCIM_USER_ID \\\n -d '{\"schemas\":[\"schemas\"],\"userName\":\"userName\",\"name\":{\"givenName\":\"givenName\",\"familyName\":\"familyName\"},\"emails\":[\"octocat@github.com\"]}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users/SCIM_USER_ID \\\n -d '{\"schemas\":[\"schemas\"],\"userName\":\"userName\",\"name\":{\"givenName\":\"givenName\",\"familyName\":\"familyName\"},\"emails\":[\"octocat@github.com\"]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}', {\n enterprise: 'enterprise',\n scim_user_id: 'scim_user_id',\n schemas: [\n 'schemas'\n ],\n userName: 'userName',\n name: {\n givenName: 'givenName',\n familyName: 'familyName'\n },\n emails: [\n 'octocat@github.com'\n ]\n})",
"html": "await octokit.request('PUT /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}', {\n enterprise: 'enterprise',\n scim_user_id: 'scim_user_id',\n schemas: [\n 'schemas'\n ],\n userName: 'userName',\n name: {\n givenName: 'givenName',\n familyName: 'familyName'\n },\n emails: [\n 'octocat@github.com'\n ]\n})\n"
}
],
"summary": "Set SCIM information for a provisioned enterprise user",
"description": "**Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.\n\nReplaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](#update-an-attribute-for-an-enterprise-scim-user) endpoint instead.\n\nYou must at least provide the required values for the user: `userName`, `name`, and `emails`.\n\n**Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`.",
"operationId": "enterprise-admin/set-information-for-provisioned-enterprise-user",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#set-scim-information-for-a-provisioned-enterprise-user"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"schemas": {
"type": "array of strings",
"description": "Required. The SCIM schema URIs.
", "items": { "type": "string" }, "name": "schemas", "in": "body", "rawType": "array", "rawDescription": "The SCIM schema URIs.", "childParamsGroups": [] }, "userName": { "type": "string", "description": "Required. The username for the user.
", "name": "userName", "in": "body", "rawType": "string", "rawDescription": "The username for the user.", "childParamsGroups": [] }, "name": { "type": "object", "properties": { "givenName": { "type": "string", "description": "Required. The first name of the user.
", "name": "givenName", "in": "body", "rawType": "string", "rawDescription": "The first name of the user.", "childParamsGroups": [] }, "familyName": { "type": "string", "description": "Required. The last name of the user.
", "name": "familyName", "in": "body", "rawType": "string", "rawDescription": "The last name of the user.", "childParamsGroups": [] } }, "required": [ "givenName", "familyName" ], "name": "name", "in": "body", "rawType": "object", "description": "Required.
", "childParamsGroups": [ { "parentName": "name", "parentType": "object", "id": "name-object", "params": [ { "type": "string", "description": "Required. The first name of the user.
", "name": "givenName", "in": "body", "rawType": "string", "rawDescription": "The first name of the user.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The last name of the user.
", "name": "familyName", "in": "body", "rawType": "string", "rawDescription": "The last name of the user.", "childParamsGroups": [] } ] } ] }, "emails": { "type": "array of objects", "description": "Required. List of user emails.
", "items": { "type": "object", "properties": { "value": { "type": "string", "description": "Required. The email address.
", "name": "value", "in": "body", "rawType": "string", "rawDescription": "The email address.", "childParamsGroups": [] }, "type": { "type": "string", "description": "Required. The type of email address.
", "name": "type", "in": "body", "rawType": "string", "rawDescription": "The type of email address.", "childParamsGroups": [] }, "primary": { "type": "boolean", "description": "Required. Whether this email address is the primary address.
", "name": "primary", "in": "body", "rawType": "boolean", "rawDescription": "Whether this email address is the primary address.", "childParamsGroups": [] } }, "required": [ "value", "type", "primary" ] }, "name": "emails", "in": "body", "rawType": "array", "rawDescription": "List of user emails.", "childParamsGroups": [ { "parentName": "emails", "parentType": "items", "id": "emails-items", "params": [ { "type": "string", "description": "Required. The email address.
", "name": "value", "in": "body", "rawType": "string", "rawDescription": "The email address.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The type of email address.
", "name": "type", "in": "body", "rawType": "string", "rawDescription": "The type of email address.", "childParamsGroups": [] }, { "type": "boolean", "description": "Required. Whether this email address is the primary address.
", "name": "primary", "in": "body", "rawType": "boolean", "rawDescription": "Whether this email address is the primary address.", "childParamsGroups": [] } ] } ] }, "groups": { "type": "array of objects", "description": "List of SCIM group IDs the user is a member of.
", "items": { "type": "object", "properties": { "value": { "type": "string", "name": "value", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } } }, "name": "groups", "in": "body", "rawType": "array", "rawDescription": "List of SCIM group IDs the user is a member of.", "childParamsGroups": [ { "parentName": "groups", "parentType": "items", "id": "groups-items", "params": [ { "type": "string", "name": "value", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ] } ] } }, "required": [ "schemas", "userName", "name", "emails" ] }, "example": { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "userName": "mona.octocat@okta.example.com", "name": { "familyName": "Octocat", "givenName": "Mona" }, "emails": [ { "value": "mona.octocat@okta.example.com", "type": "work", "primary": true } ], "groups": [ { "value": "468dd3fa-a1d6-11ea-9031-15a1f0d7811d" } ] } } } }, "x-github": { "enabledForGitHubApps": true, "githubCloudOnly": true, "category": "enterprise-admin", "subcategory": "scim" }, "slug": "set-scim-information-for-a-provisioned-enterprise-user", "category": "enterprise-admin", "categoryLabel": "Enterprise admin", "subcategory": "scim", "subcategoryLabel": "Scim", "contentType": "application/json", "notes": [], "descriptionHTML": "Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
\nReplaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the Update an attribute for a SCIM user endpoint instead.
\nYou must at least provide the required values for the user: userName, name, and emails.
Warning: Setting active: false removes the user from the enterprise, deletes the external identity, and deletes the associated {scim_user_id}.
{\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:User\"\n ],\n \"id\": \"92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"externalId\": \"00dowz5dr9oSfDFRA0h7\",\n \"userName\": \"mona.octocat@okta.example.com\",\n \"name\": {\n \"givenName\": \"Mona\",\n \"familyName\": \"Octocat\"\n },\n \"emails\": [\n {\n \"value\": \"mona.octocat@okta.example.com\",\n \"type\": \"work\",\n \"primary\": true\n }\n ],\n \"groups\": [\n {\n \"value\": \"468dd3fa-a1d6-11ea-9031-15a1f0d7811d\"\n }\n ],\n \"active\": true,\n \"meta\": {\n \"resourceType\": \"User\",\n \"created\": \"2017-03-09T16:11:13-05:00\",\n \"lastModified\": \"2017-03-09T16:11:13-05:00\",\n \"location\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\"\n }\n}\n"
}
],
"bodyParameters": [
{
"type": "array of strings",
"description": "Required. The SCIM schema URIs.
", "items": { "type": "string" }, "name": "schemas", "in": "body", "rawType": "array", "rawDescription": "The SCIM schema URIs.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The username for the user.
", "name": "userName", "in": "body", "rawType": "string", "rawDescription": "The username for the user.", "childParamsGroups": [] }, { "type": "object", "properties": { "givenName": { "type": "string", "description": "Required. The first name of the user.
", "name": "givenName", "in": "body", "rawType": "string", "rawDescription": "The first name of the user.", "childParamsGroups": [] }, "familyName": { "type": "string", "description": "Required. The last name of the user.
", "name": "familyName", "in": "body", "rawType": "string", "rawDescription": "The last name of the user.", "childParamsGroups": [] } }, "required": [ "givenName", "familyName" ], "name": "name", "in": "body", "rawType": "object", "description": "Required.
", "childParamsGroups": [ { "parentName": "name", "parentType": "object", "id": "name-object", "params": [ { "type": "string", "description": "Required. The first name of the user.
", "name": "givenName", "in": "body", "rawType": "string", "rawDescription": "The first name of the user.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The last name of the user.
", "name": "familyName", "in": "body", "rawType": "string", "rawDescription": "The last name of the user.", "childParamsGroups": [] } ] } ] }, { "type": "array of objects", "description": "Required. List of user emails.
", "items": { "type": "object", "properties": { "value": { "type": "string", "description": "Required. The email address.
", "name": "value", "in": "body", "rawType": "string", "rawDescription": "The email address.", "childParamsGroups": [] }, "type": { "type": "string", "description": "Required. The type of email address.
", "name": "type", "in": "body", "rawType": "string", "rawDescription": "The type of email address.", "childParamsGroups": [] }, "primary": { "type": "boolean", "description": "Required. Whether this email address is the primary address.
", "name": "primary", "in": "body", "rawType": "boolean", "rawDescription": "Whether this email address is the primary address.", "childParamsGroups": [] } }, "required": [ "value", "type", "primary" ] }, "name": "emails", "in": "body", "rawType": "array", "rawDescription": "List of user emails.", "childParamsGroups": [ { "parentName": "emails", "parentType": "items", "id": "emails-items", "params": [ { "type": "string", "description": "Required. The email address.
", "name": "value", "in": "body", "rawType": "string", "rawDescription": "The email address.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The type of email address.
", "name": "type", "in": "body", "rawType": "string", "rawDescription": "The type of email address.", "childParamsGroups": [] }, { "type": "boolean", "description": "Required. Whether this email address is the primary address.
", "name": "primary", "in": "body", "rawType": "boolean", "rawDescription": "Whether this email address is the primary address.", "childParamsGroups": [] } ] } ] }, { "type": "array of objects", "description": "List of SCIM group IDs the user is a member of.
", "items": { "type": "object", "properties": { "value": { "type": "string", "name": "value", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } } }, "name": "groups", "in": "body", "rawType": "array", "rawDescription": "List of SCIM group IDs the user is a member of.", "childParamsGroups": [ { "parentName": "groups", "parentType": "items", "id": "groups-items", "params": [ { "type": "string", "name": "value", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ] } ] } ] }, { "verb": "patch", "requestPath": "/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "enterprise", "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "scim_user_id", "description": "scim_user_id parameter", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "scim_user_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users/SCIM_USER_ID \\\n -d '{\"schemas\":[\"schemas\"],\"Operations\":[{}]}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users/SCIM_USER_ID \\\n -d '{\"schemas\":[\"schemas\"],\"Operations\":[{}]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}', {\n enterprise: 'enterprise',\n scim_user_id: 'scim_user_id',\n schemas: [\n 'schemas'\n ],\n Operations: [\n {}\n ]\n})",
"html": "await octokit.request('PATCH /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}', {\n enterprise: 'enterprise',\n scim_user_id: 'scim_user_id',\n schemas: [\n 'schemas'\n ],\n Operations: [\n {}\n ]\n})\n"
}
],
"summary": "Update an attribute for a SCIM enterprise user",
"description": "**Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.\n\nAllows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).\n\n**Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `\"path\": \"emails[type eq \\\"work\\\"]\"` will not work.\n\n**Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the enterprise, deletes the external identity, and deletes the associated `:scim_user_id`.\n\n```\n{\n \"Operations\":[{\n \"op\":\"replace\",\n \"value\":{\n \"active\":false\n }\n }]\n}\n```",
"operationId": "enterprise-admin/update-attribute-for-enterprise-user",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#update-an-attribute-for-a-scim-enterprise-user"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"schemas": {
"type": "array of strings",
"description": "Required. The SCIM schema URIs.
", "items": { "type": "string" }, "name": "schemas", "in": "body", "rawType": "array", "rawDescription": "The SCIM schema URIs.", "childParamsGroups": [] }, "Operations": { "type": "array of objects", "description": "Required. Array of SCIM operations.
", "items": { "type": "object" }, "name": "Operations", "in": "body", "rawType": "array", "rawDescription": "Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2).", "childParamsGroups": [] } }, "required": [ "schemas", "Operations" ] }, "example": { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:PatchOp" ], "Operations": [ { "op": "add", "path": "emails", "value": [ { "value": "monalisa@octocat.github.com", "type": "home" } ] }, { "op": "replace", "path": "name.givenName", "value": "Monalisa" } ] } } } }, "x-github": { "enabledForGitHubApps": true, "githubCloudOnly": true, "category": "enterprise-admin", "subcategory": "scim" }, "slug": "update-an-attribute-for-a-scim-enterprise-user", "category": "enterprise-admin", "categoryLabel": "Enterprise admin", "subcategory": "scim", "subcategoryLabel": "Scim", "contentType": "application/json", "notes": [], "descriptionHTML": "Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
\nAllows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the SCIM specification.
Note: Complicated SCIM path selectors that include filters are not supported. For example, a path selector defined as \"path\": \"emails[type eq \\\"work\\\"]\" will not work.
Warning: If you set active:false using the replace operation (as shown in the JSON example below), it removes the user from the enterprise, deletes the external identity, and deletes the associated :scim_user_id.
{\n \"Operations\":[{\n \"op\":\"replace\",\n \"value\":{\n \"active\":false\n }\n }]\n}\n",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"schemas\": [\n \"urn:ietf:params:scim:schemas:core:2.0:User\"\n ],\n \"id\": \"92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\",\n \"externalId\": \"00dowz5dr9oSfDFRA0h7\",\n \"userName\": \"mona.octocat@okta.example.com\",\n \"name\": {\n \"givenName\": \"Monalisa\",\n \"familyName\": \"Octocat\"\n },\n \"emails\": [\n {\n \"value\": \"mona.octocat@okta.example.com\",\n \"type\": \"work\",\n \"primary\": true\n },\n {\n \"value\": \"monalisa@octocat.github.com\",\n \"type\": \"home\"\n }\n ],\n \"groups\": [\n {\n \"value\": \"468dd3fa-a1d6-11ea-9031-15a1f0d7811d\"\n }\n ],\n \"active\": true,\n \"meta\": {\n \"resourceType\": \"User\",\n \"created\": \"2017-03-09T16:11:13-05:00\",\n \"lastModified\": \"2017-03-09T16:11:13-05:00\",\n \"location\": \"https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc\"\n }\n}\n"
}
],
"bodyParameters": [
{
"type": "array of strings",
"description": "Required. The SCIM schema URIs.
", "items": { "type": "string" }, "name": "schemas", "in": "body", "rawType": "array", "rawDescription": "The SCIM schema URIs.", "childParamsGroups": [] }, { "type": "array of objects", "description": "Required. Array of SCIM operations.
", "items": { "type": "object" }, "name": "Operations", "in": "body", "rawType": "array", "rawDescription": "Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2).", "childParamsGroups": [] } ] }, { "verb": "delete", "requestPath": "/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "enterprise", "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.
" }, { "name": "scim_user_id", "description": "scim_user_id parameter", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "scim_user_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users/SCIM_USER_ID", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users/SCIM_USER_ID"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}', {\n enterprise: 'enterprise',\n scim_user_id: 'scim_user_id'\n})",
"html": "await octokit.request('DELETE /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}', {\n enterprise: 'enterprise',\n scim_user_id: 'scim_user_id'\n})\n"
}
],
"summary": "Delete a SCIM user from an enterprise",
"description": "**Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.",
"operationId": "enterprise-admin/delete-user-from-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/enterprise-admin#delete-a-scim-user-from-an-enterprise"
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": true,
"category": "enterprise-admin",
"subcategory": "scim"
},
"slug": "delete-a-scim-user-from-an-enterprise",
"category": "enterprise-admin",
"categoryLabel": "Enterprise admin",
"subcategory": "scim",
"subcategoryLabel": "Scim",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
" }, { "verb": "get", "requestPath": "/scim/v2/organizations/{org}/Users", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "startIndex", "description": "Used for pagination: the index of the first result to return.", "in": "query", "required": false, "schema": { "type": "integer" }, "descriptionHTML": "Used for pagination: the index of the first result to return.
" }, { "name": "count", "description": "Used for pagination: the number of results to return.", "in": "query", "required": false, "schema": { "type": "integer" }, "descriptionHTML": "Used for pagination: the number of results to return.
" }, { "name": "filter", "description": "Filters results using the equals query parameter operator (`eq`). You can filter results that are equal to `id`, `userName`, `emails`, and `external_id`. For example, to search for an identity with the `userName` Octocat, you would use this query:\n\n`?filter=userName%20eq%20\\\"Octocat\\\"`.\n\nTo filter results for the identity with the email `octocat@github.com`, you would use this query:\n\n`?filter=emails%20eq%20\\\"octocat@github.com\\\"`.", "in": "query", "required": false, "schema": { "type": "string" }, "descriptionHTML": "Filters results using the equals query parameter operator (eq). You can filter results that are equal to id, userName, emails, and external_id. For example, to search for an identity with the userName Octocat, you would use this query:
?filter=userName%20eq%20\\\"Octocat\\\".
To filter results for the identity with the email octocat@github.com, you would use this query:
?filter=emails%20eq%20\\\"octocat@github.com\\\".
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/organizations/ORG/Users"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /scim/v2/organizations/{org}/Users', {\n org: 'org'\n})",
"html": "await octokit.request('GET /scim/v2/organizations/{org}/Users', {\n org: 'org'\n})\n"
}
],
"summary": "List SCIM provisioned identities",
"description": "Retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned.\n\nWhen a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member:\n - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future.\n - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted).\n - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO.\n\nThe returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO:\n\n1. The user is granted access by the IdP and is not a member of the GitHub organization.\n\n1. The user attempts to access the GitHub organization and initiates the SAML SSO process, and is not currently signed in to their GitHub account.\n\n1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account:\n - If the user signs in, their GitHub account is linked to this entry.\n - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub organization, and the external identity `null` entry remains in place.",
"tags": [
"scim"
],
"operationId": "scim/list-provisioned-identities",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/scim#list-scim-provisioned-identities"
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": true,
"category": "scim",
"subcategory": null
},
"slug": "list-scim-provisioned-identities",
"category": "scim",
"categoryLabel": "SCIM",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Bad Request"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the filter parameter, the resources for all matching provisions members are returned.
When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member:
\nThe returned list of external identities can include an entry for a null user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO:
The user is granted access by the IdP and is not a member of the GitHub organization.
\nThe user attempts to access the GitHub organization and initiates the SAML SSO process, and is not currently signed in to their GitHub account.
\nAfter successfully authenticating with the SAML SSO IdP, the null external identity entry is created and the user is prompted to sign in to their GitHub account:
null entry remains in place.curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/organizations/ORG/Users \\\n -d '{\"userName\":\"userName\",\"name\":{\"givenName\":\"givenName\",\"familyName\":\"familyName\",\"formatted\":\"formatted\"},\"emails\":[\"octocat@github.com\"]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /scim/v2/organizations/{org}/Users', {\n org: 'org',\n userName: 'userName',\n name: {\n givenName: 'givenName',\n familyName: 'familyName',\n formatted: 'formatted'\n },\n emails: [\n 'octocat@github.com'\n ]\n})",
"html": "await octokit.request('POST /scim/v2/organizations/{org}/Users', {\n org: 'org',\n userName: 'userName',\n name: {\n givenName: 'givenName',\n familyName: 'familyName',\n formatted: 'formatted'\n },\n emails: [\n 'octocat@github.com'\n ]\n})\n"
}
],
"summary": "Provision and invite a SCIM user",
"description": "Provision organization membership for a user, and send an activation email to the email address.",
"tags": [
"scim"
],
"operationId": "scim/provision-and-invite-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/scim#provision-and-invite-a-scim-user"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"userName": {
"description": "Required. Configured by the admin. Could be an email, login, or username
", "example": "someone@example.com", "type": "string", "name": "userName", "in": "body", "rawType": "string", "rawDescription": "Configured by the admin. Could be an email, login, or username", "childParamsGroups": [] }, "displayName": { "description": "The name of the user, suitable for display to end-users
", "example": "Jon Doe", "type": "string", "name": "displayName", "in": "body", "rawType": "string", "rawDescription": "The name of the user, suitable for display to end-users", "childParamsGroups": [] }, "name": { "type": "object", "properties": { "givenName": { "type": "string", "name": "givenName", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, "familyName": { "type": "string", "name": "familyName", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, "formatted": { "type": "string", "name": "formatted", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } }, "required": [ "givenName", "familyName" ], "example": { "givenName": "Jane", "familyName": "User" }, "name": "name", "in": "body", "rawType": "object", "description": "Required.
", "childParamsGroups": [ { "parentName": "name", "parentType": "object", "id": "name-object", "params": [ { "type": "string", "name": "givenName", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, { "type": "string", "name": "familyName", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, { "type": "string", "name": "formatted", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ] } ] }, "emails": { "description": "Required. user emails
", "example": [ { "value": "someone@example.com", "primary": true }, { "value": "another@example.com", "primary": false } ], "type": "array of objects", "minItems": 1, "items": { "type": "object", "properties": { "value": { "type": "string", "name": "value", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, "primary": { "type": "boolean", "name": "primary", "in": "body", "rawType": "boolean", "description": "", "childParamsGroups": [] }, "type": { "type": "string", "name": "type", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } }, "required": [ "value" ] }, "name": "emails", "in": "body", "rawType": "array", "rawDescription": "user emails", "childParamsGroups": [ { "parentName": "emails", "parentType": "items", "id": "emails-items", "params": [ { "type": "string", "name": "value", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, { "type": "boolean", "name": "primary", "in": "body", "rawType": "boolean", "description": "", "childParamsGroups": [] }, { "type": "string", "name": "type", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ] } ] }, "schemas": { "type": "array of strings", "items": { "type": "string" }, "name": "schemas", "in": "body", "rawType": "array", "description": "", "childParamsGroups": [] }, "externalId": { "type": "string", "name": "externalId", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, "groups": { "type": "array of strings", "items": { "type": "string" }, "name": "groups", "in": "body", "rawType": "array", "description": "", "childParamsGroups": [] }, "active": { "type": "boolean", "name": "active", "in": "body", "rawType": "boolean", "description": "", "childParamsGroups": [] } }, "required": [ "userName", "name", "emails" ] } } } }, "x-github": { "githubCloudOnly": true, "enabledForGitHubApps": true, "category": "scim", "subcategory": null }, "slug": "provision-and-invite-a-scim-user", "category": "scim", "categoryLabel": "SCIM", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response" }, { "httpStatusCode": "304", "httpStatusMessage": "Not Modified", "description": "Not modified" }, { "httpStatusCode": "400", "httpStatusMessage": "Bad Request", "description": "Bad Request" }, { "httpStatusCode": "403", "httpStatusMessage": "Forbidden", "description": "Forbidden" }, { "httpStatusCode": "404", "httpStatusMessage": "Not Found", "description": "Resource not found" }, { "httpStatusCode": "409", "httpStatusMessage": "Conflict", "description": "Conflict" }, { "httpStatusCode": "500", "httpStatusMessage": "Internal Server Error", "description": "Internal Error" } ], "descriptionHTML": "Provision organization membership for a user, and send an activation email to the email address.
", "bodyParameters": [ { "description": "Required. Configured by the admin. Could be an email, login, or username
", "example": "someone@example.com", "type": "string", "name": "userName", "in": "body", "rawType": "string", "rawDescription": "Configured by the admin. Could be an email, login, or username", "childParamsGroups": [] }, { "description": "The name of the user, suitable for display to end-users
", "example": "Jon Doe", "type": "string", "name": "displayName", "in": "body", "rawType": "string", "rawDescription": "The name of the user, suitable for display to end-users", "childParamsGroups": [] }, { "type": "object", "properties": { "givenName": { "type": "string", "name": "givenName", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, "familyName": { "type": "string", "name": "familyName", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, "formatted": { "type": "string", "name": "formatted", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } }, "required": [ "givenName", "familyName" ], "example": { "givenName": "Jane", "familyName": "User" }, "name": "name", "in": "body", "rawType": "object", "description": "Required.
", "childParamsGroups": [ { "parentName": "name", "parentType": "object", "id": "name-object", "params": [ { "type": "string", "name": "givenName", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, { "type": "string", "name": "familyName", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, { "type": "string", "name": "formatted", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ] } ] }, { "description": "Required. user emails
", "example": [ { "value": "someone@example.com", "primary": true }, { "value": "another@example.com", "primary": false } ], "type": "array of objects", "minItems": 1, "items": { "type": "object", "properties": { "value": { "type": "string", "name": "value", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, "primary": { "type": "boolean", "name": "primary", "in": "body", "rawType": "boolean", "description": "", "childParamsGroups": [] }, "type": { "type": "string", "name": "type", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } }, "required": [ "value" ] }, "name": "emails", "in": "body", "rawType": "array", "rawDescription": "user emails", "childParamsGroups": [ { "parentName": "emails", "parentType": "items", "id": "emails-items", "params": [ { "type": "string", "name": "value", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, { "type": "boolean", "name": "primary", "in": "body", "rawType": "boolean", "description": "", "childParamsGroups": [] }, { "type": "string", "name": "type", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ] } ] }, { "type": "array of strings", "items": { "type": "string" }, "name": "schemas", "in": "body", "rawType": "array", "description": "", "childParamsGroups": [] }, { "type": "string", "name": "externalId", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, { "type": "array of strings", "items": { "type": "string" }, "name": "groups", "in": "body", "rawType": "array", "description": "", "childParamsGroups": [] }, { "type": "boolean", "name": "active", "in": "body", "rawType": "boolean", "description": "", "childParamsGroups": [] } ] }, { "verb": "get", "requestPath": "/scim/v2/organizations/{org}/Users/{scim_user_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "scim_user_id", "description": "scim_user_id parameter", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "scim_user_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/organizations/ORG/Users/SCIM_USER_ID", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/organizations/ORG/Users/SCIM_USER_ID"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /scim/v2/organizations/{org}/Users/{scim_user_id}', {\n org: 'org',\n scim_user_id: 'scim_user_id'\n})",
"html": "await octokit.request('GET /scim/v2/organizations/{org}/Users/{scim_user_id}', {\n org: 'org',\n scim_user_id: 'scim_user_id'\n})\n"
}
],
"summary": "Get SCIM provisioning information for a user",
"description": "",
"tags": [
"scim"
],
"operationId": "scim/get-provisioning-information-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/scim#get-scim-provisioning-information-for-a-user"
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": true,
"category": "scim",
"subcategory": null
},
"slug": "get-scim-provisioning-information-for-a-user",
"category": "scim",
"categoryLabel": "SCIM",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "put",
"requestPath": "/scim/v2/organizations/{org}/Users/{scim_user_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "scim_user_id",
"description": "scim_user_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "scim_user_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/organizations/ORG/Users/SCIM_USER_ID \\\n -d '{\"userName\":\"userName\",\"name\":{\"givenName\":\"givenName\",\"familyName\":\"familyName\",\"formatted\":\"formatted\"},\"emails\":[\"octocat@github.com\"]}'", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/organizations/ORG/Users/SCIM_USER_ID \\\n -d '{\"userName\":\"userName\",\"name\":{\"givenName\":\"givenName\",\"familyName\":\"familyName\",\"formatted\":\"formatted\"},\"emails\":[\"octocat@github.com\"]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /scim/v2/organizations/{org}/Users/{scim_user_id}', {\n org: 'org',\n scim_user_id: 'scim_user_id',\n userName: 'userName',\n name: {\n givenName: 'givenName',\n familyName: 'familyName',\n formatted: 'formatted'\n },\n emails: [\n 'octocat@github.com'\n ]\n})",
"html": "await octokit.request('PUT /scim/v2/organizations/{org}/Users/{scim_user_id}', {\n org: 'org',\n scim_user_id: 'scim_user_id',\n userName: 'userName',\n name: {\n givenName: 'givenName',\n familyName: 'familyName',\n formatted: 'formatted'\n },\n emails: [\n 'octocat@github.com'\n ]\n})\n"
}
],
"summary": "Update a provisioned organization membership",
"description": "Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user) endpoint instead.\n\nYou must at least provide the required values for the user: `userName`, `name`, and `emails`.\n\n**Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`.",
"tags": [
"scim"
],
"operationId": "scim/set-information-for-provisioned-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/scim#set-scim-information-for-a-provisioned-user"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"schemas": {
"type": "array of strings",
"items": {
"type": "string"
},
"name": "schemas",
"in": "body",
"rawType": "array",
"description": "",
"childParamsGroups": []
},
"displayName": {
"description": "The name of the user, suitable for display to end-users
", "example": "Jon Doe", "type": "string", "name": "displayName", "in": "body", "rawType": "string", "rawDescription": "The name of the user, suitable for display to end-users", "childParamsGroups": [] }, "externalId": { "type": "string", "name": "externalId", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, "groups": { "type": "array of strings", "items": { "type": "string" }, "name": "groups", "in": "body", "rawType": "array", "description": "", "childParamsGroups": [] }, "active": { "type": "boolean", "name": "active", "in": "body", "rawType": "boolean", "description": "", "childParamsGroups": [] }, "userName": { "description": "Required. Configured by the admin. Could be an email, login, or username
", "example": "someone@example.com", "type": "string", "name": "userName", "in": "body", "rawType": "string", "rawDescription": "Configured by the admin. Could be an email, login, or username", "childParamsGroups": [] }, "name": { "type": "object", "properties": { "givenName": { "type": "string", "name": "givenName", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, "familyName": { "type": "string", "name": "familyName", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, "formatted": { "type": "string", "name": "formatted", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } }, "required": [ "givenName", "familyName" ], "example": { "givenName": "Jane", "familyName": "User" }, "name": "name", "in": "body", "rawType": "object", "description": "Required.
", "childParamsGroups": [ { "parentName": "name", "parentType": "object", "id": "name-object", "params": [ { "type": "string", "name": "givenName", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, { "type": "string", "name": "familyName", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, { "type": "string", "name": "formatted", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ] } ] }, "emails": { "description": "Required. user emails
", "example": [ { "value": "someone@example.com", "primary": true }, { "value": "another@example.com", "primary": false } ], "type": "array of objects", "minItems": 1, "items": { "type": "object", "properties": { "type": { "type": "string", "name": "type", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, "value": { "type": "string", "name": "value", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, "primary": { "type": "boolean", "name": "primary", "in": "body", "rawType": "boolean", "description": "", "childParamsGroups": [] } }, "required": [ "value" ] }, "name": "emails", "in": "body", "rawType": "array", "rawDescription": "user emails", "childParamsGroups": [ { "parentName": "emails", "parentType": "items", "id": "emails-items", "params": [ { "type": "string", "name": "type", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, { "type": "string", "name": "value", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, { "type": "boolean", "name": "primary", "in": "body", "rawType": "boolean", "description": "", "childParamsGroups": [] } ] } ] } }, "required": [ "userName", "name", "emails" ] } } } }, "x-github": { "githubCloudOnly": true, "enabledForGitHubApps": true, "category": "scim", "subcategory": null }, "slug": "update-a-provisioned-organization-membership", "category": "scim", "categoryLabel": "SCIM", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response" }, { "httpStatusCode": "304", "httpStatusMessage": "Not Modified", "description": "Not modified" }, { "httpStatusCode": "403", "httpStatusMessage": "Forbidden", "description": "Forbidden" }, { "httpStatusCode": "404", "httpStatusMessage": "Not Found", "description": "Resource not found" } ], "descriptionHTML": "Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the Update an attribute for a SCIM user endpoint instead.
\nYou must at least provide the required values for the user: userName, name, and emails.
Warning: Setting active: false removes the user from the organization, deletes the external identity, and deletes the associated {scim_user_id}.
The name of the user, suitable for display to end-users
", "example": "Jon Doe", "type": "string", "name": "displayName", "in": "body", "rawType": "string", "rawDescription": "The name of the user, suitable for display to end-users", "childParamsGroups": [] }, { "type": "string", "name": "externalId", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, { "type": "array of strings", "items": { "type": "string" }, "name": "groups", "in": "body", "rawType": "array", "description": "", "childParamsGroups": [] }, { "type": "boolean", "name": "active", "in": "body", "rawType": "boolean", "description": "", "childParamsGroups": [] }, { "description": "Required. Configured by the admin. Could be an email, login, or username
", "example": "someone@example.com", "type": "string", "name": "userName", "in": "body", "rawType": "string", "rawDescription": "Configured by the admin. Could be an email, login, or username", "childParamsGroups": [] }, { "type": "object", "properties": { "givenName": { "type": "string", "name": "givenName", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, "familyName": { "type": "string", "name": "familyName", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, "formatted": { "type": "string", "name": "formatted", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } }, "required": [ "givenName", "familyName" ], "example": { "givenName": "Jane", "familyName": "User" }, "name": "name", "in": "body", "rawType": "object", "description": "Required.
", "childParamsGroups": [ { "parentName": "name", "parentType": "object", "id": "name-object", "params": [ { "type": "string", "name": "givenName", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, { "type": "string", "name": "familyName", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, { "type": "string", "name": "formatted", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ] } ] }, { "description": "Required. user emails
", "example": [ { "value": "someone@example.com", "primary": true }, { "value": "another@example.com", "primary": false } ], "type": "array of objects", "minItems": 1, "items": { "type": "object", "properties": { "type": { "type": "string", "name": "type", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, "value": { "type": "string", "name": "value", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, "primary": { "type": "boolean", "name": "primary", "in": "body", "rawType": "boolean", "description": "", "childParamsGroups": [] } }, "required": [ "value" ] }, "name": "emails", "in": "body", "rawType": "array", "rawDescription": "user emails", "childParamsGroups": [ { "parentName": "emails", "parentType": "items", "id": "emails-items", "params": [ { "type": "string", "name": "type", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, { "type": "string", "name": "value", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, { "type": "boolean", "name": "primary", "in": "body", "rawType": "boolean", "description": "", "childParamsGroups": [] } ] } ] } ] }, { "verb": "patch", "requestPath": "/scim/v2/organizations/{org}/Users/{scim_user_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "scim_user_id", "description": "scim_user_id parameter", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "scim_user_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/organizations/ORG/Users/SCIM_USER_ID \\\n -d '{\"Operations\":[{\"op\":\"op\",\"path\":\"path\",\"value\":{\"active\":true,\"userName\":\"userName\",\"externalId\":\"externalId\",\"givenName\":\"givenName\",\"familyName\":\"familyName\"}}]}'", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/organizations/ORG/Users/SCIM_USER_ID \\\n -d '{\"Operations\":[{\"op\":\"op\",\"path\":\"path\",\"value\":{\"active\":true,\"userName\":\"userName\",\"externalId\":\"externalId\",\"givenName\":\"givenName\",\"familyName\":\"familyName\"}}]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /scim/v2/organizations/{org}/Users/{scim_user_id}', {\n org: 'org',\n scim_user_id: 'scim_user_id',\n Operations: [\n {\n op: 'op',\n path: 'path',\n value: {\n active: true,\n userName: 'userName',\n externalId: 'externalId',\n givenName: 'givenName',\n familyName: 'familyName'\n }\n }\n ]\n})",
"html": "await octokit.request('PATCH /scim/v2/organizations/{org}/Users/{scim_user_id}', {\n org: 'org',\n scim_user_id: 'scim_user_id',\n Operations: [\n {\n op: 'op',\n path: 'path',\n value: {\n active: true,\n userName: 'userName',\n externalId: 'externalId',\n givenName: 'givenName',\n familyName: 'familyName'\n }\n }\n ]\n})\n"
}
],
"summary": "Update an attribute for a SCIM user",
"description": "Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).\n\n**Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `\"path\": \"emails[type eq \\\"work\\\"]\"` will not work.\n\n**Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`.\n\n```\n{\n \"Operations\":[{\n \"op\":\"replace\",\n \"value\":{\n \"active\":false\n }\n }]\n}\n```",
"tags": [
"scim"
],
"operationId": "scim/update-attribute-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"schemas": {
"type": "array of strings",
"items": {
"type": "string"
},
"name": "schemas",
"in": "body",
"rawType": "array",
"description": "",
"childParamsGroups": []
},
"Operations": {
"description": "Required. Set of operations to be performed
", "example": [ { "op": "replace", "value": { "active": false } } ], "type": "array of objects", "minItems": 1, "items": { "type": "object", "properties": { "op": { "type": "string", "enum": [ "add", "remove", "replace" ], "name": "op", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, "path": { "type": "string", "name": "path", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, "value": { "oneOf": [ { "type": "object", "properties": { "active": { "type": "boolean", "nullable": true }, "userName": { "type": "string", "nullable": true }, "externalId": { "type": "string", "nullable": true }, "givenName": { "type": "string", "nullable": true }, "familyName": { "type": "string", "nullable": true } } }, { "type": "array", "items": { "type": "object", "properties": { "value": { "type": "string" }, "primary": { "type": "boolean" } } } }, { "type": "string" } ], "name": "value", "in": "body", "type": "object or array or string", "description": "", "childParamsGroups": [] } }, "required": [ "op" ] }, "name": "Operations", "in": "body", "rawType": "array", "rawDescription": "Set of operations to be performed", "childParamsGroups": [ { "parentName": "Operations", "parentType": "items", "id": "operations-items", "params": [ { "type": "string", "enum": [ "add", "remove", "replace" ], "name": "op", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, { "type": "string", "name": "path", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, { "oneOf": [ { "type": "object", "properties": { "active": { "type": "boolean", "nullable": true }, "userName": { "type": "string", "nullable": true }, "externalId": { "type": "string", "nullable": true }, "givenName": { "type": "string", "nullable": true }, "familyName": { "type": "string", "nullable": true } } }, { "type": "array", "items": { "type": "object", "properties": { "value": { "type": "string" }, "primary": { "type": "boolean" } } } }, { "type": "string" } ], "name": "value", "in": "body", "type": "object or array or string", "description": "", "childParamsGroups": [] } ] } ] } }, "required": [ "Operations" ], "type": "object" } } } }, "x-github": { "githubCloudOnly": true, "enabledForGitHubApps": true, "category": "scim", "subcategory": null }, "slug": "update-an-attribute-for-a-scim-user", "category": "scim", "categoryLabel": "SCIM", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response" }, { "httpStatusCode": "304", "httpStatusMessage": "Not Modified", "description": "Not modified" }, { "httpStatusCode": "400", "httpStatusMessage": "Bad Request", "description": "Bad Request" }, { "httpStatusCode": "403", "httpStatusMessage": "Forbidden", "description": "Forbidden" }, { "httpStatusCode": "404", "httpStatusMessage": "Not Found", "description": "Resource not found" }, { "httpStatusCode": "429", "httpStatusMessage": "Too Many Requests", "description": "Response" } ], "descriptionHTML": "Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the SCIM specification.
Note: Complicated SCIM path selectors that include filters are not supported. For example, a path selector defined as \"path\": \"emails[type eq \\\"work\\\"]\" will not work.
Warning: If you set active:false using the replace operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated :scim_user_id.
{\n \"Operations\":[{\n \"op\":\"replace\",\n \"value\":{\n \"active\":false\n }\n }]\n}\n",
"bodyParameters": [
{
"type": "array of strings",
"items": {
"type": "string"
},
"name": "schemas",
"in": "body",
"rawType": "array",
"description": "",
"childParamsGroups": []
},
{
"description": "Required. Set of operations to be performed
", "example": [ { "op": "replace", "value": { "active": false } } ], "type": "array of objects", "minItems": 1, "items": { "type": "object", "properties": { "op": { "type": "string", "enum": [ "add", "remove", "replace" ], "name": "op", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, "path": { "type": "string", "name": "path", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, "value": { "oneOf": [ { "type": "object", "properties": { "active": { "type": "boolean", "nullable": true }, "userName": { "type": "string", "nullable": true }, "externalId": { "type": "string", "nullable": true }, "givenName": { "type": "string", "nullable": true }, "familyName": { "type": "string", "nullable": true } } }, { "type": "array", "items": { "type": "object", "properties": { "value": { "type": "string" }, "primary": { "type": "boolean" } } } }, { "type": "string" } ], "name": "value", "in": "body", "type": "object or array or string", "description": "", "childParamsGroups": [] } }, "required": [ "op" ] }, "name": "Operations", "in": "body", "rawType": "array", "rawDescription": "Set of operations to be performed", "childParamsGroups": [ { "parentName": "Operations", "parentType": "items", "id": "operations-items", "params": [ { "type": "string", "enum": [ "add", "remove", "replace" ], "name": "op", "in": "body", "rawType": "string", "description": "Required.
", "childParamsGroups": [] }, { "type": "string", "name": "path", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, { "oneOf": [ { "type": "object", "properties": { "active": { "type": "boolean", "nullable": true }, "userName": { "type": "string", "nullable": true }, "externalId": { "type": "string", "nullable": true }, "givenName": { "type": "string", "nullable": true }, "familyName": { "type": "string", "nullable": true } } }, { "type": "array", "items": { "type": "object", "properties": { "value": { "type": "string" }, "primary": { "type": "boolean" } } } }, { "type": "string" } ], "name": "value", "in": "body", "type": "object or array or string", "description": "", "childParamsGroups": [] } ] } ] } ] }, { "verb": "delete", "requestPath": "/scim/v2/organizations/{org}/Users/{scim_user_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "scim_user_id", "description": "scim_user_id parameter", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "scim_user_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/organizations/ORG/Users/SCIM_USER_ID", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/organizations/ORG/Users/SCIM_USER_ID"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /scim/v2/organizations/{org}/Users/{scim_user_id}', {\n org: 'org',\n scim_user_id: 'scim_user_id'\n})",
"html": "await octokit.request('DELETE /scim/v2/organizations/{org}/Users/{scim_user_id}', {\n org: 'org',\n scim_user_id: 'scim_user_id'\n})\n"
}
],
"summary": "Delete a SCIM user from an organization",
"description": "",
"tags": [
"scim"
],
"operationId": "scim/delete-user-from-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/scim#delete-a-scim-user-from-an-organization"
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": true,
"category": "scim",
"subcategory": null
},
"slug": "delete-a-scim-user-from-an-organization",
"category": "scim",
"categoryLabel": "SCIM",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/search/code",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "q",
"description": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See \"[Searching code](https://help.github.com/articles/searching-code/)\" for a detailed list of qualifiers.",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query. See \"Searching code\" for a detailed list of qualifiers.
" }, { "name": "sort", "description": "Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results)", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "indexed" ] }, "descriptionHTML": "Sorts the results of your query. Can only be indexed, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/code", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/code"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /search/code', {\n q: 'q'\n})",
"html": "await octokit.request('GET /search/code', {\n q: 'q'\n})\n"
}
],
"summary": "Search code",
"description": "Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).\n\nWhen searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).\n\nFor example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this:\n\n`q=addClass+in:file+language:js+repo:jquery/jquery`\n\nThis query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository.\n\n#### Considerations for code search\n\nDue to the complexity of searching code, there are a few restrictions on how searches are performed:\n\n* Only the _default branch_ is considered. In most cases, this will be the `master` branch.\n* Only files smaller than 384 KB are searchable.\n* You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing\nlanguage:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is.",
"tags": [
"search"
],
"operationId": "search/code",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/search#search-code"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "search",
"subcategory": null
},
"slug": "search-code",
"category": "search",
"categoryLabel": "Search",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Searches for query terms inside of a file. This method returns up to 100 results per page.
\nWhen searching for code, you can get text match metadata for the file content and file path fields when you pass the text-match media type. For more details about how to receive highlighted search results, see Text match metadata.
For example, if you want to find the definition of the addClass function inside jQuery repository, your query would look something like this:
q=addClass+in:file+language:js+repo:jquery/jquery
This query searches for the keyword addClass within a file's contents. The query limits the search to files where the language is JavaScript in the jquery/jquery repository.
Due to the complexity of searching code, there are a few restrictions on how searches are performed:
\nmaster branch.language:go is not valid, while amazing language:go is.{\n \"total_count\": 7,\n \"incomplete_results\": false,\n \"items\": [\n {\n \"name\": \"classes.js\",\n \"path\": \"src/attributes/classes.js\",\n \"sha\": \"d7212f9dee2dcc18f084d7df8f417b80846ded5a\",\n \"url\": \"https://api.github.com/repositories/167174/contents/src/attributes/classes.js?ref=825ac3773694e0cd23ee74895fd5aeb535b27da4\",\n \"git_url\": \"https://api.github.com/repositories/167174/git/blobs/d7212f9dee2dcc18f084d7df8f417b80846ded5a\",\n \"html_url\": \"https://github.com/jquery/jquery/blob/825ac3773694e0cd23ee74895fd5aeb535b27da4/src/attributes/classes.js\",\n \"repository\": {\n \"id\": 167174,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxNjcxNzQ=\",\n \"name\": \"jquery\",\n \"full_name\": \"jquery/jquery\",\n \"owner\": {\n \"login\": \"jquery\",\n \"id\": 70142,\n \"node_id\": \"MDQ6VXNlcjcwMTQy\",\n \"avatar_url\": \"https://0.gravatar.com/avatar/6906f317a4733f4379b06c32229ef02f?d=https%3A%2F%2Fidenticons.github.com%2Ff426f04f2f9813718fb806b30e0093de.png\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/jquery\",\n \"html_url\": \"https://github.com/jquery\",\n \"followers_url\": \"https://api.github.com/users/jquery/followers\",\n \"following_url\": \"https://api.github.com/users/jquery/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/jquery/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/jquery/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/jquery/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/jquery/orgs\",\n \"repos_url\": \"https://api.github.com/users/jquery/repos\",\n \"events_url\": \"https://api.github.com/users/jquery/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/jquery/received_events\",\n \"type\": \"Organization\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/jquery/jquery\",\n \"description\": \"jQuery JavaScript Library\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/jquery/jquery\",\n \"forks_url\": \"https://api.github.com/repos/jquery/jquery/forks\",\n \"keys_url\": \"https://api.github.com/repos/jquery/jquery/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/jquery/jquery/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/jquery/jquery/teams\",\n \"hooks_url\": \"https://api.github.com/repos/jquery/jquery/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/jquery/jquery/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/jquery/jquery/events\",\n \"assignees_url\": \"https://api.github.com/repos/jquery/jquery/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/jquery/jquery/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/jquery/jquery/tags\",\n \"blobs_url\": \"https://api.github.com/repos/jquery/jquery/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/jquery/jquery/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/jquery/jquery/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/jquery/jquery/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/jquery/jquery/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/jquery/jquery/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/jquery/jquery/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/jquery/jquery/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/jquery/jquery/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/jquery/jquery/subscription\",\n \"commits_url\": \"https://api.github.com/repos/jquery/jquery/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/jquery/jquery/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/jquery/jquery/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/jquery/jquery/issues/comments/{number}\",\n \"contents_url\": \"https://api.github.com/repos/jquery/jquery/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/jquery/jquery/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/jquery/jquery/merges\",\n \"archive_url\": \"https://api.github.com/repos/jquery/jquery/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/jquery/jquery/downloads\",\n \"issues_url\": \"https://api.github.com/repos/jquery/jquery/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/jquery/jquery/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/jquery/jquery/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/jquery/jquery/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/jquery/jquery/labels{/name}\",\n \"deployments_url\": \"http://api.github.com/repos/octocat/Hello-World/deployments\",\n \"releases_url\": \"http://api.github.com/repos/octocat/Hello-World/releases{/id}\"\n },\n \"score\": 1\n }\n ]\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "get",
"requestPath": "/search/commits",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "q",
"description": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See \"[Searching commits](https://help.github.com/articles/searching-commits/)\" for a detailed list of qualifiers.",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query. See \"Searching commits\" for a detailed list of qualifiers.
" }, { "name": "sort", "description": "Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results)", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "author-date", "committer-date" ] }, "descriptionHTML": "Sorts the results of your query by author-date or committer-date. Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/commits", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/commits"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /search/commits', {\n q: 'q'\n})",
"html": "await octokit.request('GET /search/commits', {\n q: 'q'\n})\n"
}
],
"summary": "Search commits",
"description": "Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).\n\nWhen searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match\nmetadata](https://docs.github.com/rest/reference/search#text-match-metadata).\n\nFor example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this:\n\n`q=repo:octocat/Spoon-Knife+css`",
"tags": [
"search"
],
"operationId": "search/commits",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/search#search-commits"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "search",
"subcategory": null
},
"slug": "search-commits",
"category": "search",
"categoryLabel": "Search",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Find commits via various criteria on the default branch (usually master). This method returns up to 100 results per page.
When searching for commits, you can get text match metadata for the message field when you provide the text-match media type. For more details about how to receive highlighted search results, see Text match\nmetadata.
For example, if you want to find commits related to CSS in the octocat/Spoon-Knife repository. Your query would look something like this:
\nq=repo:octocat/Spoon-Knife+css
{\n \"total_count\": 1,\n \"incomplete_results\": false,\n \"items\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f\",\n \"sha\": \"bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f\",\n \"html_url\": \"https://github.com/octocat/Spoon-Knife/commit/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f/comments\",\n \"commit\": {\n \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f\",\n \"author\": {\n \"date\": \"2014-02-04T14:38:36-08:00\",\n \"name\": \"The Octocat\",\n \"email\": \"octocat@nowhere.com\"\n },\n \"committer\": {\n \"date\": \"2014-02-12T15:18:55-08:00\",\n \"name\": \"The Octocat\",\n \"email\": \"octocat@nowhere.com\"\n },\n \"message\": \"Create styles.css and updated README\",\n \"tree\": {\n \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/trees/a639e96f9038797fba6e0469f94a4b0cc459fa68\",\n \"sha\": \"a639e96f9038797fba6e0469f94a4b0cc459fa68\"\n },\n \"comment_count\": 8\n },\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 583231,\n \"node_id\": \"MDQ6VXNlcjU4MzIzMQ==\",\n \"avatar_url\": \"https://avatars.githubusercontent.com/u/583231?v=3\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"committer\": {},\n \"parents\": [\n {\n \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife/commits/a30c19e3f13765a3b48829788bc1cb8b4e95cee4\",\n \"html_url\": \"https://github.com/octocat/Spoon-Knife/commit/a30c19e3f13765a3b48829788bc1cb8b4e95cee4\",\n \"sha\": \"a30c19e3f13765a3b48829788bc1cb8b4e95cee4\"\n }\n ],\n \"repository\": {\n \"id\": 1300192,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMzAwMTky\",\n \"name\": \"Spoon-Knife\",\n \"full_name\": \"octocat/Spoon-Knife\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 583231,\n \"node_id\": \"MDQ6VXNlcjU4MzIzMQ==\",\n \"avatar_url\": \"https://avatars.githubusercontent.com/u/583231?v=3\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Spoon-Knife\",\n \"description\": \"This repo is for demonstration purposes only.\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/forks\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/teams\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/events\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/tags\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/subscription\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/merges\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/downloads\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/deployments\"\n },\n \"score\": 1,\n \"node_id\": \"MDQ6VXNlcjU4MzIzMQ==\"\n }\n ]\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
}
]
},
{
"verb": "get",
"requestPath": "/search/issues",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "q",
"description": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See \"[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)\" for a detailed list of qualifiers.",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query. See \"Searching issues and pull requests\" for a detailed list of qualifiers.
" }, { "name": "sort", "description": "Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results)", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "comments", "reactions", "reactions-+1", "reactions--1", "reactions-smile", "reactions-thinking_face", "reactions-heart", "reactions-tada", "interactions", "created", "updated" ] }, "descriptionHTML": "Sorts the results of your query by the number of comments, reactions, reactions-+1, reactions--1, reactions-smile, reactions-thinking_face, reactions-heart, reactions-tada, or interactions. You can also sort results by how recently the items were created or updated, Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/issues", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/issues"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /search/issues', {\n q: 'q'\n})",
"html": "await octokit.request('GET /search/issues', {\n q: 'q'\n})\n"
}
],
"summary": "Search issues and pull requests",
"description": "Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).\n\nWhen searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted\nsearch results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).\n\nFor example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.\n\n`q=windows+label:bug+language:python+state:open&sort=created&order=asc`\n\nThis query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.\n\n**Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see \"[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests).\"",
"tags": [
"search"
],
"operationId": "search/issues-and-pull-requests",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/search#search-issues-and-pull-requests"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "search",
"subcategory": null
},
"slug": "search-issues-and-pull-requests",
"category": "search",
"categoryLabel": "Search",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Find issues by state and keyword. This method returns up to 100 results per page.
\nWhen searching for issues, you can get text match metadata for the issue title, issue body, and issue comment body fields when you pass the text-match media type. For more details about how to receive highlighted\nsearch results, see Text match metadata.
For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.
\nq=windows+label:bug+language:python+state:open&sort=created&order=asc
This query searches for the keyword windows, within any open issue that is labeled as bug. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.
Note: For user-to-server GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the is:issue or is:pull-request qualifier will receive an HTTP 422 Unprocessable Entity response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the is qualifier, see \"Searching only issues or pull requests.\"
{\n \"total_count\": 280,\n \"incomplete_results\": false,\n \"items\": [\n {\n \"url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132\",\n \"repository_url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit\",\n \"labels_url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/labels{/name}\",\n \"comments_url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/comments\",\n \"events_url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/events\",\n \"html_url\": \"https://github.com/batterseapower/pinyin-toolkit/issues/132\",\n \"id\": 35802,\n \"node_id\": \"MDU6SXNzdWUzNTgwMg==\",\n \"number\": 132,\n \"title\": \"Line Number Indexes Beyond 20 Not Displayed\",\n \"user\": {\n \"login\": \"Nick3C\",\n \"id\": 90254,\n \"node_id\": \"MDQ6VXNlcjkwMjU0\",\n \"avatar_url\": \"https://secure.gravatar.com/avatar/934442aadfe3b2f4630510de416c5718?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/Nick3C\",\n \"html_url\": \"https://github.com/Nick3C\",\n \"followers_url\": \"https://api.github.com/users/Nick3C/followers\",\n \"following_url\": \"https://api.github.com/users/Nick3C/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/Nick3C/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/Nick3C/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/Nick3C/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/Nick3C/orgs\",\n \"repos_url\": \"https://api.github.com/users/Nick3C/repos\",\n \"events_url\": \"https://api.github.com/users/Nick3C/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/Nick3C/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"labels\": [\n {\n \"id\": 4,\n \"node_id\": \"MDU6TGFiZWw0\",\n \"url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/labels/bug\",\n \"name\": \"bug\",\n \"color\": \"ff0000\"\n }\n ],\n \"state\": \"open\",\n \"assignee\": null,\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"comments\": 15,\n \"created_at\": \"2009-07-12T20:10:41Z\",\n \"updated_at\": \"2009-07-19T09:23:43Z\",\n \"closed_at\": null,\n \"pull_request\": {\n \"url\": \"https://api/github.com/repos/octocat/Hello-World/pull/1347\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n },\n \"body\": \"...\",\n \"score\": 1,\n \"locked\": true,\n \"author_association\": \"COLLABORATOR\"\n }\n ]\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "get",
"requestPath": "/search/labels",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "repository_id",
"description": "The id of the repository.",
"in": "query",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "The id of the repository.
" }, { "name": "q", "description": "The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query).", "in": "query", "required": true, "schema": { "type": "string" }, "descriptionHTML": "The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see Constructing a search query.
" }, { "name": "sort", "description": "Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results)", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "created", "updated" ] }, "descriptionHTML": "Sorts the results of your query by when the label was created or updated. Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/labels", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/labels"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /search/labels', {\n repository_id: 42,\n q: 'q'\n})",
"html": "await octokit.request('GET /search/labels', {\n repository_id: 42,\n q: 'q'\n})\n"
}
],
"summary": "Search labels",
"description": "Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).\n\nWhen searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).\n\nFor example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this:\n\n`q=bug+defect+enhancement&repository_id=64778136`\n\nThe labels that best match the query appear first in the search results.",
"tags": [
"search"
],
"operationId": "search/labels",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/search#search-labels"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "search",
"subcategory": null
},
"slug": "search-labels",
"category": "search",
"categoryLabel": "Search",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results per page.
\nWhen searching for labels, you can get text match metadata for the label name and description fields when you pass the text-match media type. For more details about how to receive highlighted search results, see Text match metadata.
For example, if you want to find labels in the linguist repository that match bug, defect, or enhancement. Your query might look like this:
q=bug+defect+enhancement&repository_id=64778136
The labels that best match the query appear first in the search results.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"total_count\": 2,\n \"incomplete_results\": false,\n \"items\": [\n {\n \"id\": 418327088,\n \"node_id\": \"MDU6TGFiZWw0MTgzMjcwODg=\",\n \"url\": \"https://api.github.com/repos/octocat/linguist/labels/enhancement\",\n \"name\": \"enhancement\",\n \"color\": \"84b6eb\",\n \"default\": true,\n \"description\": \"New feature or request.\",\n \"score\": 1\n },\n {\n \"id\": 418327086,\n \"node_id\": \"MDU6TGFiZWw0MTgzMjcwODY=\",\n \"url\": \"https://api.github.com/repos/octocat/linguist/labels/bug\",\n \"name\": \"bug\",\n \"color\": \"ee0701\",\n \"default\": true,\n \"description\": \"Something isn't working.\",\n \"score\": 1\n }\n ]\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/search/repositories",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "q",
"description": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See \"[Searching for repositories](https://help.github.com/articles/searching-for-repositories/)\" for a detailed list of qualifiers.",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query. See \"Searching for repositories\" for a detailed list of qualifiers.
" }, { "name": "sort", "description": "Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results)", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "stars", "forks", "help-wanted-issues", "updated" ] }, "descriptionHTML": "Sorts the results of your query by number of stars, forks, or help-wanted-issues or how recently the items were updated. Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/repositories", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/repositories"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /search/repositories', {\n q: 'q'\n})",
"html": "await octokit.request('GET /search/repositories', {\n q: 'q'\n})\n"
}
],
"summary": "Search repositories",
"description": "Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).\n\nWhen searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).\n\nFor example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this:\n\n`q=tetris+language:assembly&sort=stars&order=desc`\n\nThis query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results.",
"tags": [
"search"
],
"operationId": "search/repos",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/search#search-repositories"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "search",
"subcategory": null
},
"slug": "search-repositories",
"category": "search",
"categoryLabel": "Search",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Find repositories via various criteria. This method returns up to 100 results per page.
\nWhen searching for repositories, you can get text match metadata for the name and description fields when you pass the text-match media type. For more details about how to receive highlighted search results, see Text match metadata.
For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this:
\nq=tetris+language:assembly&sort=stars&order=desc
This query searches for repositories with the word tetris in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results.
{\n \"total_count\": 40,\n \"incomplete_results\": false,\n \"items\": [\n {\n \"id\": 3081286,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkzMDgxMjg2\",\n \"name\": \"Tetris\",\n \"full_name\": \"dtrupenn/Tetris\",\n \"owner\": {\n \"login\": \"dtrupenn\",\n \"id\": 872147,\n \"node_id\": \"MDQ6VXNlcjg3MjE0Nw==\",\n \"avatar_url\": \"https://secure.gravatar.com/avatar/e7956084e75f239de85d3a31bc172ace?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/dtrupenn\",\n \"received_events_url\": \"https://api.github.com/users/dtrupenn/received_events\",\n \"type\": \"User\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"site_admin\": true\n },\n \"private\": false,\n \"html_url\": \"https://github.com/dtrupenn/Tetris\",\n \"description\": \"A C implementation of Tetris using Pennsim through LC4\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/dtrupenn/Tetris\",\n \"created_at\": \"2012-01-01T00:31:50Z\",\n \"updated_at\": \"2013-01-05T17:58:47Z\",\n \"pushed_at\": \"2012-01-01T00:37:02Z\",\n \"homepage\": \"https://github.com\",\n \"size\": 524,\n \"stargazers_count\": 1,\n \"watchers_count\": 1,\n \"language\": \"Assembly\",\n \"forks_count\": 0,\n \"open_issues_count\": 0,\n \"master_branch\": \"master\",\n \"default_branch\": \"master\",\n \"score\": 1,\n \"archive_url\": \"https://api.github.com/repos/dtrupenn/Tetris/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/dtrupenn/Tetris/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/dtrupenn/Tetris/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/dtrupenn/Tetris/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/dtrupenn/Tetris/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/dtrupenn/Tetris/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/dtrupenn/Tetris/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/dtrupenn/Tetris/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/dtrupenn/Tetris/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/dtrupenn/Tetris/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/dtrupenn/Tetris/downloads\",\n \"events_url\": \"https://api.github.com/repos/dtrupenn/Tetris/events\",\n \"forks_url\": \"https://api.github.com/repos/dtrupenn/Tetris/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/tags{/sha}\",\n \"git_url\": \"git:github.com/dtrupenn/Tetris.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/dtrupenn/Tetris/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/dtrupenn/Tetris/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/dtrupenn/Tetris/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/dtrupenn/Tetris/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/dtrupenn/Tetris/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/dtrupenn/Tetris/languages\",\n \"merges_url\": \"https://api.github.com/repos/dtrupenn/Tetris/merges\",\n \"milestones_url\": \"https://api.github.com/repos/dtrupenn/Tetris/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/dtrupenn/Tetris/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/dtrupenn/Tetris/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/dtrupenn/Tetris/releases{/id}\",\n \"ssh_url\": \"git@github.com:dtrupenn/Tetris.git\",\n \"stargazers_url\": \"https://api.github.com/repos/dtrupenn/Tetris/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/dtrupenn/Tetris/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/dtrupenn/Tetris/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/dtrupenn/Tetris/subscription\",\n \"tags_url\": \"https://api.github.com/repos/dtrupenn/Tetris/tags\",\n \"teams_url\": \"https://api.github.com/repos/dtrupenn/Tetris/teams\",\n \"trees_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/dtrupenn/Tetris.git\",\n \"mirror_url\": \"git:git.example.com/dtrupenn/Tetris\",\n \"hooks_url\": \"https://api.github.com/repos/dtrupenn/Tetris/hooks\",\n \"svn_url\": \"https://svn.github.com/dtrupenn/Tetris\",\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1,\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_pages\": true,\n \"has_wiki\": true,\n \"has_downloads\": true,\n \"archived\": true,\n \"disabled\": true,\n \"visibility\": \"private\",\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n }\n }\n ]\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "get",
"requestPath": "/search/topics",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "q",
"description": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query).",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/topics", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/topics"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /search/topics', {\n q: 'q'\n})",
"html": "await octokit.request('GET /search/topics', {\n q: 'q'\n})\n"
}
],
"summary": "Search topics",
"description": "Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See \"[Searching topics](https://help.github.com/articles/searching-topics/)\" for a detailed list of qualifiers.\n\nWhen searching for topics, you can get text match metadata for the topic's **short\\_description**, **description**, **name**, or **display\\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).\n\nFor example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this:\n\n`q=ruby+is:featured`\n\nThis query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results.",
"tags": [
"search"
],
"operationId": "search/topics",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/search#search-topics"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "search",
"subcategory": null
},
"slug": "search-topics",
"category": "search",
"categoryLabel": "Search",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results per page. See \"Searching topics\" for a detailed list of qualifiers.
\nWhen searching for topics, you can get text match metadata for the topic's short_description, description, name, or display_name field when you pass the text-match media type. For more details about how to receive highlighted search results, see Text match metadata.
For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this:
\nq=ruby+is:featured
This query searches for topics with the keyword ruby and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results.
{\n \"total_count\": 6,\n \"incomplete_results\": false,\n \"items\": [\n {\n \"name\": \"ruby\",\n \"display_name\": \"Ruby\",\n \"short_description\": \"Ruby is a scripting language designed for simplified object-oriented programming.\",\n \"description\": \"Ruby was developed by Yukihiro \\\"Matz\\\" Matsumoto in 1995 with the intent of having an easily readable programming language. It is integrated with the Rails framework to create dynamic web-applications. Ruby's syntax is similar to that of Perl and Python.\",\n \"created_by\": \"Yukihiro Matsumoto\",\n \"released\": \"December 21, 1995\",\n \"created_at\": \"2016-11-28T22:03:59Z\",\n \"updated_at\": \"2017-10-30T18:16:32Z\",\n \"featured\": true,\n \"curated\": true,\n \"score\": 1\n },\n {\n \"name\": \"rails\",\n \"display_name\": \"Rails\",\n \"short_description\": \"Ruby on Rails (Rails) is a web application framework written in Ruby.\",\n \"description\": \"Ruby on Rails (Rails) is a web application framework written in Ruby. It is meant to help simplify the building of complex websites.\",\n \"created_by\": \"David Heinemeier Hansson\",\n \"released\": \"December 13 2005\",\n \"created_at\": \"2016-12-09T17:03:50Z\",\n \"updated_at\": \"2017-10-30T16:20:19Z\",\n \"featured\": true,\n \"curated\": true,\n \"score\": 1\n },\n {\n \"name\": \"python\",\n \"display_name\": \"Python\",\n \"short_description\": \"Python is a dynamically typed programming language.\",\n \"description\": \"Python is a dynamically typed programming language designed by Guido Van Rossum. Much like the programming language Ruby, Python was designed to be easily read by programmers. Because of its large following and many libraries, Python can be implemented and used to do anything from webpages to scientific research.\",\n \"created_by\": \"Guido van Rossum\",\n \"released\": \"February 20, 1991\",\n \"created_at\": \"2016-12-07T00:07:02Z\",\n \"updated_at\": \"2017-10-27T22:45:43Z\",\n \"featured\": true,\n \"curated\": true,\n \"score\": 1\n },\n {\n \"name\": \"jekyll\",\n \"display_name\": \"Jekyll\",\n \"short_description\": \"Jekyll is a simple, blog-aware static site generator.\",\n \"description\": \"Jekyll is a blog-aware, site generator written in Ruby. It takes raw text files, runs it through a renderer and produces a publishable static website.\",\n \"created_by\": \"Tom Preston-Werner\",\n \"released\": \"2008\",\n \"created_at\": \"2016-12-16T21:53:08Z\",\n \"updated_at\": \"2017-10-27T19:00:24Z\",\n \"featured\": true,\n \"curated\": true,\n \"score\": 1\n },\n {\n \"name\": \"sass\",\n \"display_name\": \"Sass\",\n \"short_description\": \"Sass is a stable extension to classic CSS.\",\n \"description\": \"Sass is a stylesheet language with a main implementation in Ruby. It is an extension of CSS that makes improvements to the old stylesheet format, such as being able to declare variables and using a cleaner nesting syntax.\",\n \"created_by\": \"Hampton Catlin, Natalie Weizenbaum, Chris Eppstein\",\n \"released\": \"November 28, 2006\",\n \"created_at\": \"2016-12-16T21:53:45Z\",\n \"updated_at\": \"2018-01-16T16:30:40Z\",\n \"featured\": true,\n \"curated\": true,\n \"score\": 1\n },\n {\n \"name\": \"homebrew\",\n \"display_name\": \"Homebrew\",\n \"short_description\": \"Homebrew is a package manager for macOS.\",\n \"description\": \"Homebrew is a package manager for Apple's macOS operating system. It simplifies the installation of software and is popular in the Ruby on Rails community.\",\n \"created_by\": \"Max Howell\",\n \"released\": \"2009\",\n \"created_at\": \"2016-12-17T20:30:44Z\",\n \"updated_at\": \"2018-02-06T16:14:56Z\",\n \"featured\": true,\n \"curated\": true,\n \"score\": 1\n }\n ]\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
}
]
},
{
"verb": "get",
"requestPath": "/search/users",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "q",
"description": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See \"[Searching users](https://help.github.com/articles/searching-users/)\" for a detailed list of qualifiers.",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query. See \"Searching users\" for a detailed list of qualifiers.
" }, { "name": "sort", "description": "Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results)", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "followers", "repositories", "joined" ] }, "descriptionHTML": "Sorts the results of your query by number of followers or repositories, or when the person joined GitHub. Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/users", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/users"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /search/users', {\n q: 'q'\n})",
"html": "await octokit.request('GET /search/users', {\n q: 'q'\n})\n"
}
],
"summary": "Search users",
"description": "Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).\n\nWhen searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).\n\nFor example, if you're looking for a list of popular users, you might try this query:\n\n`q=tom+repos:%3E42+followers:%3E1000`\n\nThis query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers.",
"tags": [
"search"
],
"operationId": "search/users",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/search#search-users"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "search",
"subcategory": null
},
"slug": "search-users",
"category": "search",
"categoryLabel": "Search",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Find users via various criteria. This method returns up to 100 results per page.
\nWhen searching for users, you can get text match metadata for the issue login, email, and name fields when you pass the text-match media type. For more details about highlighting search results, see Text match metadata. For more details about how to receive highlighted search results, see Text match metadata.
For example, if you're looking for a list of popular users, you might try this query:
\nq=tom+repos:%3E42+followers:%3E1000
This query searches for users with the name tom. The results are restricted to users with more than 42 repositories and over 1,000 followers.
{\n \"total_count\": 12,\n \"incomplete_results\": false,\n \"items\": [\n {\n \"login\": \"mojombo\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://secure.gravatar.com/avatar/25c7c18223fb42a4c6ae1c8db6f50f9b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/mojombo\",\n \"html_url\": \"https://github.com/mojombo\",\n \"followers_url\": \"https://api.github.com/users/mojombo/followers\",\n \"subscriptions_url\": \"https://api.github.com/users/mojombo/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/mojombo/orgs\",\n \"repos_url\": \"https://api.github.com/users/mojombo/repos\",\n \"received_events_url\": \"https://api.github.com/users/mojombo/received_events\",\n \"type\": \"User\",\n \"score\": 1,\n \"following_url\": \"https://api.github.com/users/mojombo/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/mojombo/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/mojombo/starred{/owner}{/repo}\",\n \"events_url\": \"https://api.github.com/users/mojombo/events{/privacy}\",\n \"site_admin\": true\n }\n ]\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
},
{
"httpStatusCode": "503",
"httpStatusMessage": "Service Unavailable",
"description": "Service unavailable"
}
]
},
{
"verb": "get",
"requestPath": "/teams/{team_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}', {\n team_id: 42\n})",
"html": "await octokit.request('GET /teams/{team_id}', {\n team_id: 42\n})\n"
}
],
"summary": "Get a team (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint.",
"tags": [
"teams"
],
"operationId": "teams/get-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#get-a-team-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": null
},
"deprecated": true,
"slug": "get-a-team-legacy",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the Get a team by name endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null,\n \"members_count\": 3,\n \"repos_count\": 10,\n \"created_at\": \"2017-07-14T16:53:42Z\",\n \"updated_at\": \"2017-08-17T12:37:15Z\",\n \"organization\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\",\n \"name\": \"github\",\n \"company\": \"GitHub\",\n \"blog\": \"https://github.com/blog\",\n \"location\": \"San Francisco\",\n \"email\": \"octocat@github.com\",\n \"is_verified\": true,\n \"has_organization_projects\": true,\n \"has_repository_projects\": true,\n \"public_repos\": 2,\n \"public_gists\": 1,\n \"followers\": 20,\n \"following\": 0,\n \"html_url\": \"https://github.com/octocat\",\n \"created_at\": \"2008-01-14T04:33:35Z\",\n \"updated_at\": \"2017-08-17T12:37:15Z\",\n \"type\": \"Organization\"\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/teams/{team_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42 \\\n -d '{\"name\":\"name\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42 \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /teams/{team_id}', {\n team_id: 42,\n name: 'name'\n})",
"html": "await octokit.request('PATCH /teams/{team_id}', {\n team_id: 42,\n name: 'name'\n})\n"
}
],
"summary": "Update a team (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint.\n\nTo edit a team, the authenticated user must either be an organization owner or a team maintainer.\n\n**Note:** With nested teams, the `privacy` for parent teams cannot be `secret`.",
"tags": [
"teams"
],
"operationId": "teams/update-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#update-a-team-legacy"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Required. The name of the team.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the team.", "childParamsGroups": [] }, "description": { "type": "string", "description": "The description of the team.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "The description of the team.", "childParamsGroups": [] }, "privacy": { "type": "string", "description": "The level of privacy this team should have. Editing teams without specifying this parameter leaves privacy intact. The options are:
\nFor a non-nested team:
\n* secret - only visible to organization owners and members of this team.
\n* closed - visible to all members of this organization.
\nFor a parent or child team:
\n* closed - visible to all members of this organization.
Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of:
\n* pull - team members can pull, but not push to or administer newly-added repositories.
\n* push - team members can pull and push, but not administer newly-added repositories.
\n* admin - team members can pull, push and administer newly-added repositories.
The ID of a team to set as the parent team.
", "nullable": true, "name": "parent_team_id", "in": "body", "rawType": "integer", "rawDescription": "The ID of a team to set as the parent team.", "childParamsGroups": [] } }, "required": [ "name" ] }, "example": { "name": "new team name", "description": "new team description", "privacy": "closed" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "removalDate": "2021-02-01", "deprecationDate": "2020-01-21", "category": "teams", "subcategory": null }, "deprecated": true, "slug": "update-a-team-legacy", "category": "teams", "categoryLabel": "Teams", "contentType": "application/json", "notes": [], "descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Update a team endpoint.
\nTo edit a team, the authenticated user must either be an organization owner or a team maintainer.
\nNote: With nested teams, the privacy for parent teams cannot be secret.
Required. The name of the team.
", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the team.", "childParamsGroups": [] }, { "type": "string", "description": "The description of the team.
", "name": "description", "in": "body", "rawType": "string", "rawDescription": "The description of the team.", "childParamsGroups": [] }, { "type": "string", "description": "The level of privacy this team should have. Editing teams without specifying this parameter leaves privacy intact. The options are:
\nFor a non-nested team:
\n* secret - only visible to organization owners and members of this team.
\n* closed - visible to all members of this organization.
\nFor a parent or child team:
\n* closed - visible to all members of this organization.
Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of:
\n* pull - team members can pull, but not push to or administer newly-added repositories.
\n* push - team members can pull and push, but not administer newly-added repositories.
\n* admin - team members can pull, push and administer newly-added repositories.
The ID of a team to set as the parent team.
", "nullable": true, "name": "parent_team_id", "in": "body", "rawType": "integer", "rawDescription": "The ID of a team to set as the parent team.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null,\n \"members_count\": 3,\n \"repos_count\": 10,\n \"created_at\": \"2017-07-14T16:53:42Z\",\n \"updated_at\": \"2017-08-17T12:37:15Z\",\n \"organization\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\",\n \"name\": \"github\",\n \"company\": \"GitHub\",\n \"blog\": \"https://github.com/blog\",\n \"location\": \"San Francisco\",\n \"email\": \"octocat@github.com\",\n \"is_verified\": true,\n \"has_organization_projects\": true,\n \"has_repository_projects\": true,\n \"public_repos\": 2,\n \"public_gists\": 1,\n \"followers\": 20,\n \"following\": 0,\n \"html_url\": \"https://github.com/octocat\",\n \"created_at\": \"2008-01-14T04:33:35Z\",\n \"updated_at\": \"2017-08-17T12:37:15Z\",\n \"type\": \"Organization\"\n }\n}\n"
},
{
"httpStatusCode": "201",
"httpStatusMessage": "Created",
"description": "Response",
"payload": "{\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null,\n \"members_count\": 3,\n \"repos_count\": 10,\n \"created_at\": \"2017-07-14T16:53:42Z\",\n \"updated_at\": \"2017-08-17T12:37:15Z\",\n \"organization\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\",\n \"name\": \"github\",\n \"company\": \"GitHub\",\n \"blog\": \"https://github.com/blog\",\n \"location\": \"San Francisco\",\n \"email\": \"octocat@github.com\",\n \"is_verified\": true,\n \"has_organization_projects\": true,\n \"has_repository_projects\": true,\n \"public_repos\": 2,\n \"public_gists\": 1,\n \"followers\": 20,\n \"following\": 0,\n \"html_url\": \"https://github.com/octocat\",\n \"created_at\": \"2008-01-14T04:33:35Z\",\n \"updated_at\": \"2017-08-17T12:37:15Z\",\n \"type\": \"Organization\"\n }\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/teams/{team_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /teams/{team_id}', {\n team_id: 42\n})",
"html": "await octokit.request('DELETE /teams/{team_id}', {\n team_id: 42\n})\n"
}
],
"summary": "Delete a team (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint.\n\nTo delete a team, the authenticated user must be an organization owner or team maintainer.\n\nIf you are an organization owner, deleting a parent team will delete all of its child teams as well.",
"tags": [
"teams"
],
"operationId": "teams/delete-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#delete-a-team-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": null
},
"deprecated": true,
"slug": "delete-a-team-legacy",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Delete a team endpoint.
\nTo delete a team, the authenticated user must be an organization owner or team maintainer.
\nIf you are an organization owner, deleting a parent team will delete all of its child teams as well.
" }, { "verb": "get", "requestPath": "/teams/{team_id}/discussions", "serverUrl": "https://api.github.com", "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "direction", "description": "One of `asc` (ascending) or `desc` (descending).", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "default": "desc" }, "descriptionHTML": "One of asc (ascending) or desc (descending).
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}/discussions', {\n team_id: 42\n})",
"html": "await octokit.request('GET /teams/{team_id}/discussions', {\n team_id: 42\n})\n"
}
],
"summary": "List discussions (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint.\n\nList all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"teams"
],
"operationId": "teams/list-discussions-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-discussions-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": "discussions"
},
"deprecated": true,
"slug": "list-discussions-legacy",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "discussions",
"subcategoryLabel": "Discussions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new List discussions endpoint.
List all discussions on a team's page. OAuth access tokens require the read:discussion scope.
[\n {\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Hi! This is an area for us to collaborate as a team.\",\n \"body_html\": \"<p>Hi! This is an area for us to collaborate as a team</p>\",\n \"body_version\": \"0d495416a700fb06133c612575d92bfb\",\n \"comments_count\": 0,\n \"comments_url\": \"https://api.github.com/teams/2343027/discussions/1/comments\",\n \"created_at\": \"2018-01-25T18:56:31Z\",\n \"last_edited_at\": null,\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1\",\n \"node_id\": \"MDE0OlRlYW1EaXNjdXNzaW9uMQ==\",\n \"number\": 1,\n \"pinned\": false,\n \"private\": false,\n \"team_url\": \"https://api.github.com/teams/2343027\",\n \"title\": \"Our first team post\",\n \"updated_at\": \"2018-01-25T18:56:31Z\",\n \"url\": \"https://api.github.com/teams/2343027/discussions/1\",\n \"reactions\": {\n \"url\": \"https://api.github.com/teams/2343027/discussions/1/reactions\",\n \"total_count\": 5,\n \"+1\": 3,\n \"-1\": 1,\n \"laugh\": 0,\n \"confused\": 0,\n \"heart\": 1,\n \"hooray\": 0,\n \"eyes\": 1,\n \"rocket\": 1\n }\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/teams/{team_id}/discussions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /teams/{team_id}/discussions', {\n team_id: 42,\n title: 'title',\n body: 'body'\n})",
"html": "await octokit.request('POST /teams/{team_id}/discussions', {\n team_id: 42,\n title: 'title',\n body: 'body'\n})\n"
}
],
"summary": "Create a discussion (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint.\n\nCreates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\nThis endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.",
"tags": [
"teams"
],
"operationId": "teams/create-discussion-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#create-a-discussion-legacy"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Required. The discussion post's title.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The discussion post's title.", "childParamsGroups": [] }, "body": { "type": "string", "description": "Required. The discussion post's body text.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The discussion post's body text.", "childParamsGroups": [] }, "private": { "type": "boolean", "description": "Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.
Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Create a discussion endpoint.
Creates a new discussion post on a team's page. OAuth access tokens require the write:discussion scope.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.
", "bodyParameters": [ { "type": "string", "description": "Required. The discussion post's title.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The discussion post's title.", "childParamsGroups": [] }, { "type": "string", "description": "Required. The discussion post's body text.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The discussion post's body text.", "childParamsGroups": [] }, { "type": "boolean", "description": "Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.
{\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Hi! This is an area for us to collaborate as a team.\",\n \"body_html\": \"<p>Hi! This is an area for us to collaborate as a team</p>\",\n \"body_version\": \"0d495416a700fb06133c612575d92bfb\",\n \"comments_count\": 0,\n \"comments_url\": \"https://api.github.com/teams/2343027/discussions/1/comments\",\n \"created_at\": \"2018-01-25T18:56:31Z\",\n \"last_edited_at\": null,\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1\",\n \"node_id\": \"MDE0OlRlYW1EaXNjdXNzaW9uMQ==\",\n \"number\": 1,\n \"pinned\": false,\n \"private\": false,\n \"team_url\": \"https://api.github.com/teams/2343027\",\n \"title\": \"Our first team post\",\n \"updated_at\": \"2018-01-25T18:56:31Z\",\n \"url\": \"https://api.github.com/teams/2343027/discussions/1\",\n \"reactions\": {\n \"url\": \"https://api.github.com/teams/2343027/discussions/1/reactions\",\n \"total_count\": 5,\n \"+1\": 3,\n \"-1\": 1,\n \"laugh\": 0,\n \"confused\": 0,\n \"heart\": 1,\n \"hooray\": 0,\n \"eyes\": 1,\n \"rocket\": 1\n }\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/teams/{team_id}/discussions/{discussion_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "discussion_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}/discussions/{discussion_number}', {\n team_id: 42,\n discussion_number: 42\n})",
"html": "await octokit.request('GET /teams/{team_id}/discussions/{discussion_number}', {\n team_id: 42,\n discussion_number: 42\n})\n"
}
],
"summary": "Get a discussion (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint.\n\nGet a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"teams"
],
"operationId": "teams/get-discussion-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#get-a-discussion-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": "discussions"
},
"deprecated": true,
"slug": "get-a-discussion-legacy",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "discussions",
"subcategoryLabel": "Discussions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Get a discussion endpoint.
\nGet a specific discussion on a team's page. OAuth access tokens require the read:discussion scope.
{\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Hi! This is an area for us to collaborate as a team.\",\n \"body_html\": \"<p>Hi! This is an area for us to collaborate as a team</p>\",\n \"body_version\": \"0d495416a700fb06133c612575d92bfb\",\n \"comments_count\": 0,\n \"comments_url\": \"https://api.github.com/teams/2343027/discussions/1/comments\",\n \"created_at\": \"2018-01-25T18:56:31Z\",\n \"last_edited_at\": null,\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1\",\n \"node_id\": \"MDE0OlRlYW1EaXNjdXNzaW9uMQ==\",\n \"number\": 1,\n \"pinned\": false,\n \"private\": false,\n \"team_url\": \"https://api.github.com/teams/2343027\",\n \"title\": \"Our first team post\",\n \"updated_at\": \"2018-01-25T18:56:31Z\",\n \"url\": \"https://api.github.com/teams/2343027/discussions/1\",\n \"reactions\": {\n \"url\": \"https://api.github.com/teams/2343027/discussions/1/reactions\",\n \"total_count\": 5,\n \"+1\": 3,\n \"-1\": 1,\n \"laugh\": 0,\n \"confused\": 0,\n \"heart\": 1,\n \"hooray\": 0,\n \"eyes\": 1,\n \"rocket\": 1\n }\n}\n"
}
]
},
{
"verb": "patch",
"requestPath": "/teams/{team_id}/discussions/{discussion_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "discussion_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42 \\\n -d '{\"title\":\"title\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42 \\\n -d '{\"title\":\"title\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /teams/{team_id}/discussions/{discussion_number}', {\n team_id: 42,\n discussion_number: 42,\n title: 'title'\n})",
"html": "await octokit.request('PATCH /teams/{team_id}/discussions/{discussion_number}', {\n team_id: 42,\n discussion_number: 42,\n title: 'title'\n})\n"
}
],
"summary": "Update a discussion (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) endpoint.\n\nEdits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"teams"
],
"operationId": "teams/update-discussion-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#update-a-discussion-legacy"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The discussion post's title.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The discussion post's title.", "childParamsGroups": [] }, "body": { "type": "string", "description": "The discussion post's body text.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The discussion post's body text.", "childParamsGroups": [] } } }, "example": { "title": "Welcome to our first team post" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "removalDate": "2021-02-01", "deprecationDate": "2020-01-21", "category": "teams", "subcategory": "discussions" }, "deprecated": true, "slug": "update-a-discussion-legacy", "category": "teams", "categoryLabel": "Teams", "subcategory": "discussions", "subcategoryLabel": "Discussions", "contentType": "application/json", "notes": [], "descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Update a discussion endpoint.
\nEdits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the write:discussion scope.
The discussion post's title.
", "name": "title", "in": "body", "rawType": "string", "rawDescription": "The discussion post's title.", "childParamsGroups": [] }, { "type": "string", "description": "The discussion post's body text.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The discussion post's body text.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Hi! This is an area for us to collaborate as a team.\",\n \"body_html\": \"<p>Hi! This is an area for us to collaborate as a team</p>\",\n \"body_version\": \"0d495416a700fb06133c612575d92bfb\",\n \"comments_count\": 1,\n \"comments_url\": \"https://api.github.com/teams/2343027/discussions/1/comments\",\n \"created_at\": \"2018-01-25T18:56:31Z\",\n \"last_edited_at\": \"2018-01-26T18:22:20Z\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1\",\n \"node_id\": \"MDE0OlRlYW1EaXNjdXNzaW9uMQ==\",\n \"number\": 1,\n \"pinned\": false,\n \"private\": false,\n \"team_url\": \"https://api.github.com/teams/2343027\",\n \"title\": \"Welcome to our first team post\",\n \"updated_at\": \"2018-01-26T18:22:20Z\",\n \"url\": \"https://api.github.com/teams/2343027/discussions/1\",\n \"reactions\": {\n \"url\": \"https://api.github.com/teams/2343027/discussions/1/reactions\",\n \"total_count\": 5,\n \"+1\": 3,\n \"-1\": 1,\n \"laugh\": 0,\n \"confused\": 0,\n \"heart\": 1,\n \"hooray\": 0,\n \"eyes\": 1,\n \"rocket\": 1\n }\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/teams/{team_id}/discussions/{discussion_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "discussion_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /teams/{team_id}/discussions/{discussion_number}', {\n team_id: 42,\n discussion_number: 42\n})",
"html": "await octokit.request('DELETE /teams/{team_id}/discussions/{discussion_number}', {\n team_id: 42,\n discussion_number: 42\n})\n"
}
],
"summary": "Delete a discussion (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint.\n\nDelete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"teams"
],
"operationId": "teams/delete-discussion-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": "discussions"
},
"deprecated": true,
"slug": "delete-a-discussion-legacy",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "discussions",
"subcategoryLabel": "Discussions",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Delete a discussion endpoint.
Delete a discussion from a team's page. OAuth access tokens require the write:discussion scope.
One of asc (ascending) or desc (descending).
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}/discussions/{discussion_number}/comments', {\n team_id: 42,\n discussion_number: 42\n})",
"html": "await octokit.request('GET /teams/{team_id}/discussions/{discussion_number}/comments', {\n team_id: 42,\n discussion_number: 42\n})\n"
}
],
"summary": "List discussion comments (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint.\n\nList all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"teams"
],
"operationId": "teams/list-discussion-comments-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": "discussion-comments"
},
"deprecated": true,
"slug": "list-discussion-comments-legacy",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "discussion-comments",
"subcategoryLabel": "Discussion comments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new List discussion comments endpoint.
\nList all comments on a team discussion. OAuth access tokens require the read:discussion scope.
[\n {\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Do you like apples?\",\n \"body_html\": \"<p>Do you like apples?</p>\",\n \"body_version\": \"5eb32b219cdc6a5a9b29ba5d6caa9c51\",\n \"created_at\": \"2018-01-15T23:53:58Z\",\n \"last_edited_at\": null,\n \"discussion_url\": \"https://api.github.com/teams/2403582/discussions/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1\",\n \"node_id\": \"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=\",\n \"number\": 1,\n \"updated_at\": \"2018-01-15T23:53:58Z\",\n \"url\": \"https://api.github.com/teams/2403582/discussions/1/comments/1\",\n \"reactions\": {\n \"url\": \"https://api.github.com/teams/2403582/discussions/1/reactions\",\n \"total_count\": 5,\n \"+1\": 3,\n \"-1\": 1,\n \"laugh\": 0,\n \"confused\": 0,\n \"heart\": 1,\n \"hooray\": 0,\n \"eyes\": 1,\n \"rocket\": 1\n }\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/teams/{team_id}/discussions/{discussion_number}/comments",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "discussion_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments \\\n -d '{\"body\":\"body\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments \\\n -d '{\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /teams/{team_id}/discussions/{discussion_number}/comments', {\n team_id: 42,\n discussion_number: 42,\n body: 'body'\n})",
"html": "await octokit.request('POST /teams/{team_id}/discussions/{discussion_number}/comments', {\n team_id: 42,\n discussion_number: 42,\n body: 'body'\n})\n"
}
],
"summary": "Create a discussion comment (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint.\n\nCreates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\nThis endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.",
"tags": [
"teams"
],
"operationId": "teams/create-discussion-comment-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "Required. The discussion comment's body text.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The discussion comment's body text.", "childParamsGroups": [] } }, "required": [ "body" ] }, "example": { "body": "Do you like apples?" } } } }, "x-github": { "triggersNotification": true, "githubCloudOnly": false, "enabledForGitHubApps": true, "removalDate": "2021-02-01", "deprecationDate": "2020-01-21", "category": "teams", "subcategory": "discussion-comments" }, "deprecated": true, "slug": "create-a-discussion-comment-legacy", "category": "teams", "categoryLabel": "Teams", "subcategory": "discussion-comments", "subcategoryLabel": "Discussion comments", "contentType": "application/json", "notes": [], "descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Create a discussion comment endpoint.
\nCreates a new comment on a team discussion. OAuth access tokens require the write:discussion scope.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.
", "bodyParameters": [ { "type": "string", "description": "Required. The discussion comment's body text.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The discussion comment's body text.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Do you like apples?\",\n \"body_html\": \"<p>Do you like apples?</p>\",\n \"body_version\": \"5eb32b219cdc6a5a9b29ba5d6caa9c51\",\n \"created_at\": \"2018-01-15T23:53:58Z\",\n \"last_edited_at\": null,\n \"discussion_url\": \"https://api.github.com/teams/2403582/discussions/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1\",\n \"node_id\": \"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=\",\n \"number\": 1,\n \"updated_at\": \"2018-01-15T23:53:58Z\",\n \"url\": \"https://api.github.com/teams/2403582/discussions/1/comments/1\",\n \"reactions\": {\n \"url\": \"https://api.github.com/teams/2403582/discussions/1/reactions\",\n \"total_count\": 5,\n \"+1\": 3,\n \"-1\": 1,\n \"laugh\": 0,\n \"confused\": 0,\n \"heart\": 1,\n \"hooray\": 0,\n \"eyes\": 1,\n \"rocket\": 1\n }\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "discussion_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "comment_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}', {\n team_id: 42,\n discussion_number: 42,\n comment_number: 42\n})",
"html": "await octokit.request('GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}', {\n team_id: 42,\n discussion_number: 42,\n comment_number: 42\n})\n"
}
],
"summary": "Get a discussion comment (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint.\n\nGet a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"teams"
],
"operationId": "teams/get-discussion-comment-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": "discussion-comments"
},
"deprecated": true,
"slug": "get-a-discussion-comment-legacy",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "discussion-comments",
"subcategoryLabel": "Discussion comments",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Get a discussion comment endpoint.
\nGet a specific comment on a team discussion. OAuth access tokens require the read:discussion scope.
{\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Do you like apples?\",\n \"body_html\": \"<p>Do you like apples?</p>\",\n \"body_version\": \"5eb32b219cdc6a5a9b29ba5d6caa9c51\",\n \"created_at\": \"2018-01-15T23:53:58Z\",\n \"last_edited_at\": null,\n \"discussion_url\": \"https://api.github.com/teams/2403582/discussions/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1\",\n \"node_id\": \"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=\",\n \"number\": 1,\n \"updated_at\": \"2018-01-15T23:53:58Z\",\n \"url\": \"https://api.github.com/teams/2403582/discussions/1/comments/1\",\n \"reactions\": {\n \"url\": \"https://api.github.com/teams/2403582/discussions/1/reactions\",\n \"total_count\": 5,\n \"+1\": 3,\n \"-1\": 1,\n \"laugh\": 0,\n \"confused\": 0,\n \"heart\": 1,\n \"hooray\": 0,\n \"eyes\": 1,\n \"rocket\": 1\n }\n}\n"
}
]
},
{
"verb": "patch",
"requestPath": "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "discussion_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "comment_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42 \\\n -d '{\"body\":\"body\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42 \\\n -d '{\"body\":\"body\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}', {\n team_id: 42,\n discussion_number: 42,\n comment_number: 42,\n body: 'body'\n})",
"html": "await octokit.request('PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}', {\n team_id: 42,\n discussion_number: 42,\n comment_number: 42,\n body: 'body'\n})\n"
}
],
"summary": "Update a discussion comment (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint.\n\nEdits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"teams"
],
"operationId": "teams/update-discussion-comment-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "Required. The discussion comment's body text.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The discussion comment's body text.", "childParamsGroups": [] } }, "required": [ "body" ] }, "example": { "body": "Do you like pineapples?" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "removalDate": "2021-02-01", "deprecationDate": "2020-01-21", "category": "teams", "subcategory": "discussion-comments" }, "deprecated": true, "slug": "update-a-discussion-comment-legacy", "category": "teams", "categoryLabel": "Teams", "subcategory": "discussion-comments", "subcategoryLabel": "Discussion comments", "contentType": "application/json", "notes": [], "descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Update a discussion comment endpoint.
\nEdits the body text of a discussion comment. OAuth access tokens require the write:discussion scope.
Required. The discussion comment's body text.
", "name": "body", "in": "body", "rawType": "string", "rawDescription": "The discussion comment's body text.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"author\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"body\": \"Do you like pineapples?\",\n \"body_html\": \"<p>Do you like pineapples?</p>\",\n \"body_version\": \"e6907b24d9c93cc0c5024a7af5888116\",\n \"created_at\": \"2018-01-15T23:53:58Z\",\n \"last_edited_at\": \"2018-01-26T18:22:20Z\",\n \"discussion_url\": \"https://api.github.com/teams/2403582/discussions/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1\",\n \"node_id\": \"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=\",\n \"number\": 1,\n \"updated_at\": \"2018-01-26T18:22:20Z\",\n \"url\": \"https://api.github.com/teams/2403582/discussions/1/comments/1\",\n \"reactions\": {\n \"url\": \"https://api.github.com/teams/2403582/discussions/1/reactions\",\n \"total_count\": 5,\n \"+1\": 3,\n \"-1\": 1,\n \"laugh\": 0,\n \"confused\": 0,\n \"heart\": 1,\n \"hooray\": 0,\n \"eyes\": 1,\n \"rocket\": 1\n }\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "discussion_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "comment_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}', {\n team_id: 42,\n discussion_number: 42,\n comment_number: 42\n})",
"html": "await octokit.request('DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}', {\n team_id: 42,\n discussion_number: 42,\n comment_number: 42\n})\n"
}
],
"summary": "Delete a discussion comment (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint.\n\nDeletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"teams"
],
"operationId": "teams/delete-discussion-comment-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": "discussion-comments"
},
"deprecated": true,
"slug": "delete-a-discussion-comment-legacy",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "discussion-comments",
"subcategoryLabel": "Discussion comments",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Delete a discussion comment endpoint.
\nDeletes a comment on a team discussion. OAuth access tokens require the write:discussion scope.
Returns a single reaction type. Omit this parameter to list all reactions to a team discussion comment.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42/reactions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42/reactions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions', {\n team_id: 42,\n discussion_number: 42,\n comment_number: 42\n})",
"html": "await octokit.request('GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions', {\n team_id: 42,\n discussion_number: 42,\n comment_number: 42\n})\n"
}
],
"summary": "List reactions for a team discussion comment (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated 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`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint.\n\nList the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"reactions"
],
"operationId": "reactions/list-for-team-discussion-comment-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-21",
"deprecationDate": "2020-02-26",
"category": "reactions",
"subcategory": null
},
"deprecated": true,
"slug": "list-reactions-for-a-team-discussion-comment-legacy",
"category": "reactions",
"categoryLabel": "Reactions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated 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 access tokens require the read:discussion scope.
[\n {\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "discussion_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "comment_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42/reactions \\\n -d '{\"content\":\"content\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42/reactions \\\n -d '{\"content\":\"content\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions', {\n team_id: 42,\n discussion_number: 42,\n comment_number: 42,\n content: 'content'\n})",
"html": "await octokit.request('POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions', {\n team_id: 42,\n discussion_number: 42,\n comment_number: 42,\n content: 'content'\n})\n"
}
],
"summary": "Create reaction for a team discussion comment (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated 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](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)\" endpoint.\n\nCreate a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment.",
"tags": [
"reactions"
],
"operationId": "reactions/create-for-team-discussion-comment-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "Required. The reaction type to add to the team discussion comment.
", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment.", "childParamsGroups": [] } }, "required": [ "content" ] }, "example": { "content": "heart" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "removalDate": "2021-02-21", "deprecationDate": "2020-02-26", "category": "reactions", "subcategory": null }, "deprecated": true, "slug": "create-reaction-for-a-team-discussion-comment-legacy", "category": "reactions", "categoryLabel": "Reactions", "contentType": "application/json", "notes": [], "descriptionHTML": "Deprecation Notice: This endpoint route is deprecated 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.
\nCreate 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.
Required. The reaction type to add to the team discussion comment.
", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/teams/{team_id}/discussions/{discussion_number}/reactions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "discussion_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "content",
"description": "Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"+1",
"-1",
"laugh",
"confused",
"heart",
"hooray",
"rocket",
"eyes"
]
},
"descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to a team discussion.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/reactions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/reactions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}/discussions/{discussion_number}/reactions', {\n team_id: 42,\n discussion_number: 42\n})",
"html": "await octokit.request('GET /teams/{team_id}/discussions/{discussion_number}/reactions', {\n team_id: 42,\n discussion_number: 42\n})\n"
}
],
"summary": "List reactions for a team discussion (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint.\n\nList the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"reactions"
],
"operationId": "reactions/list-for-team-discussion-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-21",
"deprecationDate": "2020-02-26",
"category": "reactions",
"subcategory": null
},
"deprecated": true,
"slug": "list-reactions-for-a-team-discussion-legacy",
"category": "reactions",
"categoryLabel": "Reactions",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated 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 access tokens require the read:discussion scope.
[\n {\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n }\n]\n"
}
]
},
{
"verb": "post",
"requestPath": "/teams/{team_id}/discussions/{discussion_number}/reactions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "discussion_number",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/reactions \\\n -d '{\"content\":\"content\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/reactions \\\n -d '{\"content\":\"content\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /teams/{team_id}/discussions/{discussion_number}/reactions', {\n team_id: 42,\n discussion_number: 42,\n content: 'content'\n})",
"html": "await octokit.request('POST /teams/{team_id}/discussions/{discussion_number}/reactions', {\n team_id: 42,\n discussion_number: 42,\n content: 'content'\n})\n"
}
],
"summary": "Create reaction for a team discussion (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint.\n\nCreate a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion.",
"tags": [
"reactions"
],
"operationId": "reactions/create-for-team-discussion-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "Required. The reaction type to add to the team discussion.
", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion.", "childParamsGroups": [] } }, "required": [ "content" ] }, "example": { "content": "heart" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "removalDate": "2021-02-21", "deprecationDate": "2020-02-26", "category": "reactions", "subcategory": null }, "deprecated": true, "slug": "create-reaction-for-a-team-discussion-legacy", "category": "reactions", "categoryLabel": "Reactions", "contentType": "application/json", "notes": [], "descriptionHTML": "Deprecation Notice: This endpoint route is deprecated 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. 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.
Required. The reaction type to add to the team discussion.
", "enum": [ "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes" ], "name": "content", "in": "body", "rawType": "string", "rawDescription": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 1,\n \"node_id\": \"MDg6UmVhY3Rpb24x\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"content\": \"heart\",\n \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/teams/{team_id}/invitations",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/invitations", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/invitations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}/invitations', {\n team_id: 42\n})",
"html": "await octokit.request('GET /teams/{team_id}/invitations', {\n team_id: 42\n})\n"
}
],
"summary": "List pending team invitations (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) endpoint.\n\nThe return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.",
"tags": [
"teams"
],
"operationId": "teams/list-pending-invitations-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": "members"
},
"deprecated": true,
"slug": "list-pending-team-invitations-legacy",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new List pending team invitations endpoint.
The return hash contains a role field which refers to the Organization Invitation role and will be one of the following values: direct_member, admin, billing_manager, hiring_manager, or reinstate. If the invitee is not a GitHub member, the login field in the return hash will be null.
[\n {\n \"id\": 1,\n \"login\": \"monalisa\",\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"email\": \"octocat@github.com\",\n \"role\": \"direct_member\",\n \"created_at\": \"2016-11-30T06:46:10-08:00\",\n \"failed_at\": \"\",\n \"failed_reason\": \"\",\n \"inviter\": {\n \"login\": \"other_user\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/other_user\",\n \"html_url\": \"https://github.com/other_user\",\n \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"team_count\": 2,\n \"invitation_teams_url\": \"https://api.github.com/organizations/2/invitations/1/teams\"\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/teams/{team_id}/members",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "role",
"description": "Filters members returned by their role in the team. Can be one of: \n\\* `member` - normal members of the team. \n\\* `maintainer` - team maintainers. \n\\* `all` - all members of the team.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"member",
"maintainer",
"all"
],
"default": "all"
},
"descriptionHTML": "Filters members returned by their role in the team. Can be one of:
\n* member - normal members of the team.
\n* maintainer - team maintainers.
\n* all - all members of the team.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/members", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/members"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}/members', {\n team_id: 42\n})",
"html": "await octokit.request('GET /teams/{team_id}/members', {\n team_id: 42\n})\n"
}
],
"summary": "List team members (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint.\n\nTeam members will include the members of child teams.",
"tags": [
"teams"
],
"operationId": "teams/list-members-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-team-members-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": "members"
},
"deprecated": true,
"slug": "list-team-members-legacy",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new List team members endpoint.
Team members will include the members of child teams.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/teams/{team_id}/members/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/members/USERNAME",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/members/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}/members/{username}', {\n team_id: 42,\n username: 'username'\n})",
"html": "await octokit.request('GET /teams/{team_id}/members/{username}', {\n team_id: 42,\n username: 'username'\n})\n"
}
],
"summary": "Get team member (Legacy)",
"description": "The \"Get team member\" endpoint (described below) is deprecated.\n\nWe recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships.\n\nTo list members in a team, the team must be visible to the authenticated user.",
"tags": [
"teams"
],
"operationId": "teams/get-member-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#get-team-member-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": "members"
},
"deprecated": true,
"slug": "get-team-member-legacy",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "if user is a member"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "if user is not a member"
}
],
"bodyParameters": [],
"descriptionHTML": "The \"Get team member\" endpoint (described below) is deprecated.
\nWe recommend using the Get team membership for a user endpoint instead. It allows you to get both active and pending memberships.
\nTo list members in a team, the team must be visible to the authenticated user.
" }, { "verb": "put", "requestPath": "/teams/{team_id}/members/{username}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/members/USERNAME", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/members/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /teams/{team_id}/members/{username}', {\n team_id: 42,\n username: 'username'\n})",
"html": "await octokit.request('PUT /teams/{team_id}/members/{username}', {\n team_id: 42,\n username: 'username'\n})\n"
}
],
"summary": "Add team member (Legacy)",
"description": "The \"Add team member\" endpoint (described below) is deprecated.\n\nWe recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams.\n\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nTo add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization.\n\n**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/).\"\n\nNote that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"",
"tags": [
"teams"
],
"operationId": "teams/add-member-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#add-team-member-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": "members"
},
"deprecated": true,
"slug": "add-team-member-legacy",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if team synchronization is set up"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization"
}
],
"bodyParameters": [],
"descriptionHTML": "The \"Add team member\" endpoint (described below) is deprecated.
\nWe recommend using the Add or update team membership for a user endpoint instead. It allows you to invite new organization members to your teams.
\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nTo add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization.
\nNote: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"Synchronizing teams between your identity provider and GitHub.\"
\nNote that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/members/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /teams/{team_id}/members/{username}', {\n team_id: 42,\n username: 'username'\n})",
"html": "await octokit.request('DELETE /teams/{team_id}/members/{username}', {\n team_id: 42,\n username: 'username'\n})\n"
}
],
"summary": "Remove team member (Legacy)",
"description": "The \"Remove team member\" endpoint (described below) is deprecated.\n\nWe recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships.\n\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nTo remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team.\n\n**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/).\"",
"tags": [
"teams"
],
"operationId": "teams/remove-member-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#remove-team-member-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": "members"
},
"deprecated": true,
"slug": "remove-team-member-legacy",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if team synchronization is setup"
}
],
"bodyParameters": [],
"descriptionHTML": "The \"Remove team member\" endpoint (described below) is deprecated.
\nWe recommend using the Remove team membership for a user endpoint instead. It allows you to remove both active and pending memberships.
\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nTo remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team.
\nNote: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"Synchronizing teams between your identity provider and GitHub.\"
" }, { "verb": "get", "requestPath": "/teams/{team_id}/memberships/{username}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/memberships/USERNAME", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/memberships/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}/memberships/{username}', {\n team_id: 42,\n username: 'username'\n})",
"html": "await octokit.request('GET /teams/{team_id}/memberships/{username}', {\n team_id: 42,\n username: 'username'\n})\n"
}
],
"summary": "Get team membership for a user (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint.\n\nTeam members will include the members of child teams.\n\nTo get a user's membership with a team, the team must be visible to the authenticated user.\n\n**Note:**\nThe response contains the `state` of the membership and the member's `role`.\n\nThe `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team).",
"tags": [
"teams"
],
"operationId": "teams/get-membership-for-user-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": "members"
},
"deprecated": true,
"slug": "get-team-membership-for-a-user-legacy",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Get team membership for a user endpoint.
\nTeam members will include the members of child teams.
\nTo get a user's membership with a team, the team must be visible to the authenticated user.
\nNote:\nThe response contains the state of the membership and the member's role.
The role for organization owners is set to maintainer. For more information about maintainer roles, see Create a team.
{\n \"url\": \"https://api.github.com/teams/1/memberships/octocat\",\n \"role\": \"maintainer\",\n \"state\": \"active\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "put",
"requestPath": "/teams/{team_id}/memberships/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/memberships/USERNAME \\\n -d '{\"role\":\"role\"}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/memberships/USERNAME \\\n -d '{\"role\":\"role\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /teams/{team_id}/memberships/{username}', {\n team_id: 42,\n username: 'username',\n role: 'role'\n})",
"html": "await octokit.request('PUT /teams/{team_id}/memberships/{username}', {\n team_id: 42,\n username: 'username',\n role: 'role'\n})\n"
}
],
"summary": "Add or update team membership for a user (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint.\n\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nIf the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer.\n\n**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/).\"\n\nIf the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the \"pending\" state until the user accepts the invitation, at which point the membership will transition to the \"active\" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner.\n\nIf the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.",
"tags": [
"teams"
],
"operationId": "teams/add-or-update-membership-for-user-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"role": {
"type": "string",
"description": "The role that this user should have in the team. Can be one of:
\n* member - a normal member of the team.
\n* maintainer - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description.
Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Add or update team membership for a user endpoint.
\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nIf the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer.
\nNote: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"Synchronizing teams between your identity provider and GitHub.\"
\nIf the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the \"pending\" state until the user accepts the invitation, at which point the membership will transition to the \"active\" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner.
\nIf the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.
", "bodyParameters": [ { "type": "string", "description": "The role that this user should have in the team. Can be one of:
\n* member - a normal member of the team.
\n* maintainer - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description.
{\n \"url\": \"https://api.github.com/teams/1/memberships/octocat\",\n \"role\": \"member\",\n \"state\": \"pending\"\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden if team synchronization is set up"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Unprocessable Entity if you attempt to add an organization to a team"
}
]
},
{
"verb": "delete",
"requestPath": "/teams/{team_id}/memberships/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/memberships/USERNAME",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/memberships/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /teams/{team_id}/memberships/{username}', {\n team_id: 42,\n username: 'username'\n})",
"html": "await octokit.request('DELETE /teams/{team_id}/memberships/{username}', {\n team_id: 42,\n username: 'username'\n})\n"
}
],
"summary": "Remove team membership for a user (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint.\n\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nTo remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.\n\n**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/).\"",
"tags": [
"teams"
],
"operationId": "teams/remove-membership-for-user-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": "members"
},
"deprecated": true,
"slug": "remove-team-membership-for-a-user-legacy",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "if team synchronization is set up"
}
],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Remove team membership for a user endpoint.
\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nTo remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.
\nNote: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"Synchronizing teams between your identity provider and GitHub.\"
" }, { "verb": "get", "requestPath": "/teams/{team_id}/projects", "serverUrl": "https://api.github.com", "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/projects", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/projects"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}/projects', {\n team_id: 42\n})",
"html": "await octokit.request('GET /teams/{team_id}/projects', {\n team_id: 42\n})\n"
}
],
"summary": "List team projects (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint.\n\nLists the organization projects for a team.",
"tags": [
"teams"
],
"operationId": "teams/list-projects-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#list-team-projects-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": null
},
"deprecated": true,
"slug": "list-team-projects-legacy",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new List team projects endpoint.
Lists the organization projects for a team.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"owner_url\": \"https://api.github.com/orgs/octocat\",\n \"url\": \"https://api.github.com/projects/1002605\",\n \"html_url\": \"https://github.com/orgs/api-playground/projects/1\",\n \"columns_url\": \"https://api.github.com/projects/1002605/columns\",\n \"id\": 1002605,\n \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDU=\",\n \"name\": \"Organization Roadmap\",\n \"body\": \"High-level roadmap for the upcoming year.\",\n \"number\": 1,\n \"state\": \"open\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-11T20:09:31Z\",\n \"updated_at\": \"2014-03-04T18:58:10Z\",\n \"organization_permission\": \"write\",\n \"private\": false,\n \"permissions\": {\n \"read\": true,\n \"write\": true,\n \"admin\": false\n }\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/teams/{team_id}/projects/{project_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "project_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/projects/42",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/projects/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}/projects/{project_id}', {\n team_id: 42,\n project_id: 42\n})",
"html": "await octokit.request('GET /teams/{team_id}/projects/{project_id}', {\n team_id: 42,\n project_id: 42\n})\n"
}
],
"summary": "Check team permissions for a project (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint.\n\nChecks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.",
"tags": [
"teams"
],
"operationId": "teams/check-permissions-for-project-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": null
},
"deprecated": true,
"slug": "check-team-permissions-for-a-project-legacy",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Check team permissions for a project endpoint.
\nChecks whether a team has read, write, or admin permissions for an organization project. The response includes projects inherited from a parent team.
{\n \"owner_url\": \"https://api.github.com/orgs/octocat\",\n \"url\": \"https://api.github.com/projects/1002605\",\n \"html_url\": \"https://github.com/orgs/api-playground/projects/1\",\n \"columns_url\": \"https://api.github.com/projects/1002605/columns\",\n \"id\": 1002605,\n \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDU=\",\n \"name\": \"Organization Roadmap\",\n \"body\": \"High-level roadmap for the upcoming year.\",\n \"number\": 1,\n \"state\": \"open\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-11T20:09:31Z\",\n \"updated_at\": \"2014-03-04T18:58:10Z\",\n \"organization_permission\": \"write\",\n \"private\": false,\n \"permissions\": {\n \"read\": true,\n \"write\": true,\n \"admin\": false\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if project is not managed by this team"
}
]
},
{
"verb": "put",
"requestPath": "/teams/{team_id}/projects/{project_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "project_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/projects/42 \\\n -d '{\"permission\":\"permission\"}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/projects/42 \\\n -d '{\"permission\":\"permission\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /teams/{team_id}/projects/{project_id}', {\n team_id: 42,\n project_id: 42,\n permission: 'permission'\n})",
"html": "await octokit.request('PUT /teams/{team_id}/projects/{project_id}', {\n team_id: 42,\n project_id: 42,\n permission: 'permission'\n})\n"
}
],
"summary": "Add or update team project permissions (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) endpoint.\n\nAdds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization.",
"tags": [
"teams"
],
"operationId": "teams/add-or-update-project-permissions-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"permission": {
"type": "string",
"description": "The permission to grant to the team for this project. Can be one of:
\n* read - team members can read, but not write to or administer this project.
\n* write - team members can read and write, but not administer this project.
\n* admin - team members can read, write and administer this project.
\nDefault: the team's permission attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Add or update team project permissions endpoint.
\nAdds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have admin permissions for the project. The project and team must be part of the same organization.
The permission to grant to the team for this project. Can be one of:
\n* read - team members can read, but not write to or administer this project.
\n* write - team members can read and write, but not administer this project.
\n* admin - team members can read, write and administer this project.
\nDefault: the team's permission attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
{\n \"message\": \"Must have admin rights to Repository.\",\n \"documentation_url\": \"https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions\"\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/teams/{team_id}/projects/{project_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "project_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/projects/42",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/projects/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /teams/{team_id}/projects/{project_id}', {\n team_id: 42,\n project_id: 42\n})",
"html": "await octokit.request('DELETE /teams/{team_id}/projects/{project_id}', {\n team_id: 42,\n project_id: 42\n})\n"
}
],
"summary": "Remove a project from a team (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) endpoint.\n\nRemoves an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it.",
"tags": [
"teams"
],
"operationId": "teams/remove-project-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": null
},
"deprecated": true,
"slug": "remove-a-project-from-a-team-legacy",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "415",
"httpStatusMessage": "Unsupported Media Type",
"description": "Preview header missing"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Remove a project from a team endpoint.
\nRemoves an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have read access to both the team and project, or admin access to the team or project. Note: This endpoint removes the project from the team, but does not delete it.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/repos", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/repos"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}/repos', {\n team_id: 42\n})",
"html": "await octokit.request('GET /teams/{team_id}/repos', {\n team_id: 42\n})\n"
}
],
"summary": "List team repositories (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint.",
"tags": [
"teams"
],
"operationId": "teams/list-repos-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": null
},
"deprecated": true,
"slug": "list-team-repositories-legacy",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new List team repositories endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n }\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/teams/{team_id}/repos/{owner}/{repo}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/repos/octocat/hello-world",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/repos/octocat/hello-world"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}/repos/{owner}/{repo}', {\n team_id: 42,\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /teams/{team_id}/repos/{owner}/{repo}', {\n team_id: 42,\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Check team permissions for a repository (Legacy)",
"description": "**Note**: Repositories inherited through a parent team will also be checked.\n\n**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint.\n\nYou can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header:",
"tags": [
"teams"
],
"operationId": "teams/check-permissions-for-repo-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": null
},
"deprecated": true,
"slug": "check-team-permissions-for-a-repository-legacy",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Note: Repositories inherited through a parent team will also be checked.
\nDeprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Check team permissions for a repository endpoint.
\nYou can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom media type via the Accept header:
{\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n },\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n}\n"
},
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response if repository is managed by this team"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if repository is not managed by this team"
}
]
},
{
"verb": "put",
"requestPath": "/teams/{team_id}/repos/{owner}/{repo}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
},
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/repos/octocat/hello-world \\\n -d '{\"permission\":\"permission\"}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/repos/octocat/hello-world \\\n -d '{\"permission\":\"permission\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /teams/{team_id}/repos/{owner}/{repo}', {\n team_id: 42,\n owner: 'octocat',\n repo: 'hello-world',\n permission: 'permission'\n})",
"html": "await octokit.request('PUT /teams/{team_id}/repos/{owner}/{repo}', {\n team_id: 42,\n owner: 'octocat',\n repo: 'hello-world',\n permission: 'permission'\n})\n"
}
],
"summary": "Add or update team repository permissions (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new \"[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)\" endpoint.\n\nTo add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization.\n\nNote that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"",
"tags": [
"teams"
],
"operationId": "teams/add-or-update-repo-permissions-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions-legacy"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"permission": {
"type": "string",
"description": "The permission to grant the team on this repository. Can be one of:
\n* pull - team members can pull, but not push to or administer this repository.
\n* push - team members can pull and push, but not administer this repository.
\n* admin - team members can pull, push and administer this repository.
If no permission is specified, the team's permission attribute will be used to determine what permission to grant the team on this repository.
Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new \"Add or update team repository permissions\" endpoint.
\nTo add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a 422 Unprocessable Entity status if you attempt to add a repository to a team that is not owned by the organization.
Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
The permission to grant the team on this repository. Can be one of:
\n* pull - team members can pull, but not push to or administer this repository.
\n* push - team members can pull and push, but not administer this repository.
\n* admin - team members can pull, push and administer this repository.
If no permission is specified, the team's permission attribute will be used to determine what permission to grant the team on this repository.
curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/repos/octocat/hello-world"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /teams/{team_id}/repos/{owner}/{repo}', {\n team_id: 42,\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('DELETE /teams/{team_id}/repos/{owner}/{repo}', {\n team_id: 42,\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Remove a repository from a team (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) endpoint.\n\nIf the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team.",
"tags": [
"teams"
],
"operationId": "teams/remove-repo-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": null
},
"deprecated": true,
"slug": "remove-a-repository-from-a-team-legacy",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Remove a repository from a team endpoint.
\nIf the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team.
" }, { "verb": "get", "requestPath": "/teams/{team_id}/team-sync/group-mappings", "serverUrl": "https://api.github.com", "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/team-sync/group-mappings", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/team-sync/group-mappings"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}/team-sync/group-mappings', {\n team_id: 42\n})",
"html": "await octokit.request('GET /teams/{team_id}/team-sync/group-mappings', {\n team_id: 42\n})\n"
}
],
"summary": "List IdP groups for a team (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint.\n\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nList IdP groups connected to a team on GitHub.",
"tags": [
"teams"
],
"operationId": "teams/list-idp-groups-for-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team-legacy"
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": false,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": "team-sync"
},
"deprecated": true,
"slug": "list-idp-groups-for-a-team-legacy",
"category": "teams",
"categoryLabel": "Teams",
"subcategory": "team-sync",
"subcategoryLabel": "Team sync",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new List IdP groups for a team endpoint.
Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nList IdP groups connected to a team on GitHub.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"groups\": [\n {\n \"group_id\": \"123\",\n \"group_name\": \"Octocat admins\",\n \"group_description\": \"The people who configure your octoworld.\"\n },\n {\n \"group_id\": \"456\",\n \"group_name\": \"Octocat docs members\",\n \"group_description\": \"The people who make your octoworld come to life.\"\n }\n ]\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/teams/{team_id}/team-sync/group-mappings",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/team-sync/group-mappings \\\n -d '{\"groups\":[{\"group_id\":\"group_id\",\"group_name\":\"group_name\",\"group_description\":\"group_description\",\"id\":\"id\",\"name\":\"name\",\"description\":\"description\"}]}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/team-sync/group-mappings \\\n -d '{\"groups\":[{\"group_id\":\"group_id\",\"group_name\":\"group_name\",\"group_description\":\"group_description\",\"id\":\"id\",\"name\":\"name\",\"description\":\"description\"}]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /teams/{team_id}/team-sync/group-mappings', {\n team_id: 42,\n groups: [\n {\n group_id: 'group_id',\n group_name: 'group_name',\n group_description: 'group_description',\n id: 'id',\n name: 'name',\n description: 'description'\n }\n ]\n})",
"html": "await octokit.request('PATCH /teams/{team_id}/team-sync/group-mappings', {\n team_id: 42,\n groups: [\n {\n group_id: 'group_id',\n group_name: 'group_name',\n group_description: 'group_description',\n id: 'id',\n name: 'name',\n description: 'description'\n }\n ]\n})\n"
}
],
"summary": "Create or update IdP group connections (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint.\n\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nCreates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team.",
"tags": [
"teams"
],
"operationId": "teams/create-or-update-idp-group-connections-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections-legacy"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"groups": {
"type": "array of objects",
"description": "Required. The IdP groups you want to connect to a GitHub team. When updating, the new groups object will replace the original one. You must include any existing groups that you don't want to remove.
Required. ID of the IdP group.
", "name": "group_id", "in": "body", "rawType": "string", "rawDescription": "ID of the IdP group.", "childParamsGroups": [] }, "group_name": { "type": "string", "description": "Required. Name of the IdP group.
", "name": "group_name", "in": "body", "rawType": "string", "rawDescription": "Name of the IdP group.", "childParamsGroups": [] }, "group_description": { "type": "string", "description": "Required. Description of the IdP group.
", "name": "group_description", "in": "body", "rawType": "string", "rawDescription": "Description of the IdP group.", "childParamsGroups": [] }, "id": { "type": "string", "example": "\"caceab43fc9ffa20081c\"", "name": "id", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, "name": { "type": "string", "example": "\"external-team-6c13e7288ef7\"", "name": "name", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, "description": { "type": "string", "example": "\"moar cheese pleese\"", "name": "description", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } }, "required": [ "group_id", "group_name", "group_description" ] }, "name": "groups", "in": "body", "rawType": "array", "rawDescription": "The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove.", "childParamsGroups": [ { "parentName": "groups", "parentType": "items", "id": "groups-items", "params": [ { "type": "string", "description": "Required. ID of the IdP group.
", "name": "group_id", "in": "body", "rawType": "string", "rawDescription": "ID of the IdP group.", "childParamsGroups": [] }, { "type": "string", "description": "Required. Name of the IdP group.
", "name": "group_name", "in": "body", "rawType": "string", "rawDescription": "Name of the IdP group.", "childParamsGroups": [] }, { "type": "string", "description": "Required. Description of the IdP group.
", "name": "group_description", "in": "body", "rawType": "string", "rawDescription": "Description of the IdP group.", "childParamsGroups": [] }, { "type": "string", "example": "\"caceab43fc9ffa20081c\"", "name": "id", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, { "type": "string", "example": "\"external-team-6c13e7288ef7\"", "name": "name", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, { "type": "string", "example": "\"moar cheese pleese\"", "name": "description", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ] } ] }, "synced_at": { "type": "string", "example": "\"I am not a timestamp\"", "name": "synced_at", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } }, "required": [ "groups" ] }, "example": { "groups": [ { "group_id": "123", "group_name": "Octocat admins", "description": "The people who configure your octoworld.", "group_description": "string" } ] } } } }, "x-github": { "githubCloudOnly": true, "enabledForGitHubApps": false, "removalDate": "2021-02-01", "deprecationDate": "2020-01-21", "category": "teams", "subcategory": "team-sync" }, "deprecated": true, "slug": "create-or-update-idp-group-connections-legacy", "category": "teams", "categoryLabel": "Teams", "subcategory": "team-sync", "subcategoryLabel": "Team sync", "contentType": "application/json", "notes": [], "descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Create or update IdP group connections endpoint.
Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nCreates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty groups array will remove all connections for a team.
{\n \"groups\": [\n {\n \"group_id\": \"123\",\n \"group_name\": \"Octocat admins\",\n \"group_description\": \"The people who configure your octoworld.\"\n }\n ]\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [
{
"type": "array of objects",
"description": "Required. The IdP groups you want to connect to a GitHub team. When updating, the new groups object will replace the original one. You must include any existing groups that you don't want to remove.
Required. ID of the IdP group.
", "name": "group_id", "in": "body", "rawType": "string", "rawDescription": "ID of the IdP group.", "childParamsGroups": [] }, "group_name": { "type": "string", "description": "Required. Name of the IdP group.
", "name": "group_name", "in": "body", "rawType": "string", "rawDescription": "Name of the IdP group.", "childParamsGroups": [] }, "group_description": { "type": "string", "description": "Required. Description of the IdP group.
", "name": "group_description", "in": "body", "rawType": "string", "rawDescription": "Description of the IdP group.", "childParamsGroups": [] }, "id": { "type": "string", "example": "\"caceab43fc9ffa20081c\"", "name": "id", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, "name": { "type": "string", "example": "\"external-team-6c13e7288ef7\"", "name": "name", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, "description": { "type": "string", "example": "\"moar cheese pleese\"", "name": "description", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } }, "required": [ "group_id", "group_name", "group_description" ] }, "name": "groups", "in": "body", "rawType": "array", "rawDescription": "The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove.", "childParamsGroups": [ { "parentName": "groups", "parentType": "items", "id": "groups-items", "params": [ { "type": "string", "description": "Required. ID of the IdP group.
", "name": "group_id", "in": "body", "rawType": "string", "rawDescription": "ID of the IdP group.", "childParamsGroups": [] }, { "type": "string", "description": "Required. Name of the IdP group.
", "name": "group_name", "in": "body", "rawType": "string", "rawDescription": "Name of the IdP group.", "childParamsGroups": [] }, { "type": "string", "description": "Required. Description of the IdP group.
", "name": "group_description", "in": "body", "rawType": "string", "rawDescription": "Description of the IdP group.", "childParamsGroups": [] }, { "type": "string", "example": "\"caceab43fc9ffa20081c\"", "name": "id", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, { "type": "string", "example": "\"external-team-6c13e7288ef7\"", "name": "name", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] }, { "type": "string", "example": "\"moar cheese pleese\"", "name": "description", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ] } ] }, { "type": "string", "example": "\"I am not a timestamp\"", "name": "synced_at", "in": "body", "rawType": "string", "description": "", "childParamsGroups": [] } ] }, { "verb": "get", "requestPath": "/teams/{team_id}/teams", "serverUrl": "https://api.github.com", "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/teams", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/teams"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /teams/{team_id}/teams', {\n team_id: 42\n})",
"html": "await octokit.request('GET /teams/{team_id}/teams', {\n team_id: 42\n})\n"
}
],
"summary": "List child teams (Legacy)",
"description": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint.",
"tags": [
"teams"
],
"operationId": "teams/list-child-legacy",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#list-child-teams-legacy"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"removalDate": "2021-02-01",
"deprecationDate": "2020-01-21",
"category": "teams",
"subcategory": null
},
"deprecated": true,
"slug": "list-child-teams-legacy",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new List child teams endpoint.
[\n {\n \"id\": 2,\n \"node_id\": \"MDQ6VGVhbTI=\",\n \"url\": \"https://api.github.com/teams/2\",\n \"name\": \"Original Roster\",\n \"slug\": \"original-roster\",\n \"description\": \"Started it all.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/2/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/2/repos\",\n \"parent\": {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n },\n \"html_url\": \"https://github.com/orgs/rails/teams/core\"\n }\n]\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/user",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user')",
"html": "await octokit.request('GET /user')\n"
}
],
"summary": "Get the authenticated user",
"description": "If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information.\n\nIf the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information.",
"tags": [
"users"
],
"operationId": "users/get-authenticated",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#get-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": null
},
"slug": "get-the-authenticated-user",
"category": "users",
"categoryLabel": "Users",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "If the authenticated user is authenticated through basic authentication or OAuth with the user scope, then the response lists public and private profile information.
If the authenticated user is authenticated through OAuth without the user scope, then the response lists only public profile information.
{\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false,\n \"name\": \"monalisa octocat\",\n \"company\": \"GitHub\",\n \"blog\": \"https://github.com/blog\",\n \"location\": \"San Francisco\",\n \"email\": \"octocat@github.com\",\n \"hireable\": false,\n \"bio\": \"There once was...\",\n \"twitter_username\": \"monatheoctocat\",\n \"public_repos\": 2,\n \"public_gists\": 1,\n \"followers\": 20,\n \"following\": 0,\n \"created_at\": \"2008-01-14T04:33:35Z\",\n \"updated_at\": \"2008-01-14T04:33:35Z\",\n \"private_gists\": 81,\n \"total_private_repos\": 100,\n \"owned_private_repos\": 100,\n \"disk_usage\": 10000,\n \"collaborators\": 8,\n \"two_factor_authentication\": true,\n \"plan\": {\n \"name\": \"Medium\",\n \"space\": 400,\n \"private_repos\": 20,\n \"collaborators\": 0\n }\n}\n"
},
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response with public profile information",
"payload": "{\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false,\n \"name\": \"monalisa octocat\",\n \"company\": \"GitHub\",\n \"blog\": \"https://github.com/blog\",\n \"location\": \"San Francisco\",\n \"email\": \"octocat@github.com\",\n \"hireable\": false,\n \"bio\": \"There once was...\",\n \"twitter_username\": \"monatheoctocat\",\n \"public_repos\": 2,\n \"public_gists\": 1,\n \"followers\": 20,\n \"following\": 0,\n \"created_at\": \"2008-01-14T04:33:35Z\",\n \"updated_at\": \"2008-01-14T04:33:35Z\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "patch",
"requestPath": "/user",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user \\\n -d '{\"name\":\"name\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /user', {\n name: 'name'\n})",
"html": "await octokit.request('PATCH /user', {\n name: 'name'\n})\n"
}
],
"summary": "Update the authenticated user",
"description": "**Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API.",
"tags": [
"users"
],
"operationId": "users/update-authenticated",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users/#update-the-authenticated-user"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"description": "The new name of the user.
", "type": "string", "example": "Omar Jahandar", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The new name of the user.", "childParamsGroups": [] }, "email": { "description": "The publicly visible email address of the user.
", "type": "string", "example": "omar@example.com", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The publicly visible email address of the user.", "childParamsGroups": [] }, "blog": { "description": "The new blog URL of the user.
", "type": "string", "example": "blog.example.com", "name": "blog", "in": "body", "rawType": "string", "rawDescription": "The new blog URL of the user.", "childParamsGroups": [] }, "twitter_username": { "description": "The new Twitter username of the user.
", "type": "string or nullable", "example": "therealomarj", "nullable": true, "name": "twitter_username", "in": "body", "rawType": "string", "rawDescription": "The new Twitter username of the user.", "childParamsGroups": [] }, "company": { "description": "The new company of the user.
", "type": "string", "example": "Acme corporation", "name": "company", "in": "body", "rawType": "string", "rawDescription": "The new company of the user.", "childParamsGroups": [] }, "location": { "description": "The new location of the user.
", "type": "string", "example": "Berlin, Germany", "name": "location", "in": "body", "rawType": "string", "rawDescription": "The new location of the user.", "childParamsGroups": [] }, "hireable": { "description": "The new hiring availability of the user.
", "type": "boolean", "name": "hireable", "in": "body", "rawType": "boolean", "rawDescription": "The new hiring availability of the user.", "childParamsGroups": [] }, "bio": { "description": "The new short biography of the user.
", "type": "string", "name": "bio", "in": "body", "rawType": "string", "rawDescription": "The new short biography of the user.", "childParamsGroups": [] } } } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "users", "subcategory": null }, "slug": "update-the-authenticated-user", "category": "users", "categoryLabel": "Users", "contentType": "application/json", "notes": [], "descriptionHTML": "Note: If your email is set to private and you send an email parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API.
The new name of the user.
", "type": "string", "example": "Omar Jahandar", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The new name of the user.", "childParamsGroups": [] }, { "description": "The publicly visible email address of the user.
", "type": "string", "example": "omar@example.com", "name": "email", "in": "body", "rawType": "string", "rawDescription": "The publicly visible email address of the user.", "childParamsGroups": [] }, { "description": "The new blog URL of the user.
", "type": "string", "example": "blog.example.com", "name": "blog", "in": "body", "rawType": "string", "rawDescription": "The new blog URL of the user.", "childParamsGroups": [] }, { "description": "The new Twitter username of the user.
", "type": "string or nullable", "example": "therealomarj", "nullable": true, "name": "twitter_username", "in": "body", "rawType": "string", "rawDescription": "The new Twitter username of the user.", "childParamsGroups": [] }, { "description": "The new company of the user.
", "type": "string", "example": "Acme corporation", "name": "company", "in": "body", "rawType": "string", "rawDescription": "The new company of the user.", "childParamsGroups": [] }, { "description": "The new location of the user.
", "type": "string", "example": "Berlin, Germany", "name": "location", "in": "body", "rawType": "string", "rawDescription": "The new location of the user.", "childParamsGroups": [] }, { "description": "The new hiring availability of the user.
", "type": "boolean", "name": "hireable", "in": "body", "rawType": "boolean", "rawDescription": "The new hiring availability of the user.", "childParamsGroups": [] }, { "description": "The new short biography of the user.
", "type": "string", "name": "bio", "in": "body", "rawType": "string", "rawDescription": "The new short biography of the user.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false,\n \"name\": \"monalisa octocat\",\n \"company\": \"GitHub\",\n \"blog\": \"https://github.com/blog\",\n \"location\": \"San Francisco\",\n \"email\": \"octocat@github.com\",\n \"hireable\": false,\n \"bio\": \"There once was...\",\n \"twitter_username\": \"monatheoctocat\",\n \"public_repos\": 2,\n \"public_gists\": 1,\n \"followers\": 20,\n \"following\": 0,\n \"created_at\": \"2008-01-14T04:33:35Z\",\n \"updated_at\": \"2008-01-14T04:33:35Z\",\n \"private_gists\": 81,\n \"total_private_repos\": 100,\n \"owned_private_repos\": 100,\n \"disk_usage\": 10000,\n \"collaborators\": 8,\n \"two_factor_authentication\": true,\n \"plan\": {\n \"name\": \"Medium\",\n \"space\": 400,\n \"private_repos\": 20,\n \"collaborators\": 0\n }\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/user/blocks",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/blocks",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/blocks"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/blocks')",
"html": "await octokit.request('GET /user/blocks')\n"
}
],
"summary": "List users blocked by the authenticated user",
"description": "List the users you've blocked on your personal account.",
"tags": [
"users"
],
"operationId": "users/list-blocked-by-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "blocking"
},
"slug": "list-users-blocked-by-the-authenticated-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "blocking",
"subcategoryLabel": "Blocking",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List the users you've blocked on your personal account.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "415",
"httpStatusMessage": "Unsupported Media Type",
"description": "Preview header missing"
}
]
},
{
"verb": "get",
"requestPath": "/user/blocks/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/blocks/USERNAME",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/blocks/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/blocks/{username}', {\n username: 'username'\n})",
"html": "await octokit.request('GET /user/blocks/{username}', {\n username: 'username'\n})\n"
}
],
"summary": "Check if a user is blocked by the authenticated user",
"description": "",
"tags": [
"users"
],
"operationId": "users/check-blocked",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "blocking"
},
"slug": "check-if-a-user-is-blocked-by-the-authenticated-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "blocking",
"subcategoryLabel": "Blocking",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "If the user is blocked:"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "If the user is not blocked:"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "put",
"requestPath": "/user/blocks/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/blocks/USERNAME",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/blocks/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /user/blocks/{username}', {\n username: 'username'\n})",
"html": "await octokit.request('PUT /user/blocks/{username}', {\n username: 'username'\n})\n"
}
],
"summary": "Block a user",
"description": "",
"tags": [
"users"
],
"operationId": "users/block",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#block-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "blocking"
},
"slug": "block-a-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "blocking",
"subcategoryLabel": "Blocking",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "delete",
"requestPath": "/user/blocks/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/blocks/USERNAME",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/blocks/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /user/blocks/{username}', {\n username: 'username'\n})",
"html": "await octokit.request('DELETE /user/blocks/{username}', {\n username: 'username'\n})\n"
}
],
"summary": "Unblock a user",
"description": "",
"tags": [
"users"
],
"operationId": "users/unblock",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#unblock-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "blocking"
},
"slug": "unblock-a-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "blocking",
"subcategoryLabel": "Blocking",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "patch",
"requestPath": "/user/email/visibility",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/email/visibility \\\n -d '{\"visibility\":\"visibility\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/email/visibility \\\n -d '{\"visibility\":\"visibility\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /user/email/visibility', {\n visibility: 'visibility'\n})",
"html": "await octokit.request('PATCH /user/email/visibility', {\n visibility: 'visibility'\n})\n"
}
],
"summary": "Set primary email visibility for the authenticated user",
"description": "Sets the visibility for your primary email addresses.",
"tags": [
"users"
],
"operationId": "users/set-primary-email-visibility-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"visibility": {
"description": "Required. Denotes whether an email is publicly visible.
", "type": "string", "enum": [ "public", "private" ], "name": "visibility", "in": "body", "rawType": "string", "rawDescription": "Denotes whether an email is publicly visible.", "childParamsGroups": [] } }, "required": [ "visibility" ], "type": "object" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "users", "subcategory": "emails" }, "slug": "set-primary-email-visibility-for-the-authenticated-user", "category": "users", "categoryLabel": "Users", "subcategory": "emails", "subcategoryLabel": "Emails", "contentType": "application/json", "notes": [], "descriptionHTML": "Sets the visibility for your primary email addresses.
", "bodyParameters": [ { "description": "Required. Denotes whether an email is publicly visible.
", "type": "string", "enum": [ "public", "private" ], "name": "visibility", "in": "body", "rawType": "string", "rawDescription": "Denotes whether an email is publicly visible.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"email\": \"octocat@github.com\",\n \"primary\": true,\n \"verified\": true,\n \"visibility\": \"private\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/user/emails",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/emails", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/emails"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/emails')",
"html": "await octokit.request('GET /user/emails')\n"
}
],
"summary": "List email addresses for the authenticated user",
"description": "Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope.",
"tags": [
"users"
],
"operationId": "users/list-emails-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "emails"
},
"slug": "list-email-addresses-for-the-authenticated-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "emails",
"subcategoryLabel": "Emails",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the user:email scope.
[\n {\n \"email\": \"octocat@github.com\",\n \"verified\": true,\n \"primary\": true,\n \"visibility\": \"public\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/user/emails",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/emails",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/emails"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /user/emails')",
"html": "await octokit.request('POST /user/emails')\n"
}
],
"summary": "Add an email address for the authenticated user",
"description": "This endpoint is accessible with the `user` scope.",
"tags": [
"users"
],
"operationId": "users/add-email-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user"
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"emails": {
"description": "Required. Adds one or more email addresses to your GitHub account. Must contain at least one email address. Note: Alternatively, you can pass a single email address or an array of emails addresses directly, but we recommend that you pass an object using the emails key.
This endpoint is accessible with the user scope.
Required. Adds one or more email addresses to your GitHub account. Must contain at least one email address. Note: Alternatively, you can pass a single email address or an array of emails addresses directly, but we recommend that you pass an object using the emails key.
[\n {\n \"email\": \"octocat@octocat.org\",\n \"primary\": false,\n \"verified\": false,\n \"visibility\": \"public\"\n },\n {\n \"email\": \"octocat@github.com\",\n \"primary\": false,\n \"verified\": false,\n \"visibility\": null\n },\n {\n \"email\": \"mona@github.com\",\n \"primary\": false,\n \"verified\": false,\n \"visibility\": null\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/user/emails",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/emails",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/emails"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /user/emails')",
"html": "await octokit.request('DELETE /user/emails')\n"
}
],
"summary": "Delete an email address for the authenticated user",
"description": "This endpoint is accessible with the `user` scope.",
"tags": [
"users"
],
"operationId": "users/delete-email-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user"
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"description": "Deletes one or more email addresses from your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key.",
"properties": {
"emails": {
"description": "Required. Email addresses associated with the GitHub user account.
", "type": "array of strings", "items": { "type": "string", "example": "username@example.com", "minItems": 1 }, "name": "emails", "in": "body", "rawType": "array", "rawDescription": "Email addresses associated with the GitHub user account.", "childParamsGroups": [] } }, "example": { "emails": [ "octocat@github.com", "mona@github.com" ] }, "required": [ "emails" ] }, { "type": "array", "items": { "type": "string", "example": "username@example.com", "minItems": 1 } }, { "type": "string" } ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "users", "subcategory": "emails" }, "slug": "delete-an-email-address-for-the-authenticated-user", "category": "users", "categoryLabel": "Users", "subcategory": "emails", "subcategoryLabel": "Emails", "contentType": "application/json", "notes": [], "responses": [ { "httpStatusCode": "204", "httpStatusMessage": "No Content", "description": "Response" }, { "httpStatusCode": "304", "httpStatusMessage": "Not Modified", "description": "Not modified" }, { "httpStatusCode": "401", "httpStatusMessage": "Unauthorized", "description": "Requires authentication" }, { "httpStatusCode": "403", "httpStatusMessage": "Forbidden", "description": "Forbidden" }, { "httpStatusCode": "404", "httpStatusMessage": "Not Found", "description": "Resource not found" }, { "httpStatusCode": "422", "httpStatusMessage": "Unprocessable Entity", "description": "Validation failed" } ], "descriptionHTML": "This endpoint is accessible with the user scope.
Required. Email addresses associated with the GitHub user account.
", "type": "array of strings", "items": { "type": "string", "example": "username@example.com", "minItems": 1 }, "name": "emails", "in": "body", "rawType": "array", "rawDescription": "Email addresses associated with the GitHub user account.", "childParamsGroups": [] } ] }, { "verb": "get", "requestPath": "/user/followers", "serverUrl": "https://api.github.com", "parameters": [ { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/followers", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/followers"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/followers')",
"html": "await octokit.request('GET /user/followers')\n"
}
],
"summary": "List followers of the authenticated user",
"description": "Lists the people following the authenticated user.",
"tags": [
"users"
],
"operationId": "users/list-followers-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "followers"
},
"slug": "list-followers-of-the-authenticated-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "followers",
"subcategoryLabel": "Followers",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the people following the authenticated user.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "get",
"requestPath": "/user/following",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/following", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/following"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/following')",
"html": "await octokit.request('GET /user/following')\n"
}
],
"summary": "List the people the authenticated user follows",
"description": "Lists the people who the authenticated user follows.",
"tags": [
"users"
],
"operationId": "users/list-followed-by-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "followers"
},
"slug": "list-the-people-the-authenticated-user-follows",
"category": "users",
"categoryLabel": "Users",
"subcategory": "followers",
"subcategoryLabel": "Followers",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the people who the authenticated user follows.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "get",
"requestPath": "/user/following/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/following/USERNAME",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/following/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/following/{username}', {\n username: 'username'\n})",
"html": "await octokit.request('GET /user/following/{username}', {\n username: 'username'\n})\n"
}
],
"summary": "Check if a person is followed by the authenticated user",
"description": "",
"tags": [
"users"
],
"operationId": "users/check-person-is-followed-by-authenticated",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "followers"
},
"slug": "check-if-a-person-is-followed-by-the-authenticated-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "followers",
"subcategoryLabel": "Followers",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "if the person is followed by the authenticated user"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "if the person is not followed by the authenticated user"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "put",
"requestPath": "/user/following/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/following/USERNAME",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/following/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /user/following/{username}', {\n username: 'username'\n})",
"html": "await octokit.request('PUT /user/following/{username}', {\n username: 'username'\n})\n"
}
],
"summary": "Follow a user",
"description": "Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"\n\nFollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope.",
"tags": [
"users"
],
"operationId": "users/follow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#follow-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "followers"
},
"slug": "follow-a-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "followers",
"subcategoryLabel": "Followers",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Note that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the user:follow scope.
curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/following/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /user/following/{username}', {\n username: 'username'\n})",
"html": "await octokit.request('DELETE /user/following/{username}', {\n username: 'username'\n})\n"
}
],
"summary": "Unfollow a user",
"description": "Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope.",
"tags": [
"users"
],
"operationId": "users/unfollow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#unfollow-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "followers"
},
"slug": "unfollow-a-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "followers",
"subcategoryLabel": "Followers",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the user:follow scope.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/gpg_keys')",
"html": "await octokit.request('GET /user/gpg_keys')\n"
}
],
"summary": "List GPG keys for the authenticated user",
"description": "Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"users"
],
"operationId": "users/list-gpg-keys-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "gpg-keys"
},
"slug": "list-gpg-keys-for-the-authenticated-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "gpg-keys",
"subcategoryLabel": "Gpg keys",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least read:gpg_key scope.
[\n {\n \"id\": 3,\n \"primary_key_id\": 2,\n \"key_id\": \"3262EFF25BA0D270\",\n \"public_key\": \"xsBNBFayYZ...\",\n \"emails\": [\n {\n \"email\": \"mastahyeti@users.noreply.github.com\",\n \"verified\": true\n }\n ],\n \"subkeys\": [\n {\n \"id\": 4,\n \"primary_key_id\": 3,\n \"key_id\": \"4A595D4C72EE49C7\",\n \"public_key\": \"zsBNBFayYZ...\",\n \"emails\": [],\n \"subkeys\": [],\n \"can_sign\": false,\n \"can_encrypt_comms\": true,\n \"can_encrypt_storage\": true,\n \"can_certify\": false,\n \"created_at\": \"2016-03-24T11:31:04-06:00\",\n \"expires_at\": \"2016-03-24T11:31:04-07:00\"\n }\n ],\n \"can_sign\": true,\n \"can_encrypt_comms\": false,\n \"can_encrypt_storage\": false,\n \"can_certify\": true,\n \"created_at\": \"2016-03-24T11:31:04-06:00\",\n \"expires_at\": \"2016-03-24T11:31:04-07:00\",\n \"raw_key\": \"string\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/user/gpg_keys",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys \\\n -d '{\"armored_public_key\":\"armored_public_key\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys \\\n -d '{\"armored_public_key\":\"armored_public_key\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /user/gpg_keys', {\n armored_public_key: 'armored_public_key'\n})",
"html": "await octokit.request('POST /user/gpg_keys', {\n armored_public_key: 'armored_public_key'\n})\n"
}
],
"summary": "Create a GPG key for the authenticated user",
"description": "Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"operationId": "users/create-gpg-key-for-authenticated-user",
"tags": [
"users"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"armored_public_key": {
"description": "Required. A GPG key in ASCII-armored format.
", "type": "string", "name": "armored_public_key", "in": "body", "rawType": "string", "rawDescription": "A GPG key in ASCII-armored format.", "childParamsGroups": [] } }, "type": "object", "required": [ "armored_public_key" ] } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "users", "subcategory": "gpg-keys" }, "slug": "create-a-gpg-key-for-the-authenticated-user", "category": "users", "categoryLabel": "Users", "subcategory": "gpg-keys", "subcategoryLabel": "Gpg keys", "contentType": "application/json", "notes": [], "descriptionHTML": "Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least write:gpg_key scope.
Required. A GPG key in ASCII-armored format.
", "type": "string", "name": "armored_public_key", "in": "body", "rawType": "string", "rawDescription": "A GPG key in ASCII-armored format.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 3,\n \"primary_key_id\": 2,\n \"key_id\": \"3262EFF25BA0D270\",\n \"public_key\": \"xsBNBFayYZ...\",\n \"emails\": [\n {\n \"email\": \"mastahyeti@users.noreply.github.com\",\n \"verified\": true\n }\n ],\n \"subkeys\": [\n {\n \"id\": 4,\n \"primary_key_id\": 3,\n \"key_id\": \"4A595D4C72EE49C7\",\n \"public_key\": \"zsBNBFayYZ...\",\n \"emails\": [],\n \"subkeys\": [],\n \"can_sign\": false,\n \"can_encrypt_comms\": true,\n \"can_encrypt_storage\": true,\n \"can_certify\": false,\n \"created_at\": \"2016-03-24T11:31:04-06:00\",\n \"expires_at\": \"2016-03-24T11:31:04-07:00\"\n }\n ],\n \"can_sign\": true,\n \"can_encrypt_comms\": false,\n \"can_encrypt_storage\": false,\n \"can_certify\": true,\n \"created_at\": \"2016-03-24T11:31:04-06:00\",\n \"expires_at\": \"2016-03-24T11:31:04-07:00\",\n \"raw_key\": \"\\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\nVersion: GnuPG v2\\\\n\\\\nmQENBFayYZ0BCAC4hScoJXXpyR+MXGcrBxElqw3FzCVvkViuyeko+Jp76QJhg8kr\\\\nucRTxbnOoHfda/FmilEa/wxf9ch5/PSrrL26FxEoPHhJolp8fnIDLQeITn94NYdB\\\\nZtnnEKslpPrG97qSUWIchvyqCPtvOb8+8fWvGx9K/ZWcEEdh1X8+WFR2jMENMeoX\\\\nwxHWQoPnS7LpX/85/M7VUcJxvDVfv+eHsnQupmE5bGarKNih0oMe3LbdN3qA5PTz\\\\nSCm6Iudar1VsQ+xTz08ymL7t4pnEtLguQ7EyatFHCjxNblv5RzxoL0tDgN3HqoDz\\\\nc7TEA+q4RtDQl9amcvQ95emnXmZ974u7UkYdABEBAAG0HlNvbWUgVXNlciA8c29t\\\\nZXVzZXJAZ21haWwuY29tPokBOAQTAQIAIgUCVrJhnQIbAwYLCQgHAwIGFQgCCQoL\\\\nBBYCAwECHgECF4AACgkQMmLv8lug0nAViQgArWjI55+7p48URr2z9Jvak+yrBTx1\\\\nzkufltQAnHTJkq+Kl9dySSmTnOop8o3rE4++IOpYV5Y36PkKf9EZMk4n1RQiDPKE\\\\nAFtRVTkRaoWzOir9KQXJPfhKrl01j/QzY+utfiMvUoBJZ9ybq8Pa885SljW9lbaX\\\\nIYw+hl8ZdJ2KStvGrEyfQvRyq3aN5c9TV//4BdGnwx7Qabq/U+G18lizG6f/yq15\\\\ned7t0KELaCfeKPvytp4VE9/z/Ksah/h3+Qilx07/oG2Ae5kC1bEC9coD/ogPUhbv\\\\nb2bsBIoY9E9YwsLoif2lU+o1t76zLgUktuNscRRUKobW028H1zuFS/XQhrkBDQRW\\\\nsmGdAQgApnyyv3i144OLYy0O4UKQxd3e10Y3WpDwfnGIBefAI1m7RxnUxBag/DsU\\\\n7gi9qLEC4VHSfq4eiNfr1LJOyCL2edTgCWFgBhVjbXjZe6YAOrAnhxwCErnN0Y7N\\\\n6s8wVh9fObSOyf8ZE6G7JeKpcq9Q6gd/KxagfD48a1v+fyRHpyQc6J9pUEmtrDJ7\\\\nBjmsd2VWzLBvNWdHyxDNtZweIaqIO9VUYYpr1mtTliNBOZLUelmgrt7HBRcJpWMA\\\\nS8muVVbuP5MK0trLBq/JB8qUH3zRzB/PhMgzmkIfjEK1VYDWm4E8DYyTWEJcHqkb\\\\neqFsNjrIlwPaA122BWC6gUOPwwH+oQARAQABiQEfBBgBAgAJBQJWsmGdAhsMAAoJ\\\\nEDJi7/JboNJwAyAIALd4xcdmGbZD98gScJzqwzkOMcO8zFHqHNvJ42xIFvGny7c0\\\\n1Rx7iyrdypOby5AxE+viQcjG4rpLZW/xKYBNGrCfDyQO7511I0v8x20EICMlMfD/\\\\nNrWQCzesEPcUlKTP07d+sFyP8AyseOidbzY/92CpskTgdSBjY/ntLSaoknl/fjJE\\\\nQM8OkPqU7IraO1Jzzdnm20d5PZL9+PIwIWdSTedU/vBMTJyNcoqvSfKf1wNC66XP\\\\nhqfYgXJE564AdWZKA3C0IyCqiv+LHwxLnUHio1a4/r91C8KPzxs6tGxRDjXLd7ms\\\\nuYFGWymiUGOE/giHlcxdYcHzwLnPDliMQOLiTkK5AQ0EVuxMygEIAOD+bW1cDTmE\\\\nBxh5JECoqeHuwgl6DlLhnubWPkQ4ZeRzBRAsFcEJQlwlJjrzFDicL+lnm6Qq4tt0\\\\n560TwHdf15/AKTZIZu7H25axvGNzgeaUkJEJdYAq9zTKWwX7wKyzBszi485nQg97\\\\nMfAqwhMpDW0Qqf8+7Ug+WEmfBSGv9uL3aQC6WEeIsHfri0n0n8v4XgwhfShXguxO\\\\nCsOztEsuW7WWKW9P4TngKKv4lCHdPlV6FwxeMzODBJvc2fkHVHnqc0PqszJ5xcF8\\\\n6gZCpMM027SbpeYWCAD5zwJyYP9ntfO1p2HjnQ1dZaP9FeNcO7uIV1Lnd1eGCu6I\\\\nsrVp5k1f3isAEQEAAYkCPgQYAQIACQUCVuxMygIbAgEpCRAyYu/yW6DScMBdIAQZ\\\\nAQIABgUCVuxMygAKCRCKohN4dhq2b4tcCACHxmOHVXNpu47OvUGYQydLgMACUlXN\\\\nlj+HfE0VReqShxdDmpasAY9IRpuMB2RsGK8GbNP+4SlOlAiPf5SMhS7nZNkNDgQQ\\\\naZ3HFpgrFmFwmE10BKT4iQtoxELLM57z0qGOAfTsEjWFQa4sF+6IHAQR/ptkdkkI\\\\nBUEXiMnAwVwBysLIJiLO8qdjB6qp52QkT074JVrwywT/P+DkMfC2k4r/AfEbf6eF\\\\ndmPDuPk6KD87+hJZsSa5MaMUBQVvRO/mgEkhJRITVu58eWGaBOcQJ8gqurhCqM5P\\\\nDfUA4TJ7wiqM6sS764vV1rOioTTXkszzhClQqET7hPVnVQjenYgv0EZHNyQH/1f1\\\\n/CYqvV1vFjM9vJjMbxXsATCkZe6wvBVKD8vLsJAr8N+onKQz+4OPc3kmKq7aESu3\\\\nCi/iuie5KKVwnuNhr9AzT61vEkKxwHcVFEvHB77F6ZAAInhRvjzmQbD2dlPLLQCC\\\\nqDj71ODSSAPTEmUy6969bgD9PfWei7kNkBIx7s3eBv8yzytSc2EcuUgopqFazquw\\\\nFs1+tqGHjBvQfTo6bqbJjp/9Ci2pvde3ElV2rAgUlb3lqXyXjRDqrXosh5GcRPQj\\\\nK8Nhj1BNhnrCVskE4BP0LYbOHuzgm86uXwGCFsY+w2VOsSm16Jx5GHyG5S5WU3+D\\\\nIts/HFYRLiFgDLmTlxo=\\\\n=+OzK\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\"\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/user/gpg_keys/{gpg_key_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "gpg_key_id",
"description": "gpg_key_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "gpg_key_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/gpg_keys/{gpg_key_id}', {\n gpg_key_id: 42\n})",
"html": "await octokit.request('GET /user/gpg_keys/{gpg_key_id}', {\n gpg_key_id: 42\n})\n"
}
],
"summary": "Get a GPG key for the authenticated user",
"description": "View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"users"
],
"operationId": "users/get-gpg-key-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "gpg-keys"
},
"slug": "get-a-gpg-key-for-the-authenticated-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "gpg-keys",
"subcategoryLabel": "Gpg keys",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least read:gpg_key scope.
{\n \"id\": 3,\n \"primary_key_id\": 2,\n \"key_id\": \"3262EFF25BA0D270\",\n \"public_key\": \"xsBNBFayYZ...\",\n \"emails\": [\n {\n \"email\": \"mastahyeti@users.noreply.github.com\",\n \"verified\": true\n }\n ],\n \"subkeys\": [\n {\n \"id\": 4,\n \"primary_key_id\": 3,\n \"key_id\": \"4A595D4C72EE49C7\",\n \"public_key\": \"zsBNBFayYZ...\",\n \"emails\": [],\n \"subkeys\": [],\n \"can_sign\": false,\n \"can_encrypt_comms\": true,\n \"can_encrypt_storage\": true,\n \"can_certify\": false,\n \"created_at\": \"2016-03-24T11:31:04-06:00\",\n \"expires_at\": \"2016-03-24T11:31:04-07:00\"\n }\n ],\n \"can_sign\": true,\n \"can_encrypt_comms\": false,\n \"can_encrypt_storage\": false,\n \"can_certify\": true,\n \"created_at\": \"2016-03-24T11:31:04-06:00\",\n \"expires_at\": \"2016-03-24T11:31:04-07:00\",\n \"raw_key\": \"\\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\nVersion: GnuPG v2\\\\n\\\\nmQENBFayYZ0BCAC4hScoJXXpyR+MXGcrBxElqw3FzCVvkViuyeko+Jp76QJhg8kr\\\\nucRTxbnOoHfda/FmilEa/wxf9ch5/PSrrL26FxEoPHhJolp8fnIDLQeITn94NYdB\\\\nZtnnEKslpPrG97qSUWIchvyqCPtvOb8+8fWvGx9K/ZWcEEdh1X8+WFR2jMENMeoX\\\\nwxHWQoPnS7LpX/85/M7VUcJxvDVfv+eHsnQupmE5bGarKNih0oMe3LbdN3qA5PTz\\\\nSCm6Iudar1VsQ+xTz08ymL7t4pnEtLguQ7EyatFHCjxNblv5RzxoL0tDgN3HqoDz\\\\nc7TEA+q4RtDQl9amcvQ95emnXmZ974u7UkYdABEBAAG0HlNvbWUgVXNlciA8c29t\\\\nZXVzZXJAZ21haWwuY29tPokBOAQTAQIAIgUCVrJhnQIbAwYLCQgHAwIGFQgCCQoL\\\\nBBYCAwECHgECF4AACgkQMmLv8lug0nAViQgArWjI55+7p48URr2z9Jvak+yrBTx1\\\\nzkufltQAnHTJkq+Kl9dySSmTnOop8o3rE4++IOpYV5Y36PkKf9EZMk4n1RQiDPKE\\\\nAFtRVTkRaoWzOir9KQXJPfhKrl01j/QzY+utfiMvUoBJZ9ybq8Pa885SljW9lbaX\\\\nIYw+hl8ZdJ2KStvGrEyfQvRyq3aN5c9TV//4BdGnwx7Qabq/U+G18lizG6f/yq15\\\\ned7t0KELaCfeKPvytp4VE9/z/Ksah/h3+Qilx07/oG2Ae5kC1bEC9coD/ogPUhbv\\\\nb2bsBIoY9E9YwsLoif2lU+o1t76zLgUktuNscRRUKobW028H1zuFS/XQhrkBDQRW\\\\nsmGdAQgApnyyv3i144OLYy0O4UKQxd3e10Y3WpDwfnGIBefAI1m7RxnUxBag/DsU\\\\n7gi9qLEC4VHSfq4eiNfr1LJOyCL2edTgCWFgBhVjbXjZe6YAOrAnhxwCErnN0Y7N\\\\n6s8wVh9fObSOyf8ZE6G7JeKpcq9Q6gd/KxagfD48a1v+fyRHpyQc6J9pUEmtrDJ7\\\\nBjmsd2VWzLBvNWdHyxDNtZweIaqIO9VUYYpr1mtTliNBOZLUelmgrt7HBRcJpWMA\\\\nS8muVVbuP5MK0trLBq/JB8qUH3zRzB/PhMgzmkIfjEK1VYDWm4E8DYyTWEJcHqkb\\\\neqFsNjrIlwPaA122BWC6gUOPwwH+oQARAQABiQEfBBgBAgAJBQJWsmGdAhsMAAoJ\\\\nEDJi7/JboNJwAyAIALd4xcdmGbZD98gScJzqwzkOMcO8zFHqHNvJ42xIFvGny7c0\\\\n1Rx7iyrdypOby5AxE+viQcjG4rpLZW/xKYBNGrCfDyQO7511I0v8x20EICMlMfD/\\\\nNrWQCzesEPcUlKTP07d+sFyP8AyseOidbzY/92CpskTgdSBjY/ntLSaoknl/fjJE\\\\nQM8OkPqU7IraO1Jzzdnm20d5PZL9+PIwIWdSTedU/vBMTJyNcoqvSfKf1wNC66XP\\\\nhqfYgXJE564AdWZKA3C0IyCqiv+LHwxLnUHio1a4/r91C8KPzxs6tGxRDjXLd7ms\\\\nuYFGWymiUGOE/giHlcxdYcHzwLnPDliMQOLiTkK5AQ0EVuxMygEIAOD+bW1cDTmE\\\\nBxh5JECoqeHuwgl6DlLhnubWPkQ4ZeRzBRAsFcEJQlwlJjrzFDicL+lnm6Qq4tt0\\\\n560TwHdf15/AKTZIZu7H25axvGNzgeaUkJEJdYAq9zTKWwX7wKyzBszi485nQg97\\\\nMfAqwhMpDW0Qqf8+7Ug+WEmfBSGv9uL3aQC6WEeIsHfri0n0n8v4XgwhfShXguxO\\\\nCsOztEsuW7WWKW9P4TngKKv4lCHdPlV6FwxeMzODBJvc2fkHVHnqc0PqszJ5xcF8\\\\n6gZCpMM027SbpeYWCAD5zwJyYP9ntfO1p2HjnQ1dZaP9FeNcO7uIV1Lnd1eGCu6I\\\\nsrVp5k1f3isAEQEAAYkCPgQYAQIACQUCVuxMygIbAgEpCRAyYu/yW6DScMBdIAQZ\\\\nAQIABgUCVuxMygAKCRCKohN4dhq2b4tcCACHxmOHVXNpu47OvUGYQydLgMACUlXN\\\\nlj+HfE0VReqShxdDmpasAY9IRpuMB2RsGK8GbNP+4SlOlAiPf5SMhS7nZNkNDgQQ\\\\naZ3HFpgrFmFwmE10BKT4iQtoxELLM57z0qGOAfTsEjWFQa4sF+6IHAQR/ptkdkkI\\\\nBUEXiMnAwVwBysLIJiLO8qdjB6qp52QkT074JVrwywT/P+DkMfC2k4r/AfEbf6eF\\\\ndmPDuPk6KD87+hJZsSa5MaMUBQVvRO/mgEkhJRITVu58eWGaBOcQJ8gqurhCqM5P\\\\nDfUA4TJ7wiqM6sS764vV1rOioTTXkszzhClQqET7hPVnVQjenYgv0EZHNyQH/1f1\\\\n/CYqvV1vFjM9vJjMbxXsATCkZe6wvBVKD8vLsJAr8N+onKQz+4OPc3kmKq7aESu3\\\\nCi/iuie5KKVwnuNhr9AzT61vEkKxwHcVFEvHB77F6ZAAInhRvjzmQbD2dlPLLQCC\\\\nqDj71ODSSAPTEmUy6969bgD9PfWei7kNkBIx7s3eBv8yzytSc2EcuUgopqFazquw\\\\nFs1+tqGHjBvQfTo6bqbJjp/9Ci2pvde3ElV2rAgUlb3lqXyXjRDqrXosh5GcRPQj\\\\nK8Nhj1BNhnrCVskE4BP0LYbOHuzgm86uXwGCFsY+w2VOsSm16Jx5GHyG5S5WU3+D\\\\nIts/HFYRLiFgDLmTlxo=\\\\n=+OzK\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\"\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "delete",
"requestPath": "/user/gpg_keys/{gpg_key_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "gpg_key_id",
"description": "gpg_key_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "gpg_key_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /user/gpg_keys/{gpg_key_id}', {\n gpg_key_id: 42\n})",
"html": "await octokit.request('DELETE /user/gpg_keys/{gpg_key_id}', {\n gpg_key_id: 42\n})\n"
}
],
"summary": "Delete a GPG key for the authenticated user",
"description": "Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"users"
],
"operationId": "users/delete-gpg-key-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "gpg-keys"
},
"slug": "delete-a-gpg-key-for-the-authenticated-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "gpg-keys",
"subcategoryLabel": "Gpg keys",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
],
"bodyParameters": [],
"descriptionHTML": "Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least admin:gpg_key scope.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/installations", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/installations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/installations')",
"html": "await octokit.request('GET /user/installations')\n"
}
],
"summary": "List app installations accessible to the user access token",
"description": "Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.\n\nYou must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint.\n\nThe authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.\n\nYou can find the permissions for the installation under the `permissions` key.",
"tags": [
"apps"
],
"operationId": "apps/list-installations-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "installations"
},
"slug": "list-app-installations-accessible-to-the-user-access-token",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "installations",
"subcategoryLabel": "Installations",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists installations of your GitHub App that the authenticated user has explicit permission (:read, :write, or :admin) to access.
You must use a user-to-server OAuth access token, created for a user who has authorized your GitHub App, to access this endpoint.
\nThe authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
\nYou can find the permissions for the installation under the permissions key.
{\n \"total_count\": 2,\n \"installations\": [\n {\n \"id\": 1,\n \"account\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n \"repositories_url\": \"https://api.github.com/installation/repositories\",\n \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n \"app_id\": 1,\n \"target_id\": 1,\n \"target_type\": \"Organization\",\n \"permissions\": {\n \"checks\": \"write\",\n \"metadata\": \"read\",\n \"contents\": \"read\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ],\n \"single_file_name\": \"config.yaml\",\n \"has_multiple_single_files\": true,\n \"single_file_paths\": [\n \"config.yml\",\n \".github/issue_TEMPLATE.md\"\n ],\n \"repository_selection\": \"all\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"app_slug\": \"github-actions\",\n \"suspended_at\": null,\n \"suspended_by\": null\n },\n {\n \"id\": 3,\n \"account\": {\n \"login\": \"octocat\",\n \"id\": 2,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n \"repositories_url\": \"https://api.github.com/installation/repositories\",\n \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n \"app_id\": 1,\n \"target_id\": 1,\n \"target_type\": \"Organization\",\n \"permissions\": {\n \"checks\": \"write\",\n \"metadata\": \"read\",\n \"contents\": \"read\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ],\n \"single_file_name\": \"config.yaml\",\n \"has_multiple_single_files\": true,\n \"single_file_paths\": [\n \"config.yml\",\n \".github/issue_TEMPLATE.md\"\n ],\n \"repository_selection\": \"all\",\n \"created_at\": \"2017-07-08T16:18:44-04:00\",\n \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n \"app_slug\": \"github-actions\",\n \"suspended_at\": null,\n \"suspended_by\": null\n }\n ]\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "415",
"httpStatusMessage": "Unsupported Media Type",
"description": "Preview header missing"
}
]
},
{
"verb": "get",
"requestPath": "/user/installations/{installation_id}/repositories",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "installation_id",
"description": "installation_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "installation_id parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/installations/42/repositories", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/installations/42/repositories"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/installations/{installation_id}/repositories', {\n installation_id: 42\n})",
"html": "await octokit.request('GET /user/installations/{installation_id}/repositories', {\n installation_id: 42\n})\n"
}
],
"summary": "List repositories accessible to the user access token",
"description": "List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation.\n\nThe authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.\n\nYou must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint.\n\nThe access the user has to each repository is included in the hash under the `permissions` key.",
"tags": [
"apps"
],
"operationId": "apps/list-installation-repos-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "installations"
},
"slug": "list-repositories-accessible-to-the-user-access-token",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "installations",
"subcategoryLabel": "Installations",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List repositories that the authenticated user has explicit permission (:read, :write, or :admin) to access for an installation.
The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
\nYou must use a user-to-server OAuth access token, created for a user who has authorized your GitHub App, to access this endpoint.
\nThe access the user has to each repository is included in the hash under the permissions key.
{\n \"total_count\": 1,\n \"repositories\": [\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n ]\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "put",
"requestPath": "/user/installations/{installation_id}/repositories/{repository_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "installation_id",
"description": "installation_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "installation_id parameter
" }, { "name": "repository_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/installations/42/repositories/42", "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/installations/42/repositories/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /user/installations/{installation_id}/repositories/{repository_id}', {\n installation_id: 42,\n repository_id: 42\n})",
"html": "await octokit.request('PUT /user/installations/{installation_id}/repositories/{repository_id}', {\n installation_id: 42,\n repository_id: 42\n})\n"
}
],
"summary": "Add a repository to an app installation",
"description": "Add a single repository to an installation. The authenticated user must have admin access to the repository.\n\nYou must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/add-repo-to-installation-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "installations"
},
"slug": "add-a-repository-to-an-app-installation",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "installations",
"subcategoryLabel": "Installations",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Add a single repository to an installation. The authenticated user must have admin access to the repository.
\nYou must use a personal access token (which you can create via the command line or Basic Authentication) to access this endpoint.
" }, { "verb": "delete", "requestPath": "/user/installations/{installation_id}/repositories/{repository_id}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "installation_id", "description": "installation_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "installation_id parameter
" }, { "name": "repository_id", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/installations/42/repositories/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/installations/42/repositories/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /user/installations/{installation_id}/repositories/{repository_id}', {\n installation_id: 42,\n repository_id: 42\n})",
"html": "await octokit.request('DELETE /user/installations/{installation_id}/repositories/{repository_id}', {\n installation_id: 42,\n repository_id: 42\n})\n"
}
],
"summary": "Remove a repository from an app installation",
"description": "Remove a single repository from an installation. The authenticated user must have admin access to the repository.\n\nYou must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/remove-repo-from-installation-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "installations"
},
"slug": "remove-a-repository-from-an-app-installation",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "installations",
"subcategoryLabel": "Installations",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Remove a single repository from an installation. The authenticated user must have admin access to the repository.
\nYou must use a personal access token (which you can create via the command line or Basic Authentication) to access this endpoint.
" }, { "verb": "get", "requestPath": "/user/interaction-limits", "serverUrl": "https://api.github.com", "parameters": [], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/interaction-limits", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/interaction-limits"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/interaction-limits')",
"html": "await octokit.request('GET /user/interaction-limits')\n"
}
],
"summary": "Get interaction restrictions for your public repositories",
"description": "Shows which type of GitHub user can interact with your public repositories and when the restriction expires.",
"tags": [
"interactions"
],
"operationId": "interactions/get-restrictions-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "interactions",
"subcategory": "user"
},
"slug": "get-interaction-restrictions-for-your-public-repositories",
"category": "interactions",
"categoryLabel": "Interactions",
"subcategory": "user",
"subcategoryLabel": "User",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Shows which type of GitHub user can interact with your public repositories and when the restriction expires.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Default response", "payload": "{\n \"limit\": \"collaborators_only\",\n \"origin\": \"organization\",\n \"expires_at\": \"2018-08-17T04:18:39Z\"\n}\n"
},
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response when there are no restrictions"
}
]
},
{
"verb": "put",
"requestPath": "/user/interaction-limits",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/interaction-limits \\\n -d '{\"limit\":\"limit\"}'",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/interaction-limits \\\n -d '{\"limit\":\"limit\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /user/interaction-limits', {\n limit: 'limit'\n})",
"html": "await octokit.request('PUT /user/interaction-limits', {\n limit: 'limit'\n})\n"
}
],
"summary": "Set interaction restrictions for your public repositories",
"description": "Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user.",
"tags": [
"interactions"
],
"operationId": "interactions/set-restrictions-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"title": "Interaction Restrictions",
"description": "Limit interactions to a specific type of user for a specified duration",
"type": "object",
"properties": {
"limit": {
"type": "string",
"description": "Required. The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: existing_users, contributors_only, collaborators_only.
The duration of the interaction restriction. Can be one of: one_day, three_days, one_week, one_month, six_months. Default: one_day.
Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user.
", "bodyParameters": [ { "type": "string", "description": "Required. The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: existing_users, contributors_only, collaborators_only.
The duration of the interaction restriction. Can be one of: one_day, three_days, one_week, one_month, six_months. Default: one_day.
{\n \"limit\": \"collaborators_only\",\n \"origin\": \"user\",\n \"expires_at\": \"2018-08-17T04:18:39Z\"\n}\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "delete",
"requestPath": "/user/interaction-limits",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/interaction-limits",
"html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/interaction-limits"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /user/interaction-limits')",
"html": "await octokit.request('DELETE /user/interaction-limits')\n"
}
],
"summary": "Remove interaction restrictions from your public repositories",
"description": "Removes any interaction restrictions from your public repositories.",
"tags": [
"interactions"
],
"operationId": "interactions/remove-restrictions-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "interactions",
"subcategory": "user"
},
"slug": "remove-interaction-restrictions-from-your-public-repositories",
"category": "interactions",
"categoryLabel": "Interactions",
"subcategory": "user",
"subcategoryLabel": "User",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Removes any interaction restrictions from your public repositories.
" }, { "verb": "get", "requestPath": "/user/issues", "serverUrl": "https://api.github.com", "parameters": [ { "name": "filter", "description": "Indicates which sorts of issues to return. Can be one of: \n\\* `assigned`: Issues assigned to you \n\\* `created`: Issues created by you \n\\* `mentioned`: Issues mentioning you \n\\* `subscribed`: Issues you're subscribed to updates for \n\\* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "assigned", "created", "mentioned", "subscribed", "repos", "all" ], "default": "assigned" }, "descriptionHTML": "Indicates which sorts of issues to return. Can be one of:
\n* assigned: Issues assigned to you
\n* created: Issues created by you
\n* mentioned: Issues mentioning you
\n* subscribed: Issues you're subscribed to updates for
\n* all or repos: All issues the authenticated user can see, regardless of participation or creation
Indicates the state of the issues to return. Can be either open, closed, or all.
A list of comma separated label names. Example: bug,ui,@high
What to sort results by. Can be either created, updated, comments.
One of asc (ascending) or desc (descending).
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/issues", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/issues"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/issues')",
"html": "await octokit.request('GET /user/issues')\n"
}
],
"summary": "List user account issues assigned to the authenticated user",
"description": "List issues across owned and member repositories assigned to the authenticated user.\n\n**Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe `pull_request` key. Be aware that the `id` of a pull request returned from \"Issues\" endpoints will be an _issue id_. To find out the pull\nrequest id, use the \"[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)\" endpoint.",
"tags": [
"issues"
],
"operationId": "issues/list-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "issues",
"subcategory": null
},
"slug": "list-user-account-issues-assigned-to-the-authenticated-user",
"category": "issues",
"categoryLabel": "Issues",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List issues across owned and member repositories assigned to the authenticated user.
\nNote: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe pull_request key. Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull\nrequest id, use the \"List pull requests\" endpoint.
[\n {\n \"id\": 1,\n \"node_id\": \"MDU6SXNzdWUx\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n \"number\": 1347,\n \"state\": \"open\",\n \"title\": \"Found a bug\",\n \"body\": \"I'm having a problem with this.\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"labels\": [\n {\n \"id\": 208045946,\n \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n \"name\": \"bug\",\n \"description\": \"Something isn't working\",\n \"color\": \"f29513\",\n \"default\": true\n }\n ],\n \"assignee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"assignees\": [\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n ],\n \"milestone\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n \"id\": 1002604,\n \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n \"number\": 1,\n \"state\": \"open\",\n \"title\": \"v1.0\",\n \"description\": \"Tracking milestone for version 1.0\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"open_issues\": 4,\n \"closed_issues\": 8,\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\",\n \"closed_at\": \"2013-02-12T13:22:01Z\",\n \"due_on\": \"2012-10-09T23:39:01Z\"\n },\n \"locked\": true,\n \"active_lock_reason\": \"too heated\",\n \"comments\": 0,\n \"pull_request\": {\n \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n },\n \"closed_at\": null,\n \"created_at\": \"2011-04-22T13:33:48Z\",\n \"updated_at\": \"2011-04-22T13:33:48Z\",\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n },\n \"author_association\": \"COLLABORATOR\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/user/keys",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/keys')",
"html": "await octokit.request('GET /user/keys')\n"
}
],
"summary": "List public SSH keys for the authenticated user",
"description": "Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"users"
],
"operationId": "users/list-public-ssh-keys-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "keys"
},
"slug": "list-public-ssh-keys-for-the-authenticated-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "keys",
"subcategoryLabel": "Keys",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least read:public_key scope.
[\n {\n \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\",\n \"id\": 2,\n \"url\": \"https://api.github.com/user/keys/2\",\n \"title\": \"ssh-rsa AAAAB3NzaC1yc2EAAA\",\n \"created_at\": \"2020-06-11T21:31:57Z\",\n \"verified\": false,\n \"read_only\": false\n },\n {\n \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJy931234\",\n \"id\": 3,\n \"url\": \"https://api.github.com/user/keys/3\",\n \"title\": \"ssh-rsa AAAAB3NzaC1yc2EAAB\",\n \"created_at\": \"2020-07-11T21:31:57Z\",\n \"verified\": false,\n \"read_only\": false\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "post",
"requestPath": "/user/keys",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys \\\n -d '{\"key\":\"key\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys \\\n -d '{\"key\":\"key\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /user/keys', {\n key: 'key'\n})",
"html": "await octokit.request('POST /user/keys', {\n key: 'key'\n})\n"
}
],
"summary": "Create a public SSH key for the authenticated user",
"description": "Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"operationId": "users/create-public-ssh-key-for-authenticated-user",
"tags": [
"users"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"title": {
"description": "A descriptive name for the new key.
", "type": "string", "example": "Personal MacBook Air", "name": "title", "in": "body", "rawType": "string", "rawDescription": "A descriptive name for the new key.", "childParamsGroups": [] }, "key": { "description": "Required. The public SSH key to add to your GitHub account.
", "type": "string", "pattern": "^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521) ", "name": "key", "in": "body", "rawType": "string", "rawDescription": "The public SSH key to add to your GitHub account.", "childParamsGroups": [] } }, "required": [ "key" ], "type": "object" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "users", "subcategory": "keys" }, "slug": "create-a-public-ssh-key-for-the-authenticated-user", "category": "users", "categoryLabel": "Users", "subcategory": "keys", "subcategoryLabel": "Keys", "contentType": "application/json", "notes": [], "descriptionHTML": "Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least write:public_key scope.
A descriptive name for the new key.
", "type": "string", "example": "Personal MacBook Air", "name": "title", "in": "body", "rawType": "string", "rawDescription": "A descriptive name for the new key.", "childParamsGroups": [] }, { "description": "Required. The public SSH key to add to your GitHub account.
", "type": "string", "pattern": "^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521) ", "name": "key", "in": "body", "rawType": "string", "rawDescription": "The public SSH key to add to your GitHub account.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\",\n \"id\": 2,\n \"url\": \"https://api.github.com/user/keys/2\",\n \"title\": \"ssh-rsa AAAAB3NzaC1yc2EAAA\",\n \"created_at\": \"2020-06-11T21:31:57Z\",\n \"verified\": false,\n \"read_only\": false\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/user/keys/{key_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "key_id",
"description": "key_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "key_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/keys/{key_id}', {\n key_id: 42\n})",
"html": "await octokit.request('GET /user/keys/{key_id}', {\n key_id: 42\n})\n"
}
],
"summary": "Get a public SSH key for the authenticated user",
"description": "View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"users"
],
"operationId": "users/get-public-ssh-key-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "keys"
},
"slug": "get-a-public-ssh-key-for-the-authenticated-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "keys",
"subcategoryLabel": "Keys",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least read:public_key scope.
{\n \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\",\n \"id\": 2,\n \"url\": \"https://api.github.com/user/keys/2\",\n \"title\": \"ssh-rsa AAAAB3NzaC1yc2EAAA\",\n \"created_at\": \"2020-06-11T21:31:57Z\",\n \"verified\": false,\n \"read_only\": false\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "delete",
"requestPath": "/user/keys/{key_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "key_id",
"description": "key_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "key_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /user/keys/{key_id}', {\n key_id: 42\n})",
"html": "await octokit.request('DELETE /user/keys/{key_id}', {\n key_id: 42\n})\n"
}
],
"summary": "Delete a public SSH key for the authenticated user",
"description": "Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"users"
],
"operationId": "users/delete-public-ssh-key-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "keys"
},
"slug": "delete-a-public-ssh-key-for-the-authenticated-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "keys",
"subcategoryLabel": "Keys",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least admin:public_key scope.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/marketplace_purchases", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/marketplace_purchases"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/marketplace_purchases')",
"html": "await octokit.request('GET /user/marketplace_purchases')\n"
}
],
"summary": "List subscriptions for the authenticated user",
"description": "Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/).",
"tags": [
"apps"
],
"operationId": "apps/list-subscriptions-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "marketplace"
},
"slug": "list-subscriptions-for-the-authenticated-user",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "marketplace",
"subcategoryLabel": "Marketplace",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the active subscriptions for the authenticated user. You must use a user-to-server OAuth access token, created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an OAuth token.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"billing_cycle\": \"monthly\",\n \"next_billing_date\": \"2017-11-11T00:00:00Z\",\n \"unit_count\": null,\n \"on_free_trial\": true,\n \"free_trial_ends_on\": \"2017-11-11T00:00:00Z\",\n \"updated_at\": \"2017-11-02T01:12:12Z\",\n \"account\": {\n \"login\": \"github\",\n \"id\": 4,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"email\": null,\n \"organization_billing_email\": \"billing@github.com\",\n \"type\": \"Organization\"\n },\n \"plan\": {\n \"url\": \"https://api.github.com/marketplace_listing/plans/1313\",\n \"accounts_url\": \"https://api.github.com/marketplace_listing/plans/1313/accounts\",\n \"id\": 1313,\n \"number\": 3,\n \"name\": \"Pro\",\n \"description\": \"A professional-grade CI solution\",\n \"monthly_price_in_cents\": 1099,\n \"yearly_price_in_cents\": 11870,\n \"price_model\": \"flat-rate\",\n \"has_free_trial\": true,\n \"unit_name\": null,\n \"state\": \"published\",\n \"bullets\": [\n \"Up to 25 private repositories\",\n \"11 concurrent builds\"\n ]\n }\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/user/marketplace_purchases/stubbed",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/marketplace_purchases/stubbed", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/marketplace_purchases/stubbed"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/marketplace_purchases/stubbed')",
"html": "await octokit.request('GET /user/marketplace_purchases/stubbed')\n"
}
],
"summary": "List subscriptions for the authenticated user (stubbed)",
"description": "Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/).",
"tags": [
"apps"
],
"operationId": "apps/list-subscriptions-for-authenticated-user-stubbed",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "marketplace"
},
"slug": "list-subscriptions-for-the-authenticated-user-stubbed",
"category": "apps",
"categoryLabel": "Apps",
"subcategory": "marketplace",
"subcategoryLabel": "Marketplace",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the active subscriptions for the authenticated user. You must use a user-to-server OAuth access token, created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an OAuth token.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"billing_cycle\": \"monthly\",\n \"next_billing_date\": \"2017-11-11T00:00:00Z\",\n \"unit_count\": null,\n \"on_free_trial\": true,\n \"free_trial_ends_on\": \"2017-11-11T00:00:00Z\",\n \"updated_at\": \"2017-11-02T01:12:12Z\",\n \"account\": {\n \"login\": \"github\",\n \"id\": 4,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"email\": null,\n \"organization_billing_email\": \"billing@github.com\",\n \"type\": \"Organization\"\n },\n \"plan\": {\n \"url\": \"https://api.github.com/marketplace_listing/plans/1313\",\n \"accounts_url\": \"https://api.github.com/marketplace_listing/plans/1313/accounts\",\n \"id\": 1313,\n \"number\": 3,\n \"name\": \"Pro\",\n \"description\": \"A professional-grade CI solution\",\n \"monthly_price_in_cents\": 1099,\n \"yearly_price_in_cents\": 11870,\n \"price_model\": \"flat-rate\",\n \"has_free_trial\": true,\n \"unit_name\": null,\n \"state\": \"published\",\n \"bullets\": [\n \"Up to 25 private repositories\",\n \"11 concurrent builds\"\n ]\n }\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
}
]
},
{
"verb": "get",
"requestPath": "/user/memberships/orgs",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "state",
"description": "Indicates the state of the memberships to return. Can be either `active` or `pending`. If not specified, the API returns both active and pending memberships.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"active",
"pending"
]
},
"descriptionHTML": "Indicates the state of the memberships to return. Can be either active or pending. If not specified, the API returns both active and pending memberships.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/memberships/orgs", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/memberships/orgs"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/memberships/orgs')",
"html": "await octokit.request('GET /user/memberships/orgs')\n"
}
],
"summary": "List organization memberships for the authenticated user",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/list-memberships-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "orgs",
"subcategory": "members"
},
"slug": "list-organization-memberships-for-the-authenticated-user",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"url\": \"https://api.github.com/orgs/octocat/memberships/defunkt\",\n \"state\": \"active\",\n \"role\": \"admin\",\n \"organization_url\": \"https://api.github.com/orgs/octocat\",\n \"organization\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\"\n },\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n },\n {\n \"url\": \"https://api.github.com/orgs/invitocat/memberships/defunkt\",\n \"state\": \"pending\",\n \"role\": \"admin\",\n \"organization_url\": \"https://api.github.com/orgs/invitocat\",\n \"organization\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\"\n },\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/user/memberships/orgs/{org}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/memberships/orgs/ORG",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/memberships/orgs/ORG"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/memberships/orgs/{org}', {\n org: 'org'\n})",
"html": "await octokit.request('GET /user/memberships/orgs/{org}', {\n org: 'org'\n})\n"
}
],
"summary": "Get an organization membership for the authenticated user",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/get-membership-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "orgs",
"subcategory": "members"
},
"slug": "get-an-organization-membership-for-the-authenticated-user",
"category": "orgs",
"categoryLabel": "Orgs",
"subcategory": "members",
"subcategoryLabel": "Members",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"url\": \"https://api.github.com/orgs/invitocat/memberships/defunkt\",\n \"state\": \"pending\",\n \"role\": \"admin\",\n \"organization_url\": \"https://api.github.com/orgs/invitocat\",\n \"organization\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\"\n },\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/user/memberships/orgs/{org}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "org",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/memberships/orgs/ORG \\\n -d '{\"state\":\"state\"}'",
"html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/memberships/orgs/ORG \\\n -d '{\"state\":\"state\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /user/memberships/orgs/{org}', {\n org: 'org',\n state: 'state'\n})",
"html": "await octokit.request('PATCH /user/memberships/orgs/{org}', {\n org: 'org',\n state: 'state'\n})\n"
}
],
"summary": "Update an organization membership for the authenticated user",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/update-membership-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"state": {
"type": "string",
"description": "Required. The state that the membership should be in. Only \"active\" will be accepted.
Required. The state that the membership should be in. Only \"active\" will be accepted.
{\n \"url\": \"https://api.github.com/orgs/octocat/memberships/defunkt\",\n \"state\": \"active\",\n \"role\": \"admin\",\n \"organization_url\": \"https://api.github.com/orgs/octocat\",\n \"organization\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\"\n },\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n}\n"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/user/migrations",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/migrations", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/migrations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/migrations')",
"html": "await octokit.request('GET /user/migrations')\n"
}
],
"summary": "List user migrations",
"description": "Lists all migrations a user has started.",
"tags": [
"migrations"
],
"operationId": "migrations/list-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#list-user-migrations"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "users"
},
"slug": "list-user-migrations",
"category": "migrations",
"categoryLabel": "Migrations",
"subcategory": "users",
"subcategoryLabel": "Users",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all migrations a user has started.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 79,\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"guid\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"state\": \"pending\",\n \"lock_repositories\": true,\n \"exclude_attachments\": false,\n \"exclude_releases\": false,\n \"exclude_owner_projects\": false,\n \"repositories\": [\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n ],\n \"url\": \"https://api.github.com/orgs/octo-org/migrations/79\",\n \"created_at\": \"2015-07-06T15:33:38-07:00\",\n \"updated_at\": \"2015-07-06T15:33:38-07:00\",\n \"node_id\": \"MDQ6VXNlcjE=\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "post",
"requestPath": "/user/migrations",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/migrations \\\n -d '{\"repositories\":[\"repositories\"]}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/migrations \\\n -d '{\"repositories\":[\"repositories\"]}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /user/migrations', {\n repositories: [\n 'repositories'\n ]\n})",
"html": "await octokit.request('POST /user/migrations', {\n repositories: [\n 'repositories'\n ]\n})\n"
}
],
"summary": "Start a user migration",
"description": "Initiates the generation of a user migration archive.",
"tags": [
"migrations"
],
"operationId": "migrations/start-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#start-a-user-migration"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"lock_repositories": {
"description": "Lock the repositories being migrated at the start of the migration
", "example": true, "readOnly": false, "type": "boolean", "name": "lock_repositories", "in": "body", "rawType": "boolean", "rawDescription": "Lock the repositories being migrated at the start of the migration", "childParamsGroups": [] }, "exclude_attachments": { "description": "Do not include attachments in the migration
", "example": true, "readOnly": false, "type": "boolean", "name": "exclude_attachments", "in": "body", "rawType": "boolean", "rawDescription": "Do not include attachments in the migration", "childParamsGroups": [] }, "exclude_releases": { "description": "Do not include releases in the migration
", "example": true, "readOnly": false, "type": "boolean", "name": "exclude_releases", "in": "body", "rawType": "boolean", "rawDescription": "Do not include releases in the migration", "childParamsGroups": [] }, "exclude_owner_projects": { "description": "Indicates whether projects owned by the organization or users should be excluded.
", "example": true, "readOnly": false, "type": "boolean", "name": "exclude_owner_projects", "in": "body", "rawType": "boolean", "rawDescription": "Indicates whether projects owned by the organization or users should be excluded.", "childParamsGroups": [] }, "exclude": { "description": "Exclude attributes from the API response to improve performance
", "example": [ "repositories" ], "readOnly": false, "type": "array of strings", "items": { "description": "Allowed values that can be passed to the exclude param.", "enum": [ "repositories" ], "example": "repositories", "type": "string" }, "name": "exclude", "in": "body", "rawType": "array", "rawDescription": "Exclude attributes from the API response to improve performance", "childParamsGroups": [] }, "repositories": { "type": "array of strings", "items": { "description": "Repository path, owner and name", "example": "acme/widgets", "type": "string" }, "name": "repositories", "in": "body", "rawType": "array", "description": "Required.
", "childParamsGroups": [] } }, "required": [ "repositories" ], "type": "object" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "migrations", "subcategory": "users" }, "slug": "start-a-user-migration", "category": "migrations", "categoryLabel": "Migrations", "subcategory": "users", "subcategoryLabel": "Users", "contentType": "application/json", "notes": [], "descriptionHTML": "Initiates the generation of a user migration archive.
", "bodyParameters": [ { "description": "Lock the repositories being migrated at the start of the migration
", "example": true, "readOnly": false, "type": "boolean", "name": "lock_repositories", "in": "body", "rawType": "boolean", "rawDescription": "Lock the repositories being migrated at the start of the migration", "childParamsGroups": [] }, { "description": "Do not include attachments in the migration
", "example": true, "readOnly": false, "type": "boolean", "name": "exclude_attachments", "in": "body", "rawType": "boolean", "rawDescription": "Do not include attachments in the migration", "childParamsGroups": [] }, { "description": "Do not include releases in the migration
", "example": true, "readOnly": false, "type": "boolean", "name": "exclude_releases", "in": "body", "rawType": "boolean", "rawDescription": "Do not include releases in the migration", "childParamsGroups": [] }, { "description": "Indicates whether projects owned by the organization or users should be excluded.
", "example": true, "readOnly": false, "type": "boolean", "name": "exclude_owner_projects", "in": "body", "rawType": "boolean", "rawDescription": "Indicates whether projects owned by the organization or users should be excluded.", "childParamsGroups": [] }, { "description": "Exclude attributes from the API response to improve performance
", "example": [ "repositories" ], "readOnly": false, "type": "array of strings", "items": { "description": "Allowed values that can be passed to the exclude param.", "enum": [ "repositories" ], "example": "repositories", "type": "string" }, "name": "exclude", "in": "body", "rawType": "array", "rawDescription": "Exclude attributes from the API response to improve performance", "childParamsGroups": [] }, { "type": "array of strings", "items": { "description": "Repository path, owner and name", "example": "acme/widgets", "type": "string" }, "name": "repositories", "in": "body", "rawType": "array", "description": "Required.
", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 79,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"guid\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"state\": \"pending\",\n \"lock_repositories\": true,\n \"exclude_attachments\": false,\n \"exclude_releases\": false,\n \"exclude_owner_projects\": false,\n \"repositories\": [\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n ],\n \"url\": \"https://api.github.com/orgs/octo-org/migrations/79\",\n \"created_at\": \"2015-07-06T15:33:38-07:00\",\n \"updated_at\": \"2015-07-06T15:33:38-07:00\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/user/migrations/{migration_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "migration_id",
"description": "migration_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "migration_id parameter
" }, { "name": "exclude", "in": "query", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/migrations/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/migrations/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/migrations/{migration_id}', {\n migration_id: 42\n})",
"html": "await octokit.request('GET /user/migrations/{migration_id}', {\n migration_id: 42\n})\n"
}
],
"summary": "Get a user migration status",
"description": "Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values:\n\n* `pending` - the migration hasn't started yet.\n* `exporting` - the migration is in progress.\n* `exported` - the migration finished successfully.\n* `failed` - the migration failed.\n\nOnce the migration has been `exported` you can [download the migration archive](https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive).",
"tags": [
"migrations"
],
"operationId": "migrations/get-status-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#get-a-user-migration-status"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "users"
},
"slug": "get-a-user-migration-status",
"category": "migrations",
"categoryLabel": "Migrations",
"subcategory": "users",
"subcategoryLabel": "Users",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Fetches a single user migration. The response includes the state of the migration, which can be one of the following values:
pending - the migration hasn't started yet.exporting - the migration is in progress.exported - the migration finished successfully.failed - the migration failed.Once the migration has been exported you can download the migration archive.
{\n \"id\": 79,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"guid\": \"0b989ba4-242f-11e5-81e1-c7b6966d2516\",\n \"state\": \"exported\",\n \"lock_repositories\": true,\n \"exclude_attachments\": false,\n \"exclude_releases\": false,\n \"exclude_owner_projects\": false,\n \"repositories\": [\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n ],\n \"url\": \"https://api.github.com/orgs/octo-org/migrations/79\",\n \"created_at\": \"2015-07-06T15:33:38-07:00\",\n \"updated_at\": \"2015-07-06T15:33:38-07:00\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/user/migrations/{migration_id}/archive",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "migration_id",
"description": "migration_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "migration_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/migrations/42/archive", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/migrations/42/archive"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/migrations/{migration_id}/archive', {\n migration_id: 42\n})",
"html": "await octokit.request('GET /user/migrations/{migration_id}/archive', {\n migration_id: 42\n})\n"
}
],
"summary": "Download a user migration archive",
"description": "Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects:\n\n* attachments\n* bases\n* commit\\_comments\n* issue\\_comments\n* issue\\_events\n* issues\n* milestones\n* organizations\n* projects\n* protected\\_branches\n* pull\\_request\\_reviews\n* pull\\_requests\n* releases\n* repositories\n* review\\_comments\n* schema\n* users\n\nThe archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data.",
"tags": [
"migrations"
],
"operationId": "migrations/get-archive-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "users"
},
"slug": "download-a-user-migration-archive",
"category": "migrations",
"categoryLabel": "Migrations",
"subcategory": "users",
"subcategoryLabel": "Users",
"notes": [],
"responses": [
{
"httpStatusCode": "302",
"httpStatusMessage": "Found",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
],
"bodyParameters": [],
"descriptionHTML": "Fetches the URL to download the migration archive as a tar.gz file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects:
The archive will also contain an attachments directory that includes all attachment files uploaded to GitHub.com and a repositories directory that contains the repository's Git data.
migration_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/migrations/42/archive", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/migrations/42/archive"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /user/migrations/{migration_id}/archive', {\n migration_id: 42\n})",
"html": "await octokit.request('DELETE /user/migrations/{migration_id}/archive', {\n migration_id: 42\n})\n"
}
],
"summary": "Delete a user migration archive",
"description": "Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted.",
"tags": [
"migrations"
],
"operationId": "migrations/delete-archive-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "users"
},
"slug": "delete-a-user-migration-archive",
"category": "migrations",
"categoryLabel": "Migrations",
"subcategory": "users",
"subcategoryLabel": "Users",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the List user migrations and Get a user migration status endpoints, will continue to be available even after an archive is deleted.
" }, { "verb": "delete", "requestPath": "/user/migrations/{migration_id}/repos/{repo_name}/lock", "serverUrl": "https://api.github.com", "parameters": [ { "name": "migration_id", "description": "migration_id parameter", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "migration_id parameter
" }, { "name": "repo_name", "description": "repo_name parameter", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "repo_name parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/migrations/42/repos/REPO_NAME/lock", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/migrations/42/repos/REPO_NAME/lock"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock', {\n migration_id: 42,\n repo_name: 'repo_name'\n})",
"html": "await octokit.request('DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock', {\n migration_id: 42,\n repo_name: 'repo_name'\n})\n"
}
],
"summary": "Unlock a user repository",
"description": "Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked.",
"tags": [
"migrations"
],
"operationId": "migrations/unlock-repo-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#unlock-a-user-repository"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "users"
},
"slug": "unlock-a-user-repository",
"category": "migrations",
"categoryLabel": "Migrations",
"subcategory": "users",
"subcategoryLabel": "Users",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Unlocks a repository. You can lock repositories when you start a user migration. Once the migration is complete you can unlock each repository to begin using it again or delete the repository if you no longer need the source data. Returns a status of 404 Not Found if the repository is not locked.
migration_id parameter
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/migrations/42/repositories", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/migrations/42/repositories"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/migrations/{migration_id}/repositories', {\n migration_id: 42\n})",
"html": "await octokit.request('GET /user/migrations/{migration_id}/repositories', {\n migration_id: 42\n})\n"
}
],
"summary": "List repositories for a user migration",
"description": "Lists all the repositories for this user migration.",
"tags": [
"migrations"
],
"operationId": "migrations/list-repos-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "users"
},
"slug": "list-repositories-for-a-user-migration",
"category": "migrations",
"categoryLabel": "Migrations",
"subcategory": "users",
"subcategoryLabel": "Users",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all the repositories for this user migration.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n }\n }\n]\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/user/orgs",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/orgs", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/orgs"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/orgs')",
"html": "await octokit.request('GET /user/orgs')\n"
}
],
"summary": "List organizations for the authenticated user",
"description": "List organizations for the authenticated user.\n\n**OAuth scope requirements**\n\nThis only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response.",
"tags": [
"orgs"
],
"operationId": "orgs/list-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "orgs",
"subcategory": null
},
"slug": "list-organizations-for-the-authenticated-user",
"category": "orgs",
"categoryLabel": "Orgs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List organizations for the authenticated user.
\nOAuth scope requirements
\nThis only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org scope, you can publicize your organization membership with user scope, etc.). Therefore, this API requires at least user or read:org scope. OAuth requests with insufficient scope receive a 403 Forbidden response.
[\n {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "get",
"requestPath": "/user/packages",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "package_type",
"description": "The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"in": "query",
"required": true,
"schema": {
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"descriptionHTML": "The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The selected visibility of the packages. Can be one of public, private, or internal. Only container package_types currently support internal visibility properly. For other ecosystems internal is synonymous with private. This parameter is optional and only filters an existing result set.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/packages"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/packages', {\n package_type: 'package_type'\n})",
"html": "await octokit.request('GET /user/packages', {\n package_type: 'package_type'\n})\n"
}
],
"summary": "List packages for the authenticated user's namespace",
"description": "Lists packages owned by the authenticated user within the user's namespace.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.",
"tags": [
"packages"
],
"operationId": "packages/list-packages-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "list-packages-for-the-authenticated-users-namespace",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists packages owned by the authenticated user within the user's namespace.
\nTo use this endpoint, you must authenticate using an access token with the packages:read scope.\nIf package_type is not container, your token must also include the repo scope.
[\n {\n \"id\": 197,\n \"name\": \"hello_docker\",\n \"package_type\": \"container\",\n \"owner\": {\n \"login\": \"monalisa\",\n \"id\": 9919,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjk5MTk=\",\n \"avatar_url\": \"https://avatars.monalisausercontent.com/u/9919?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/monalisa\",\n \"html_url\": \"https://github.com/github\",\n \"followers_url\": \"https://api.github.com/users/github/followers\",\n \"following_url\": \"https://api.github.com/users/github/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/github/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/github/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/github/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/github/orgs\",\n \"repos_url\": \"https://api.github.com/users/github/repos\",\n \"events_url\": \"https://api.github.com/users/github/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/github/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"version_count\": 1,\n \"visibility\": \"private\",\n \"url\": \"https://api.github.com/orgs/github/packages/container/hello_docker\",\n \"created_at\": \"2020-05-19T22:19:11Z\",\n \"updated_at\": \"2020-05-19T22:19:11Z\",\n \"html_url\": \"https://github.com/orgs/github/packages/container/package/hello_docker\"\n },\n {\n \"id\": 198,\n \"name\": \"goodbye_docker\",\n \"package_type\": \"container\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 9919,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjk5MTk=\",\n \"avatar_url\": \"https://avatars.githubusercontent.com/u/9919?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/monalisa\",\n \"html_url\": \"https://github.com/github\",\n \"followers_url\": \"https://api.github.com/users/github/followers\",\n \"following_url\": \"https://api.github.com/users/github/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/github/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/github/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/github/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/github/orgs\",\n \"repos_url\": \"https://api.github.com/users/github/repos\",\n \"events_url\": \"https://api.github.com/users/github/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/github/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"version_count\": 2,\n \"visibility\": \"private\",\n \"url\": \"https://api.github.com/user/monalisa/packages/container/goodbye_docker\",\n \"created_at\": \"2020-05-20T22:19:11Z\",\n \"updated_at\": \"2020-05-20T22:19:11Z\",\n \"html_url\": \"https://github.com/user/monalisa/packages/container/package/goodbye_docker\"\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/user/packages/{package_type}/{package_name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "package_type",
"description": "The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"descriptionHTML": "The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/packages/PACKAGE_TYPE/PACKAGE_NAME", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/packages/PACKAGE_TYPE/PACKAGE_NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/packages/{package_type}/{package_name}', {\n package_type: 'package_type',\n package_name: 'package_name'\n})",
"html": "await octokit.request('GET /user/packages/{package_type}/{package_name}', {\n package_type: 'package_type',\n package_name: 'package_name'\n})\n"
}
],
"summary": "Get a package for the authenticated user",
"description": "Gets a specific package for a package owned by the authenticated user.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.",
"tags": [
"packages"
],
"operationId": "packages/get-package-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "get-a-package-for-the-authenticated-user",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a specific package for a package owned by the authenticated user.
\nTo use this endpoint, you must authenticate using an access token with the packages:read scope.\nIf package_type is not container, your token must also include the repo scope.
{\n \"id\": 40201,\n \"name\": \"octo-name\",\n \"package_type\": \"rubygems\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 209477,\n \"node_id\": \"MDQ6VXNlcjIwOTQ3Nw==\",\n \"avatar_url\": \"https://avatars.githubusercontent.com/u/209477?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"version_count\": 3,\n \"visibility\": \"public\",\n \"url\": \"https://api.github.com/users/octocat/packages/rubygems/octo-name\",\n \"created_at\": \"2019-10-20T14:17:14Z\",\n \"updated_at\": \"2019-10-20T14:17:14Z\",\n \"repository\": {\n \"id\": 216219492,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMTYyMTk0OTI=\",\n \"name\": \"octo-name-repo\",\n \"full_name\": \"octocat/octo-name-repo\",\n \"private\": false,\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 209477,\n \"node_id\": \"MDQ6VXNlcjIwOTQ3Nw==\",\n \"avatar_url\": \"https://avatars.githubusercontent.com/u/209477?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"html_url\": \"https://github.com/octocat/octo-name-repo\",\n \"description\": \"Project for octocats\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/octo-name-repo\",\n \"forks_url\": \"https://api.github.com/repos/octocat/octo-name-repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/octocat/octo-name-repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/octo-name-repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/octocat/octo-name-repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/octo-name-repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/octo-name-repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/octocat/octo-name-repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/octo-name-repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/octo-name-repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/octocat/octo-name-repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/octo-name-repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/octo-name-repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/octo-name-repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/octocat/octo-name-repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/octo-name-repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/octo-name-repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/octo-name-repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/octo-name-repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/octo-name-repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/octo-name-repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/octocat/octo-name-repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/octo-name-repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/octo-name-repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/octo-name-repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/octo-name-repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/octo-name-repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/octocat/octo-name-repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/octocat/octo-name-repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/octo-name-repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/octocat/octo-name-repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/octo-name-repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/octo-name-repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/octo-name-repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/octo-name-repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/octo-name-repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/octo-name-repo/deployments\"\n },\n \"html_url\": \"https://github.com/octocat/octo-name-repo/packages/40201\"\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/user/packages/{package_type}/{package_name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "package_type",
"description": "The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"descriptionHTML": "The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/packages/PACKAGE_TYPE/PACKAGE_NAME", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/packages/PACKAGE_TYPE/PACKAGE_NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /user/packages/{package_type}/{package_name}', {\n package_type: 'package_type',\n package_name: 'package_name'\n})",
"html": "await octokit.request('DELETE /user/packages/{package_type}/{package_name}', {\n package_type: 'package_type',\n package_name: 'package_name'\n})\n"
}
],
"summary": "Delete a package for the authenticated user",
"description": "Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes.\nIf `package_type` is not `container`, your token must also include the `repo` scope.",
"tags": [
"packages"
],
"operationId": "packages/delete-package-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "delete-a-package-for-the-authenticated-user",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
\nTo use this endpoint, you must authenticate using an access token with the packages:read and packages:delete scopes.\nIf package_type is not container, your token must also include the repo scope.
The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "token", "description": "package token", "schema": { "type": "string" }, "required": false, "in": "query", "descriptionHTML": "package token
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/packages/PACKAGE_TYPE/PACKAGE_NAME/restore", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/packages/PACKAGE_TYPE/PACKAGE_NAME/restore"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /user/packages/{package_type}/{package_name}/restore', {\n package_type: 'package_type',\n package_name: 'package_name'\n})",
"html": "await octokit.request('POST /user/packages/{package_type}/{package_name}/restore', {\n package_type: 'package_type',\n package_name: 'package_name'\n})\n"
}
],
"summary": "Restore a package for the authenticated user",
"description": "Restores a package owned by the authenticated user.\n\nYou can restore a deleted package under the following conditions:\n - The package was deleted within the last 30 days.\n - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope.",
"tags": [
"packages"
],
"operationId": "packages/restore-package-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "restore-a-package-for-the-authenticated-user",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Restores a package owned by the authenticated user.
\nYou can restore a deleted package under the following conditions:
\nTo use this endpoint, you must authenticate using an access token with the packages:read and packages:write scopes. If package_type is not container, your token must also include the repo scope.
The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "state", "in": "query", "required": false, "description": "The state of the package, either active or deleted.", "schema": { "type": "string", "enum": [ "active", "deleted" ], "default": "active" }, "descriptionHTML": "The state of the package, either active or deleted.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/packages/PACKAGE_TYPE/PACKAGE_NAME/versions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/packages/PACKAGE_TYPE/PACKAGE_NAME/versions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/packages/{package_type}/{package_name}/versions', {\n package_type: 'package_type',\n package_name: 'package_name'\n})",
"html": "await octokit.request('GET /user/packages/{package_type}/{package_name}/versions', {\n package_type: 'package_type',\n package_name: 'package_name'\n})\n"
}
],
"summary": "Get all package versions for a package owned by the authenticated user",
"description": "Returns all package versions for a package owned by the authenticated user.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.",
"tags": [
"packages"
],
"operationId": "packages/get-all-package-versions-for-package-owned-by-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "get-all-package-versions-for-a-package-owned-by-the-authenticated-user",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns all package versions for a package owned by the authenticated user.
\nTo use this endpoint, you must authenticate using an access token with the packages:read scope.\nIf package_type is not container, your token must also include the repo scope.
[\n {\n \"id\": 45763,\n \"name\": \"sha256:08a44bab0bddaddd8837a8b381aebc2e4b933768b981685a9e088360af0d3dd9\",\n \"url\": \"https://api.github.com/users/octocat/packages/container/hello_docker/versions/45763\",\n \"package_html_url\": \"https://github.com/users/octocat/packages/container/package/hello_docker\",\n \"created_at\": \"2020-09-11T21:56:40Z\",\n \"updated_at\": \"2021-02-05T21:32:32Z\",\n \"html_url\": \"https://github.com/users/octocat/packages/container/hello_docker/45763\",\n \"metadata\": {\n \"package_type\": \"container\",\n \"container\": {\n \"tags\": [\n \"latest\"\n ]\n }\n }\n },\n {\n \"id\": 881,\n \"name\": \"sha256:b3d3e366b55f9a54599220198b3db5da8f53592acbbb7dc7e4e9878762fc5344\",\n \"url\": \"https://api.github.com/users/octocat/packages/container/hello_docker/versions/881\",\n \"package_html_url\": \"https://github.com/users/octocat/packages/container/package/hello_docker\",\n \"created_at\": \"2020-05-21T22:22:20Z\",\n \"updated_at\": \"2021-02-05T21:32:32Z\",\n \"html_url\": \"https://github.com/users/octocat/packages/container/hello_docker/881\",\n \"metadata\": {\n \"package_type\": \"container\",\n \"container\": {\n \"tags\": []\n }\n }\n }\n]\n"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/user/packages/{package_type}/{package_name}/versions/{package_version_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "package_type",
"description": "The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"descriptionHTML": "The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "package_version_id", "description": "Unique identifier of the package version.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the package version.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}', {\n package_type: 'package_type',\n package_name: 'package_name',\n package_version_id: 42\n})",
"html": "await octokit.request('GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}', {\n package_type: 'package_type',\n package_name: 'package_name',\n package_version_id: 42\n})\n"
}
],
"summary": "Get a package version for the authenticated user",
"description": "Gets a specific package version for a package owned by the authenticated user.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.",
"tags": [
"packages"
],
"operationId": "packages/get-package-version-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "get-a-package-version-for-the-authenticated-user",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a specific package version for a package owned by the authenticated user.
\nTo use this endpoint, you must authenticate using an access token with the packages:read scope.\nIf package_type is not container, your token must also include the repo scope.
{\n \"id\": 214,\n \"name\": \"sha256:3561f0cff06caccddb99c93bd26e712fcc56a811de0f8ea7a17bb865f30b176a\",\n \"url\": \"https://api.github.com/users/octocat/packages/container/hello_docker/versions/214\",\n \"package_html_url\": \"https://github.com/users/octocat/packages/container/package/hello_docker\",\n \"created_at\": \"2020-05-15T03:46:45Z\",\n \"updated_at\": \"2020-05-15T03:46:45Z\",\n \"html_url\": \"https://github.com/users/octocat/packages/container/hello_docker/214\",\n \"metadata\": {\n \"package_type\": \"container\",\n \"container\": {\n \"tags\": [\n \"1.13.6\"\n ]\n }\n }\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/user/packages/{package_type}/{package_name}/versions/{package_version_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "package_type",
"description": "The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"descriptionHTML": "The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "package_version_id", "description": "Unique identifier of the package version.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the package version.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}', {\n package_type: 'package_type',\n package_name: 'package_name',\n package_version_id: 42\n})",
"html": "await octokit.request('DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}', {\n package_type: 'package_type',\n package_name: 'package_name',\n package_version_id: 42\n})\n"
}
],
"summary": "Delete a package version for the authenticated user",
"description": "Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.\n\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes.\nIf `package_type` is not `container`, your token must also include the `repo` scope.",
"tags": [
"packages"
],
"operationId": "packages/delete-package-version-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "delete-a-package-version-for-the-authenticated-user",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read and packages:delete scopes.\nIf package_type is not container, your token must also include the repo scope.
The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "package_version_id", "description": "Unique identifier of the package version.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the package version.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42/restore", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42/restore"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore', {\n package_type: 'package_type',\n package_name: 'package_name',\n package_version_id: 42\n})",
"html": "await octokit.request('POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore', {\n package_type: 'package_type',\n package_name: 'package_name',\n package_version_id: 42\n})\n"
}
],
"summary": "Restore a package version for the authenticated user",
"description": "Restores a package version owned by the authenticated user.\n\nYou can restore a deleted package version under the following conditions:\n - The package was deleted within the last 30 days.\n - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope.",
"tags": [
"packages"
],
"operationId": "packages/restore-package-version-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "restore-a-package-version-for-the-authenticated-user",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Restores a package version owned by the authenticated user.
\nYou can restore a deleted package version under the following conditions:
\nTo use this endpoint, you must authenticate using an access token with the packages:read and packages:write scopes. If package_type is not container, your token must also include the repo scope.
curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/projects \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /user/projects', {\n name: 'name'\n})",
"html": "await octokit.request('POST /user/projects', {\n name: 'name'\n})\n"
}
],
"summary": "Create a user project",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/create-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#create-a-user-project"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"description": "Required. Name of the project
", "example": "Week One Sprint", "type": "string", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Name of the project", "childParamsGroups": [] }, "body": { "description": "Body of the project
", "example": "This project represents the sprint of the first week in January", "type": "string or nullable", "nullable": true, "name": "body", "in": "body", "rawType": "string", "rawDescription": "Body of the project", "childParamsGroups": [] } }, "required": [ "name" ], "type": "object" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "projects", "subcategory": null }, "slug": "create-a-user-project", "category": "projects", "categoryLabel": "Projects", "contentType": "application/json", "notes": [], "descriptionHTML": "", "bodyParameters": [ { "description": "Required. Name of the project
", "example": "Week One Sprint", "type": "string", "name": "name", "in": "body", "rawType": "string", "rawDescription": "Name of the project", "childParamsGroups": [] }, { "description": "Body of the project
", "example": "This project represents the sprint of the first week in January", "type": "string or nullable", "nullable": true, "name": "body", "in": "body", "rawType": "string", "rawDescription": "Body of the project", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"owner_url\": \"https://api.github.com/users/octocat\",\n \"url\": \"https://api.github.com/projects/1002603\",\n \"html_url\": \"https://github.com/users/octocat/projects/1\",\n \"columns_url\": \"https://api.github.com/projects/1002603/columns\",\n \"id\": 1002603,\n \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDM=\",\n \"name\": \"My Projects\",\n \"body\": \"A board to manage my personal projects.\",\n \"number\": 1,\n \"state\": \"open\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\"\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "415",
"httpStatusMessage": "Unsupported Media Type",
"description": "Preview header missing"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/user/public_emails",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/public_emails", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/public_emails"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/public_emails')",
"html": "await octokit.request('GET /user/public_emails')\n"
}
],
"summary": "List public email addresses for the authenticated user",
"description": "Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope.",
"tags": [
"users"
],
"operationId": "users/list-public-emails-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": "emails"
},
"slug": "list-public-email-addresses-for-the-authenticated-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "emails",
"subcategoryLabel": "Emails",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists your publicly visible email address, which you can set with the Set primary email visibility for the authenticated user endpoint. This endpoint is accessible with the user:email scope.
[\n {\n \"email\": \"octocat@github.com\",\n \"verified\": true,\n \"primary\": true,\n \"visibility\": \"public\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/user/repos",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "visibility",
"description": "Can be one of `all`, `public`, or `private`. Note: For GitHub AE, can be one of `all`, `internal`, or `private`.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"all",
"public",
"private"
],
"default": "all"
},
"descriptionHTML": "Can be one of all, public, or private. Note: For GitHub AE, can be one of all, internal, or private.
Comma-separated list of values. Can include:
\n* owner: Repositories that are owned by the authenticated user.
\n* collaborator: Repositories that the user has been added to as a collaborator.
\n* organization_member: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on.
Can be one of all, owner, public, private, member. Note: For GitHub AE, can be one of all, owner, internal, private, member. Default: all
Will cause a 422 error if used in the same request as visibility or affiliation. Will cause a 422 error if used in the same request as visibility or affiliation.
Can be one of created, updated, pushed, full_name.
Can be one of asc or desc. Default: asc when using full_name, otherwise desc
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" }, { "name": "since", "description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", "in": "query", "required": false, "schema": { "type": "string", "format": "date-time" }, "descriptionHTML": "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repos"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/repos')",
"html": "await octokit.request('GET /user/repos')\n"
}
],
"summary": "List repositories for the authenticated user",
"description": "Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.\n\nThe authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.",
"tags": [
"repos"
],
"operationId": "repos/list-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "repos",
"subcategory": null
},
"slug": "list-repositories-for-the-authenticated-user",
"category": "repos",
"categoryLabel": "Repos",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists repositories that the authenticated user has explicit permission (:read, :write, or :admin) to access.
The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Default response", "payload": "[\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "post",
"requestPath": "/user/repos",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repos \\\n -d '{\"name\":\"name\"}'",
"html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repos \\\n -d '{\"name\":\"name\"}'"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /user/repos', {\n name: 'name'\n})",
"html": "await octokit.request('POST /user/repos', {\n name: 'name'\n})\n"
}
],
"summary": "Create a repository for the authenticated user",
"description": "Creates a new repository for the authenticated user.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.\n* `repo` scope to create a private repository.",
"tags": [
"repos"
],
"operationId": "repos/create-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"description": "Required. The name of the repository.
", "type": "string", "example": "Team Environment", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the repository.", "childParamsGroups": [] }, "description": { "description": "A short description of the repository.
", "type": "string", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short description of the repository.", "childParamsGroups": [] }, "homepage": { "description": "A URL with more information about the repository.
", "type": "string", "name": "homepage", "in": "body", "rawType": "string", "rawDescription": "A URL with more information about the repository.", "childParamsGroups": [] }, "private": { "description": "Whether the repository is private.
", "default": false, "type": "boolean", "name": "private", "in": "body", "rawType": "boolean", "rawDescription": "Whether the repository is private.", "childParamsGroups": [] }, "has_issues": { "description": "Whether issues are enabled.
", "default": true, "type": "boolean", "example": true, "name": "has_issues", "in": "body", "rawType": "boolean", "rawDescription": "Whether issues are enabled.", "childParamsGroups": [] }, "has_projects": { "description": "Whether projects are enabled.
", "default": true, "type": "boolean", "example": true, "name": "has_projects", "in": "body", "rawType": "boolean", "rawDescription": "Whether projects are enabled.", "childParamsGroups": [] }, "has_wiki": { "description": "Whether the wiki is enabled.
", "default": true, "type": "boolean", "example": true, "name": "has_wiki", "in": "body", "rawType": "boolean", "rawDescription": "Whether the wiki is enabled.", "childParamsGroups": [] }, "team_id": { "description": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.
", "type": "integer", "name": "team_id", "in": "body", "rawType": "integer", "rawDescription": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.", "childParamsGroups": [] }, "auto_init": { "description": "Whether the repository is initialized with a minimal README.
", "default": false, "type": "boolean", "name": "auto_init", "in": "body", "rawType": "boolean", "rawDescription": "Whether the repository is initialized with a minimal README.", "childParamsGroups": [] }, "gitignore_template": { "description": "The desired language or platform to apply to the .gitignore.
", "example": "Haskell", "type": "string", "name": "gitignore_template", "in": "body", "rawType": "string", "rawDescription": "The desired language or platform to apply to the .gitignore.", "childParamsGroups": [] }, "license_template": { "description": "The license keyword of the open source license for this repository.
", "example": "mit", "type": "string", "name": "license_template", "in": "body", "rawType": "string", "rawDescription": "The license keyword of the open source license for this repository.", "childParamsGroups": [] }, "allow_squash_merge": { "description": "Whether to allow squash merges for pull requests.
", "default": true, "type": "boolean", "example": true, "name": "allow_squash_merge", "in": "body", "rawType": "boolean", "rawDescription": "Whether to allow squash merges for pull requests.", "childParamsGroups": [] }, "allow_merge_commit": { "description": "Whether to allow merge commits for pull requests.
", "default": true, "type": "boolean", "example": true, "name": "allow_merge_commit", "in": "body", "rawType": "boolean", "rawDescription": "Whether to allow merge commits for pull requests.", "childParamsGroups": [] }, "allow_rebase_merge": { "description": "Whether to allow rebase merges for pull requests.
", "default": true, "type": "boolean", "example": true, "name": "allow_rebase_merge", "in": "body", "rawType": "boolean", "rawDescription": "Whether to allow rebase merges for pull requests.", "childParamsGroups": [] }, "allow_auto_merge": { "description": "Whether to allow Auto-merge to be used on pull requests.
", "default": false, "type": "boolean", "example": false, "name": "allow_auto_merge", "in": "body", "rawType": "boolean", "rawDescription": "Whether to allow Auto-merge to be used on pull requests.", "childParamsGroups": [] }, "delete_branch_on_merge": { "description": "Whether to delete head branches when pull requests are merged
", "default": false, "type": "boolean", "example": false, "name": "delete_branch_on_merge", "in": "body", "rawType": "boolean", "rawDescription": "Whether to delete head branches when pull requests are merged", "childParamsGroups": [] }, "has_downloads": { "description": "Whether downloads are enabled.
", "default": true, "type": "boolean", "example": true, "name": "has_downloads", "in": "body", "rawType": "boolean", "rawDescription": "Whether downloads are enabled.", "childParamsGroups": [] }, "is_template": { "description": "Whether this repository acts as a template that can be used to generate new repositories.
", "default": false, "type": "boolean", "example": true, "name": "is_template", "in": "body", "rawType": "boolean", "rawDescription": "Whether this repository acts as a template that can be used to generate new repositories.", "childParamsGroups": [] } }, "required": [ "name" ], "type": "object" } } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": false, "category": "repos", "subcategory": null }, "slug": "create-a-repository-for-the-authenticated-user", "category": "repos", "categoryLabel": "Repos", "contentType": "application/json", "notes": [], "descriptionHTML": "Creates a new repository for the authenticated user.
\nOAuth scope requirements
\nWhen using OAuth, authorizations must include:
\npublic_repo scope or repo scope to create a public repository. Note: For GitHub AE, use repo scope to create an internal repository.repo scope to create a private repository.Required. The name of the repository.
", "type": "string", "example": "Team Environment", "name": "name", "in": "body", "rawType": "string", "rawDescription": "The name of the repository.", "childParamsGroups": [] }, { "description": "A short description of the repository.
", "type": "string", "name": "description", "in": "body", "rawType": "string", "rawDescription": "A short description of the repository.", "childParamsGroups": [] }, { "description": "A URL with more information about the repository.
", "type": "string", "name": "homepage", "in": "body", "rawType": "string", "rawDescription": "A URL with more information about the repository.", "childParamsGroups": [] }, { "description": "Whether the repository is private.
", "default": false, "type": "boolean", "name": "private", "in": "body", "rawType": "boolean", "rawDescription": "Whether the repository is private.", "childParamsGroups": [] }, { "description": "Whether issues are enabled.
", "default": true, "type": "boolean", "example": true, "name": "has_issues", "in": "body", "rawType": "boolean", "rawDescription": "Whether issues are enabled.", "childParamsGroups": [] }, { "description": "Whether projects are enabled.
", "default": true, "type": "boolean", "example": true, "name": "has_projects", "in": "body", "rawType": "boolean", "rawDescription": "Whether projects are enabled.", "childParamsGroups": [] }, { "description": "Whether the wiki is enabled.
", "default": true, "type": "boolean", "example": true, "name": "has_wiki", "in": "body", "rawType": "boolean", "rawDescription": "Whether the wiki is enabled.", "childParamsGroups": [] }, { "description": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.
", "type": "integer", "name": "team_id", "in": "body", "rawType": "integer", "rawDescription": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.", "childParamsGroups": [] }, { "description": "Whether the repository is initialized with a minimal README.
", "default": false, "type": "boolean", "name": "auto_init", "in": "body", "rawType": "boolean", "rawDescription": "Whether the repository is initialized with a minimal README.", "childParamsGroups": [] }, { "description": "The desired language or platform to apply to the .gitignore.
", "example": "Haskell", "type": "string", "name": "gitignore_template", "in": "body", "rawType": "string", "rawDescription": "The desired language or platform to apply to the .gitignore.", "childParamsGroups": [] }, { "description": "The license keyword of the open source license for this repository.
", "example": "mit", "type": "string", "name": "license_template", "in": "body", "rawType": "string", "rawDescription": "The license keyword of the open source license for this repository.", "childParamsGroups": [] }, { "description": "Whether to allow squash merges for pull requests.
", "default": true, "type": "boolean", "example": true, "name": "allow_squash_merge", "in": "body", "rawType": "boolean", "rawDescription": "Whether to allow squash merges for pull requests.", "childParamsGroups": [] }, { "description": "Whether to allow merge commits for pull requests.
", "default": true, "type": "boolean", "example": true, "name": "allow_merge_commit", "in": "body", "rawType": "boolean", "rawDescription": "Whether to allow merge commits for pull requests.", "childParamsGroups": [] }, { "description": "Whether to allow rebase merges for pull requests.
", "default": true, "type": "boolean", "example": true, "name": "allow_rebase_merge", "in": "body", "rawType": "boolean", "rawDescription": "Whether to allow rebase merges for pull requests.", "childParamsGroups": [] }, { "description": "Whether to allow Auto-merge to be used on pull requests.
", "default": false, "type": "boolean", "example": false, "name": "allow_auto_merge", "in": "body", "rawType": "boolean", "rawDescription": "Whether to allow Auto-merge to be used on pull requests.", "childParamsGroups": [] }, { "description": "Whether to delete head branches when pull requests are merged
", "default": false, "type": "boolean", "example": false, "name": "delete_branch_on_merge", "in": "body", "rawType": "boolean", "rawDescription": "Whether to delete head branches when pull requests are merged", "childParamsGroups": [] }, { "description": "Whether downloads are enabled.
", "default": true, "type": "boolean", "example": true, "name": "has_downloads", "in": "body", "rawType": "boolean", "rawDescription": "Whether downloads are enabled.", "childParamsGroups": [] }, { "description": "Whether this repository acts as a template that can be used to generate new repositories.
", "default": false, "type": "boolean", "example": true, "name": "is_template", "in": "body", "rawType": "boolean", "rawDescription": "Whether this repository acts as a template that can be used to generate new repositories.", "childParamsGroups": [] } ], "responses": [ { "httpStatusCode": "201", "httpStatusMessage": "Created", "description": "Response", "payload": "{\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"organization\": null,\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n}\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "400",
"httpStatusMessage": "Bad Request",
"description": "Bad Request"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/user/repository_invitations",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repository_invitations", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repository_invitations"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/repository_invitations')",
"html": "await octokit.request('GET /user/repository_invitations')\n"
}
],
"summary": "List repository invitations for the authenticated user",
"description": "When authenticating as a user, this endpoint will list all currently open repository invitations for that user.",
"tags": [
"repos"
],
"operationId": "repos/list-invitations-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-repository-invitations-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "repos",
"subcategory": "invitations"
},
"slug": "list-repository-invitations-for-the-authenticated-user",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "invitations",
"subcategoryLabel": "Invitations",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "When authenticating as a user, this endpoint will list all currently open repository invitations for that user.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n },\n \"invitee\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"inviter\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"permissions\": \"write\",\n \"created_at\": \"2016-06-13T14:52:50-05:00\",\n \"url\": \"https://api.github.com/user/repository_invitations/1296269\",\n \"html_url\": \"https://github.com/octocat/Hello-World/invitations\",\n \"node_id\": \"MDQ6VXNlcjE=\"\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "patch",
"requestPath": "/user/repository_invitations/{invitation_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "invitation_id",
"description": "invitation_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "invitation_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repository_invitations/42", "html": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repository_invitations/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PATCH /user/repository_invitations/{invitation_id}', {\n invitation_id: 42\n})",
"html": "await octokit.request('PATCH /user/repository_invitations/{invitation_id}', {\n invitation_id: 42\n})\n"
}
],
"summary": "Accept a repository invitation",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/accept-invitation-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#accept-a-repository-invitation"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "repos",
"subcategory": "invitations"
},
"slug": "accept-a-repository-invitation",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "invitations",
"subcategoryLabel": "Invitations",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "409",
"httpStatusMessage": "Conflict",
"description": "Conflict"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "delete",
"requestPath": "/user/repository_invitations/{invitation_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "invitation_id",
"description": "invitation_id parameter",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"descriptionHTML": "invitation_id parameter
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repository_invitations/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repository_invitations/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /user/repository_invitations/{invitation_id}', {\n invitation_id: 42\n})",
"html": "await octokit.request('DELETE /user/repository_invitations/{invitation_id}', {\n invitation_id: 42\n})\n"
}
],
"summary": "Decline a repository invitation",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/decline-invitation-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#decline-a-repository-invitation"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "repos",
"subcategory": "invitations"
},
"slug": "decline-a-repository-invitation",
"category": "repos",
"categoryLabel": "Repos",
"subcategory": "invitations",
"subcategoryLabel": "Invitations",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "409",
"httpStatusMessage": "Conflict",
"description": "Conflict"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/user/starred",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "sort",
"description": "One of `created` (when the repository was starred) or `updated` (when it was last pushed to).",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"created",
"updated"
],
"default": "created"
},
"descriptionHTML": "One of created (when the repository was starred) or updated (when it was last pushed to).
One of asc (ascending) or desc (descending).
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/starred", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/starred"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/starred')",
"html": "await octokit.request('GET /user/starred')\n"
}
],
"summary": "List repositories starred by the authenticated user",
"description": "Lists repositories the authenticated user has starred.\n\nYou can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header:",
"tags": [
"activity"
],
"operationId": "activity/list-repos-starred-by-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "starring"
},
"slug": "list-repositories-starred-by-the-authenticated-user",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "starring",
"subcategoryLabel": "Starring",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists repositories the authenticated user has starred.
\nYou can also find out when stars were created by passing the following custom media type via the Accept header:
[\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "get",
"requestPath": "/user/starred/{owner}/{repo}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/starred/octocat/hello-world",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/starred/octocat/hello-world"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/starred/{owner}/{repo}', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('GET /user/starred/{owner}/{repo}', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Check if a repository is starred by the authenticated user",
"description": "",
"tags": [
"activity"
],
"operationId": "activity/check-repo-is-starred-by-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "starring"
},
"slug": "check-if-a-repository-is-starred-by-the-authenticated-user",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "starring",
"subcategoryLabel": "Starring",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response if this repository is starred by you"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Not Found if this repository is not starred by you"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "put",
"requestPath": "/user/starred/{owner}/{repo}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/starred/octocat/hello-world",
"html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/starred/octocat/hello-world"
},
{
"lang": "JavaScript",
"source": "await octokit.request('PUT /user/starred/{owner}/{repo}', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('PUT /user/starred/{owner}/{repo}', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Star a repository for the authenticated user",
"description": "Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"",
"tags": [
"activity"
],
"operationId": "activity/star-repo-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "starring"
},
"slug": "star-a-repository-for-the-authenticated-user",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "starring",
"subcategoryLabel": "Starring",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Note that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/starred/octocat/hello-world"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /user/starred/{owner}/{repo}', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
"html": "await octokit.request('DELETE /user/starred/{owner}/{repo}', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n"
}
],
"summary": "Unstar a repository for the authenticated user",
"description": "",
"tags": [
"activity"
],
"operationId": "activity/unstar-repo-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "starring"
},
"slug": "unstar-a-repository-for-the-authenticated-user",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "starring",
"subcategoryLabel": "Starring",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/user/subscriptions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/subscriptions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/subscriptions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/subscriptions')",
"html": "await octokit.request('GET /user/subscriptions')\n"
}
],
"summary": "List repositories watched by the authenticated user",
"description": "Lists repositories the authenticated user is watching.",
"tags": [
"activity"
],
"operationId": "activity/list-watched-repos-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "watching"
},
"slug": "list-repositories-watched-by-the-authenticated-user",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "watching",
"subcategoryLabel": "Watching",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists repositories the authenticated user is watching.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n }\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "get",
"requestPath": "/user/teams",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/teams", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/teams"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /user/teams')",
"html": "await octokit.request('GET /user/teams')\n"
}
],
"summary": "List teams for the authenticated user",
"description": "List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/).",
"tags": [
"teams"
],
"operationId": "teams/list-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "teams",
"subcategory": null
},
"slug": "list-teams-for-the-authenticated-user",
"category": "teams",
"categoryLabel": "Teams",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List all of the teams across all of the organizations to which the authenticated user belongs. This method requires user, repo, or read:org scope when authenticating via OAuth.
[\n {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n \"parent\": null,\n \"members_count\": 3,\n \"repos_count\": 10,\n \"created_at\": \"2017-07-14T16:53:42Z\",\n \"updated_at\": \"2017-08-17T12:37:15Z\",\n \"organization\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\",\n \"name\": \"github\",\n \"company\": \"GitHub\",\n \"blog\": \"https://github.com/blog\",\n \"location\": \"San Francisco\",\n \"email\": \"octocat@github.com\",\n \"is_verified\": true,\n \"has_organization_projects\": true,\n \"has_repository_projects\": true,\n \"public_repos\": 2,\n \"public_gists\": 1,\n \"followers\": 20,\n \"following\": 0,\n \"html_url\": \"https://github.com/octocat\",\n \"created_at\": \"2008-01-14T04:33:35Z\",\n \"updated_at\": \"2017-08-17T12:37:15Z\",\n \"type\": \"Organization\"\n }\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/users",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "since",
"description": "A user ID. Only return users with an ID greater than this ID.",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"descriptionHTML": "A user ID. Only return users with an ID greater than this ID.
" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users')",
"html": "await octokit.request('GET /users')\n"
}
],
"summary": "List users",
"description": "Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts.\n\nNote: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users.",
"tags": [
"users"
],
"operationId": "users/list",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#list-users"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "users",
"subcategory": null
},
"slug": "list-users",
"category": "users",
"categoryLabel": "Users",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts.
\nNote: Pagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of users.
[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
},
{
"httpStatusCode": "304",
"httpStatusMessage": "Not Modified",
"description": "Not modified"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}', {\n username: 'username'\n})\n"
}
],
"summary": "Get a user",
"description": "Provides publicly available information about someone with a GitHub account.\n\nGitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See \"[Identifying and authorizing users for GitHub Apps](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)\" for details about authentication. For an example response, see 'Response with GitHub plan information' below\"\n\nThe `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/overview/resources-in-the-rest-api#authentication).\n\nThe Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see \"[Emails API](https://docs.github.com/rest/reference/users#emails)\".",
"tags": [
"users"
],
"operationId": "users/get-by-username",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#get-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "users",
"subcategory": null
},
"slug": "get-a-user",
"category": "users",
"categoryLabel": "Users",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Provides publicly available information about someone with a GitHub account.
\nGitHub Apps with the Plan user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See \"Identifying and authorizing users for GitHub Apps\" for details about authentication. For an example response, see 'Response with GitHub plan information' below\"
The email key in the following response is the publicly visible email address from your GitHub profile page. When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for email, then it will have a value of null. You only see publicly visible email addresses when authenticated with GitHub. For more information, see Authentication.
The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see \"Emails API\".
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Default response", "payload": "{\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false,\n \"name\": \"monalisa octocat\",\n \"company\": \"GitHub\",\n \"blog\": \"https://github.com/blog\",\n \"location\": \"San Francisco\",\n \"email\": \"octocat@github.com\",\n \"hireable\": false,\n \"bio\": \"There once was...\",\n \"twitter_username\": \"monatheoctocat\",\n \"public_repos\": 2,\n \"public_gists\": 1,\n \"followers\": 20,\n \"following\": 0,\n \"created_at\": \"2008-01-14T04:33:35Z\",\n \"updated_at\": \"2008-01-14T04:33:35Z\"\n}\n"
},
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response with GitHub plan information",
"payload": "{\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false,\n \"name\": \"monalisa octocat\",\n \"company\": \"GitHub\",\n \"blog\": \"https://github.com/blog\",\n \"location\": \"San Francisco\",\n \"email\": \"octocat@github.com\",\n \"hireable\": false,\n \"bio\": \"There once was...\",\n \"twitter_username\": \"monatheoctocat\",\n \"public_repos\": 2,\n \"public_gists\": 1,\n \"followers\": 20,\n \"following\": 0,\n \"created_at\": \"2008-01-14T04:33:35Z\",\n \"updated_at\": \"2008-01-14T04:33:35Z\",\n \"plan\": {\n \"name\": \"pro\",\n \"space\": 976562499,\n \"collaborators\": 0,\n \"private_repos\": 9999\n }\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/events",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/events", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/events"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/events', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/events', {\n username: 'username'\n})\n"
}
],
"summary": "List events for the authenticated user",
"description": "If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.",
"tags": [
"activity"
],
"operationId": "activity/list-events-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "events"
},
"slug": "list-events-for-the-authenticated-user",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "events",
"subcategoryLabel": "Events",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.
" }, { "verb": "get", "requestPath": "/users/{username}/events/orgs/{org}", "serverUrl": "https://api.github.com", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "org", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/events/orgs/ORG", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/events/orgs/ORG"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/events/orgs/{org}', {\n username: 'username',\n org: 'org'\n})",
"html": "await octokit.request('GET /users/{username}/events/orgs/{org}', {\n username: 'username',\n org: 'org'\n})\n"
}
],
"summary": "List organization events for the authenticated user",
"description": "This is the user's organization dashboard. You must be authenticated as the user to view this.",
"tags": [
"activity"
],
"operationId": "activity/list-org-events-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "events"
},
"slug": "list-organization-events-for-the-authenticated-user",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "events",
"subcategoryLabel": "Events",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "This is the user's organization dashboard. You must be authenticated as the user to view this.
" }, { "verb": "get", "requestPath": "/users/{username}/events/public", "serverUrl": "https://api.github.com", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/events/public", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/events/public"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/events/public', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/events/public', {\n username: 'username'\n})\n"
}
],
"summary": "List public events for a user",
"description": "",
"tags": [
"activity"
],
"operationId": "activity/list-public-events-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-public-events-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "events"
},
"slug": "list-public-events-for-a-user",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "events",
"subcategoryLabel": "Events",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/users/{username}/followers",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/followers", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/followers"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/followers', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/followers', {\n username: 'username'\n})\n"
}
],
"summary": "List followers of a user",
"description": "Lists the people following the specified user.",
"tags": [
"users"
],
"operationId": "users/list-followers-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#list-followers-of-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "users",
"subcategory": "followers"
},
"slug": "list-followers-of-a-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "followers",
"subcategoryLabel": "Followers",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the people following the specified user.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/following",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/following", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/following"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/following', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/following', {\n username: 'username'\n})\n"
}
],
"summary": "List the people a user follows",
"description": "Lists the people who the specified user follows.",
"tags": [
"users"
],
"operationId": "users/list-following-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#list-the-people-a-user-follows"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "users",
"subcategory": "followers"
},
"slug": "list-the-people-a-user-follows",
"category": "users",
"categoryLabel": "Users",
"subcategory": "followers",
"subcategoryLabel": "Followers",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the people who the specified user follows.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/following/{target_user}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "target_user",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/following/TARGET_USER",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/following/TARGET_USER"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/following/{target_user}', {\n username: 'username',\n target_user: 'target_user'\n})",
"html": "await octokit.request('GET /users/{username}/following/{target_user}', {\n username: 'username',\n target_user: 'target_user'\n})\n"
}
],
"summary": "Check if a user follows another user",
"description": "",
"tags": [
"users"
],
"operationId": "users/check-following-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "users",
"subcategory": "followers"
},
"slug": "check-if-a-user-follows-another-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "followers",
"subcategoryLabel": "Followers",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "if the user follows the target user"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "if the user does not follow the target user"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/users/{username}/gists",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "since",
"description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
},
"descriptionHTML": "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/gists", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/gists"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/gists', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/gists', {\n username: 'username'\n})\n"
}
],
"summary": "List gists for a user",
"description": "Lists public gists for the specified user:",
"tags": [
"gists"
],
"operationId": "gists/list-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#list-gists-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
},
"slug": "list-gists-for-a-user",
"category": "gists",
"categoryLabel": "Gists",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists public gists for the specified user:
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n \"id\": \"aa5a315d61ae9438b18d\",\n \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n \"files\": {\n \"hello_world.rb\": {\n \"filename\": \"hello_world.rb\",\n \"type\": \"application/x-ruby\",\n \"language\": \"Ruby\",\n \"raw_url\": \"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\n \"size\": 167\n }\n },\n \"public\": true,\n \"created_at\": \"2010-04-14T02:15:15Z\",\n \"updated_at\": \"2011-06-20T11:34:15Z\",\n \"description\": \"Hello World Examples\",\n \"comments\": 0,\n \"user\": null,\n \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"truncated\": false\n }\n]\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/gpg_keys",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/gpg_keys", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/gpg_keys"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/gpg_keys', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/gpg_keys', {\n username: 'username'\n})\n"
}
],
"summary": "List GPG keys for a user",
"description": "Lists the GPG keys for a user. This information is accessible by anyone.",
"tags": [
"users"
],
"operationId": "users/list-gpg-keys-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "users",
"subcategory": "gpg-keys"
},
"slug": "list-gpg-keys-for-a-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "gpg-keys",
"subcategoryLabel": "Gpg keys",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the GPG keys for a user. This information is accessible by anyone.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 3,\n \"primary_key_id\": 2,\n \"key_id\": \"3262EFF25BA0D270\",\n \"public_key\": \"xsBNBFayYZ...\",\n \"emails\": [\n {\n \"email\": \"mastahyeti@users.noreply.github.com\",\n \"verified\": true\n }\n ],\n \"subkeys\": [\n {\n \"id\": 4,\n \"primary_key_id\": 3,\n \"key_id\": \"4A595D4C72EE49C7\",\n \"public_key\": \"zsBNBFayYZ...\",\n \"emails\": [],\n \"subkeys\": [],\n \"can_sign\": false,\n \"can_encrypt_comms\": true,\n \"can_encrypt_storage\": true,\n \"can_certify\": false,\n \"created_at\": \"2016-03-24T11:31:04-06:00\",\n \"expires_at\": \"2016-03-24T11:31:04-07:00\"\n }\n ],\n \"can_sign\": true,\n \"can_encrypt_comms\": false,\n \"can_encrypt_storage\": false,\n \"can_certify\": true,\n \"created_at\": \"2016-03-24T11:31:04-06:00\",\n \"expires_at\": \"2016-03-24T11:31:04-07:00\",\n \"raw_key\": \"string\"\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/hovercard",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "subject_type",
"description": "Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"organization",
"repository",
"issue",
"pull_request"
]
},
"descriptionHTML": "Identifies which additional information you'd like to receive about the person's hovercard. Can be organization, repository, issue, pull_request. Required when using subject_id.
Uses the ID for the subject_type you specified. Required when using subject_type.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/hovercard"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/hovercard', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/hovercard', {\n username: 'username'\n})\n"
}
],
"summary": "Get contextual information for a user",
"description": "Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations.\n\nThe `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this:\n\n```shell\n curl -u username:token\n https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192\n```",
"tags": [
"users"
],
"operationId": "users/get-context-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "users",
"subcategory": null
},
"slug": "get-contextual-information-for-a-user",
"category": "users",
"categoryLabel": "Users",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Provides hovercard information when authenticated through basic auth or OAuth with the repo scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations.
The subject_type and subject_id parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about octocat who owns the Spoon-Knife repository via cURL, it would look like this:
curl -u username:token\n https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "{\n \"contexts\": [\n {\n \"message\": \"Owns this repository\",\n \"octicon\": \"repo\"\n }\n ]\n}\n"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/installation",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/installation",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/installation"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/installation', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/installation', {\n username: 'username'\n})\n"
}
],
"summary": "Get a user installation for the authenticated app",
"description": "Enables an authenticated GitHub App to find the user’s installation information.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-user-installation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": null
},
"slug": "get-a-user-installation-for-the-authenticated-app",
"category": "apps",
"categoryLabel": "Apps",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Enables an authenticated GitHub App to find the user’s installation information.
\nYou must use a JWT to access this endpoint.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "{\n \"id\": 1,\n \"account\": {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"html_url\": \"https://github.com/github\",\n \"followers_url\": \"https://api.github.com/users/github/followers\",\n \"following_url\": \"https://api.github.com/users/github/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/github/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/github/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/github/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/github/orgs\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"received_events_url\": \"https://api.github.com/users/github/received_events\",\n \"type\": \"Organization\",\n \"site_admin\": false\n },\n \"repository_selection\": \"all\",\n \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n \"repositories_url\": \"https://api.github.com/installation/repositories\",\n \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n \"app_id\": 1,\n \"target_id\": 1,\n \"target_type\": \"Organization\",\n \"permissions\": {\n \"checks\": \"write\",\n \"metadata\": \"read\",\n \"contents\": \"read\"\n },\n \"events\": [\n \"push\",\n \"pull_request\"\n ],\n \"created_at\": \"2018-02-09T20:51:14Z\",\n \"updated_at\": \"2018-02-09T20:51:14Z\",\n \"single_file_name\": \"config.yml\",\n \"has_multiple_single_files\": true,\n \"single_file_paths\": [\n \"config.yml\",\n \".github/issue_TEMPLATE.md\"\n ],\n \"app_slug\": \"github-actions\",\n \"suspended_at\": null,\n \"suspended_by\": null\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/keys",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/keys", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/keys"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/keys', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/keys', {\n username: 'username'\n})\n"
}
],
"summary": "List public keys for a user",
"description": "Lists the _verified_ public SSH keys for a user. This is accessible by anyone.",
"tags": [
"users"
],
"operationId": "users/list-public-keys-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/users#list-public-keys-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "users",
"subcategory": "keys"
},
"slug": "list-public-keys-for-a-user",
"category": "users",
"categoryLabel": "Users",
"subcategory": "keys",
"subcategoryLabel": "Keys",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists the verified public SSH keys for a user. This is accessible by anyone.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1,\n \"key\": \"ssh-rsa AAA...\"\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/orgs",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/orgs", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/orgs"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/orgs', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/orgs', {\n username: 'username'\n})\n"
}
],
"summary": "List organizations for a user",
"description": "List [public organization memberships](https://help.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user.\n\nThis method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead.",
"tags": [
"orgs"
],
"operationId": "orgs/list-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": null
},
"slug": "list-organizations-for-a-user",
"category": "orgs",
"categoryLabel": "Orgs",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "List public organization memberships for the specified user.
\nThis method only lists public memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the List organizations for the authenticated user API instead.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"login\": \"github\",\n \"id\": 1,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n \"url\": \"https://api.github.com/orgs/github\",\n \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n \"events_url\": \"https://api.github.com/orgs/github/events\",\n \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"description\": \"A great organization\"\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/packages",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "package_type",
"description": "The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"in": "query",
"required": true,
"schema": {
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"descriptionHTML": "The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The selected visibility of the packages. Can be one of public, private, or internal. Only container package_types currently support internal visibility properly. For other ecosystems internal is synonymous with private. This parameter is optional and only filters an existing result set.
curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/packages"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/packages', {\n package_type: 'package_type',\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/packages', {\n package_type: 'package_type',\n username: 'username'\n})\n"
}
],
"summary": "List packages for a user",
"description": "Lists all packages in a user's namespace for which the requesting user has access.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.",
"tags": [
"packages"
],
"operationId": "packages/list-packages-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#list-packages-for-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "list-packages-for-a-user",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists all packages in a user's namespace for which the requesting user has access.
\nTo use this endpoint, you must authenticate using an access token with the packages:read scope.\nIf package_type is not container, your token must also include the repo scope.
[\n {\n \"id\": 197,\n \"name\": \"hello_docker\",\n \"package_type\": \"container\",\n \"owner\": {\n \"login\": \"monalisa\",\n \"id\": 9919,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjk5MTk=\",\n \"avatar_url\": \"https://avatars.monalisausercontent.com/u/9919?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/monalisa\",\n \"html_url\": \"https://github.com/github\",\n \"followers_url\": \"https://api.github.com/users/github/followers\",\n \"following_url\": \"https://api.github.com/users/github/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/github/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/github/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/github/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/github/orgs\",\n \"repos_url\": \"https://api.github.com/users/github/repos\",\n \"events_url\": \"https://api.github.com/users/github/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/github/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"version_count\": 1,\n \"visibility\": \"private\",\n \"url\": \"https://api.github.com/orgs/github/packages/container/hello_docker\",\n \"created_at\": \"2020-05-19T22:19:11Z\",\n \"updated_at\": \"2020-05-19T22:19:11Z\",\n \"html_url\": \"https://github.com/orgs/github/packages/container/package/hello_docker\"\n },\n {\n \"id\": 198,\n \"name\": \"goodbye_docker\",\n \"package_type\": \"container\",\n \"owner\": {\n \"login\": \"github\",\n \"id\": 9919,\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjk5MTk=\",\n \"avatar_url\": \"https://avatars.githubusercontent.com/u/9919?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/monalisa\",\n \"html_url\": \"https://github.com/github\",\n \"followers_url\": \"https://api.github.com/users/github/followers\",\n \"following_url\": \"https://api.github.com/users/github/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/github/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/github/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/github/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/github/orgs\",\n \"repos_url\": \"https://api.github.com/users/github/repos\",\n \"events_url\": \"https://api.github.com/users/github/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/github/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"version_count\": 2,\n \"visibility\": \"private\",\n \"url\": \"https://api.github.com/user/monalisa/packages/container/goodbye_docker\",\n \"created_at\": \"2020-05-20T22:19:11Z\",\n \"updated_at\": \"2020-05-20T22:19:11Z\",\n \"html_url\": \"https://github.com/user/monalisa/packages/container/package/goodbye_docker\"\n }\n]\n"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/packages/{package_type}/{package_name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "package_type",
"description": "The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"descriptionHTML": "The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/packages/PACKAGE_TYPE/PACKAGE_NAME", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/packages/PACKAGE_TYPE/PACKAGE_NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/packages/{package_type}/{package_name}', {\n package_type: 'package_type',\n package_name: 'package_name',\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/packages/{package_type}/{package_name}', {\n package_type: 'package_type',\n package_name: 'package_name',\n username: 'username'\n})\n"
}
],
"summary": "Get a package for a user",
"description": "Gets a specific package metadata for a public package owned by a user.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.",
"tags": [
"packages"
],
"operationId": "packages/get-package-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#get-a-package-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "get-a-package-for-a-user",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a specific package metadata for a public package owned by a user.
\nTo use this endpoint, you must authenticate using an access token with the packages:read scope.\nIf package_type is not container, your token must also include the repo scope.
{\n \"id\": 40201,\n \"name\": \"octo-name\",\n \"package_type\": \"rubygems\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 209477,\n \"node_id\": \"MDQ6VXNlcjIwOTQ3Nw==\",\n \"avatar_url\": \"https://avatars.githubusercontent.com/u/209477?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"version_count\": 3,\n \"visibility\": \"public\",\n \"url\": \"https://api.github.com/users/octocat/packages/rubygems/octo-name\",\n \"created_at\": \"2019-10-20T14:17:14Z\",\n \"updated_at\": \"2019-10-20T14:17:14Z\",\n \"repository\": {\n \"id\": 216219492,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMTYyMTk0OTI=\",\n \"name\": \"octo-name-repo\",\n \"full_name\": \"octocat/octo-name-repo\",\n \"private\": false,\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 209477,\n \"node_id\": \"MDQ6VXNlcjIwOTQ3Nw==\",\n \"avatar_url\": \"https://avatars.githubusercontent.com/u/209477?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": true\n },\n \"html_url\": \"https://github.com/octocat/octo-name-repo\",\n \"description\": \"Project for octocats\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/octo-name-repo\",\n \"forks_url\": \"https://api.github.com/repos/octocat/octo-name-repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/octocat/octo-name-repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/octo-name-repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/octocat/octo-name-repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/octo-name-repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/octo-name-repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/octocat/octo-name-repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/octo-name-repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/octo-name-repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/octocat/octo-name-repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/octo-name-repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/octo-name-repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/octo-name-repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/octocat/octo-name-repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/octo-name-repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/octo-name-repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/octo-name-repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/octo-name-repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/octo-name-repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/octo-name-repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/octocat/octo-name-repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/octo-name-repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/octo-name-repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/octo-name-repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/octo-name-repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/octo-name-repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/octocat/octo-name-repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/octocat/octo-name-repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/octo-name-repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/octocat/octo-name-repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/octo-name-repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/octo-name-repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/octo-name-repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/octo-name-repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/octo-name-repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/octo-name-repo/deployments\"\n },\n \"html_url\": \"https://github.com/octocat/octo-name-repo/packages/40201\"\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/users/{username}/packages/{package_type}/{package_name}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "package_type",
"description": "The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"descriptionHTML": "The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/packages/PACKAGE_TYPE/PACKAGE_NAME", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/packages/PACKAGE_TYPE/PACKAGE_NAME"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /users/{username}/packages/{package_type}/{package_name}', {\n package_type: 'package_type',\n package_name: 'package_name',\n username: 'username'\n})",
"html": "await octokit.request('DELETE /users/{username}/packages/{package_type}/{package_name}', {\n package_type: 'package_type',\n package_name: 'package_name',\n username: 'username'\n})\n"
}
],
"summary": "Delete a package for a user",
"description": "Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition:\n- If `package_type` is not `container`, your token must also include the `repo` scope.\n- If `package_type` is `container`, you must also have admin permissions to the container you want to delete.",
"tags": [
"packages"
],
"operationId": "packages/delete-package-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "delete-a-package-for-a-user",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
\nTo use this endpoint, you must authenticate using an access token with the packages:read and packages:delete scopes. In addition:
package_type is not container, your token must also include the repo scope.package_type is container, you must also have admin permissions to the container you want to delete.The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "token", "description": "package token", "schema": { "type": "string" }, "required": false, "in": "query", "descriptionHTML": "package token
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/packages/PACKAGE_TYPE/PACKAGE_NAME/restore", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/packages/PACKAGE_TYPE/PACKAGE_NAME/restore"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /users/{username}/packages/{package_type}/{package_name}/restore', {\n package_type: 'package_type',\n package_name: 'package_name',\n username: 'username'\n})",
"html": "await octokit.request('POST /users/{username}/packages/{package_type}/{package_name}/restore', {\n package_type: 'package_type',\n package_name: 'package_name',\n username: 'username'\n})\n"
}
],
"summary": "Restore a package for a user",
"description": "Restores an entire package for a user.\n\nYou can restore a deleted package under the following conditions:\n - The package was deleted within the last 30 days.\n - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition:\n- If `package_type` is not `container`, your token must also include the `repo` scope.\n- If `package_type` is `container`, you must also have admin permissions to the container that you want to restore.",
"tags": [
"packages"
],
"operationId": "packages/restore-package-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "restore-a-package-for-a-user",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Restores an entire package for a user.
\nYou can restore a deleted package under the following conditions:
\nTo use this endpoint, you must authenticate using an access token with the packages:read and packages:write scopes. In addition:
package_type is not container, your token must also include the repo scope.package_type is container, you must also have admin permissions to the container that you want to restore.The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/packages/PACKAGE_TYPE/PACKAGE_NAME/versions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/packages/PACKAGE_TYPE/PACKAGE_NAME/versions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/packages/{package_type}/{package_name}/versions', {\n package_type: 'package_type',\n package_name: 'package_name',\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/packages/{package_type}/{package_name}/versions', {\n package_type: 'package_type',\n package_name: 'package_name',\n username: 'username'\n})\n"
}
],
"summary": "Get all package versions for a package owned by a user",
"description": "Returns all package versions for a public package owned by a specified user.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.",
"tags": [
"packages"
],
"operationId": "packages/get-all-package-versions-for-package-owned-by-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "get-all-package-versions-for-a-package-owned-by-a-user",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Returns all package versions for a public package owned by a specified user.
\nTo use this endpoint, you must authenticate using an access token with the packages:read scope.\nIf package_type is not container, your token must also include the repo scope.
[\n {\n \"id\": 3497268,\n \"name\": \"0.3.0\",\n \"url\": \"https://api.github.com/users/octocat/packages/rubygems/octo-name/versions/3497268\",\n \"package_html_url\": \"https://github.com/octocat/octo-name-repo/packages/40201\",\n \"license\": \"MIT\",\n \"created_at\": \"2020-08-31T15:22:11Z\",\n \"updated_at\": \"2020-08-31T15:22:12Z\",\n \"description\": \"Project for octocats\",\n \"html_url\": \"https://github.com/octocat/octo-name-repo/packages/40201?version=0.3.0\",\n \"metadata\": {\n \"package_type\": \"rubygems\"\n }\n },\n {\n \"id\": 387039,\n \"name\": \"0.2.0\",\n \"url\": \"https://api.github.com/users/octocat/packages/rubygems/octo-name/versions/387039\",\n \"package_html_url\": \"https://github.com/octocat/octo-name-repo/packages/40201\",\n \"license\": \"MIT\",\n \"created_at\": \"2019-12-01T20:49:29Z\",\n \"updated_at\": \"2019-12-01T20:49:30Z\",\n \"description\": \"Project for octocats\",\n \"html_url\": \"https://github.com/octocat/octo-name-repo/packages/40201?version=0.2.0\",\n \"metadata\": {\n \"package_type\": \"rubygems\"\n }\n },\n {\n \"id\": 169770,\n \"name\": \"0.1.0\",\n \"url\": \"https://api.github.com/users/octocat/packages/rubygems/octo-name/versions/169770\",\n \"package_html_url\": \"https://github.com/octocat/octo-name-repo/packages/40201\",\n \"license\": \"MIT\",\n \"created_at\": \"2019-10-20T14:17:14Z\",\n \"updated_at\": \"2019-10-20T14:17:15Z\",\n \"html_url\": \"https://github.com/octocat/octo-name-repo/packages/40201?version=0.1.0\",\n \"metadata\": {\n \"package_type\": \"rubygems\"\n }\n }\n]\n"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "package_type",
"description": "The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"descriptionHTML": "The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "package_version_id", "description": "Unique identifier of the package version.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the package version.
" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}', {\n package_type: 'package_type',\n package_name: 'package_name',\n package_version_id: 42,\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}', {\n package_type: 'package_type',\n package_name: 'package_name',\n package_version_id: 42,\n username: 'username'\n})\n"
}
],
"summary": "Get a package version for a user",
"description": "Gets a specific package version for a public package owned by a specified user.\n\nAt this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope.\nIf `package_type` is not `container`, your token must also include the `repo` scope.",
"tags": [
"packages"
],
"operationId": "packages/get-package-version-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "get-a-package-version-for-a-user",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets a specific package version for a public package owned by a specified user.
\nAt this time, to use this endpoint, you must authenticate using an access token with the packages:read scope.\nIf package_type is not container, your token must also include the repo scope.
{\n \"id\": 387039,\n \"name\": \"0.2.0\",\n \"url\": \"https://api.github.com/users/octocat/packages/rubygems/octo-name/versions/387039\",\n \"package_html_url\": \"https://github.com/octocat/octo-name-repo/packages/40201\",\n \"license\": \"MIT\",\n \"created_at\": \"2019-12-01T20:49:29Z\",\n \"updated_at\": \"2019-12-01T20:49:30Z\",\n \"description\": \"Octo-name client for Ruby\",\n \"html_url\": \"https://github.com/octocat/octo-name-repo/packages/40201?version=0.2.0\",\n \"metadata\": {\n \"package_type\": \"rubygems\"\n }\n}\n"
}
]
},
{
"verb": "delete",
"requestPath": "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "package_type",
"description": "The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"descriptionHTML": "The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "package_version_id", "description": "Unique identifier of the package version.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the package version.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42", "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42"
},
{
"lang": "JavaScript",
"source": "await octokit.request('DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}', {\n package_type: 'package_type',\n package_name: 'package_name',\n username: 'username',\n package_version_id: 42\n})",
"html": "await octokit.request('DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}', {\n package_type: 'package_type',\n package_name: 'package_name',\n username: 'username',\n package_version_id: 42\n})\n"
}
],
"summary": "Delete package version for a user",
"description": "Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition:\n- If `package_type` is not `container`, your token must also include the `repo` scope.\n- If `package_type` is `container`, you must also have admin permissions to the container you want to delete.",
"tags": [
"packages"
],
"operationId": "packages/delete-package-version-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "delete-package-version-for-a-user",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
\nTo use this endpoint, you must authenticate using an access token with the packages:read and packages:delete scopes. In addition:
package_type is not container, your token must also include the repo scope.package_type is container, you must also have admin permissions to the container you want to delete.The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
The name of the package.
" }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "package_version_id", "description": "Unique identifier of the package version.", "in": "path", "required": true, "schema": { "type": "integer" }, "descriptionHTML": "Unique identifier of the package version.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42/restore", "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/packages/PACKAGE_TYPE/PACKAGE_NAME/versions/42/restore"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore', {\n package_type: 'package_type',\n package_name: 'package_name',\n username: 'username',\n package_version_id: 42\n})",
"html": "await octokit.request('POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore', {\n package_type: 'package_type',\n package_name: 'package_name',\n username: 'username',\n package_version_id: 42\n})\n"
}
],
"summary": "Restore package version for a user",
"description": "Restores a specific package version for a user.\n\nYou can restore a deleted package under the following conditions:\n - The package was deleted within the last 30 days.\n - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition:\n- If `package_type` is not `container`, your token must also include the `repo` scope.\n- If `package_type` is `container`, you must also have admin permissions to the container that you want to restore.",
"tags": [
"packages"
],
"operationId": "packages/restore-package-version-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
},
"slug": "restore-package-version-for-a-user",
"category": "packages",
"categoryLabel": "Packages",
"notes": [],
"responses": [
{
"httpStatusCode": "204",
"httpStatusMessage": "No Content",
"description": "Response"
},
{
"httpStatusCode": "401",
"httpStatusMessage": "Unauthorized",
"description": "Requires authentication"
},
{
"httpStatusCode": "403",
"httpStatusMessage": "Forbidden",
"description": "Forbidden"
},
{
"httpStatusCode": "404",
"httpStatusMessage": "Not Found",
"description": "Resource not found"
}
],
"bodyParameters": [],
"descriptionHTML": "Restores a specific package version for a user.
\nYou can restore a deleted package under the following conditions:
\nTo use this endpoint, you must authenticate using an access token with the packages:read and packages:write scopes. In addition:
package_type is not container, your token must also include the repo scope.package_type is container, you must also have admin permissions to the container that you want to restore.Indicates the state of the projects to return. Can be either open, closed, or all.
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/projects", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/projects"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/projects', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/projects', {\n username: 'username'\n})\n"
}
],
"summary": "List user projects",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/list-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#list-user-projects"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "projects",
"subcategory": null
},
"slug": "list-user-projects",
"category": "projects",
"categoryLabel": "Projects",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
"payload": "[\n {\n \"owner_url\": \"https://api.github.com/users/octocat\",\n \"url\": \"https://api.github.com/projects/1002603\",\n \"html_url\": \"https://github.com/users/octocat/projects/1\",\n \"columns_url\": \"https://api.github.com/projects/1002603/columns\",\n \"id\": 1002603,\n \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDM=\",\n \"name\": \"My Projects\",\n \"body\": \"A board to manage my personal projects.\",\n \"number\": 1,\n \"state\": \"open\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2011-04-10T20:09:31Z\",\n \"updated_at\": \"2014-03-03T18:58:10Z\"\n }\n]\n"
},
{
"httpStatusCode": "422",
"httpStatusMessage": "Unprocessable Entity",
"description": "Validation failed"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/received_events",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/received_events", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/received_events"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/received_events', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/received_events', {\n username: 'username'\n})\n"
}
],
"summary": "List events received by the authenticated user",
"description": "These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events.",
"tags": [
"activity"
],
"operationId": "activity/list-received-events-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "events"
},
"slug": "list-events-received-by-the-authenticated-user",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "events",
"subcategoryLabel": "Events",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events.
" }, { "verb": "get", "requestPath": "/users/{username}/received_events/public", "serverUrl": "https://api.github.com", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string" }, "descriptionHTML": "" }, { "name": "per_page", "description": "Results per page (max 100)", "in": "query", "schema": { "type": "integer", "default": 30 }, "descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/received_events/public", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/received_events/public"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/received_events/public', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/received_events/public', {\n username: 'username'\n})\n"
}
],
"summary": "List public events received by a user",
"description": "",
"tags": [
"activity"
],
"operationId": "activity/list-received-public-events-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "events"
},
"slug": "list-public-events-received-by-a-user",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "events",
"subcategoryLabel": "Events",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": ""
},
{
"verb": "get",
"requestPath": "/users/{username}/repos",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "type",
"description": "Can be one of `all`, `owner`, `member`.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"all",
"owner",
"member"
],
"default": "owner"
},
"descriptionHTML": "Can be one of all, owner, member.
Can be one of created, updated, pushed, full_name.
Can be one of asc or desc. Default: asc when using full_name, otherwise desc
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/repos", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/repos"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/repos', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/repos', {\n username: 'username'\n})\n"
}
],
"summary": "List repositories for a user",
"description": "Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user.",
"tags": [
"repos"
],
"operationId": "repos/list-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-repositories-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
},
"slug": "list-repositories-for-a-user",
"category": "repos",
"categoryLabel": "Repos",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n }\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/settings/billing/actions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/settings/billing/actions",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/settings/billing/actions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/settings/billing/actions', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/settings/billing/actions', {\n username: 'username'\n})\n"
}
],
"summary": "Get GitHub Actions billing for a user",
"description": "Gets the summary of the free and paid GitHub Actions minutes used.\n\nPaid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see \"[Managing billing for GitHub Actions](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)\".\n\nAccess tokens must have the `user` scope.",
"operationId": "billing/get-github-actions-billing-user",
"tags": [
"billing"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "billing",
"subcategory": null
},
"slug": "get-github-actions-billing-for-a-user",
"category": "billing",
"categoryLabel": "Billing",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the summary of the free and paid GitHub Actions minutes used.
\nPaid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see \"Managing billing for GitHub Actions\".
\nAccess tokens must have the user scope.
{\n \"total_minutes_used\": 305,\n \"total_paid_minutes_used\": 0,\n \"included_minutes\": 3000,\n \"minutes_used_breakdown\": {\n \"UBUNTU\": 205,\n \"MACOS\": 10,\n \"WINDOWS\": 90\n }\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/settings/billing/packages",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/settings/billing/packages",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/settings/billing/packages"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/settings/billing/packages', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/settings/billing/packages', {\n username: 'username'\n})\n"
}
],
"summary": "Get GitHub Packages billing for a user",
"description": "Gets the free and paid storage used for GitHub Packages in gigabytes.\n\nPaid minutes only apply to packages stored for private repositories. For more information, see \"[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages).\"\n\nAccess tokens must have the `user` scope.",
"operationId": "billing/get-github-packages-billing-user",
"tags": [
"billing"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "billing",
"subcategory": null
},
"slug": "get-github-packages-billing-for-a-user",
"category": "billing",
"categoryLabel": "Billing",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the free and paid storage used for GitHub Packages in gigabytes.
\nPaid minutes only apply to packages stored for private repositories. For more information, see \"Managing billing for GitHub Packages.\"
\nAccess tokens must have the user scope.
{\n \"total_gigabytes_bandwidth_used\": 50,\n \"total_paid_gigabytes_bandwidth_used\": 40,\n \"included_gigabytes_bandwidth\": 10\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/settings/billing/shared-storage",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
}
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/settings/billing/shared-storage",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/settings/billing/shared-storage"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/settings/billing/shared-storage', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/settings/billing/shared-storage', {\n username: 'username'\n})\n"
}
],
"summary": "Get shared storage billing for a user",
"description": "Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages.\n\nPaid minutes only apply to packages stored for private repositories. For more information, see \"[Managing billing for GitHub Packages](https://help.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages).\"\n\nAccess tokens must have the `user` scope.",
"operationId": "billing/get-shared-storage-billing-user",
"tags": [
"billing"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "billing",
"subcategory": null
},
"slug": "get-shared-storage-billing-for-a-user",
"category": "billing",
"categoryLabel": "Billing",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages.
\nPaid minutes only apply to packages stored for private repositories. For more information, see \"Managing billing for GitHub Packages.\"
\nAccess tokens must have the user scope.
{\n \"days_left_in_billing_cycle\": 20,\n \"estimated_paid_storage_for_month\": 15,\n \"estimated_storage_for_month\": 40\n}\n"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/starred",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "sort",
"description": "One of `created` (when the repository was starred) or `updated` (when it was last pushed to).",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"created",
"updated"
],
"default": "created"
},
"descriptionHTML": "One of created (when the repository was starred) or updated (when it was last pushed to).
One of asc (ascending) or desc (descending).
Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/starred", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/starred"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/starred', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/starred', {\n username: 'username'\n})\n"
}
],
"summary": "List repositories starred by a user",
"description": "Lists repositories a user has starred.\n\nYou can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header:",
"tags": [
"activity"
],
"operationId": "activity/list-repos-starred-by-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "starring"
},
"slug": "list-repositories-starred-by-a-user",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "starring",
"subcategoryLabel": "Starring",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists repositories a user has starred.
\nYou can also find out when stars were created by passing the following custom media type via the Accept header:
[\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"template_repository\": null,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://github.com/licenses/mit\"\n },\n \"forks\": 1,\n \"open_issues\": 1,\n \"watchers\": 1\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/users/{username}/subscriptions",
"serverUrl": "https://api.github.com",
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"descriptionHTML": ""
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
},
"descriptionHTML": "Results per page (max 100)
" }, { "name": "page", "description": "Page number of the results to fetch.", "in": "query", "schema": { "type": "integer", "default": 1 }, "descriptionHTML": "Page number of the results to fetch.
" } ], "x-codeSamples": [ { "lang": "Shell", "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/subscriptions", "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/subscriptions"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /users/{username}/subscriptions', {\n username: 'username'\n})",
"html": "await octokit.request('GET /users/{username}/subscriptions', {\n username: 'username'\n})\n"
}
],
"summary": "List repositories watched by a user",
"description": "Lists repositories a user is watching.",
"tags": [
"activity"
],
"operationId": "activity/list-repos-watched-by-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "watching"
},
"slug": "list-repositories-watched-by-a-user",
"category": "activity",
"categoryLabel": "Activity",
"subcategory": "watching",
"subcategoryLabel": "Watching",
"notes": [],
"bodyParameters": [],
"descriptionHTML": "Lists repositories a user is watching.
", "responses": [ { "httpStatusCode": "200", "httpStatusMessage": "OK", "description": "Response", "payload": "[\n {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World\",\n \"full_name\": \"octocat/Hello-World\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues_count\": 0,\n \"is_template\": false,\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"template_repository\": {\n \"id\": 1296269,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n \"name\": \"Hello-World-Template\",\n \"full_name\": \"octocat/Hello-World-Template\",\n \"owner\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"private\": false,\n \"html_url\": \"https://github.com/octocat/Hello-World-Template\",\n \"description\": \"This your first repo!\",\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/octocat/Hello-World-Template\",\n \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}\",\n \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}\",\n \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}\",\n \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}\",\n \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}\",\n \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}\",\n \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}\",\n \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}\",\n \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}\",\n \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/contributors\",\n \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/deployments\",\n \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/downloads\",\n \"events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/events\",\n \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/forks\",\n \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}\",\n \"git_url\": \"git:github.com/octocat/Hello-World-Template.git\",\n \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}\",\n \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}\",\n \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}\",\n \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}\",\n \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}\",\n \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/languages\",\n \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/merges\",\n \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}\",\n \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}\",\n \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}\",\n \"ssh_url\": \"git@github.com:octocat/Hello-World-Template.git\",\n \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/stargazers\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}\",\n \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/subscription\",\n \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/tags\",\n \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/teams\",\n \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}\",\n \"clone_url\": \"https://github.com/octocat/Hello-World-Template.git\",\n \"mirror_url\": \"git:git.example.com/octocat/Hello-World-Template\",\n \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World-Template/hooks\",\n \"svn_url\": \"https://svn.github.com/octocat/Hello-World-Template\",\n \"homepage\": \"https://github.com\",\n \"language\": null,\n \"forks\": 9,\n \"forks_count\": 9,\n \"stargazers_count\": 80,\n \"watchers_count\": 80,\n \"watchers\": 80,\n \"size\": 108,\n \"default_branch\": \"master\",\n \"open_issues\": 0,\n \"open_issues_count\": 0,\n \"is_template\": true,\n \"license\": {\n \"key\": \"mit\",\n \"name\": \"MIT License\",\n \"url\": \"https://api.github.com/licenses/mit\",\n \"spdx_id\": \"MIT\",\n \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n \"html_url\": \"https://api.github.com/licenses/mit\"\n },\n \"topics\": [\n \"octocat\",\n \"atom\",\n \"electron\",\n \"api\"\n ],\n \"has_issues\": true,\n \"has_projects\": true,\n \"has_wiki\": true,\n \"has_pages\": false,\n \"has_downloads\": true,\n \"archived\": false,\n \"disabled\": false,\n \"visibility\": \"public\",\n \"pushed_at\": \"2011-01-26T19:06:43Z\",\n \"created_at\": \"2011-01-26T19:01:12Z\",\n \"updated_at\": \"2011-01-26T19:14:43Z\",\n \"permissions\": {\n \"admin\": false,\n \"push\": false,\n \"pull\": true\n },\n \"allow_rebase_merge\": true,\n \"temp_clone_token\": \"ABTLWHOULUVAXGTRYU7OC2876QJ2O\",\n \"allow_squash_merge\": true,\n \"allow_auto_merge\": false,\n \"delete_branch_on_merge\": true,\n \"allow_merge_commit\": true,\n \"subscribers_count\": 42,\n \"network_count\": 0\n }\n }\n]\n"
}
]
},
{
"verb": "get",
"requestPath": "/zen",
"serverUrl": "https://api.github.com",
"parameters": [],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/zen",
"html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/zen"
},
{
"lang": "JavaScript",
"source": "await octokit.request('GET /zen')",
"html": "await octokit.request('GET /zen')\n"
}
],
"summary": "Get the Zen of GitHub",
"description": "Get a random sentence from the Zen of GitHub",
"tags": [
"meta"
],
"operationId": "meta/get-zen",
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "meta"
},
"slug": "get-the-zen-of-github",
"category": "meta",
"categoryLabel": "Meta",
"notes": [],
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response"
}
],
"bodyParameters": [],
"descriptionHTML": "Get a random sentence from the Zen of GitHub
" } ]