@datafire/github
Client library for GitHub v3 REST APIInstallation 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 APIgithub..get(null, context)
Input
This action has no parametersOutput
- output
object
string
codesearchurl required string
commitsearchurl required string
currentuserauthorizationshtmlurl required string
currentuserrepositoriesurl required string
currentuserurl required string
emailsurl required string
emojisurl required string
eventsurl required string
feedsurl required string
followersurl required string
followingurl required string
gistsurl required string
huburl required string
issuesearchurl required string
issuesurl required string
keysurl required string
labelsearchurl required string
notificationsurl required string
organizationrepositoriesurl required string
organizationteamsurl required string
organizationurl required string
publicgistsurl required string
ratelimiturl required string
repositorysearchurl required string
repositoryurl required string
starredgistsurl required string
starredurl required string
topicsearchurl string
userorganizationsurl required string
userrepositoriesurl required string
usersearchurl required string
userurl required string
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 theinstallations_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 parametersOutput
- output integration
appmanifests.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 temporarycode
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
string
: code parameterOutput
- output
string
clientsecret string
createdat required string
description required string
events required array
: The list of events for the GitHub app* items `string`
externalurl required string
htmlurl required string
id required integer
: Unique identifier of the GitHub app
installationscount integer
: The number of installations associated with the GitHub app
name required string
: The name of the GitHub app
nodeid 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`
pem string
permissions required object
: The set of permissions for the GitHub app* checks `string`
* contents `string`
* deployments `string`
* issues `string`
* metadata `string`
slug string
: The slug name of the GitHub app
updatedat required string
webhooksecret string
clientid required string
clientsecret required string
pem required string
webhooksecret required string
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
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
Output
- output
array
app.installations.installationid.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
integer
: installationid parameterOutput
Output schema unknownapp.installations.installationid.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
integer
: installationid parameterOutput
- output installation
app.installations.installationid.accesstokens.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 of401 - 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
integer
: installationid parameter
body object
* permissions `object`
* contents `string`
* def_not_a_repo `string`
* deployments `string`
* issues `string`
* single_file `string`
* repositories `array`: List of repository names that the token should have access to
* items `string`
* repository_ids `array`: List of repository IDs that the token should have access to
* items `integer`
Output
- output installation-token
app.installations.installationid.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
integer
: installationid parameterOutput
Output schema unknownapp.installations.installationid.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
integer
: installationid parameterOutput
Output schema unknownapplications.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
integer
: Results per page (max 100)
page integer
: Page number of the results to fetch.Output
- output
array
applications.grants.grantid.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
integer
: grantid parameterOutput
Output schema unknownapplications.grants.grantid.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
integer
: grantid parameterOutput
- output application-grant
applications.clientid.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'sclient_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
string
body object
* access_token `string`: The OAuth access token used to authenticate to the GitHub API.
Output
Output schema unknownapplications.clientid.grants.accesstoken.delete
Deprecation Notice: GitHub will replace and discontinue OAuth endpoints containingaccess_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
string
accesstoken required string
Output
Output schema unknownapplications.clientid.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'sclient_id
and client_secret
as the username and password.github.applications.client_id.token.delete({
"client_id": ""
}, context)
Input
- input
object
string
body object
* access_token `string`: The OAuth access token used to authenticate to the GitHub API.
Output
Output schema unknownapplications.clientid.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'sclient_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
string
body object
* access_token **required** `string`: The access_token of the OAuth application.
Output
- output authorization
applications.clientid.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 applicationclient_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
string
body object
* access_token **required** `string`: The access_token of the OAuth application.
Output
- output authorization
applications.clientid.tokens.accesstoken.delete
Deprecation Notice: GitHub will replace and discontinue OAuth endpoints containingaccess_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
string
accesstoken required string
Output
Output schema unknownapplications.clientid.tokens.accesstoken.get
Deprecation Notice: GitHub will replace and discontinue OAuth endpoints containingaccess_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
string
accesstoken required string
Output
- output
object
* client_id **required** `string`
* name **required** `string`
* url **required** `string`
createdat required string
fingerprint required string
hashedtoken required string
id required integer
installation* account **required** [simple-user](#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
noteurl required string
scopes required array
: A list of scopes that this authorization is in.* items `string`
token required string
tokenlasteight required string
updatedat 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`
applications.clientid.tokens.accesstoken.post
Deprecation Notice: GitHub will replace and discontinue OAuth endpoints containingaccess_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
string
accesstoken required string
Output
- output authorization
apps.appslug.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
string
: appslug parameterOutput
- 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
integer
: Results per page (max 100)
page integer
: Page number of the results to fetch.Output
- output
array
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
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`
Output
- output authorization
authorizations.clients.clientid.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
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`
Output
- output authorization
authorizations.clients.clientid.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
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`
Output
- output authorization
authorizations.authorizationid.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
integer
: authorizationid parameterOutput
Output schema unknownauthorizations.authorizationid.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
integer
: authorizationid parameterOutput
- output authorization
authorizations.authorizationid.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
integer
: authorizationid parameter
body object
* add_scopes `array`: A list of scopes to add to this authorization.
* items `string`
* 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`
* scopes `array`: A list of scopes that this authorization is in.
* items `string`
Output
- output authorization
codesofconduct.get
Get all codes of conductgithub.codes_of_conduct.get(null, context)
Input
This action has no parametersOutput
- output
array
codesofconduct.key.get
Get a code of conductgithub.codes_of_conduct.key.get({
"key": ""
}, context)
Input
- input
object
string
: key parameterOutput
- output code-of-conduct
contentreferences.contentreferenceid.attachments.post
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use theid
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
integer
: contentreferenceid parameter
body object
* body **required** `string`: The body of the attachment
* title **required** `string`: The title of the attachment
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 parametersOutput
- output
object
enterprises.enterpriseid.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
string
: Unique identifier of the GitHub Enterprise Cloud instance.Output
- output actions-billing-usage
enterprises.enterpriseid.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
string
: Unique identifier of the GitHub Enterprise Cloud instance.Output
- output packages-billing-usage
enterprises.enterpriseid.settings.billing.sharedstorage.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
string
: Unique identifier of the GitHub Enterprise Cloud instance.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
integer
: Results per page (max 100)
page integer
: Page number of the results to fetch.Output
- output
array
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 parametersOutput
- 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
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
.
perpage integer
: Results per page (max 100)
page integer
: Page number of the results to fetch.Output
- output
array
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
object
* description `string`: Description of the gist
* files **required** `object`: Names and content for the files that make up the gist
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
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
.
perpage integer
: Results per page (max 100)
page integer
: Page number of the results to fetch.Output
- output
array
gists.starred.get
List the authenticated user's starred gists:github.gists.starred.get({}, context)
Input
- input
object
string
: Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
.
perpage integer
: Results per page (max 100)
page integer
: Page number of the results to fetch.Output
- output
array
gists.gistid.delete
Delete a gistgithub.gists.gist_id.delete({
"gist_id": ""
}, context)
Input
- input
object
string
: gistid parameterOutput
Output schema unknowngists.gistid.get
Get a gistgithub.gists.gist_id.get({
"gist_id": ""
}, context)
Input
- input
object
string
: gistid parameterOutput
- output gist-full
gists.gistid.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
string
: gistid parameter
body object
* description `string`: Description of the gist
* files `object`: Names of files to be updated
Output
- output gist-full
gists.gistid.comments.get
List gist commentsgithub.gists.gist_id.comments.get({
"gist_id": ""
}, context)
Input
- input
object
string
: gistid parameter
perpage integer
: Results per page (max 100)
page integer
: Page number of the results to fetch.Output
- output
array
gists.gistid.comments.post
Create a gist commentgithub.gists.gist_id.comments.post({
"gist_id": ""
}, context)
Input
- input
object
string
: gistid parameter
body object
* body **required** `string`: The comment text.
Output
- output gist-comment
gists.gistid.comments.commentid.delete
Delete a gist commentgithub.gists.gist_id.comments.comment_id.delete({
"gist_id": "",
"comment_id": 0
}, context)
Input
- input
object
string
: gistid parameter
commentid required integer
: commentid parameterOutput
Output schema unknowngists.gistid.comments.commentid.get
Get a gist commentgithub.gists.gist_id.comments.comment_id.get({
"gist_id": "",
"comment_id": 0
}, context)
Input
- input
object
string
: gistid parameter
commentid required integer
: commentid parameterOutput
- output gist-comment
gists.gistid.comments.commentid.patch
Update a gist commentgithub.gists.gist_id.comments.comment_id.patch({
"gist_id": "",
"comment_id": 0
}, context)
Input
- input
object
string
: gistid parameter
commentid required integer
: commentid parameter
body object
* body **required** `string`: The comment text.
Output
- output gist-comment
gists.gistid.commits.get
List gist commitsgithub.gists.gist_id.commits.get({
"gist_id": ""
}, context)
Input
- input
object
string
: gistid parameter
perpage integer
: Results per page (max 100)
page integer
: Page number of the results to fetch.Output
- output
array
gists.gistid.forks.get
List gist forksgithub.gists.gist_id.forks.get({
"gist_id": ""
}, context)
Input
- input
object
string
: gistid parameter
perpage integer
: Results per page (max 100)
page integer
: Page number of the results to fetch.Output
- output
array
gists.gistid.forks.post
Note: This was previously/gists/:gist_id/fork
.github.gists.gist_id.forks.post({
"gist_id": ""
}, context)
Input
- input
object
string
: gistid parameterOutput
- output base-gist
gists.gistid.star.delete
Unstar a gistgithub.gists.gist_id.star.delete({
"gist_id": ""
}, context)
Input
- input
object
string
: gistid parameterOutput
Output schema unknowngists.gistid.star.get
Check if a gist is starredgithub.gists.gist_id.star.get({
"gist_id": ""
}, context)
Input
- input
object
string
: gistid parameterOutput
Output schema unknowngists.gistid.star.put
Note that you'll need to setContent-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
string
: gistid parameterOutput
Output schema unknowngists.gistid.sha.get
Get a gist revisiongithub.gists.gist_id.sha.get({
"gist_id": "",
"sha": ""
}, context)
Input
- input
object
string
: gistid parameter
sha required string
: sha parameterOutput
- 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 parametersOutput
- output
array
string
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
string
: name parameterOutput
- 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
integer
: Results per page (max 100)
page integer
: Page number of the results to fetch.Output
- output
object
array
* items [repository](#repository)
repositoryselection string
totalcount integer
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 parametersOutput
Output schema unknownissues.get
List issues assigned to the authenticated user across all visible repositories including owned repositories, member repositories, and organization repositories. You can use thefilter
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
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 either open
, closed
, or all
.
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 either created
, updated
, comments
.
direction string
(values: asc, desc): One of asc
(ascending) or desc
(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
perpage integer
: Results per page (max 100)
page integer
: Page number of the results to fetch.Output
- output
array
licenses.get
Get all commonly used licensesgithub.licenses.get({}, context)
Input
- input
object
boolean
perpage integer
: Results per page (max 100)Output
- output
array
licenses.license.get
Get a licensegithub.licenses.license.get({
"license": ""
}, context)
Input
- input
object
string
: license parameterOutput
- output license
markdown.post
Render a Markdown documentgithub.markdown.post({}, context)
Input
- input
object
object
* context `string`: The repository context to use when creating references in `gfm` mode.
* mode `string` (values: markdown, gfm): The rendering mode.
* text **required** `string`: The Markdown text to render in HTML.
Output
Output schema unknownmarkdown.raw.post
You must send Markdown as plain text (using aContent-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
string
Output
- output
string
marketplacelisting.accounts.accountid.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
integer
: accountid parameterOutput
- output marketplace-purchase
marketplacelisting.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
integer
: Results per page (max 100)
page integer
: Page number of the results to fetch.Output
- output
array
marketplacelisting.plans.planid.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
integer
: planid parameter
sort string
(values: created, updated): One of created
(when the repository was starred) or updated
(when it was last pushed to).
direction string
(values: asc, desc): To return the oldest accounts first, set to asc
. Can be one of asc
or desc
. Ignored without the sort
parameter.
perpage integer
: Results per page (max 100)
page integer
: Page number of the results to fetch.Output
- output
array
marketplacelisting.stubbed.accounts.accountid.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
integer
: accountid parameterOutput
- output marketplace-purchase
marketplacelisting.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
integer
: Results per page (max 100)
page integer
: Page number of the results to fetch.Output
- output
array
marketplacelisting.stubbed.plans.planid.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
integer
: planid parameter
sort string
(values: created, updated): One of created
(when the repository was starred) or updated
(when it was last pushed to).
direction string
(values: asc, desc): To return the oldest accounts first, set to asc
. Can be one of asc
or desc
. Ignored without the sort
parameter.
perpage integer
: Results per page (max 100)
page integer
: Page number of the results to fetch.Output
- output
array