diff --git a/content/rest/credentials/index.md b/content/rest/credentials/index.md new file mode 100644 index 0000000000..37f896f675 --- /dev/null +++ b/content/rest/credentials/index.md @@ -0,0 +1,13 @@ +--- +title: Credentials +topics: + - API +autogenerated: rest +allowTitleToDifferFromFilename: true +children: + - /revoke +versions: + fpt: '*' + ghec: '*' +--- + diff --git a/content/rest/credentials/revoke.md b/content/rest/credentials/revoke.md new file mode 100644 index 0000000000..95189d73af --- /dev/null +++ b/content/rest/credentials/revoke.md @@ -0,0 +1,14 @@ +--- +title: Revocation +shortTitle: Revocation +intro: Use the REST API to revoke credentials that you have found exposed on {% data variables.product.github %} or elsewhere. +versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖 + fpt: '*' + ghec: '*' +topics: + - API +autogenerated: rest +allowTitleToDifferFromFilename: true +--- + + diff --git a/content/rest/index.md b/content/rest/index.md index 023563063a..9ff5868af1 100644 --- a/content/rest/index.md +++ b/content/rest/index.md @@ -56,6 +56,7 @@ children: - /collaborators - /commits - /copilot + - /credentials - /dependabot - /dependency-graph - /deploy-keys diff --git a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json index b84783cdde..1428cda1aa 100644 --- a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json @@ -2171,6 +2171,14 @@ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics" } ], + "credentials": [ + { + "slug": "revoke-a-list-of-credentials", + "subcategory": "revoke", + "verb": "post", + "requestPath": "/credentials/revoke" + } + ], "dependabot": [ { "slug": "list-dependabot-alerts-for-an-organization", diff --git a/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json b/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json index a278f4a098..92ba9e964e 100644 --- a/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json @@ -1905,6 +1905,14 @@ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics" } ], + "credentials": [ + { + "slug": "revoke-a-list-of-credentials", + "subcategory": "revoke", + "verb": "post", + "requestPath": "/credentials/revoke" + } + ], "dependabot": [ { "slug": "list-dependabot-alerts-for-an-organization", diff --git a/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json b/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json index b84783cdde..1428cda1aa 100644 --- a/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json @@ -2171,6 +2171,14 @@ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics" } ], + "credentials": [ + { + "slug": "revoke-a-list-of-credentials", + "subcategory": "revoke", + "verb": "post", + "requestPath": "/credentials/revoke" + } + ], "dependabot": [ { "slug": "list-dependabot-alerts-for-an-organization", diff --git a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json index fd6e89ba4d..e0a5b70275 100644 --- a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json @@ -2209,6 +2209,14 @@ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics" } ], + "credentials": [ + { + "slug": "revoke-a-list-of-credentials", + "subcategory": "revoke", + "verb": "post", + "requestPath": "/credentials/revoke" + } + ], "dependabot": [ { "slug": "list-dependabot-alerts-for-an-organization", diff --git a/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json b/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json index bf50fed338..27836fbacc 100644 --- a/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json @@ -1943,6 +1943,14 @@ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics" } ], + "credentials": [ + { + "slug": "revoke-a-list-of-credentials", + "subcategory": "revoke", + "verb": "post", + "requestPath": "/credentials/revoke" + } + ], "dependabot": [ { "slug": "list-dependabot-alerts-for-an-organization", diff --git a/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json b/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json index fd6e89ba4d..e0a5b70275 100644 --- a/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json @@ -2209,6 +2209,14 @@ "requestPath": "/orgs/{org}/team/{team_slug}/copilot/metrics" } ], + "credentials": [ + { + "slug": "revoke-a-list-of-credentials", + "subcategory": "revoke", + "verb": "post", + "requestPath": "/credentials/revoke" + } + ], "dependabot": [ { "slug": "list-dependabot-alerts-for-an-organization", diff --git a/src/github-apps/lib/config.json b/src/github-apps/lib/config.json index 1d00060c52..d5b0747c89 100644 --- a/src/github-apps/lib/config.json +++ b/src/github-apps/lib/config.json @@ -60,5 +60,5 @@ "2022-11-28" ] }, - "sha": "8af3e59120fdf6294e2d385bdae74b39fa824da5" + "sha": "e7a314cf1c452fbcf55e3be650f1bb7363cad424" } \ No newline at end of file diff --git a/src/rest/data/fpt-2022-11-28/schema.json b/src/rest/data/fpt-2022-11-28/schema.json index b5ef6363e9..3f796952b2 100644 --- a/src/rest/data/fpt-2022-11-28/schema.json +++ b/src/rest/data/fpt-2022-11-28/schema.json @@ -243374,6 +243374,76 @@ } ] }, + "credentials": { + "revoke": [ + { + "serverUrl": "https://api.github.com", + "verb": "post", + "requestPath": "/credentials/revoke", + "title": "Revoke a list of credentials", + "category": "credentials", + "subcategory": "revoke", + "parameters": [], + "bodyParameters": [ + { + "type": "array of strings", + "name": "credentials", + "in": "body", + "description": "
A list of credentials to be revoked, up to 1000 per request.
", + "isRequired": true + } + ], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [], + "allowPermissionlessAccess": true + }, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "credentials": [ + "ghp_1234567890abcdef1234567890abcdef12345678", + "ghp_abcdef1234567890abcdef1234567890abcdef12" + ] + } + }, + "response": { + "statusCode": "202", + "contentType": "application/json", + "description": "Accepted
", + "example": null, + "schema": { + "type": "object" + } + } + } + ], + "previews": [], + "descriptionHTML": "Submit a list of credentials to be revoked. This endpoint is intended to revoke credentials the caller does not own and may have found exposed on GitHub.com or elsewhere. It can also be used for credentials associated with an old user account that you no longer have access to. Credential owners will be notified of the revocation.
\nThis endpoint currently accepts the following credential types:
\nRevoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users.\nGitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated.
\nTo prevent abuse, this API is limited to only 60 unauthenticated requests per hour and a max of 1000 tokens per API request.
\nNote
\n\nAny authenticated requests will return a 403.
\nAccepted
" + }, + { + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + } + ] + }, "dependabot": { "alerts": [ { @@ -397864,13 +397934,14 @@ }, { "name": "filter", - "description": "Filter members returned in the list. 2fa_disabled means that only members without two-factor authentication enabled will be returned. This options is only available for organization owners.
Filter members returned in the list. 2fa_disabled means that only members without two-factor authentication enabled will be returned. 2fa_insecure means that only members with insecure 2FA methods will be returned. These options are only available for organization owners.
Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned.
Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned. 2fa_insecure means that only outside collaborators with insecure 2FA methods will be returned.
A list of credentials to be revoked, up to 1000 per request.
", + "isRequired": true + } + ], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [], + "allowPermissionlessAccess": true + }, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "credentials": [ + "ghp_1234567890abcdef1234567890abcdef12345678", + "ghp_abcdef1234567890abcdef1234567890abcdef12" + ] + } + }, + "response": { + "statusCode": "202", + "contentType": "application/json", + "description": "Accepted
", + "example": null, + "schema": { + "type": "object" + } + } + } + ], + "previews": [], + "descriptionHTML": "Submit a list of credentials to be revoked. This endpoint is intended to revoke credentials the caller does not own and may have found exposed on GitHub.com or elsewhere. It can also be used for credentials associated with an old user account that you no longer have access to. Credential owners will be notified of the revocation.
\nThis endpoint currently accepts the following credential types:
\nRevoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users.\nGitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated.
\nTo prevent abuse, this API is limited to only 60 unauthenticated requests per hour and a max of 1000 tokens per API request.
\nNote
\n\nAny authenticated requests will return a 403.
\nAccepted
" + }, + { + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + } + ] + }, "dependabot": { "alerts": [ { @@ -434268,13 +434338,14 @@ }, { "name": "filter", - "description": "Filter members returned in the list. 2fa_disabled means that only members without two-factor authentication enabled will be returned. This options is only available for organization owners.
Filter members returned in the list. 2fa_disabled means that only members without two-factor authentication enabled will be returned. 2fa_insecure means that only members with insecure 2FA methods will be returned. These options are only available for organization owners.
Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned.
Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned. 2fa_insecure means that only outside collaborators with insecure 2FA methods will be returned.
Filter members returned in the list. 2fa_disabled means that only members without two-factor authentication enabled will be returned. This options is only available for organization owners.
Filter members returned in the list. 2fa_disabled means that only members without two-factor authentication enabled will be returned. 2fa_insecure means that only members with insecure 2FA methods will be returned. These options are only available for organization owners.
Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned.
Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned. 2fa_insecure means that only outside collaborators with insecure 2FA methods will be returned.
Filter members returned in the list. 2fa_disabled means that only members without two-factor authentication enabled will be returned. This options is only available for organization owners.
Filter members returned in the list. 2fa_disabled means that only members without two-factor authentication enabled will be returned. 2fa_insecure means that only members with insecure 2FA methods will be returned. These options are only available for organization owners.
Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned.
Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned. 2fa_insecure means that only outside collaborators with insecure 2FA methods will be returned.
Filter members returned in the list. 2fa_disabled means that only members without two-factor authentication enabled will be returned. This options is only available for organization owners.
Filter members returned in the list. 2fa_disabled means that only members without two-factor authentication enabled will be returned. 2fa_insecure means that only members with insecure 2FA methods will be returned. These options are only available for organization owners.
Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned.
Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned. 2fa_insecure means that only outside collaborators with insecure 2FA methods will be returned.
Filter members returned in the list. 2fa_disabled means that only members without two-factor authentication enabled will be returned. This options is only available for organization owners.
Filter members returned in the list. 2fa_disabled means that only members without two-factor authentication enabled will be returned. 2fa_insecure means that only members with insecure 2FA methods will be returned. These options are only available for organization owners.
Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned.
Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned. 2fa_insecure means that only outside collaborators with insecure 2FA methods will be returned.
Filter members returned in the list. 2fa_disabled means that only members without two-factor authentication enabled will be returned. This options is only available for organization owners.
Filter members returned in the list. 2fa_disabled means that only members without two-factor authentication enabled will be returned. 2fa_insecure means that only members with insecure 2FA methods will be returned. These options are only available for organization owners.
Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned.
Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned. 2fa_insecure means that only outside collaborators with insecure 2FA methods will be returned.