Skip to content

Commit c89d02c

Browse files
Separate the curl outputs from the commands (elastic#3165)
Currently, both the `curl` command and example output appear in the same `sh` block that may confuse users while copying and running the commands. With this commit, the example outputs are separated from the `curl` commands similar to the command and output shown in https://www.elastic.co/docs/reference/cloud/cloud-enterprise/ece-restful-api-examples-get-deployments.
1 parent f555d44 commit c89d02c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

deploy-manage/deploy/cloud-enterprise/generate-roles-tokens.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ To generate an ephemeral token for additional allocators:
5252

5353
```sh
5454
curl -H 'Content-Type: application/json' -u USER:PASSWORD https://$COORDINATOR_HOST:12443/api/v1/platform/configuration/security/enrollment-tokens -d '{ "persistent": false, "roles": [ "allocator"] }'
55+
```
56+
```sh
5557
{
5658
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI0Njk3N2I3ZC1hM2U2LTQ2MDUtYjcwZC0xNzIzMTI5YWY4ZTQiLCJyb2xlcyI6WyJwcm94eSIsImFsbG9jYXRvciJdLCJpc3MiOiJib290c3RyYXAtaW5pdGlhbCIsImV4cCI6MTQ5MzY0NjIxM30.xsaRb72CsNMuXKy6Y-PJgqLc0qmjCljlB4Smcx_MRxg"
5759
}
@@ -61,6 +63,8 @@ To generate a persistent token for additional allocators:
6163

6264
```sh
6365
curl -H 'Content-Type: application/json' -u USER:PASSWORD https://$COORDINATOR_HOST:12443/api/v1/platform/configuration/security/enrollment-tokens -d '{ "persistent": true, "roles": [ "allocator"] }'
66+
```
67+
```sh
6468
{
6569
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI0Yzg5OTBkZi0xZmI3LTQ4MjAtYjg2OC02YmM5ZTg4NjA4MTQiLCJyb2xlcyI6WyJwcm94eSIsImFsbG9jYXRvciJdLCJpc3MiOiJib290c3RyYXAtaW5pdGlhbCJ9.mfTkO4j8uZJ-qwB2jmBuMScyYfLmcJpvKgSTLx2WV24",
6670
"token_id": "4c8990df-1fb7-4820-b868-6bc9e8860814"
@@ -83,6 +87,8 @@ To delete a token:
8387

8488
```sh
8589
curl -u USER:PASSWORD https://localhost:12443/api/v1/platform/configuration/security/enrollment-tokens
90+
```
91+
```sh
8692
{
8793
"tokens": [{
8894
"token_id": "5f9cad2f-c6e7-4ee2-8f6e-53225df45be5",
@@ -98,6 +104,8 @@ To delete a token:
98104

99105
```sh
100106
curl -XDELETE -u USER:PASSWORD 'https://localhost:12443/api/v1/platform/configuration/security/enrollment-tokens/4c8990df-1fb7-4820-b868-6bc9e8860814'
107+
```
108+
```sh
101109
{
102110
}
103111
```

0 commit comments

Comments
 (0)