Skip to content

Commit e977bce

Browse files
authored
Combine product name variables for REST and GraphQL API base URLs (#50521)
1 parent aef6bc2 commit e977bce

File tree

40 files changed

+99
-107
lines changed

40 files changed

+99
-107
lines changed

content/actions/deployment/protecting-deployments/creating-custom-deployment-protection-rules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Once a workflow reaches a job that references an environment that has the custom
5757

5858
```shell
5959
curl --request POST \
60-
--url "{% data variables.product.api_url_code %}/app/installations/INSTALLATION_ID/ACCESS_TOKENS" \
60+
--url "{% data variables.product.rest_url %}/app/installations/INSTALLATION_ID/ACCESS_TOKENS" \
6161
--header "Accept: application/vnd.github+json" \
6262
--header "Authorization: Bearer {jwt}" \
6363
--header "Content-Type: application/json" \

content/actions/learn-github-actions/variables.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,12 @@ We strongly recommend that actions use variables to access the filesystem rather
278278
{%- ifversion actions-oidc-custom-claims %}
279279
| `GITHUB_ACTOR_ID` | {% data reusables.actions.actor_id-description %} |
280280
{%- endif %}
281-
| `GITHUB_API_URL` | Returns the API URL. For example: `{% data variables.product.api_url_code %}`.
281+
| `GITHUB_API_URL` | Returns the API URL. For example: `{% data variables.product.rest_url %}`.
282282
| `GITHUB_BASE_REF` | The name of the base ref or target branch of the pull request in a workflow run. This is only set when the event that triggers a workflow run is either `pull_request` or `pull_request_target`. For example, `main`. |
283283
| `GITHUB_ENV` | The path on the runner to the file that sets variables from workflow commands. The path to this file is unique to the current step and changes for each step in a job. For example, `/home/runner/work/_temp/_runner_file_commands/set_env_87406d6e-4979-4d42-98e1-3dab1f48b13a`. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable)." |
284284
| `GITHUB_EVENT_NAME` | The name of the event that triggered the workflow. For example, `workflow_dispatch`. |
285285
| `GITHUB_EVENT_PATH` | The path to the file on the runner that contains the full event webhook payload. For example, `/github/workflow/event.json`. |
286-
| `GITHUB_GRAPHQL_URL` | Returns the GraphQL API URL. For example: `{% data variables.product.graphql_url_code %}`.
286+
| `GITHUB_GRAPHQL_URL` | Returns the GraphQL API URL. For example: `{% data variables.product.graphql_url %}`.
287287
| `GITHUB_HEAD_REF` | The head ref or source branch of the pull request in a workflow run. This property is only set when the event that triggers a workflow run is either `pull_request` or `pull_request_target`. For example, `feature-branch-1`. |
288288
| `GITHUB_JOB` | The [job_id](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_id) of the current job. For example, `greeting_job`. |
289289
| `GITHUB_OUTPUT` | The path on the runner to the file that sets the current step's outputs from workflow commands. The path to this file is unique to the current step and changes for each step in a job. For example, `/home/runner/work/_temp/_runner_file_commands/set_output_a50ef383-b063-46d9-9157-57953fc9f3f0`. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter)." |

content/actions/security-guides/automatic-token-authentication.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
- name: Create issue using REST API
6262
run: |
6363
curl --request POST \
64-
--url {% data variables.product.api_url_code %}/repos/${% raw %}{{ github.repository }}{% endraw %}/issues \
64+
--url {% data variables.product.rest_url %}/repos/${% raw %}{{ github.repository }}{% endraw %}/issues \
6565
--header 'authorization: Bearer ${% raw %}{{ secrets.GITHUB_TOKEN }}{% endraw %}' \
6666
--header 'content-type: application/json' \
6767
--data '{

content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit-log-api-for-your-enterprise.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The query below searches for audit log events created on Jan 1st, 2022 in the `a
4949
```shell
5050
curl -H "Authorization: Bearer TOKEN" \
5151
--request GET \
52-
"{% data variables.product.api_url_code %}/enterprises/avocado-corp/audit-log?phrase=created:2022-01-01&page=1&per_page=100"
52+
"{% data variables.product.rest_url %}/enterprises/avocado-corp/audit-log?phrase=created:2022-01-01&page=1&per_page=100"
5353
```
5454

5555
{% else %}
@@ -59,23 +59,23 @@ The query below searches for audit log events created on Jan 1st, 2022 in the `a
5959
```shell
6060
curl --include -H "Authorization: Bearer TOKEN" \
6161
--request GET \
62-
"{% data variables.product.api_url_code %}/enterprises/avocado-corp/audit-log?phrase=created:2022-01-01&per_page=100"
62+
"{% data variables.product.rest_url %}/enterprises/avocado-corp/audit-log?phrase=created:2022-01-01&per_page=100"
6363
```
6464

6565
If there are more than 100 results, the `link` header will include URLs to fetch the next, first, and previous pages of results.
6666

6767
```text
68-
link: <{% data variables.product.api_url_code %}/enterprises/13827/audit-log?%3A2022-11-01=&per_page=100&after=MS42NjQzODMzNTk5MjdlKzEyfDloQzBxdURzaFdVbVlLWjkxRU9mNXc%3D&before=>; rel="next",
69-
<{% data variables.product.api_url_code %}/enterprises/13827/audit-log?%3A2022-11-01=&per_page=100&after=&before=>; rel="first",
70-
<{% data variables.product.api_url_code %}/enterprises/13827/audit-log?%3A2022-11-01=&per_page=100&after=&before=MS42Njc4NDA2MjM4MzNlKzEyfExqeG5sUElvNEZMbG1XZHA5akdKTVE%3D>; rel="prev"
68+
link: <{% data variables.product.rest_url %}/enterprises/13827/audit-log?%3A2022-11-01=&per_page=100&after=MS42NjQzODMzNTk5MjdlKzEyfDloQzBxdURzaFdVbVlLWjkxRU9mNXc%3D&before=>; rel="next",
69+
<{% data variables.product.rest_url %}/enterprises/13827/audit-log?%3A2022-11-01=&per_page=100&after=&before=>; rel="first",
70+
<{% data variables.product.rest_url %}/enterprises/13827/audit-log?%3A2022-11-01=&per_page=100&after=&before=MS42Njc4NDA2MjM4MzNlKzEyfExqeG5sUElvNEZMbG1XZHA5akdKTVE%3D>; rel="prev"
7171
```
7272

7373
Copy the corresponding pagination link into your next request. For example:
7474

7575
```shell
7676
curl -I -H "Authorization: Bearer TOKEN" \
7777
--request GET \
78-
"{% data variables.product.api_url_code %}/enterprises/13827/audit-log?%3A2022-11-01=&per_page=100&after=MS42Njc4NDA2MjM5NDFlKzEyfHRYa3AwSkxUd2xyRjA5bWxfOS1RbFE%3D&before="
78+
"{% data variables.product.rest_url %}/enterprises/13827/audit-log?%3A2022-11-01=&per_page=100&after=MS42Njc4NDA2MjM5NDFlKzEyfHRYa3AwSkxUd2xyRjA5bWxfOS1RbFE%3D&before="
7979
```
8080

8181
{% endif %}
@@ -89,7 +89,7 @@ The query below searches for audit log events for pull requests, where the event
8989
```shell
9090
curl -H "Authorization: Bearer TOKEN" \
9191
--request GET \
92-
"{% data variables.product.api_url_code %}/enterprises/avocado-corp/audit-log?phrase=action:pull_request+created:>=2022-01-01+actor:octocat"
92+
"{% data variables.product.rest_url %}/enterprises/avocado-corp/audit-log?phrase=action:pull_request+created:>=2022-01-01+actor:octocat"
9393
```
9494

9595
## Example 3: Events for Git activity in an enterprise, for a specific date and actor
@@ -101,5 +101,5 @@ The query below searches for audit log events for Git activity, where the event
101101
```shell
102102
curl -H "Authorization: Bearer TOKEN" \
103103
--request GET \
104-
"{% data variables.product.api_url_code %}/enterprises/avocado-corp/audit-log?phrase=created:>=2024-01-01+actor:octocat&include=git"
104+
"{% data variables.product.rest_url %}/enterprises/avocado-corp/audit-log?phrase=created:>=2024-01-01+actor:octocat&include=git"
105105
```

content/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ In the following example, replace `INSTALLATION_ACCESS_TOKEN` with an installati
4646

4747
```shell
4848
curl --request GET \
49-
--url "{% data variables.product.api_url_pre %}/meta" \
49+
--url "{% data variables.product.rest_url %}/meta" \
5050
--header "Accept: application/vnd.github+json" \
5151
--header "Authorization: Bearer INSTALLATION_ACCESS_TOKEN" \
5252
--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"

content/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If a REST API endpoint requires you to authenticate as an app, the documentation
2323

2424
```shell
2525
curl --request GET \
26-
--url "{% data variables.product.api_url_pre %}/app/installations" \
26+
--url "{% data variables.product.rest_url %}/app/installations" \
2727
--header "Accept: application/vnd.github+json" \
2828
--header "Authorization: Bearer YOUR_JWT" \
2929
--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"

content/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To use a JWT, pass it in the `Authorization` header of an API request. For examp
2727

2828
```shell
2929
curl --request GET \
30-
--url "{% data variables.product.api_url_pre %}/app" \
30+
--url "{% data variables.product.rest_url %}/app" \
3131
--header "Accept: application/vnd.github+json" \
3232
--header "Authorization: Bearer YOUR_JWT" \
3333
--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"
@@ -128,7 +128,7 @@ payload = {
128128
# {% data variables.product.prodname_github_app %}'s client ID
129129
'iss': client_id{% else %}
130130
# {% data variables.product.prodname_github_app %}'s app ID
131-
'iss': app_id{% endif %}
131+
'iss': app_id{% endif %}
132132
}
133133

134134
# Create JWT
@@ -156,7 +156,7 @@ set -o pipefail
156156
client_id=$1 # Client ID as first argument
157157
{% else %}
158158
app_id=$1 # App ID as first argument
159-
{% endif %}
159+
{% endif %}
160160
pem=$( cat $2 ) # file path of the private key as second argument
161161

162162
now=$(date +%s)
@@ -175,7 +175,7 @@ header=$( echo -n "${header_json}" | b64enc )
175175
payload_json='{
176176
"iat":'"${iat}"',
177177
"exp":'"${exp}"',
178-
{% ifversion client-id-for-app %}"iss":'"${client_id}"'{% else %}"iss":'"${client_id}"'{% endif %}
178+
{% ifversion client-id-for-app %}"iss":'"${client_id}"'{% else %}"iss":'"${client_id}"'{% endif %}
179179
}'
180180
# Payload encode
181181
payload=$( echo -n "${payload_json}" | b64enc )
@@ -203,7 +203,7 @@ In the following example, replace `YOUR_PATH_TO_PEM` with the file path where yo
203203
$client_id = YOUR_CLIENT_ID
204204
{% else %}
205205
$app_id = YOUR_APP_ID
206-
{% endif %}
206+
{% endif %}
207207
$private_key_path = "YOUR_PATH_TO_PEM"
208208

209209
$header = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes((ConvertTo-Json -InputObject @{
@@ -214,7 +214,7 @@ $header = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes((Conve
214214
$payload = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes((ConvertTo-Json -InputObject @{
215215
iat = [System.DateTimeOffset]::UtcNow.AddSeconds(-10).ToUnixTimeSeconds()
216216
exp = [System.DateTimeOffset]::UtcNow.AddMinutes(10).ToUnixTimeSeconds()
217-
{% ifversion client-id-for-app %} iss = $client_id{% else %} iss = $app_id{% endif %}
217+
{% ifversion client-id-for-app %} iss = $client_id{% else %} iss = $app_id{% endif %}
218218
}))).TrimEnd('=').Replace('+', '-').Replace('/', '_');
219219

220220
$rsa = [System.Security.Cryptography.RSA]::Create()

content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-cli-with-a-github-app.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ Now that your app can generate a user access token, you can make API requests on
490490

491491
```ruby copy
492492
def whoami
493-
uri = URI("{% data variables.product.api_url_code %}/user")
493+
uri = URI("{% data variables.product.rest_url %}/user")
494494
495495
begin
496496
token = File.read("./.token").strip
@@ -675,7 +675,7 @@ This is the full code example that was outlined in the previous section. Replace
675675
end
676676
677677
def whoami
678-
uri = URI("{% data variables.product.api_url_code %}/user")
678+
uri = URI("{% data variables.product.rest_url %}/user")
679679
680680
begin
681681
token = File.read("./.token").strip

content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-login-with-github-button-with-a-github-app.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ These steps lead you through writing code to generate a user access token. To sk
249249

250250
```ruby copy
251251
def user_info(token)
252-
uri = URI("{% data variables.product.api_url_code %}/user")
252+
uri = URI("{% data variables.product.rest_url %}/user")
253253

254254
result = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
255255
body = {"access_token" => token}.to_json
@@ -332,7 +332,7 @@ def exchange_code(code)
332332
end
333333

334334
def user_info(token)
335-
uri = URI("{% data variables.product.api_url_code %}/user")
335+
uri = URI("{% data variables.product.rest_url %}/user")
336336

337337
result = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
338338
body = {"access_token" => token}.to_json

content/apps/oauth-apps/building-oauth-apps/authenticating-to-the-rest-api-with-an-oauth-app.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,13 @@ the logged in user:
182182

183183
``` ruby
184184
# fetch user information
185-
auth_result = JSON.parse(RestClient.get('{% data variables.product.api_url_code %}/user',
185+
auth_result = JSON.parse(RestClient.get('{% data variables.product.rest_url %}/user',
186186
{:params => {:access_token => access_token}}))
187187

188188
# if the user authorized it, fetch private emails
189189
if has_user_email_scope
190190
auth_result['private_emails'] =
191-
JSON.parse(RestClient.get('{% data variables.product.api_url_code %}/user/emails',
191+
JSON.parse(RestClient.get('{% data variables.product.rest_url %}/user/emails',
192192
{:params => {:access_token => access_token}}))
193193
end
194194

@@ -271,7 +271,7 @@ get '/' do
271271
scopes = []
272272

273273
begin
274-
auth_result = RestClient.get('{% data variables.product.api_url_code %}/user',
274+
auth_result = RestClient.get('{% data variables.product.rest_url %}/user',
275275
{:params => {:access_token => access_token},
276276
:accept => :json})
277277
rescue => e
@@ -292,7 +292,7 @@ get '/' do
292292

293293
if scopes.include? 'user:email'
294294
auth_result['private_emails'] =
295-
JSON.parse(RestClient.get('{% data variables.product.api_url_code %}/user/emails',
295+
JSON.parse(RestClient.get('{% data variables.product.rest_url %}/user/emails',
296296
{:params => {:access_token => access_token},
297297
:accept => :json}))
298298
end

content/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ Accept: application/xml
116116
The access token allows you to make requests to the API on a behalf of a user.
117117

118118
Authorization: Bearer OAUTH-TOKEN
119-
GET {% data variables.product.api_url_code %}/user
119+
GET {% data variables.product.rest_url %}/user
120120

121121
For example, in curl you can set the Authorization header like this:
122122

123123
```shell
124-
curl -H "Authorization: Bearer OAUTH-TOKEN" {% data variables.product.api_url_pre %}/user
124+
curl -H "Authorization: Bearer OAUTH-TOKEN" {% data variables.product.rest_url %}/user
125125
```
126126

127127
## Device flow

content/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ If your {% data variables.product.prodname_oauth_app %} doesn't have access to a
3434
Check headers to see what OAuth scopes you have, and what the API action accepts:
3535

3636
```shell
37-
$ curl -H "Authorization: Bearer OAUTH-TOKEN" {% data variables.product.api_url_pre %}/users/codertocat -I
37+
$ curl -H "Authorization: Bearer OAUTH-TOKEN" {% data variables.product.rest_url %}/users/codertocat -I
3838
HTTP/2 200
3939
X-OAuth-Scopes: repo, user
4040
X-Accepted-OAuth-Scopes: user

content/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ redirect_from:
3333
| `GIT_COMMITTER_EMAIL` | The email for the "author" field of future `git` commits. |
3434
| `GIT_COMMITTER_NAME` | The name for the "committer" field of future `git` commits. |
3535
| `GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN`| Returns the domain of the {% data variables.product.prodname_github_codespaces %} forwarded port. For example, `app.github.dev`. |
36-
| `GITHUB_API_URL` | Returns the API URL. For example, `{% data variables.product.api_url_code %}`. |
37-
| `GITHUB_GRAPHQL_URL` | Returns the GraphQL API URL. For example, `{% data variables.product.graphql_url_code %}`. |
36+
| `GITHUB_API_URL` | Returns the API URL. For example, `{% data variables.product.rest_url %}`. |
37+
| `GITHUB_GRAPHQL_URL` | Returns the GraphQL API URL. For example, `{% data variables.product.graphql_url %}`. |
3838
| `GITHUB_REPOSITORY` | The owner and repository name. For example, `octocat/Hello-World`. |
3939
| `GITHUB_SERVER_URL`| Returns the URL of the {% data variables.product.product_name %} server. For example, `https://{% data variables.product.product_url %}`. |
4040
| `GITHUB_TOKEN` | A signed auth token representing the user in the codespace. You can use this to make authenticated calls to the GitHub API. For more information, see "[AUTOTITLE](/codespaces/reference/security-in-github-codespaces#authentication)." |

content/graphql/guides/forming-calls-with-graphql.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ To authenticate with an OAuth token from an {% data variables.product.prodname_o
4444

4545
The REST API has numerous endpoints; the GraphQL API has a single endpoint:
4646

47-
<pre>{% data variables.product.graphql_url_pre %}</pre>
47+
<pre>{% data variables.product.graphql_url %}</pre>
4848

4949
The endpoint remains constant no matter what operation you perform.
5050

@@ -61,7 +61,7 @@ curl -H "Authorization: bearer TOKEN" -X POST -d " \
6161
{ \
6262
\"query\": \"query { viewer { login }}\" \
6363
} \
64-
" {% data variables.product.graphql_url_code %}
64+
" {% data variables.product.graphql_url %}
6565
```
6666

6767
{% tip %}

content/graphql/guides/introduction-to-graphql.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ GraphQL is [introspective](https://graphql.org/learn/introspection/). This means
115115
- You can also run an _introspection query_ of the schema via a `GET` request:
116116

117117
```shell
118-
curl -H "Authorization: bearer TOKEN" {% data variables.product.graphql_url_pre %}
118+
curl -H "Authorization: bearer TOKEN" {% data variables.product.graphql_url %}
119119
```
120120

121121
{% note %}
@@ -130,7 +130,7 @@ GraphQL is [introspective](https://graphql.org/learn/introspection/). This means
130130

131131
```shell
132132
$ curl -H "Authorization: bearer TOKEN" -H "Accept: application/vnd.github.v4.idl" \
133-
{% data variables.product.graphql_url_pre %}
133+
{% data variables.product.graphql_url %}
134134
```
135135

136136
{% note %}

content/graphql/guides/migrating-from-rest-to-graphql.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Here are examples of each.
3939
A single REST API call retrieves a list of your organization's members:
4040

4141
```shell
42-
curl -v {% data variables.product.api_url_pre %}/orgs/:org/members
42+
curl -v {% data variables.product.rest_url %}/orgs/:org/members
4343
```
4444

4545
The REST payload contains excessive data if your goal is to retrieve only member names and links to avatars. However, a GraphQL query returns only what you specify:
@@ -62,13 +62,13 @@ query {
6262
Consider another example: retrieving a list of pull requests and checking if each one is mergeable. A call to the REST API retrieves a list of pull requests and their [summary representations](/rest#summary-representations):
6363

6464
```shell
65-
curl -v {% data variables.product.api_url_pre %}/repos/:owner/:repo/pulls
65+
curl -v {% data variables.product.rest_url %}/repos/:owner/:repo/pulls
6666
```
6767

6868
Determining if a pull request is mergeable requires retrieving each pull request individually for its [detailed representation](/rest#detailed-representations) (a large payload) and checking whether its `mergeable` attribute is true or false:
6969

7070
```shell
71-
curl -v {% data variables.product.api_url_pre %}/repos/:owner/:repo/pulls/:number
71+
curl -v {% data variables.product.rest_url %}/repos/:owner/:repo/pulls/:number
7272
```
7373

7474
With GraphQL, you could retrieve only the `number` and `mergeable` attributes for each pull request:
@@ -93,10 +93,10 @@ query {
9393
Querying with nested fields lets you replace multiple REST calls with fewer GraphQL queries. For example, retrieving a pull request along with its commits, non-review comments, and reviews using the **REST API** requires four separate calls:
9494

9595
```shell
96-
curl -v {% data variables.product.api_url_pre %}/repos/:owner/:repo/pulls/:number
97-
curl -v {% data variables.product.api_url_pre %}/repos/:owner/:repo/pulls/:number/commits
98-
curl -v {% data variables.product.api_url_pre %}/repos/:owner/:repo/issues/:number/comments
99-
curl -v {% data variables.product.api_url_pre %}/repos/:owner/:repo/pulls/:number/reviews
96+
curl -v {% data variables.product.rest_url %}/repos/:owner/:repo/pulls/:number
97+
curl -v {% data variables.product.rest_url %}/repos/:owner/:repo/pulls/:number/commits
98+
curl -v {% data variables.product.rest_url %}/repos/:owner/:repo/issues/:number/comments
99+
curl -v {% data variables.product.rest_url %}/repos/:owner/:repo/pulls/:number/reviews
100100
```
101101

102102
Using the **GraphQL API**, you can retrieve the data with a single query using nested fields:

content/graphql/guides/using-global-node-ids.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Let's walk through an example.
3434
If you [request the authenticated user](/rest/users/users#get-the-authenticated-user):
3535

3636
```shell
37-
curl -i --header "Authorization: Bearer YOUR-TOKEN" {% data variables.product.api_url_pre %}/user
37+
curl -i --header "Authorization: Bearer YOUR-TOKEN" {% data variables.product.rest_url %}/user
3838
```
3939

4040
you'll get a response that includes the `node_id` of the authenticated user:

0 commit comments

Comments
 (0)