You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -227,7 +227,7 @@ defaultPlatform: linux
227
227
228
228
### `defaultTool`
229
229
230
-
- Purpose: Override the initial tool selection for a page, where the tool refers to the application the reader is using to work with GitHub (such as GitHub.com's web UI, the GitHub CLI, or GitHub Desktop) or the GitHub APIs (such as cURL or the GitHub CLI). For more information about the tool selector, see [Markup reference for GitHub Docs](../contributing/content-markup-reference.md#tool-tags). If this frontmatter is omitted, then the tool-specific content matching the GitHub web UI is shown by default. If a user has indicated a tool preference (by clicking on a tool tab), then the user's preference will be applied instead of the default value.
230
+
- Purpose: Override the initial tool selection for a page, where the tool refers to the application the reader is using to work with GitHub (such as GitHub.com's web UI, the GitHub CLI, or GitHub Desktop) or the GitHub APIs. For more information about the tool selector, see [Markup reference for GitHub Docs](../contributing/content-markup-reference.md#tool-tags). If this frontmatter is omitted, then the tool-specific content matching the GitHub web UI is shown by default. If a user has indicated a tool preference (by clicking on a tool tab), then the user's preference will be applied instead of the default value.
Copy file name to clipboardExpand all lines: content/admin/configuration/configuring-your-enterprise/site-admin-dashboard.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ Specifically, you can download CSV reports that list
64
64
65
65
You can also access these reports programmatically via standard HTTP authentication with a site admin account. You must use a {% data variables.product.pat_v1 %} with the `site_admin` scope. For more information, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)."
66
66
67
-
For example, here is how you would download the "all users" report using cURL:
67
+
For example, here is how you would download the "all users" report in a `curl` command:
Copy file name to clipboardExpand all lines: content/developers/apps/getting-started-with-apps/about-apps.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,12 +76,12 @@ For more on {% data variables.product.prodname_oauth_apps %}, see "[Creating an
76
76
77
77
A [{% data variables.product.pat_generic %}](/articles/creating-a-personal-access-token-for-the-command-line/) is a string of characters that functions similarly to an [OAuth token](/apps/building-oauth-apps/authorizing-oauth-apps/) in that you can specify its permissions via [scopes](/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A {% data variables.product.pat_generic %} is also similar to a password, but you can have many of them and you can revoke access to each one at any time.
78
78
79
-
As an example, you can enable a {% data variables.product.pat_generic %} to write to your repositories. If then you run a cURL command or write a script that [creates an issue](/rest/reference/issues#create-an-issue) in your repository, you would pass the {% data variables.product.pat_generic %} to authenticate. You can store the {% data variables.product.pat_generic %} as an environment variable to avoid typing it every time you use it.
79
+
As an example, you can enable a {% data variables.product.pat_generic %} to write to your repositories. If then you run a `curl` command or write a script that [creates an issue](/rest/reference/issues#create-an-issue) in your repository, you would pass the {% data variables.product.pat_generic %} to authenticate. You can store the {% data variables.product.pat_generic %} as an environment variable to avoid typing it every time you use it.
80
80
81
81
Keep these ideas in mind when using {% data variables.product.pat_generic %}s:
82
82
83
83
* Remember to use this token to represent yourself only.
84
-
* You can perform one-off cURL requests.
84
+
* You can perform one-off `curl` requests.
85
85
* You can run personal scripts.
86
86
* Don't set up a script for your whole team or company to use.
87
87
* Don't set up a shared personal account to act as a bot user.
@@ -99,7 +99,7 @@ Consider these questions about how your integration needs to behave and what it
99
99
* Will my integration act only as me, or will it act more like an application?
100
100
* Do I want it to act independently of me as its own entity?
101
101
* Will it access everything that I can access, or do I want to limit its access?
102
-
* Is it simple or complex? For example, {% data variables.product.pat_generic %}s are good for simple scripts and cURLs, whereas an {% data variables.product.prodname_oauth_app %} can handle more complex scripting.
102
+
* Is it simple or complex? For example, {% data variables.product.pat_generic %}s are good for simple scripts and `curl` commands, whereas an {% data variables.product.prodname_oauth_app %} can handle more complex scripting.
Copy file name to clipboardExpand all lines: content/graphql/guides/forming-calls-with-graphql.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,11 +47,11 @@ The endpoint remains constant no matter what operation you perform.
47
47
48
48
## Communicating with GraphQL
49
49
50
-
Because GraphQL operations consist of multiline JSON, GitHub recommends using the [Explorer](/graphql/guides/using-the-explorer) to make GraphQL calls. You can also use cURL or any other HTTP-speaking library.
50
+
Because GraphQL operations consist of multiline JSON, GitHub recommends using the [Explorer](/graphql/guides/using-the-explorer) to make GraphQL calls. You can also use `curl` or any other HTTP-speaking library.
51
51
52
52
In REST, [HTTP verbs](/rest#http-verbs) determine the operation performed. In GraphQL, you'll provide a JSON-encoded body whether you're performing a query or a mutation, so the HTTP verb is `POST`. The exception is an [introspection query](/graphql/guides/introduction-to-graphql#discovering-the-graphql-api), which is a simple `GET` to the endpoint. For more information on GraphQL versus REST, see "[Migrating from REST to GraphQL](/graphql/guides/migrating-from-rest-to-graphql)."
53
53
54
-
To query GraphQL using cURL, make a `POST` request with a JSON payload. The payload must contain a string called `query`:
54
+
To query GraphQL in a `curl` command, make a `POST` request with a JSON payload. The payload must contain a string called `query`:
55
55
56
56
```shell
57
57
curl -H "Authorization: bearer TOKEN" -X POST -d "\
Copy file name to clipboardExpand all lines: content/graphql/guides/migrating-graphql-global-node-ids.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ Additionally, if you currently decode the legacy IDs to extract type information
28
28
29
29
To facilitate migration to the new ID format, you can use the `X-Github-Next-Global-ID` header in your GraphQL API requests. The value of the `X-Github-Next-Global-ID` header can be `1` or `0`. Setting the value to `1` will force the response payload to always use the new ID format for any object that you requested the `id` field for. Setting the value to `0` will revert to default behavior, which is to show the legacy ID or new ID depending on the object creation date.
30
30
31
-
Here is an example request using cURL:
31
+
Here is an example request using a `curl` command:
Copy file name to clipboardExpand all lines: content/graphql/guides/using-the-explorer.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ variables {
88
88
}
89
89
```
90
90
91
-
This is the correct format to submit the call via a cURL `POST` (as long as you [escape newlines](/graphql/guides/forming-calls-with-graphql#communicating-with-graphql)).
91
+
This is the correct format to submit the call using a `POST` request in a `curl` command (as long as you [escape newlines](/graphql/guides/forming-calls-with-graphql#communicating-with-graphql)).
92
92
93
93
If you want to run the call in the Explorer, enter the `query` segment in the main pane and the variables in the **Query Variables** pane below it. Omit the word `variables` from the Explorer:
Copy file name to clipboardExpand all lines: content/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ This article demonstrates how to use the GraphQL API to manage a project. For mo
21
21
22
22
{% curl %}
23
23
24
-
In all of the following cURL examples, replace `TOKEN` with a token that has the `read:project` scope (for queries) or `project` scope (for queries and mutations). The token can be a {% data variables.product.pat_v1 %} for a user or an installation access token for a {% data variables.product.prodname_github_app %}. For more information about creating a {% data variables.product.pat_generic %}, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)." For more information about creating an installation access token for a {% data variables.product.prodname_github_app %}, see "[Authenticating with {% data variables.product.prodname_github_apps %}](/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-a-github-app)."
24
+
In all of the following `curl` command examples, replace `TOKEN` with a token that has the `read:project` scope (for queries) or `project` scope (for queries and mutations). The token can be a {% data variables.product.pat_v1 %} for a user or an installation access token for a {% data variables.product.prodname_github_app %}. For more information about creating a {% data variables.product.pat_generic %}, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)." For more information about creating an installation access token for a {% data variables.product.prodname_github_app %}, see "[Authenticating with {% data variables.product.prodname_github_apps %}](/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-a-github-app)."
Copy file name to clipboardExpand all lines: content/rest/guides/getting-started-with-the-rest-api.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ miniTocMaxHeadingLevel: 3
14
14
15
15
## About the {% data variables.product.prodname_dotcom %} REST API
16
16
17
-
This article describes how to use the {% data variables.product.prodname_dotcom %} REST API using {% data variables.product.prodname_cli %}, JavaScript, or cURL. For a quickstart guide, see "[Quickstart for GitHub REST API](/rest/quickstart)."
17
+
This article describes how to use the {% data variables.product.prodname_dotcom %} REST API using {% data variables.product.prodname_cli %}, JavaScript, or `curl`. For a quickstart guide, see "[Quickstart for GitHub REST API](/rest/quickstart)."
18
18
19
19
When you make a request to the REST API, you will specify an HTTP method and a path. Additionally, you might also specify request headers and path, query, or body parameters. The API will return the response status code, response headers, and potentially a response body.
20
20
@@ -83,7 +83,7 @@ curl --request GET \
83
83
84
84
{% note %}
85
85
86
-
**Note**: If you get a message similar to "command not found: curl", you may need to download and install cURL. For more information, see [the cURL project download page](https://curl.se/download.html).
86
+
**Note**: If you get a message similar to "command not found: curl", you may need to download and install `curl`. For more information, see [the curl project download page](https://curl.se/download.html).
87
87
88
88
{% endnote %}
89
89
@@ -150,15 +150,15 @@ const octokit = new Octokit({ {% ifversion ghes or ghae %}
150
150
151
151
**Warning**: Treat your access token like a password.
152
152
153
-
To help keep your account secure, you can use {% data variables.product.prodname_cli %} instead of cURL. {% data variables.product.prodname_cli %} will take care of authentication for you. For more information, see the {% data variables.product.prodname_cli %} version of this page.
153
+
To help keep your account secure, you can use {% data variables.product.prodname_cli %} instead of `curl` commands. {% data variables.product.prodname_cli %} will take care of authentication for you. For more information, see the {% data variables.product.prodname_cli %} version of this page.
154
154
155
155
{% ifversion ghec or fpt %}You can also store your token as a {% data variables.product.prodname_codespaces %} secret and use the command line through {% data variables.product.prodname_codespaces %}. For more information, see "[Managing encrypted secrets for your codespaces](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)."{% endif %}
156
156
157
157
If these options are not possible, consider using another service such as [the 1Password CLI](https://developer.1password.com/docs/cli/secret-references/) to store your token securely.
158
158
159
159
{% endwarning %}
160
160
161
-
With cURL, you will send an `Authorization` header with your token. Replace `YOUR-TOKEN` with your token:
161
+
In `curl` commands, you will send an `Authorization` header with your token. Replace `YOUR-TOKEN` with your token:
162
162
163
163
```shell
164
164
curl --request GET \
@@ -270,7 +270,7 @@ jobs:
270
270
271
271
{% curl %}
272
272
273
-
You can also use the `run` keyword to execute cURL commands in your {% data variables.product.prodname_actions %} workflows. For more information, see "[Workflow syntax for GitHub Actions](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)."
273
+
You can also use the `run` keyword to execute `curl` commands in your {% data variables.product.prodname_actions %} workflows. For more information, see "[Workflow syntax for GitHub Actions](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)."
274
274
275
275
{% data variables.product.prodname_dotcom %} recommends that you authenticate with the built-in `GITHUB_TOKEN` instead of creating a token. If this is not possible, store your token as a secret and replace `GITHUB_TOKEN` in the example below with the name of your secret. For more information about `GITHUB_TOKEN`, see "[Automatic token authentication](/actions/security-guides/automatic-token-authentication)." For more information about secrets, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)."
For cURL, add a `?` to the end of the path, then append your query parameter name and value in the form `parameter_name=value`. Separate multiple query parameters with `&`.
442
+
For `curl` commands, add a `?` to the end of the path, then append your query parameter name and value in the form `parameter_name=value`. Separate multiple query parameters with `&`.
443
443
444
444
```shell
445
445
curl --request GET \
@@ -511,7 +511,7 @@ If you are using a {% data variables.product.pat_v2 %}, you must replace `octoca
511
511
512
512
{% endif %}
513
513
514
-
For cURL, use the `--data` flag to pass the body parameters in a JSON object.
514
+
For `curl` commands, use the `--data` flag to pass the body parameters in a JSON object.
Copy file name to clipboardExpand all lines: content/rest/overview/other-authentication-methods.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,9 +64,8 @@ This approach is useful if your tools only support Basic Authentication but you
64
64
To use Basic Authentication with the {% data variables.product.product_name %} API, simply send the username and
65
65
password associated with the account.
66
66
67
-
For example, if you're accessing the API via [cURL][curl], the following command
68
-
would authenticate you if you replace `<username>` with your {% data variables.product.product_name %} username.
69
-
(cURL will prompt you to enter the password.)
67
+
For example, the following [`curl` command][curl] to the API would authenticate you if you replace `<username>` with your {% data variables.product.product_name %} username.
68
+
(curl will prompt you to enter the password.)
70
69
71
70
```shell
72
71
$ curl -u USERNAME {% data variables.product.api_url_pre %}/user
0 commit comments