1
0
mirror of synced 2025-12-19 09:57:42 -05:00

Hack Week 2025: update product.product_name in /content/rest (#54029)

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Felicity Chapman <felicitymay@github.com>
This commit is contained in:
Anne-Marie
2025-01-22 11:12:58 +00:00
committed by GitHub
parent 22f8293531
commit ea44900700
42 changed files with 94 additions and 94 deletions

View File

@@ -1,7 +1,7 @@
---
title: About the OpenAPI description for the REST API
shortTitle: OpenAPI description
intro: 'The {% data variables.product.product_name %} REST API is fully described in an OpenAPI compliant document.'
intro: 'The {% data variables.product.github %} REST API is fully described in an OpenAPI compliant document.'
versions:
fpt: '*'
ghes: '*'

View File

@@ -26,4 +26,4 @@ Once your integration is updated, test your integration to verify that it works
## Breaking changes for {{ initialRestVersioningReleaseDate }}
Version `{{ initialRestVersioningReleaseDate }}` is the first version of the {% data variables.product.product_name %} REST API after date-based versioning was introduced. This version does not include any breaking changes.
Version `{{ initialRestVersioningReleaseDate }}` is the first version of the {% data variables.product.github %} REST API after date-based versioning was introduced. This version does not include any breaking changes.

View File

@@ -1,7 +1,7 @@
---
title: Comparing GitHub's REST API and GraphQL API
shortTitle: Comparing GitHub's APIs
intro: 'Learn about {% data variables.product.prodname_dotcom %}''s APIs to extend and customize your {% data variables.product.prodname_dotcom %} experience.'
intro: 'Learn about {% data variables.product.github %}''s APIs to extend and customize your {% data variables.product.github %} experience.'
redirect_from:
- /v3/versions
- /articles/getting-started-with-the-api
@@ -29,7 +29,7 @@ This article discusses the benefits of each API. For more information about the
The GraphQL API returns exactly the data that you request. GraphQL also returns the data in a pre-known structure based on your request. In contrast, the REST API returns more data than you requested and returns it in a pre-determined structure. You can also accomplish the equivalent of multiple REST API request in a single GraphQL request. The ability to make fewer requests and fetch less data makes GraphQL appealing to developers of mobile applications.
For example, to get the {% data variables.product.product_name %} login of ten of your followers, and the login of ten followers of each of your followers, you can send a single request like:
For example, to get the {% data variables.product.github %} login of ten of your followers, and the login of ten followers of each of your followers, you can send a single request like:
```graphql
{

View File

@@ -3,7 +3,7 @@ title: REST API endpoints for events
shortTitle: Events
allowTitleToDifferFromFilename: true
intro: >-
Use the REST API to interact with {% data variables.product.prodname_dotcom %}
Use the REST API to interact with {% data variables.product.github %}
events.
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
fpt: '*'
@@ -14,11 +14,11 @@ topics:
autogenerated: rest
---
## About {% data variables.product.prodname_dotcom %} events
## About {% data variables.product.github %} events
{% data variables.product.prodname_dotcom %} events power the various activity streams on the site.
{% data variables.product.github %} events power the various activity streams on the site.
You can use the REST API to return different types of events triggered by activity on {% data variables.product.product_name %}. For more information about the specific events that you can receive, see [AUTOTITLE](/webhooks-and-events/events/github-event-types). Endpoints for repository issues are also available. For more information, see [AUTOTITLE](/rest/issues/events).
You can use the REST API to return different types of events triggered by activity on {% data variables.product.github %}. For more information about the specific events that you can receive, see [AUTOTITLE](/webhooks-and-events/events/github-event-types). Endpoints for repository issues are also available. For more information, see [AUTOTITLE](/rest/issues/events).
Events are optimized for polling with the "ETag" header. If no new events have been triggered, you will see a "304 Not Modified" response, and your current rate limit will be untouched. There is also an "X-Poll-Interval" header that specifies how often (in seconds) you are allowed to poll. In times of high server load, the time may increase. Please obey the header.

View File

@@ -3,7 +3,7 @@ title: REST API endpoints for notifications
shortTitle: Notifications
allowTitleToDifferFromFilename: true
intro: >-
Use the REST API to manage {% data variables.product.product_name %}
Use the REST API to manage {% data variables.product.github %}
notifications.
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
fpt: '*'
@@ -14,11 +14,11 @@ topics:
autogenerated: rest
---
## About {% data variables.product.product_name %} notifications
## About {% data variables.product.github %} notifications
{% data reusables.user-settings.notifications-api-classic-pat-only %}
You can use the REST API to manage {% data variables.product.product_name %} notifications. For more information about notifications, see [AUTOTITLE](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications).
You can use the REST API to manage {% data variables.product.github %} notifications. For more information about notifications, see [AUTOTITLE](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications).
All calls to these endpoints require the `notifications` or `repo` scopes. You will need the `repo` scope to access issues and commits from their respective endpoints.

View File

@@ -16,7 +16,8 @@ allowTitleToDifferFromFilename: true
This article gives details about the REST API endpoint.
{% ifversion ghes %}
{% data variables.product.product_name %} does not retrieve license information for dependencies, and does not calculate information about dependents, the repositories and packages that depend on a repository. These fields will not be populated in the response.
> [!NOTE]
> {% data variables.product.prodname_ghe_server %} does not retrieve license information for dependencies, and does not calculate information about dependents, the repositories and packages that depend on a repository. These fields will not be populated in the response.
{% endif %}
<!-- Content after this section is automatically generated -->

View File

@@ -70,11 +70,11 @@ http(s)://HOSTNAME:ADMINISTRATION-PORT/
## Authentication
Your {% data variables.product.product_name %} installation's API endpoints accept the same authentication methods as the {% data variables.product.prodname_dotcom %} API. For more information, see [AUTOTITLE](/rest/overview/authenticating-to-the-rest-api).
Your {% data variables.product.prodname_ghe_server %} installation's API endpoints accept the same authentication methods as the {% data variables.product.github %} API. For more information, see [AUTOTITLE](/rest/overview/authenticating-to-the-rest-api).
OAuth tokens must have the `site_admin` [OAuth scope](/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes) when used with these endpoints.
These endpoints are only accessible to authenticated {% data variables.product.product_name %} site administrators, except for endpoints of the [AUTOTITLE](/rest/enterprise-admin/manage-ghes) API{% ifversion ghes < 3.15 %} and [AUTOTITLE](/rest/enterprise-admin/management-console) API{% endif %}, which allow authentication as a Management Console user. See [AUTOTITLE](/admin/configuration/administering-your-instance-from-the-management-console).
These endpoints are only accessible to authenticated {% data variables.product.prodname_ghe_server %} site administrators, except for endpoints of the [AUTOTITLE](/rest/enterprise-admin/manage-ghes) API{% ifversion ghes < 3.15 %} and [AUTOTITLE](/rest/enterprise-admin/management-console) API{% endif %}, which allow authentication as a Management Console user. See [AUTOTITLE](/admin/configuration/administering-your-instance-from-the-management-console).
{% data reusables.enterprise_management_console.api-deprecation %}

View File

@@ -3,8 +3,7 @@ title: REST API endpoints for LDAP
shortTitle: LDAP
allowTitleToDifferFromFilename: true
intro: >-
Use the REST API to update account relationships between a {% data
variables.product.product_name %} user or team and its linked LDAP entry or
Use the REST API to update account relationships between a {% data variables.product.prodname_ghe_server %} user or team and its linked LDAP entry or
queue a new synchronization.
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
ghes: '*'
@@ -15,7 +14,7 @@ autogenerated: rest
## About LDAP
You can use these endpoints to update the Distinguished Name (DN) that a user or team maps to. Note that in most cases, you must have [LDAP Sync enabled](/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap) for your {% data variables.product.product_name %} appliance. The [Update LDAP mapping for a user](#update-ldap-mapping-for-a-user) endpoint can be used when LDAP is enabled, even if LDAP Sync is disabled.
You can use these endpoints to update the Distinguished Name (DN) that a user or team maps to. Note that in most cases, you must have [LDAP Sync enabled](/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap) for your {% data variables.product.prodname_ghe_server %} appliance. The [Update LDAP mapping for a user](#update-ldap-mapping-for-a-user) endpoint can be used when LDAP is enabled, even if LDAP Sync is disabled.
{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %}

View File

@@ -3,7 +3,7 @@ title: REST API endpoints for managing GitHub Enterprise Server
allowTitleToDifferFromFilename: true
shortTitle: Manage GHES
intro: >-
Use the REST API to manage your {% data variables.product.product_name %}
Use the REST API to manage your {% data variables.product.prodname_ghe_server %}
instance.
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
ghes: '*'

View File

@@ -3,7 +3,7 @@ title: REST API endpoints for Management Console
shortTitle: Management Console
allowTitleToDifferFromFilename: true
intro: >-
Use the REST API to manage your {% data variables.product.product_name %}
Use the REST API to manage your {% data variables.product.prodname_ghe_server %}
installation.
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
ghes: <=3.14
@@ -14,7 +14,7 @@ autogenerated: rest
## About the Management Console endpoints
The full functionality of the Management Console endpoints was added to the [Manage GHES](/rest/enterprise-admin/manage-ghes) endpoints in {% data variables.product.prodname_ghe_server %} version 3.12. With feature parity achieved, the Management Console API endpoints {% ifversion ghes < 3.15 %}will be{% else %}were{% endif %} removed in version 3.15.
The full functionality of the Management Console endpoints was added to the [Manage GHES](/rest/enterprise-admin/manage-ghes) endpoints in {% data variables.product.prodname_ghe_server %} version 3.12. With feature parity achieved, the Management Console API endpoints were removed in version 3.15.
{% ifversion management-console-manage-ghes-parity %}
@@ -42,7 +42,7 @@ You should explicitly set the port number when making API calls to the Managemen
If you cannot provide a port number, you'll need to configure your tool to automatically follow redirects.
You may also need to add the [`-k` flag](http://curl.haxx.se/docs/manpage.html#-k) when using `curl`, since {% data variables.product.product_name %} uses a self-signed certificate before you [add your own TLS certificate](/admin/configuration/configuring-network-settings/configuring-tls).
You may also need to add the [`-k` flag](http://curl.haxx.se/docs/manpage.html#-k) when using `curl`, since {% data variables.product.github %} uses a self-signed certificate before you [add your own TLS certificate](/admin/configuration/configuring-network-settings/configuring-tls).
### Authentication as the root site administrator

View File

@@ -26,7 +26,7 @@ These endpoints are only available to [authenticated](/rest/overview/authenticat
|-----------------------|-----------|----------------------------------------------------------------------------|
| `name` | `string` | The name of the environment as displayed in the UI. |
| `image_url` | `string` | URL to the tarball that will be downloaded and extracted. |
| `default_environment` | `boolean` | Whether this is the default environment that ships with {% data variables.product.product_name %}. |
| `default_environment` | `boolean` | Whether this is the default environment that ships with {% data variables.product.github %}. |
| `download` | `object` | This environment's download status. |
| `hooks_count` | `integer` | The number of pre-receive hooks that use this environment. |

View File

@@ -41,7 +41,7 @@ To authenticate API requests, the person who configures SCIM on the IdP must use
### Mapping of SAML and SCIM data
After a {% data variables.enterprise.prodname_managed_user %} successfully authenticates to access your enterprise using SAML SSO, {% data variables.product.product_name %} links the user to a SCIM provisioned identity. To link the identities successfully, the SAML identity provider and the SCIM integration must use matching unique identifiers.
After a {% data variables.enterprise.prodname_managed_user %} successfully authenticates to access your enterprise using SAML SSO, {% data variables.product.github %} links the user to a SCIM provisioned identity. To link the identities successfully, the SAML identity provider and the SCIM integration must use matching unique identifiers.
{% data variables.product.company_short %} requires the following SAML claim and SCIM attribute to successfully match the user with the identity provisioned by SCIM. Identity providers may differ in the field used to uniquely identify a user.
@@ -96,19 +96,19 @@ To use other IdPs for SAML, the following SAML claims and SCIM attribute must ma
{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %}
{% data variables.product.product_name %} provides endpoints for use by SCIM-enabled Identity Providers (IdPs). An integration on the IdP can use the REST API to automatically provision, manage, or deprovision user accounts on a {% data variables.product.product_name %} instance that uses SAML single sign-on (SSO) for authentication. See [AUTOTITLE](/admin/managing-iam/provisioning-user-accounts-with-scim/user-provisioning-with-scim-on-ghes).
{% data variables.product.github %} provides endpoints for use by SCIM-enabled Identity Providers (IdPs). An integration on the IdP can use the REST API to automatically provision, manage, or deprovision user accounts on a {% data variables.product.prodname_ghe_server %} instance that uses SAML single sign-on (SSO) for authentication. See [AUTOTITLE](/admin/managing-iam/provisioning-user-accounts-with-scim/user-provisioning-with-scim-on-ghes).
These endpoints are based on SCIM 2.0. For more information, refer to your IdP's documentation or see the [specification on the IETF website](https://datatracker.ietf.org/doc/html/rfc7644).
### Root URLs
An IdP can use the following root URL to communicate with the endpoints in this category for a {% data variables.product.product_name %} instance.
An IdP can use the following root URL to communicate with the endpoints in this category for a {% data variables.product.prodname_ghe_server %} instance.
```http
{% data variables.product.rest_url %}/scim/v2/
```
Do **not** include the `enterprises/{enterprise}/` portion of the URLs provided in the endpoint documentation below. This part of the path is not applicable to {% data variables.product.product_name %}. In the future, this documentation will display the correct URLs for {% data variables.product.product_name %}.
Do **not** include the `enterprises/{enterprise}/` portion of the URLs provided in the endpoint documentation below. This part of the path is not applicable to {% data variables.product.prodname_ghe_server %}. In the future, this documentation will display the correct URLs for {% data variables.product.prodname_ghe_server %}.
Endpoints in this category are case-sensitive. For example, the first letter in the `Users` endpoint must be capitalized.
@@ -118,7 +118,7 @@ GET /scim/v2/Users/{scim_user_id}
### Authentication
The SCIM integration on the IdP performs actions on behalf of an enterprise owner for the {% data variables.product.product_name %} instance. For more information, see [AUTOTITLE](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise#enterprise-owners).
The SCIM integration on the IdP performs actions on behalf of an enterprise owner for the {% data variables.product.prodname_ghe_server %} instance. For more information, see [AUTOTITLE](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise#enterprise-owners).
To authenticate API requests, the person who configures SCIM on the IdP must use a {% data variables.product.pat_v1 %} with the {% ifversion scim-enterprise-scope %}`scim:enterprise`{% else %}`admin:enterprise`{% endif %} scope, which the IdP must provide in the request's `Authorization` header. For more information about {% data variables.product.pat_v1_plural %}, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
@@ -127,12 +127,12 @@ To authenticate API requests, the person who configures SCIM on the IdP must use
### Mapping of SAML and SCIM data
The {% data variables.product.product_name %} instance links each user who authenticates successfully with SAML SSO to a SCIM identity. To link the identities successfully, the SAML IdP and the SCIM integration must use matching SAML `NameID` and SCIM `userName` values for each user.
The {% data variables.product.prodname_ghe_server %} instance links each user who authenticates successfully with SAML SSO to a SCIM identity. To link the identities successfully, the SAML IdP and the SCIM integration must use matching SAML `NameID` and SCIM `userName` values for each user.
{% ifversion ghes %}
> [!NOTE]
> If the {% data variables.product.product_name %} uses Entra ID as a SAML IdP, {% data variables.product.product_name %} will also check the SCIM `externalId` claim and SAML `http://schemas.microsoft.com/identity/claims/objectidentifier` claim to match users first, instead of using `NameID` and `userName`.
> If the {% data variables.product.prodname_ghe_server %} instance uses Entra ID as a SAML IdP, {% data variables.product.github %} will also check the SCIM `externalId` claim and SAML `http://schemas.microsoft.com/identity/claims/objectidentifier` claim to match users first, instead of using `NameID` and `userName`.
{% endif %}
@@ -149,7 +149,7 @@ The {% data variables.product.product_name %} instance links each user who authe
| `userName` | String | The username for the user, generated by the IdP. Undergoes [normalization](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication#about-username-normalization) before being used.
| `emails` | Array | List of the user's emails. |
| `roles` | Array | List of the user's roles. |
| `externalId` | String | This identifier is generated by an IdP provider. You can find the `externalId` for a user either on the IdP, or by using the [List SCIM provisioned identities](#list-scim-provisioned-identities-for-an-enterprise) endpoint and filtering on other known attributes, such as a user's username or email address on the {% data variables.product.product_name %} instance. |
| `externalId` | String | This identifier is generated by an IdP provider. You can find the `externalId` for a user either on the IdP, or by using the [List SCIM provisioned identities](#list-scim-provisioned-identities-for-an-enterprise) endpoint and filtering on other known attributes, such as a user's username or email address on the {% data variables.product.prodname_ghe_server %} instance. |
| `id` | String | Identifier generated by the instance's SCIM endpoint. |
| `active` | Boolean | Indicates whether the identity is active (`true`) or should be suspended (`false`). |

View File

@@ -2,7 +2,7 @@
title: REST API endpoints for gists and gist comments
shortTitle: Gists
allowTitleToDifferFromFilename: true
intro: 'Use the REST API to list, create, update and delete the public gists on {% data variables.product.product_name %}.'
intro: 'Use the REST API to list, create, update and delete the public gists on {% data variables.product.github %}.'
redirect_from:
- /v3/gists
- /rest/reference/gists

View File

@@ -17,6 +17,6 @@ autogenerated: rest
## About Git blobs
A Git blob (binary large object) is the object type used to store the contents of each file in a repository. The file's SHA-1 hash is computed and stored in the blob object. These endpoints allow you to read and write [blob objects](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects)
to your Git database on {% data variables.product.product_name %}. Blobs leverage [these custom media types](#custom-media-types-for-blobs). For more information about the use of media types in the API, see [AUTOTITLE](/rest/overview/media-types).
to your Git database on {% data variables.product.github %}. Blobs leverage [these custom media types](#custom-media-types-for-blobs). For more information about the use of media types in the API, see [AUTOTITLE](/rest/overview/media-types).
<!-- Content after this section is automatically generated -->

View File

@@ -4,7 +4,7 @@ shortTitle: Commits
allowTitleToDifferFromFilename: true
intro: >-
Use the REST API to interact with commit objects in your Git database on {%
data variables.product.product_name %}.
data variables.product.github %}.
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
fpt: '*'
ghec: '*'
@@ -16,6 +16,6 @@ autogenerated: rest
## About Git commits
A Git commit is a snapshot of the hierarchy ([Git tree](/rest/git/trees)) and the contents of the files ([Git blob](/rest/git/blobs)) in a Git repository. These endpoints allow you to read and write [commit objects](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects#_git_commit_objects) to your Git database on {% data variables.product.product_name %}.
A Git commit is a snapshot of the hierarchy ([Git tree](/rest/git/trees)) and the contents of the files ([Git blob](/rest/git/blobs)) in a Git repository. These endpoints allow you to read and write [commit objects](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects#_git_commit_objects) to your Git database on {% data variables.product.github %}.
<!-- Content after this section is automatically generated -->

View File

@@ -1,7 +1,7 @@
---
title: REST API endpoints for Git database
shortTitle: Git database
intro: 'Use the REST API to interact with raw Git objects in your Git database on {% data variables.product.product_name %} and to list and update Git references (branch heads and tags).'
intro: 'Use the REST API to interact with raw Git objects in your Git database on {% data variables.product.github %} and to list and update Git references (branch heads and tags).'
allowTitleToDifferFromFilename: true
redirect_from:
- /v3/git
@@ -23,6 +23,6 @@ autogenerated: rest
## About Git database
The REST API gives you access to read and write raw Git objects to your Git database on {% data variables.product.product_name %} and to list and update your references (branch heads and tags). For more information about using the REST API to interact with your Git database, see [AUTOTITLE](/rest/guides/using-the-rest-api-to-interact-with-your-git-database).
The REST API gives you access to read and write raw Git objects to your Git database on {% data variables.product.github %} and to list and update your references (branch heads and tags). For more information about using the REST API to interact with your Git database, see [AUTOTITLE](/rest/guides/using-the-rest-api-to-interact-with-your-git-database).
<!-- Content after this section is automatically generated -->

View File

@@ -3,7 +3,7 @@ title: REST API endpoints for Git references
shortTitle: References
intro: >-
Use the REST API to interact with references in your Git database on {% data
variables.product.product_name %}
variables.product.github %}
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
fpt: '*'
ghec: '*'
@@ -16,6 +16,6 @@ autogenerated: rest
## About Git references
A Git reference (`git ref`) is a file that contains a Git commit SHA-1 hash. When referring to a Git commit, you can use the Git reference, which is an easy-to-remember name, rather than the hash. The Git reference can be rewritten to point to a new commit. A branch is a Git reference that stores the new Git commit hash. These endpoints allow you to read and write [references](https://git-scm.com/book/en/v2/Git-Internals-Git-References) to your Git database on {% data variables.product.product_name %}.
A Git reference (`git ref`) is a file that contains a Git commit SHA-1 hash. When referring to a Git commit, you can use the Git reference, which is an easy-to-remember name, rather than the hash. The Git reference can be rewritten to point to a new commit. A branch is a Git reference that stores the new Git commit hash. These endpoints allow you to read and write [references](https://git-scm.com/book/en/v2/Git-Internals-Git-References) to your Git database on {% data variables.product.github %}.
<!-- Content after this section is automatically generated -->

View File

@@ -4,7 +4,7 @@ shortTitle: Tags
allowTitleToDifferFromFilename: true
intro: >-
Use the REST API to interact with tag objects in your Git database on {% data
variables.product.product_name %}.
variables.product.github %}.
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
fpt: '*'
ghec: '*'
@@ -16,6 +16,6 @@ autogenerated: rest
## About Git tags
A Git tag is similar to a [Git reference](/rest/git/refs), but the Git commit that it points to never changes. Git tags are helpful when you want to point to specific releases. These endpoints allow you to read and write [tag objects](https://git-scm.com/book/en/v2/Git-Internals-Git-References#_tags) to your Git database on {% data variables.product.product_name %}. The API only supports [annotated tag objects](https://git-scm.com/book/en/v2/Git-Internals-Git-References#_tags), not lightweight tags.
A Git tag is similar to a [Git reference](/rest/git/refs), but the Git commit that it points to never changes. Git tags are helpful when you want to point to specific releases. These endpoints allow you to read and write [tag objects](https://git-scm.com/book/en/v2/Git-Internals-Git-References#_tags) to your Git database on {% data variables.product.github %}. The API only supports [annotated tag objects](https://git-scm.com/book/en/v2/Git-Internals-Git-References#_tags), not lightweight tags.
<!-- Content after this section is automatically generated -->

View File

@@ -4,7 +4,7 @@ shortTitle: Trees
allowTitleToDifferFromFilename: true
intro: >-
Use the REST API to interact with tree objects in your Git database on {% data
variables.product.product_name %}.
variables.product.github %}.
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
fpt: '*'
ghec: '*'
@@ -16,6 +16,6 @@ autogenerated: rest
## About Git trees
A Git tree object creates the hierarchy between files in a Git repository. You can use the Git tree object to create the relationship between directories and the files they contain. These endpoints allow you to read and write [tree objects](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects#_tree_objects) to your Git database on {% data variables.product.product_name %}.
A Git tree object creates the hierarchy between files in a Git repository. You can use the Git tree object to create the relationship between directories and the files they contain. These endpoints allow you to read and write [tree objects](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects#_tree_objects) to your Git database on {% data variables.product.github %}.
<!-- Content after this section is automatically generated -->

View File

@@ -18,6 +18,6 @@ autogenerated: rest
## About gitignore
When you create a new repository on {% data variables.product.github %} via the API, you can specify a [.gitignore template](/get-started/getting-started-with-git/ignoring-files) to apply to the repository upon creation. You can use the REST API to get .gitignore templates from the {% data variables.product.product_name %} [.gitignore repository](https://github.com/github/gitignore).
When you create a new repository on {% data variables.product.github %} via the API, you can specify a [.gitignore template](/get-started/getting-started-with-git/ignoring-files) to apply to the repository upon creation. You can use the REST API to get .gitignore templates from the {% data variables.product.github %} [.gitignore repository](https://github.com/github/gitignore).
<!-- Content after this section is automatically generated -->

View File

@@ -16,7 +16,7 @@ topics:
You can use the REST API to tie together commits with
a testing service, so that every push you make can be tested and represented
in a {% data variables.product.product_name %} pull request. For more information about the relevant endpoints, see [AUTOTITLE](/rest/commits/statuses).
in a {% data variables.product.github %} pull request. For more information about the relevant endpoints, see [AUTOTITLE](/rest/commits/statuses).
This guide will use that API to demonstrate a setup that you can use.
In our scenario, we will:
@@ -74,7 +74,7 @@ Great! Click on **Let me select individual events**, and select the following:
* Status
* Pull Request
These are the events {% data variables.product.product_name %} will send to our server whenever the relevant action
These are the events {% data variables.product.github %} will send to our server whenever the relevant action
occurs. Let's update our server to _just_ handle the Pull Request scenario right now:
``` ruby
@@ -96,7 +96,7 @@ helpers do
end
```
What's going on? Every event that {% data variables.product.product_name %} sends out attached a `X-GitHub-Event`
What's going on? Every event that {% data variables.product.github %} sends out attached a `X-GitHub-Event`
HTTP header. We'll only care about the PR events for now. From there, we'll
take the payload of information, and return the title field. In an ideal scenario,
our server would be concerned with every time a pull request is updated, not just
@@ -113,7 +113,7 @@ setting (and updating) CI statuses. Note that at any time you update your server
you can click **Redeliver** to send the same payload. There's no need to make a
new pull request every time you make a change!
Since we're interacting with the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API, we'll use [Octokit.rb](https://github.com/octokit/octokit.rb)
Since we're interacting with the {% data variables.product.github %} API, we'll use [Octokit.rb](https://github.com/octokit/octokit.rb)
to manage our interactions. We'll configure that client with
[a {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token):
@@ -127,7 +127,7 @@ before do
end
```
After that, we'll just need to update the pull request on {% data variables.product.product_name %} to make clear
After that, we'll just need to update the pull request on {% data variables.product.github %} to make clear
that we're processing on the CI:
``` ruby

View File

@@ -15,7 +15,7 @@ topics:
You can use the REST API to deploy your projects hosted on {% data variables.product.product_name %} on a server that you own. For more information about the endpoints to manage deployments and statuses, see [AUTOTITLE](/rest/deployments). You can also use the REST API to coordinate your deployments the moment your code lands on the default branch. For more information, see [AUTOTITLE](/rest/guides/building-a-ci-server).
You can use the REST API to deploy your projects hosted on {% data variables.product.github %} on a server that you own. For more information about the endpoints to manage deployments and statuses, see [AUTOTITLE](/rest/deployments). You can also use the REST API to coordinate your deployments the moment your code lands on the default branch. For more information, see [AUTOTITLE](/rest/guides/building-a-ci-server).
This guide will use the REST API to demonstrate a setup that you can use.
In our scenario, we will:
@@ -76,7 +76,7 @@ Great! Click on **Let me select individual events.**, and select the following:
* Deployment status
* Pull Request
These are the events {% data variables.product.product_name %} will send to our server whenever the relevant action
These are the events {% data variables.product.github %} will send to our server whenever the relevant action
occurs. We'll configure our server to _just_ handle when pull requests are merged
right now:
@@ -93,7 +93,7 @@ post '/event_handler' do
end
```
What's going on? Every event that {% data variables.product.product_name %} sends out attached a `X-GitHub-Event`
What's going on? Every event that {% data variables.product.github %} sends out attached a `X-GitHub-Event`
HTTP header. We'll only care about the PR events for now. When a pull request is
merged (its state is `closed`, and `merged` is `true`), we'll kick off a deployment.

View File

@@ -15,9 +15,9 @@ shortTitle: Discover resources for a user
When making authenticated requests to the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API, applications often need to fetch the current user's repositories and organizations. In this guide, we'll explain how to reliably discover those resources.
When making authenticated requests to the {% data variables.product.github %} API, applications often need to fetch the current user's repositories and organizations. In this guide, we'll explain how to reliably discover those resources.
To interact with the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API, we'll be using [Octokit.rb](https://github.com/octokit/octokit.rb). You can find the complete source code for this project in the [platform-samples](https://github.com/github/platform-samples/tree/master/api/ruby/discovering-resources-for-a-user) repository.
To interact with the {% data variables.product.github %} API, we'll be using [Octokit.rb](https://github.com/octokit/octokit.rb). You can find the complete source code for this project in the [platform-samples](https://github.com/github/platform-samples/tree/master/api/ruby/discovering-resources-for-a-user) repository.
## Getting started

View File

@@ -23,6 +23,6 @@ children:
- /encrypting-secrets-for-the-rest-api
---
This section of the documentation is intended to get you up-and-running with
real-world {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API applications. We'll go over everything you need to know, from authentication to results manipulation to integrating results with other apps.
real-world {% data variables.product.github %} API applications. We'll go over everything you need to know, from authentication to results manipulation to integrating results with other apps.
Every tutorial will include a project, and each project will be saved and documented in our public
[platform-samples](https://github.com/github/platform-samples) repository.

View File

@@ -17,7 +17,7 @@ topics:
In this guide, we're going to use the API to fetch information about repositories
that we own, and the programming languages that make them up. Then, we'll
visualize that information in a couple of different ways using the [D3.js](https://d3js.org/) library. To
interact with the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API, we'll be using the excellent Ruby library, [Octokit](https://github.com/octokit/octokit.rb).
interact with the {% data variables.product.github %} API, we'll be using the excellent Ruby library, [Octokit](https://github.com/octokit/octokit.rb).
If you haven't already, you should read the [Basics of Authentication](/apps/oauth-apps/building-oauth-apps/authenticating-to-the-rest-api-with-an-oauth-app)
guide before starting this example. You can find the complete source code for this project in the [platform-samples](https://github.com/github/platform-samples/tree/master/api/ruby/rendering-data-as-graphs) repository.
@@ -26,7 +26,7 @@ Let's jump right in!
## Setting up an {% data variables.product.prodname_oauth_app %}
First, [register a new application](https://github.com/settings/applications/new) on {% data variables.product.product_name %}. Set the main and callback
First, [register a new application](https://github.com/settings/applications/new) on {% data variables.product.github %}. Set the main and callback
URLs to `http://localhost:4567/`. As [before](/apps/oauth-apps/building-oauth-apps/authenticating-to-the-rest-api-with-an-oauth-app), we're going to handle authentication for the API by
implementing a Rack middleware using [sinatra-auth-github](https://github.com/atmos/sinatra_auth_github):
@@ -81,7 +81,7 @@ run Example::MyGraphApp
## Fetching repository information
This time, in order to talk to the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API, we're going to use the [Octokit
This time, in order to talk to the {% data variables.product.github %} API, we're going to use the [Octokit
Ruby library](https://github.com/octokit/octokit.rb). This is much easier than directly making a bunch of
REST calls. Plus, Octokit was developed by a GitHubber, and is actively maintained,
so you know it'll work.
@@ -106,7 +106,7 @@ With Octokit, that looks like this:
repos = client.repositories
```
Next, we'll iterate over each repository, and count the language that {% data variables.product.product_name %}
Next, we'll iterate over each repository, and count the language that {% data variables.product.github %}
associates with it:
``` ruby

View File

@@ -1,6 +1,6 @@
---
title: Using the REST API to interact with your Git database
intro: 'Use the REST API to read and write raw Git objects to your Git database on {% data variables.product.product_name %} and to list and update your references (branch heads and tags).'
intro: 'Use the REST API to read and write raw Git objects to your Git database on {% data variables.product.github %} and to list and update your references (branch heads and tags).'
versions:
fpt: '*'
ghes: '*'
@@ -17,7 +17,7 @@ redirect_from:
This basically allows you to reimplement a lot of Git functionality with the REST API - by creating raw objects directly into the database and updating branch references you could technically do just about anything that Git can do without having Git installed.
The REST API will return a `409 Conflict` if the Git repository is empty
or unavailable. An unavailable repository typically means {% data variables.product.product_name %} is in the process of creating the repository. For an empty repository, you can use the [`PUT /repos/{owner}/{repo}/contents/{path}`](/rest/repos/contents#create-or-update-file-contents) REST API endpoint to create content and initialize the repository so you can use the API to manage the Git database. Contact {% data variables.contact.contact_support %} if this response status persists.
or unavailable. An unavailable repository typically means {% data variables.product.github %} is in the process of creating the repository. For an empty repository, you can use the [`PUT /repos/{owner}/{repo}/contents/{path}`](/rest/repos/contents#create-or-update-file-contents) REST API endpoint to create content and initialize the repository so you can use the API to manage the Git database. Contact {% data variables.contact.contact_support %} if this response status persists.
For more information on the Git object database, please read the
[Git Internals](https://git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain) chapter of

View File

@@ -14,11 +14,11 @@ topics:
For any Pull Request, {% data variables.product.product_name %} provides three kinds of comment views:
For any Pull Request, {% data variables.product.github %} provides three kinds of comment views:
[comments on the Pull Request](https://github.com/octocat/Spoon-Knife/pull/1176#issuecomment-24114792) as a whole, [comments on a specific line](https://github.com/octocat/Spoon-Knife/pull/1176#discussion_r6252889) within the Pull Request,
and [comments on a specific commit](https://github.com/octocat/Spoon-Knife/commit/cbc28e7c8caee26febc8c013b0adfb97a4edd96e#commitcomment-4049848) within the Pull Request.
Each of these types of comments goes through a different portion of the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API.
Each of these types of comments goes through a different portion of the {% data variables.product.github %} API.
In this guide, we'll explore how you can access and manipulate each one. For every
example, we'll be using [this sample Pull Request made](https://github.com/octocat/Spoon-Knife/pull/1176) on the "octocat"
repository. As always, samples can be found in [our platform-samples repository](https://github.com/github/platform-samples/tree/master/api/ruby/working-with-comments).

View File

@@ -15,7 +15,7 @@ autogenerated: rest
## About organization interactions
Organization owners can temporarily restrict which type of user can comment, open issues, or create pull requests in the organization's public repositories. {% data reusables.interactions.interactions-detail %} Here's more about the types of {% data variables.product.product_name %} users:
Organization owners can temporarily restrict which type of user can comment, open issues, or create pull requests in the organization's public repositories. {% data reusables.interactions.interactions-detail %} Here's more about the types of {% data variables.product.github %} users:
* {% data reusables.interactions.existing-user-limit-definition %} in the organization.
* {% data reusables.interactions.contributor-user-limit-definition %} in the organization.

View File

@@ -18,7 +18,7 @@ autogenerated: rest
## About repository interactions
People with owner or admin access can use the REST API to temporarily restrict which type of user can comment, open issues, or create pull requests in a public repository. {% data reusables.interactions.interactions-detail %} Here's more about the types of {% data variables.product.product_name %} users:
People with owner or admin access can use the REST API to temporarily restrict which type of user can comment, open issues, or create pull requests in a public repository. {% data reusables.interactions.interactions-detail %} Here's more about the types of {% data variables.product.github %} users:
* {% data reusables.interactions.existing-user-limit-definition %} in the repository.
* {% data reusables.interactions.contributor-user-limit-definition %} in the repository.

View File

@@ -15,7 +15,7 @@ autogenerated: rest
## About user interactions
You can use the REST API to temporarily restrict which type of user can comment, open issues, or create pull requests on your public repositories. {% data reusables.interactions.interactions-detail %} Here's more about the types of {% data variables.product.product_name %} users:
You can use the REST API to temporarily restrict which type of user can comment, open issues, or create pull requests on your public repositories. {% data reusables.interactions.interactions-detail %} Here's more about the types of {% data variables.product.github %} users:
* {% data reusables.interactions.existing-user-limit-definition %} from interacting with your repositories.
* {% data reusables.interactions.contributor-user-limit-definition %} from interacting with your repositories.

View File

@@ -3,7 +3,7 @@ title: REST API endpoints for repository statistics
shortTitle: Statistics
allowTitleToDifferFromFilename: true
intro: >-
Use the REST API to fetch the data that {% data variables.product.product_name
Use the REST API to fetch the data that {% data variables.product.github
%} uses for visualizing different types of repository activity.
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
fpt: '*'
@@ -16,7 +16,7 @@ autogenerated: rest
## About repository statistics
You can use the REST API to fetch the data that {% data variables.product.product_name %} uses for visualizing different types of repository activity.
You can use the REST API to fetch the data that {% data variables.product.github %} uses for visualizing different types of repository activity.
### Best practices for caching

View File

@@ -3,7 +3,7 @@ title: REST API endpoints for repositories
shortTitle: Repositories
intro: >-
Use the REST API to create, manage and control the workflow of public and
private {% data variables.product.product_name %} repositories.
private {% data variables.product.github %} repositories.
allowTitleToDifferFromFilename: true
redirect_from:
- /v3/repos

View File

@@ -20,7 +20,7 @@ autogenerated: rest
### SCIM Provisioning for Organizations
These endpoints are used by SCIM-enabled Identity Providers (IdPs) to automate provisioning of {% data variables.product.product_name %} organization membership and are based on version 2.0 of the [SCIM standard](http://www.simplecloud.info/). IdPs should use the base URL `{% data variables.product.rest_url %}/scim/v2/organizations/{org}/` for {% data variables.product.product_name %} SCIM endpoints.
These endpoints are used by SCIM-enabled Identity Providers (IdPs) to automate provisioning of {% data variables.product.github %} organization membership and are based on version 2.0 of the [SCIM standard](http://www.simplecloud.info/). IdPs should use the base URL `{% data variables.product.rest_url %}/scim/v2/organizations/{org}/` for {% data variables.product.github %} SCIM endpoints.
> [!NOTE]
> * These endpoints are only available for individual organizations that use {% data variables.product.prodname_ghe_cloud %} with SAML SSO enabled. For more information about SCIM, see [AUTOTITLE](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/about-scim-for-organizations). For more information about authorizing a token for a SAML SSO organization, see [AUTOTITLE](/rest/overview/authenticating-to-the-rest-api).
@@ -28,7 +28,7 @@ These endpoints are used by SCIM-enabled Identity Providers (IdPs) to automate p
### Authentication
You must authenticate as an owner of a {% data variables.product.product_name %} organization to use these endpoints. The REST API expects an OAuth 2.0 Bearer token (for example, a {% data variables.product.prodname_github_app %} user access token) to be included in the `Authorization` header. If you use a {% data variables.product.pat_v1 %} for authentication, it must have the `admin:org` scope and you must also [authorize it for use with your SAML SSO organization](/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on).
You must authenticate as an owner of a {% data variables.product.github %} organization to use these endpoints. The REST API expects an OAuth 2.0 Bearer token (for example, a {% data variables.product.prodname_github_app %} user access token) to be included in the `Authorization` header. If you use a {% data variables.product.pat_v1 %} for authentication, it must have the `admin:org` scope and you must also [authorize it for use with your SAML SSO organization](/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on).
### Mapping of SAML and SCIM data

View File

@@ -4,7 +4,7 @@ shortTitle: Search
allowTitleToDifferFromFilename: true
intro: >-
Use the REST API to search for specific items on {% data
variables.product.product_name %}.
variables.product.github %}.
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
fpt: '*'
ghec: '*'
@@ -18,7 +18,7 @@ autogenerated: rest
## About search
You can use the REST API to search for the specific item you want to find. For example, you can find a user or a specific file in a repository. Think of it the way you think of performing a search on Google. It's designed to help you find the one result you're looking for (or maybe the few results you're looking for). Just like searching on Google, you sometimes want to see a few pages of search results so that you can find the item that best meets your needs. To satisfy that need, the {% data variables.product.product_name %} REST API provides **up to 1,000 results for each search**.
You can use the REST API to search for the specific item you want to find. For example, you can find a user or a specific file in a repository. Think of it the way you think of performing a search on Google. It's designed to help you find the one result you're looking for (or maybe the few results you're looking for). Just like searching on Google, you sometimes want to see a few pages of search results so that you can find the item that best meets your needs. To satisfy that need, the {% data variables.product.github %} REST API provides **up to 1,000 results for each search**.
You can narrow your search using queries. To learn more about the search query syntax, see [AUTOTITLE](/rest/search/search#constructing-a-search-query).
@@ -37,9 +37,9 @@ For information about how to determine your current rate limit status, see [Rate
### Constructing a search query
Each endpoint for searching uses [query parameters](https://en.wikipedia.org/wiki/Query_string) to perform searches on {% data variables.product.product_name %}. See the individual endpoints for examples that include the endpoint and query parameters.
Each endpoint for searching uses [query parameters](https://en.wikipedia.org/wiki/Query_string) to perform searches on {% data variables.product.github %}. See the individual endpoints for examples that include the endpoint and query parameters.
A query can contain any combination of search qualifiers supported on {% data variables.product.product_name %}. The format of the search query is:
A query can contain any combination of search qualifiers supported on {% data variables.product.github %}. The format of the search query is:
```text
SEARCH_KEYWORD_1 SEARCH_KEYWORD_N QUALIFIER_1 QUALIFIER_N

View File

@@ -2,7 +2,7 @@
title: REST API endpoints for teams
shortTitle: Teams
allowTitleToDifferFromFilename: true
intro: 'Use the REST API to create and manage teams in your {% data variables.product.product_name %} organization.'
intro: 'Use the REST API to create and manage teams in your {% data variables.product.github %} organization.'
redirect_from:
- /v3/teams
- /rest/reference/teams

View File

@@ -3,7 +3,7 @@ title: REST API endpoints for team synchronization
shortTitle: Team synchronization
intro: >-
Use the REST API to manage connections between {% data
variables.product.product_name %} teams and external identity provider (IdP)
variables.product.github %} teams and external identity provider (IdP)
groups.
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
ghec: '*'
@@ -17,7 +17,7 @@ autogenerated: rest
To use these endpoints, the authenticated user must be a team maintainer or an owner of the organization associated with the team. The token you use to authenticate will also need to be authorized for use with your IdP (SSO) provider. For more information, see [AUTOTITLE](/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on).
You can manage {% data variables.product.product_name %} team members through your IdP with team synchronization. Team synchronization must be enabled to use these endpoints. For more information, see [AUTOTITLE](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/managing-team-synchronization-for-your-organization).
You can manage {% data variables.product.github %} team members through your IdP with team synchronization. Team synchronization must be enabled to use these endpoints. For more information, see [AUTOTITLE](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/managing-team-synchronization-for-your-organization).
> [!NOTE]
> These endpoints cannot be used with {% data variables.product.prodname_emus %}. To learn more about managing an {% data variables.enterprise.prodname_emu_org %}, see [AUTOTITLE](/enterprise-cloud@latest/rest/teams/external-groups).

View File

@@ -52,7 +52,7 @@ Continuing to make requests while you are rate limited may result in the banning
## Follow redirects
The {% data variables.product.product_name %} REST API uses HTTP redirection where appropriate. You should assume that any
The {% data variables.product.github %} REST API uses HTTP redirection where appropriate. You should assume that any
request may result in a redirection. Receiving an HTTP redirection is not an error, and you should follow the redirect.
A `301` status code indicates permanent redirection. You should repeat your request to the URL specified by the `location` header. Additionally, you should update your code to use this URL for future requests.

View File

@@ -1,7 +1,7 @@
---
title: Getting started with the REST API
shortTitle: Getting started
intro: 'Learn how to use the {% data variables.product.prodname_dotcom %} REST API.'
intro: 'Learn how to use the {% data variables.product.github %} REST API.'
versions:
fpt: '*'
ghes: '*'
@@ -20,7 +20,7 @@ redirect_from:
## Introduction
This article describes how to use the {% data variables.product.prodname_dotcom %} REST API with {% data variables.product.prodname_cli %}, `curl`, or JavaScript. For a quickstart guide, see [AUTOTITLE](/rest/quickstart).
This article describes how to use the {% data variables.product.github %} REST API with {% data variables.product.prodname_cli %}, `curl`, or JavaScript. For a quickstart guide, see [AUTOTITLE](/rest/quickstart).
{% curl %}
@@ -53,7 +53,7 @@ The HTTP method of an endpoint defines the type of action it performs on a given
For example, the HTTP method for the ["List repository issues" endpoint](/rest/issues/issues#list-repository-issues) is `GET`."
Where possible, the {% data variables.product.product_name %} REST API strives to use an appropriate HTTP method for each action.
Where possible, the {% data variables.product.github %} REST API strives to use an appropriate HTTP method for each action.
* `GET`: Used for retrieving resources.
* `POST`: Used for creating resources.
@@ -87,19 +87,19 @@ All API requests must include a valid `User-Agent` header. The `User-Agent` head
{% cli %}
By default, {% data variables.product.prodname_cli %} sends a valid `User-Agent` header. However, {% data variables.product.prodname_dotcom %} recommends using your {% data variables.product.product_name %} username, or the name of your application, for the `User-Agent` header value. This allows {% data variables.product.prodname_dotcom %} to contact you if there are problems.
By default, {% data variables.product.prodname_cli %} sends a valid `User-Agent` header. However, {% data variables.product.prodname_dotcom %} recommends using your {% data variables.product.github %} username, or the name of your application, for the `User-Agent` header value. This allows {% data variables.product.prodname_dotcom %} to contact you if there are problems.
{% endcli %}
{% curl %}
By default, `curl` sends a valid `User-Agent` header. However {% data variables.product.prodname_dotcom %} recommends using your {% data variables.product.product_name %} username, or the name of your application, for the `User-Agent` header value. This allows {% data variables.product.prodname_dotcom %} to contact you if there are problems.
By default, `curl` sends a valid `User-Agent` header. However {% data variables.product.prodname_dotcom %} recommends using your {% data variables.product.github %} username, or the name of your application, for the `User-Agent` header value. This allows {% data variables.product.prodname_dotcom %} to contact you if there are problems.
{% endcurl %}
{% javascript %}
If you use the Octokit.js SDK, the SDK will send a valid `User-Agent` header for you. However, {% data variables.product.prodname_dotcom %} recommends using your {% data variables.product.product_name %} username, or the name of your application, for the `User-Agent` header value. This allows {% data variables.product.prodname_dotcom %} to contact you if there are problems.
If you use the Octokit.js SDK, the SDK will send a valid `User-Agent` header for you. However, {% data variables.product.prodname_dotcom %} recommends using your {% data variables.product.github %} username, or the name of your application, for the `User-Agent` header value. This allows {% data variables.product.prodname_dotcom %} to contact you if there are problems.
{% endjavascript %}
@@ -126,7 +126,7 @@ The most common media types supported by the {% data variables.product.prodname_
There are custom media types that you can use with some endpoints. For example, the REST API to manage [commits](/rest/commits/commits#get-a-commit) and [pull requests](/rest/pulls/pulls) support the media types `diff`, `patch`, and `sha`. The media types `full`, `raw`, `text`, or `html` are used by some other endpoints.
All custom media types for {% data variables.product.product_name %} look like this: `application/vnd.github.PARAM+json`, where `PARAM` is the name of the media type. For example, to specify the `raw` media type, you would use `application/vnd.github.raw+json`.
All custom media types for {% data variables.product.github %} look like this: `application/vnd.github.PARAM+json`, where `PARAM` is the name of the media type. For example, to specify the `raw` media type, you would use `application/vnd.github.raw+json`.
For an example of a request that uses media types, see [Making a request](#making-a-request).
@@ -150,7 +150,7 @@ For an example of a request that uses an authentication token, see [Making a req
{% cli %}
Although some REST API endpoints are accessible without authentication, {% data variables.product.prodname_cli %} requires you to authenticate before you can use the `api` subcommand to make an API request. Use the `auth login` subcommand to authenticate to {% data variables.product.product_name %}. For more information, see [Making a request](#making-a-request).
Although some REST API endpoints are accessible without authentication, {% data variables.product.prodname_cli %} requires you to authenticate before you can use the `api` subcommand to make an API request. Use the `auth login` subcommand to authenticate to {% data variables.product.github %}. For more information, see [Making a request](#making-a-request).
{% endcli %}
@@ -218,7 +218,7 @@ Install {% data variables.product.prodname_cli %} on macOS, Windows, or Linux. F
### 3. Choose an endpoint for your request
1. Choose an endpoint to make a request to. You can explore {% data variables.product.product_name %}'s [REST API documentation](/rest) to discover endpoints that you can use to interact with {% data variables.product.product_name %}.
1. Choose an endpoint to make a request to. You can explore {% data variables.product.github %}'s [REST API documentation](/rest) to discover endpoints that you can use to interact with {% data variables.product.github %}.
1. Identify the HTTP method and path of the endpoint. You will send these with your request. For more information, see [HTTP method](#http-method) and [Path](#path).
For example, the ["Create an issue" endpoint](/rest/issues/issues#create-an-issue) uses the HTTP method `POST` and the path `/repos/{owner}/{repo}/issues`.
@@ -295,7 +295,7 @@ You must have `curl` installed on your machine. To check if `curl` is already in
### 2. Choose an endpoint for your request
1. Choose an endpoint to make a request to. You can explore {% data variables.product.product_name %}'s [REST API documentation](/rest) to discover endpoints that you can use to interact with {% data variables.product.product_name %}.
1. Choose an endpoint to make a request to. You can explore {% data variables.product.github %}'s [REST API documentation](/rest) to discover endpoints that you can use to interact with {% data variables.product.github %}.
1. Identify the HTTP method and path of the endpoint. You will send these with your request. For more information, see [HTTP method](#http-method) and [Path](#path).
For example, the ["Create an issue" endpoint](/rest/issues/issues#create-an-issue) uses the HTTP method `POST` and the path `/repos/{owner}/{repo}/issues`.
@@ -381,7 +381,7 @@ You must install `octokit` to use the Octokit.js library shown in the following
### 2. Choose an endpoint for your request
1. Choose an endpoint to make a request to. You can explore {% data variables.product.product_name %}'s [REST API documentation](/rest) to discover endpoints that you can use to interact with {% data variables.product.product_name %}.
1. Choose an endpoint to make a request to. You can explore {% data variables.product.github %}'s [REST API documentation](/rest) to discover endpoints that you can use to interact with {% data variables.product.github %}.
1. Identify the HTTP method and path of the endpoint. You will send these with your request. For more information, see [HTTP method](#http-method) and [Path](#path).
For example, the ["Create an issue" endpoint](/rest/issues/issues#create-an-issue) uses the HTTP method `POST` and the path `/repos/{owner}/{repo}/issues`.

View File

@@ -14,7 +14,7 @@ redirect_from:
{% ifversion ghes %}
Rate limits are disabled by default for {% data variables.product.product_name %}. Contact your site administrator to confirm the rate limits for your instance.
Rate limits are disabled by default for {% data variables.product.prodname_ghe_server %}. Contact your site administrator to confirm the rate limits for your instance.
If you are a site administrator, you can set rate limits, including secondary rate limits, for your instance. See [AUTOTITLE](/admin/configuration/configuring-user-applications-for-your-enterprise/configuring-rate-limits).

View File

@@ -43,7 +43,7 @@ For example, the API to manage contents generates a git commit for each addition
### Using the last known timezone for the user
If no `Time-Zone` header is specified and you make an authenticated call to the API, we use the last known timezone for the authenticated user. The last known timezone is updated whenever you browse the {% data variables.product.product_name %} website.
If no `Time-Zone` header is specified and you make an authenticated call to the API, we use the last known timezone for the authenticated user. The last known timezone is updated whenever you browse the {% data variables.product.github %} website.
### Defaulting to UTC without other timezone information

View File

@@ -89,9 +89,9 @@ Basic authentication with your username and password is not supported. Instead,
## Timeouts
If {% data variables.product.product_name %} takes more than 10 seconds to process an API request, {% data variables.product.product_name %} will terminate the request and you will receive a timeout response and a "Server Error" message.
If {% data variables.product.github %} takes more than 10 seconds to process an API request, {% data variables.product.github %} will terminate the request and you will receive a timeout response and a "Server Error" message.
{% data variables.product.product_name %} reserves the right to change the timeout window to protect the speed and reliability of the API.
{% data variables.product.github %} reserves the right to change the timeout window to protect the speed and reliability of the API.
You can check the status of the REST API at [githubstatus.com](https://www.githubstatus.com/) to determine whether the timeout is due to a problem with the API. You can also try to simplify your request or try your request later. For example, if you are requesting 100 items on a page, you can try requesting fewer items.

View File

@@ -43,7 +43,7 @@ Access-Control-Max-Age: 86400
## JSON-P callbacks
You can send a `?callback` parameter to any GET call to have the results
wrapped in a JSON function. This is typically used when browsers want to embed {% data variables.product.product_name %} content in web pages and avoid cross-domain problems. The response includes the same data output as the regular API, plus the relevant HTTP Header information.
wrapped in a JSON function. This is typically used when browsers want to embed {% data variables.product.github %} content in web pages and avoid cross-domain problems. The response includes the same data output as the regular API, plus the relevant HTTP Header information.
```shell
$ curl {% data variables.product.rest_url %}?callback=foo