{ "opencollection": "1.0.0", "info": { "name": "Github Tokens API", "version": "1.1.4" }, "items": [ { "info": { "name": "Tokens", "type": "folder" }, "items": [ { "info": { "name": "GitHub Create an Installation Access Token for an App", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/api/v3/app/installations/:installation_id/access_tokens", "params": [ { "name": "installation_id", "value": "", "type": "path", "description": "The unique identifier of the installation." } ], "body": { "type": "json", "data": "{}" } }, "docs": "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. \n\nOptionally, you can use the `repositories` or " }, { "info": { "name": "GitHub Checktoken", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/api/v3/applications/:client_id/token", "params": [ { "name": "client_id", "value": "", "type": "path", "description": "The client ID of the GitHub app." } ], "body": { "type": "json", "data": "{}" } }, "docs": "OAuth applications and GitHub applications with OAuth authorizations can use this 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/enterprise-server@3.9/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is it" }, { "info": { "name": "GitHub Reset Token", "type": "http" }, "http": { "method": "PATCH", "url": "{protocol}://{hostname}/api/v3/applications/:client_id/token", "params": [ { "name": "client_id", "value": "", "type": "path", "description": "The client ID of the GitHub app." } ], "body": { "type": "json", "data": "{}" } }, "docs": "OAuth applications and GitHub applications with OAuth authorizations 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/enterprise-server@3.9/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the usernam" }, { "info": { "name": "GitHub Delete an App Token", "type": "http" }, "http": { "method": "DELETE", "url": "{protocol}://{hostname}/api/v3/applications/:client_id/token", "params": [ { "name": "client_id", "value": "", "type": "path", "description": "The client ID of the GitHub app." } ], "body": { "type": "json", "data": "{}" } }, "docs": "OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.9/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password." }, { "info": { "name": "GitHub Createscoped Access Token", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/api/v3/applications/:client_id/token/scoped", "params": [ { "name": "client_id", "value": "", "type": "path", "description": "The client ID of the GitHub app." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Use a non-scoped user access token to create a repository-scoped and/or permission-scoped user access token. You can specify\nwhich repositories the token can access and which permissions are granted to the\ntoken.\n\nInvalid tokens will return `404 NOT FOUND`.\n\nYou must use [Basic Authentication](https://docs.github.com/enterprise-server@3.9/rest/overview/other-authentication-methods#basic-authentication)\nwhen accessing this endpoint, using the `client_id` and `client_secret` of the GitHub App\nas t" }, { "info": { "name": "GitHub Create an Impersonation Oauth Token", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/api/v3/admin/users/:username/authorizations", "params": [ { "name": "username", "value": "", "type": "path", "description": "The handle for the GitHub user account." } ], "body": { "type": "json", "data": "{}" } }, "docs": "This API endpoint allows administrators to create an OAuth impersonation token for a specific GitHub user by making a POST request to /admin/users/{username}/authorizations. The operation enables authorized administrators to generate access tokens on behalf of other users, which can be useful for troubleshooting, performing administrative tasks, or assisting users with account-related issues. The endpoint requires admin privileges and accepts the target username as a path parameter, along with o" }, { "info": { "name": "GitHub Delete an Impersonation Oauth Token", "type": "http" }, "http": { "method": "DELETE", "url": "{protocol}://{hostname}/api/v3/admin/users/:username/authorizations", "params": [ { "name": "username", "value": "", "type": "path", "description": "The handle for the GitHub user account." } ] }, "docs": "Deletes an impersonation OAuth token for a specified user, allowing administrators to revoke access tokens that were created to impersonate that user. This endpoint requires admin authentication and removes the authorization token associated with the given username, effectively terminating any active sessions or API access using that impersonated token. This is typically used for security purposes or when administrative access to a user's account is no longer needed." }, { "info": { "name": "GitHub Revoke an Installation Access Token", "type": "http" }, "http": { "method": "DELETE", "url": "{protocol}://{hostname}/api/v3/installation/token" }, "docs": "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/enterprise-server@3.9/rest/apps/apps#create-an-installation-access-token-for-an-app)\" endpoint." }, { "info": { "name": "GitHub List App Installations Accessible to the User Access Token", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/user/installations", "params": [ { "name": "per_page", "value": "", "type": "query", "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"" }, { "name": "page", "value": "", "type": "query", "description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"" } ] }, "docs": "Lists installations of your GitHub App 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.\n\nYou can find the permissions for the installation under the `permissions` key." }, { "info": { "name": "GitHub List Repositories Accessible to the User Access Token", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/user/installations/:installation_id/repositories", "params": [ { "name": "installation_id", "value": "", "type": "path", "description": "The unique identifier of the installation." }, { "name": "per_page", "value": "", "type": "query", "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"" }, { "name": "page", "value": "", "type": "query", "description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"" } ] }, "docs": "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\nThe access the user has to each repository is included in the hash under the `permissions` key." }, { "info": { "name": "GitHub Create Registration Token for an Organization", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/api/v3/orgs/:org/actions/runners/registration-token", "params": [ { "name": "org", "value": "", "type": "path", "description": "The organization name. The name is not case sensitive." } ] }, "docs": "Returns a token that you can pass to the `config` script. The token expires after one hour.\n\nFor example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to configure your self-hosted runner:\n\n```\n./config.sh --url https://github.com/octo-org --token TOKEN\n```\n\nAuthenticated users must have admin access to the organization to use this endpoint.\n\nOAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint." }, { "info": { "name": "GitHub Create Remove Token for an Organization", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/api/v3/orgs/:org/actions/runners/remove-token", "params": [ { "name": "org", "value": "", "type": "path", "description": "The organization name. The name is not case sensitive." } ] }, "docs": "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\nFor example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization:\n\n```\n./config.sh remove --token TOKEN\n```\n\nAuthenticated users must have admin access to the organization to use this endpoint.\n\nOAuth tokens and personal access tokens (classic) need" }, { "info": { "name": "GitHub Create Registration Token for Repository", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/actions/runners/registration-token", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." } ] }, "docs": "Returns a token that you can pass to the `config` script. The token expires after one hour.\n\nFor example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to configure your self-hosted runner:\n\n```\n./config.sh --url https://github.com/octo-org --token TOKEN\n```\n\nAuthenticated users must have admin access to the repository to use this endpoint.\n\nOAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint." }, { "info": { "name": "GitHub Create Remove Token for Repository", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/actions/runners/remove-token", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." } ] }, "docs": "Returns a token that you can pass to the `config` script to remove a self-hosted runner from an repository. The token expires after one hour.\n\nFor example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization:\n\n```\n./config.sh remove --token TOKEN\n```\n\nAuthenticated users must have admin access to the repository to use this endpoint.\n\nOAuth tokens and personal access tokens (classic) need the" } ] } ], "bundled": true }