@datafire/github v7.0.0
@datafire/github
Client library for GitHub v3 REST API
Installation and Usage
npm install --save @datafire/github
let github = require('@datafire/github').create();
.then(data => {
console.log(data);
});
Description
GitHub's v3 REST API.
Actions
.get
Get Hypermedia links to resources accessible in GitHub's REST API
github..get(null, context)
Input
This action has no parameters
Output
- output
object
- authorizations_url required
string
- code_search_url required
string
- commit_search_url required
string
- current_user_authorizations_html_url required
string
- current_user_repositories_url required
string
- current_user_url required
string
- emails_url required
string
- emojis_url required
string
- events_url required
string
- feeds_url required
string
- followers_url required
string
- following_url required
string
- gists_url required
string
- hub_url required
string
- issue_search_url required
string
- issues_url required
string
- keys_url required
string
- label_search_url required
string
- notifications_url required
string
- organization_repositories_url required
string
- organization_teams_url required
string
- organization_url required
string
- public_gists_url required
string
- rate_limit_url required
string
- repository_search_url required
string
- repository_url required
string
- starred_gists_url required
string
- starred_url required
string
- topic_search_url
string
- user_organizations_url required
string
- user_repositories_url required
string
- user_search_url required
string
- user_url required
string
- authorizations_url required
app.get
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.
github.app.get(null, context)
Input
This action has no parameters
Output
- output integration
app_manifests.code.conversions.post
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
.
github.app_manifests.code.conversions.post({
"code": ""
}, context)
Input
- input
object
- code required
string
: code parameter
- code required
Output
- output
- client_id
string
- client_secret
string
- created_at required
string
- description required
string
- events required
array
: The list of events for the GitHub app- items
string
- items
- external_url required
string
- html_url required
string
- id required
integer
: Unique identifier of the GitHub app - installations_count
integer
: The number of installations associated with the GitHub app - name required
string
: The name of the GitHub app - node_id required
string
- owner required
- avatar_url required
string
- events_url required
string
- followers_url required
string
- following_url required
string
- gists_url required
string
- gravatar_id required
string
- html_url required
string
- id required
integer
- login required
string
- node_id required
string
- organizations_url required
string
- received_events_url required
string
- repos_url required
string
- site_admin required
boolean
- starred_at
string
- starred_url required
string
- subscriptions_url required
string
- type required
string
- url required
string
- avatar_url required
- pem
string
- permissions required
object
: The set of permissions for the GitHub app- checks
string
- contents
string
- deployments
string
- issues
string
- metadata
string
- checks
- slug
string
: The slug name of the GitHub app - updated_at required
string
- webhook_secret
string
- client_id required
string
- client_secret required
string
- pem required
string
- webhook_secret required
string
- client_id
app.installations.get
You must use a JWT to access this endpoint.
The permissions the installation has are included under the permissions
key.
github.app.installations.get({}, context)
Input
- input
object
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch. - since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - outdated
string
- per_page
Output
- output
array
- items installation
app.installations.installation_id.delete
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.
You must use a JWT to access this endpoint.
github.app.installations.installation_id.delete({
"installation_id": 0
}, context)
Input
- input
object
- installation_id required
integer
: installation_id parameter
- installation_id required
Output
Output schema unknown
app.installations.installation_id.get
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.
github.app.installations.installation_id.get({
"installation_id": 0
}, context)
Input
- input
object
- installation_id required
integer
: installation_id parameter
- installation_id required
Output
- output installation
app.installations.installation_id.access_tokens.post
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.
github.app.installations.installation_id.access_tokens.post({
"installation_id": 0
}, context)
Input
- input
object
- installation_id required
integer
: installation_id parameter - body
object
- permissions
object
- contents
string
- def_not_a_repo
string
- deployments
string
- issues
string
- single_file
string
- contents
- repositories
array
: List of repository names that the token should have access to- items
string
- items
- repository_ids
array
: List of repository IDs that the token should have access to- items
integer
- items
- permissions
- installation_id required
Output
- output installation-token
app.installations.installation_id.suspended.delete
Note: Suspending a GitHub App installation is currently in beta and subject to change. Before you can suspend a GitHub App, the app owner must enable suspending installations for the app by opting-in to the beta. For more information, see "Suspending a GitHub App installation."
Removes a GitHub App installation suspension.
To unsuspend a GitHub App, you must be an account owner or have admin permissions in the repository or organization where the app is installed and suspended.
You must use a JWT to access this endpoint.
github.app.installations.installation_id.suspended.delete({
"installation_id": 0
}, context)
Input
- input
object
- installation_id required
integer
: installation_id parameter
- installation_id required
Output
Output schema unknown
app.installations.installation_id.suspended.put
Note: Suspending a GitHub App installation is currently in beta and subject to change. Before you can suspend a GitHub App, the app owner must enable suspending installations for the app by opting-in to the beta. For more information, see "Suspending a GitHub App installation."
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.
To suspend a GitHub App, you must be an account owner or have admin permissions in the repository or organization where the app is installed.
You must use a JWT to access this endpoint.
github.app.installations.installation_id.suspended.put({
"installation_id": 0
}, context)
Input
- input
object
- installation_id required
integer
: installation_id parameter
- installation_id required
Output
Output schema unknown
applications.grants.get
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.
You 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"]
.
github.applications.grants.get({}, context)
Input
- input
object
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- per_page
Output
- output
array
- items application-grant
applications.grants.grant_id.delete
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.
Deleting 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.
github.applications.grants.grant_id.delete({
"grant_id": 0
}, context)
Input
- input
object
- grant_id required
integer
: grant_id parameter
- grant_id required
Output
Output schema unknown
applications.grants.grant_id.get
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.
github.applications.grants.grant_id.get({
"grant_id": 0
}, context)
Input
- input
object
- grant_id required
integer
: grant_id parameter
- grant_id required
Output
- output application-grant
applications.client_id.grant.delete
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.
Deleting 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.
github.applications.client_id.grant.delete({
"client_id": ""
}, context)
Input
- input
object
- client_id required
string
- body
object
- access_token
string
: The OAuth access token used to authenticate to the GitHub API.
- access_token
- client_id required
Output
Output schema unknown
applications.client_id.grants.access_token.delete
Deprecation Notice: GitHub will replace and discontinue OAuth endpoints containing access_token
in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using access_token
as an input parameter. The OAuth Application API will be removed on May 5, 2021. For more information, including scheduled brownouts, see the blog post.
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 token as :access_token
and the grant for the token's owner will be deleted.
Deleting 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 Applications settings page under "Authorized OAuth Apps" on GitHub.
github.applications.client_id.grants.access_token.delete({
"client_id": "",
"access_token": ""
}, context)
Input
- input
object
- client_id required
string
- access_token required
string
- client_id required
Output
Output schema unknown
applications.client_id.token.delete
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.
github.applications.client_id.token.delete({
"client_id": ""
}, context)
Input
- input
object
- client_id required
string
- body
object
- access_token
string
: The OAuth access token used to authenticate to the GitHub API.
- access_token
- client_id required
Output
Output schema unknown
applications.client_id.token.patch
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
.
github.applications.client_id.token.patch({
"client_id": ""
}, context)
Input
- input
object
- client_id required
string
- body
object
- access_token required
string
: The access_token of the OAuth application.
- access_token required
- client_id required
Output
- output authorization
applications.client_id.token.post
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
.
github.applications.client_id.token.post({
"client_id": ""
}, context)
Input
- input
object
- client_id required
string
- body
object
- access_token required
string
: The access_token of the OAuth application.
- access_token required
- client_id required
Output
- output authorization
applications.client_id.tokens.access_token.delete
Deprecation Notice: GitHub will replace and discontinue OAuth endpoints containing access_token
in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using access_token
as an input parameter. The OAuth Application API will be removed on May 5, 2021. For more information, including scheduled brownouts, see the blog post.
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.
github.applications.client_id.tokens.access_token.delete({
"client_id": "",
"access_token": ""
}, context)
Input
- input
object
- client_id required
string
- access_token required
string
- client_id required
Output
Output schema unknown
applications.client_id.tokens.access_token.get
Deprecation Notice: GitHub will replace and discontinue OAuth endpoints containing access_token
in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using access_token
as an input parameter. The OAuth Application API will be removed on May 5, 2021. For more information, including scheduled brownouts, see the blog post.
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 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
.
github.applications.client_id.tokens.access_token.get({
"client_id": "",
"access_token": ""
}, context)
Input
- input
object
- client_id required
string
- access_token required
string
- client_id required
Output
- output
- app required
object
- client_id required
string
- name required
string
- url required
string
- client_id required
- created_at required
string
- fingerprint required
string
- hashed_token required
string
- id required
integer
- installation
- account required simple-user
- permissions required
object
- repositories_url required
string
- repository_selection required
string
(values: all, selected): Describe whether all repositories have been selected or there's a selection involved - single_file_name required
string
- note required
string
- note_url required
string
- scopes required
array
: A list of scopes that this authorization is in.- items
string
- items
- token required
string
- token_last_eight required
string
- updated_at required
string
- url required
string
- user
- avatar_url required
string
- events_url required
string
- followers_url required
string
- following_url required
string
- gists_url required
string
- gravatar_id required
string
- html_url required
string
- id required
integer
- login required
string
- node_id required
string
- organizations_url required
string
- received_events_url required
string
- repos_url required
string
- site_admin required
boolean
- starred_at
string
- starred_url required
string
- subscriptions_url required
string
- type required
string
- url required
string
- avatar_url required
- app required
applications.client_id.tokens.access_token.post
Deprecation Notice: GitHub will replace and discontinue OAuth endpoints containing access_token
in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using access_token
as an input parameter. The OAuth Application API will be removed on May 5, 2021. For more information, including scheduled brownouts, see the blog post.
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
.
github.applications.client_id.tokens.access_token.post({
"client_id": "",
"access_token": ""
}, context)
Input
- input
object
- client_id required
string
- access_token required
string
- client_id required
Output
- output authorization
apps.app_slug.get
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.
github.apps.app_slug.get({
"app_slug": ""
}, context)
Input
- input
object
- app_slug required
string
: app_slug parameter
- app_slug required
Output
- output integration
authorizations.get
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.
github.authorizations.get({}, context)
Input
- input
object
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- per_page
Output
- output
array
- items authorization
authorizations.post
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.
Warning: 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.
Creates 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."
To 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.
Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in the GitHub Help documentation.
github.authorizations.post({}, context)
Input
- input
object
- body
object
- client_id
string
: The OAuth app client key for which to create the token. - client_secret
string
: The OAuth app client secret for which to create the token. - fingerprint
string
: A unique string to distinguish an authorization from others created for the same client ID and user. - note
string
: A note to remind you what the OAuth token is for. - note_url
string
: A URL to remind you what app the OAuth token is for. - scopes
array
: A list of scopes that this authorization is in.- items
string
- items
- client_id
- body
Output
- output authorization
authorizations.clients.client_id.put
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.
Warning: 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.
Creates 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.
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."
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.
github.authorizations.clients.client_id.put({
"client_id": ""
}, context)
Input
- input
object
- client_id required
string
- body
object
- client_secret required
string
: The OAuth app client secret for which to create the token. - fingerprint
string
: A unique string to distinguish an authorization from others created for the same client ID and user. - note
string
: A note to remind you what the OAuth token is for. - note_url
string
: A URL to remind you what app the OAuth token is for. - scopes
array
: A list of scopes that this authorization is in.- items
string
- items
- client_secret required
- client_id required
Output
- output authorization
authorizations.clients.client_id.fingerprint.put
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.
Warning: 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.
This 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."
github.authorizations.clients.client_id.fingerprint.put({
"client_id": "",
"fingerprint": ""
}, context)
Input
- input
object
- client_id required
string
- fingerprint required
string
: fingerprint parameter - body
object
- client_secret required
string
: The OAuth app client secret for which to create the token. - note
string
: A note to remind you what the OAuth token is for. - note_url
string
: A URL to remind you what app the OAuth token is for. - scopes
array
: A list of scopes that this authorization is in.- items
string
- items
- client_secret required
- client_id required
Output
- output authorization
authorizations.authorization_id.delete
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.
github.authorizations.authorization_id.delete({
"authorization_id": 0
}, context)
Input
- input
object
- authorization_id required
integer
: authorization_id parameter
- authorization_id required
Output
Output schema unknown
authorizations.authorization_id.get
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.
github.authorizations.authorization_id.get({
"authorization_id": 0
}, context)
Input
- input
object
- authorization_id required
integer
: authorization_id parameter
- authorization_id required
Output
- output authorization
authorizations.authorization_id.patch
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.
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."
You can only send one of these scope keys at a time.
github.authorizations.authorization_id.patch({
"authorization_id": 0
}, context)
Input
- input
object
- authorization_id required
integer
: authorization_id parameter - body
object
- add_scopes
array
: A list of scopes to add to this authorization.- items
string
- items
- fingerprint
string
: A unique string to distinguish an authorization from others created for the same client ID and user. - note
string
: A note to remind you what the OAuth token is for. - note_url
string
: A URL to remind you what app the OAuth token is for. - remove_scopes
array
: A list of scopes to remove from this authorization.- items
string
- items
- scopes
array
: A list of scopes that this authorization is in.- items
string
- items
- add_scopes
- authorization_id required
Output
- output authorization
codes_of_conduct.get
Get all codes of conduct
github.codes_of_conduct.get(null, context)
Input
This action has no parameters
Output
- output
array
- items code-of-conduct
codes_of_conduct.key.get
Get a code of conduct
github.codes_of_conduct.key.get({
"key": ""
}, context)
Input
- input
object
- key required
string
: key parameter
- key required
Output
- output code-of-conduct
content_references.content_reference_id.attachments.post
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id
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.
You must use an installation access token to access this endpoint.
github.content_references.content_reference_id.attachments.post({
"content_reference_id": 0
}, context)
Input
- input
object
- content_reference_id required
integer
: content_reference_id parameter - body
object
- body required
string
: The body of the attachment - title required
string
: The title of the attachment
- body required
- content_reference_id required
Output
- output content-reference-attachment
emojis.get
Lists all the emojis available to use on GitHub.
github.emojis.get(null, context)
Input
This action has no parameters
Output
- output
object
enterprises.enterprise_id.settings.billing.actions.get
Warning: The Billing API is currently in public beta and subject to change.
Gets the summary of the free and paid GitHub Actions minutes used.
Paid 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".
The authenticated user must be an enterprise admin.
github.enterprises.enterprise_id.settings.billing.actions.get({
"enterprise_id": ""
}, context)
Input
- input
object
- enterprise_id required
string
: Unique identifier of the GitHub Enterprise Cloud instance.
- enterprise_id required
Output
- output actions-billing-usage
enterprises.enterprise_id.settings.billing.packages.get
Warning: The Billing API is currently in public beta and subject to change.
Gets the free and paid storage used for GitHub Packages in gigabytes.
Paid minutes only apply to packages stored for private repositories. For more information, see "Managing billing for GitHub Packages."
The authenticated user must be an enterprise admin.
github.enterprises.enterprise_id.settings.billing.packages.get({
"enterprise_id": ""
}, context)
Input
- input
object
- enterprise_id required
string
: Unique identifier of the GitHub Enterprise Cloud instance.
- enterprise_id required
Output
- output packages-billing-usage
enterprises.enterprise_id.settings.billing.shared_storage.get
Warning: The Billing API is currently in public beta and subject to change.
Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages.
Paid minutes only apply to packages stored for private repositories. For more information, see "Managing billing for GitHub Packages."
The authenticated user must be an enterprise admin.
github.enterprises.enterprise_id.settings.billing.shared_storage.get({
"enterprise_id": ""
}, context)
Input
- input
object
- enterprise_id required
string
: Unique identifier of the GitHub Enterprise Cloud instance.
- enterprise_id required
Output
- output combined-billing-usage
events.get
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.
github.events.get({}, context)
Input
- input
object
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- per_page
Output
- output
array
- items event
feeds.get
GitHub provides several timeline resources in Atom format. The Feeds API lists all the feeds available to the authenticated user:
- Timeline: The GitHub global public timeline
- User: The public timeline for any user, using URI template
- Current user public: The public timeline for the authenticated user
- Current user: The private timeline for the authenticated user
- Current user actor: The private timeline for activity created by the authenticated user
- Current user organizations: The private timeline for the organizations the authenticated user is a member of.
- Security advisories: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.
Note: Private feeds are only returned when authenticating via Basic Auth since current feed URIs use the older, non revocable auth tokens.
github.feeds.get(null, context)
Input
This action has no parameters
Output
- output feed
gists.get
Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists:
github.gists.get({}, context)
Input
- input
object
- since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- since
Output
- output
array
- items base-gist
gists.post
Allows you to add a new gist with one or more files.
Note: Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally.
github.gists.post({}, context)
Input
- input
object
- body
object
- description
string
: Description of the gist - files required
object
: Names and content for the files that make up the gist
- description
- body
Output
- output gist-full
gists.public.get
List public gists sorted by most recently updated to least recently updated.
Note: 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.
github.gists.public.get({}, context)
Input
- input
object
- since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- since
Output
- output
array
- items base-gist
gists.starred.get
List the authenticated user's starred gists:
github.gists.starred.get({}, context)
Input
- input
object
- since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- since
Output
- output
array
- items base-gist
gists.gist_id.delete
Delete a gist
github.gists.gist_id.delete({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter
- gist_id required
Output
Output schema unknown
gists.gist_id.get
Get a gist
github.gists.gist_id.get({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter
- gist_id required
Output
- output gist-full
gists.gist_id.patch
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.
github.gists.gist_id.patch({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - body
object
- description
string
: Description of the gist - files
object
: Names of files to be updated
- description
- gist_id required
Output
- output gist-full
gists.gist_id.comments.get
List gist comments
github.gists.gist_id.comments.get({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- gist_id required
Output
- output
array
- items gist-comment
gists.gist_id.comments.post
Create a gist comment
github.gists.gist_id.comments.post({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - body
object
- body required
string
: The comment text.
- body required
- gist_id required
Output
- output gist-comment
gists.gist_id.comments.comment_id.delete
Delete a gist comment
github.gists.gist_id.comments.comment_id.delete({
"gist_id": "",
"comment_id": 0
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - comment_id required
integer
: comment_id parameter
- gist_id required
Output
Output schema unknown
gists.gist_id.comments.comment_id.get
Get a gist comment
github.gists.gist_id.comments.comment_id.get({
"gist_id": "",
"comment_id": 0
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - comment_id required
integer
: comment_id parameter
- gist_id required
Output
- output gist-comment
gists.gist_id.comments.comment_id.patch
Update a gist comment
github.gists.gist_id.comments.comment_id.patch({
"gist_id": "",
"comment_id": 0
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - comment_id required
integer
: comment_id parameter - body
object
- body required
string
: The comment text.
- body required
- gist_id required
Output
- output gist-comment
gists.gist_id.commits.get
List gist commits
github.gists.gist_id.commits.get({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- gist_id required
Output
- output
array
- items gist-commit
gists.gist_id.forks.get
List gist forks
github.gists.gist_id.forks.get({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- gist_id required
Output
- output
array
- items gist-full
gists.gist_id.forks.post
Note: This was previously /gists/:gist_id/fork
.
github.gists.gist_id.forks.post({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter
- gist_id required
Output
- output base-gist
gists.gist_id.star.delete
Unstar a gist
github.gists.gist_id.star.delete({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter
- gist_id required
Output
Output schema unknown
gists.gist_id.star.get
Check if a gist is starred
github.gists.gist_id.star.get({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter
- gist_id required
Output
Output schema unknown
gists.gist_id.star.put
Note that you'll need to set Content-Length
to zero when calling out to this endpoint. For more information, see "HTTP verbs."
github.gists.gist_id.star.put({
"gist_id": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter
- gist_id required
Output
Output schema unknown
gists.gist_id.sha.get
Get a gist revision
github.gists.gist_id.sha.get({
"gist_id": "",
"sha": ""
}, context)
Input
- input
object
- gist_id required
string
: gist_id parameter - sha required
string
: sha parameter
- gist_id required
Output
- output gist-full
gitignore.templates.get
List all templates available to pass as an option when creating a repository.
github.gitignore.templates.get(null, context)
Input
This action has no parameters
Output
- output
array
- items
string
- items
gitignore.templates.name.get
The API also allows fetching the source of a single template. Use the raw media type to get the raw contents.
github.gitignore.templates.name.get({
"name": ""
}, context)
Input
- input
object
- name required
string
: name parameter
- name required
Output
- output gitignore-template
installation.repositories.get
List repositories that an app installation can access.
You must use an installation access token to access this endpoint.
github.installation.repositories.get({}, context)
Input
- input
object
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- per_page
Output
- output
object
- repositories
array
- items repository
- repository_selection
string
- total_count
integer
- repositories
installation.token.delete
Revokes the installation token you're using to authenticate as an installation and access this endpoint.
Once 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.
You must use an installation access token to access this endpoint.
github.installation.token.delete(null, context)
Input
This action has no parameters
Output
Output schema unknown
issues.get
List issues assigned to the authenticated user across all visible repositories including owned repositories, member
repositories, and organization repositories. You can use the filter
query parameter to fetch issues that are not
necessarily assigned to you. See the Parameters table for more
information.
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
the 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
request id, use the "List pull requests" endpoint.
github.issues.get({}, context)
Input
- input
object
- filter
string
(values: assigned, created, mentioned, subscribed, all): Indicates which sorts of issues to return. Can be one of: - state
string
(values: open, closed, all): Indicates the state of the issues to return. Can be eitheropen
,closed
, orall
. - labels
string
: A list of comma separated label names. Example:bug,ui,@high
- sort
string
(values: created, updated, comments): What to sort results by. Can be eithercreated
,updated
,comments
. - direction
string
(values: asc, desc): One ofasc
(ascending) ordesc
(descending). - since
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
. - collab
boolean
- orgs
boolean
- owned
boolean
- pulls
boolean
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- filter
Output
- output
array
- items issue
licenses.get
Get all commonly used licenses
github.licenses.get({}, context)
Input
- input
object
- featured
boolean
- per_page
integer
: Results per page (max 100)
- featured
Output
- output
array
- items license-simple
licenses.license.get
Get a license
github.licenses.license.get({
"license": ""
}, context)
Input
- input
object
- license required
string
: license parameter
- license required
Output
- output license
markdown.post
Render a Markdown document
github.markdown.post({}, context)
Input
- input
object
- body
object
- context
string
: The repository context to use when creating references ingfm
mode. - mode
string
(values: markdown, gfm): The rendering mode. - text required
string
: The Markdown text to render in HTML.
- context
- body
Output
Output schema unknown
markdown.raw.post
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.
github.markdown.raw.post({}, context)
Input
- input
object
- body
string
- body
Output
- output
string
marketplace_listing.accounts.account_id.get
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.
GitHub 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.
github.marketplace_listing.accounts.account_id.get({
"account_id": 0
}, context)
Input
- input
object
- account_id required
integer
: account_id parameter
- account_id required
Output
- output marketplace-purchase
marketplace_listing.plans.get
Lists all plans that are part of your GitHub Marketplace listing.
GitHub 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.
github.marketplace_listing.plans.get({}, context)
Input
- input
object
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- per_page
Output
- output
array
- items marketplace-listing-plan
marketplace_listing.plans.plan_id.accounts.get
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.
GitHub 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.
github.marketplace_listing.plans.plan_id.accounts.get({
"plan_id": 0
}, context)
Input
- input
object
- plan_id required
integer
: plan_id parameter - sort
string
(values: created, updated): One ofcreated
(when the repository was starred) orupdated
(when it was last pushed to). - direction
string
(values: asc, desc): To return the oldest accounts first, set toasc
. Can be one ofasc
ordesc
. Ignored without thesort
parameter. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- plan_id required
Output
- output
array
- items marketplace-purchase
marketplace_listing.stubbed.accounts.account_id.get
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.
GitHub 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.
github.marketplace_listing.stubbed.accounts.account_id.get({
"account_id": 0
}, context)
Input
- input
object
- account_id required
integer
: account_id parameter
- account_id required
Output
- output marketplace-purchase
marketplace_listing.stubbed.plans.get
Lists all plans that are part of your GitHub Marketplace listing.
GitHub 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.
github.marketplace_listing.stubbed.plans.get({}, context)
Input
- input
object
- per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- per_page
Output
- output
array
- items marketplace-listing-plan
marketplace_listing.stubbed.plans.plan_id.accounts.get
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.
GitHub 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.
github.marketplace_listing.stubbed.plans.plan_id.accounts.get({
"plan_id": 0
}, context)
Input
- input
object
- plan_id required
integer
: plan_id parameter - sort
string
(values: created, updated): One ofcreated
(when the repository was starred) orupdated
(when it was last pushed to). - direction
string
(values: asc, desc): To return the oldest accounts first, set toasc
. Can be one ofasc
ordesc
. Ignored without thesort
parameter. - per_page
integer
: Results per page (max 100) - page
integer
: Page number of the results to fetch.
- plan_id required
Output
- output
array
- items marketplace-purchase
meta.get
This endpoint provides a list of GitHub's IP addresses. For more information, see "About GitHub's IP addresses(https://help.github.com/a