Skip to content

Commit 289e736

Browse files
committed
Change example files to unique names
1 parent 39f5337 commit 289e736

File tree

40 files changed

+560
-0
lines changed

40 files changed

+560
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# summary: 'Migrates indices, ILM policies, and templates from using custom node attributes to using data tiers.'
2+
# method_request: POST /_ilm/migrate_to_data_tiers
3+
description: >
4+
Run `POST /_ilm/migrate_to_data_tiers` to migrate the indices, ILM policies, legacy templates, composable, and component templates away from defining custom allocation filtering using the `custom_attribute_name` node attribute.
5+
It also deletes the legacy template with name `global-template` if it exists in the system.
6+
# type: request
7+
value: |-
8+
{
9+
"legacy_template_to_delete": "global-template",
10+
"node_attribute": "custom_attribute_name"
11+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# summary:
2+
description: >
3+
A successful response when migrating indices, ILMs, and templates from custom node attributes to data tiers.
4+
# type: response
5+
# response_code: 200
6+
value: |-
7+
{
8+
"dry_run": false,
9+
"removed_legacy_template":"global-template",
10+
"migrated_ilm_policies":["policy_with_allocate_action"],
11+
"migrated_indices":["warm-index-to-migrate-000001"],
12+
"migrated_legacy_templates":["a-legacy-template"],
13+
"migrated_composable_templates":["a-composable-template"],
14+
"migrated_component_templates":["a-component-template"]
15+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# summary:
2+
# method_request: POST /my-time-series-index/_downsample/my-downsampled-time-series-index
3+
# description: ''
4+
# type: request
5+
value:
6+
fixed_interval: 1d
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# summary:
2+
description: A successful response from `GET /_searchable_snapshots/cache/stats`.
3+
# type: response
4+
# response_code: 200
5+
value: |-
6+
{
7+
"nodes" : {
8+
"eerrtBMtQEisohZzxBLUSw" : {
9+
"shared_cache" : {
10+
"reads" : 6051,
11+
"bytes_read_in_bytes" : 5448829,
12+
"writes" : 37,
13+
"bytes_written_in_bytes" : 1208320,
14+
"evictions" : 5,
15+
"num_regions" : 65536,
16+
"size_in_bytes" : 1099511627776,
17+
"region_size_in_bytes" : 16777216
18+
}
19+
}
20+
}
21+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# summary:
2+
# method_request: POST /_security/profile/_activate
3+
description: >
4+
Run `POST /_security/profile/_activate` to activate a user profile.
5+
# type: request
6+
value: |-
7+
{
8+
"grant_type": "password",
9+
"username" : "jacknich",
10+
"password" : "l0ng-r4nd0m-p@ssw0rd"
11+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# summary:
2+
description: A successful response from `POST /_security/profile/_activate`.
3+
# type: response
4+
# response_code:
5+
value: |-
6+
{
7+
"uid": "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0",
8+
"enabled": true,
9+
"last_synchronized": 1642650651037,
10+
"user": {
11+
"username": "jacknich",
12+
"roles": [
13+
"admin", "other_role1"
14+
],
15+
"realm_name": "native",
16+
"full_name": "Jack Nicholson",
17+
"email": "[email protected]"
18+
},
19+
"labels": {},
20+
"data": {},
21+
"_doc": {
22+
"_primary_term": 88,
23+
"_seq_no": 66
24+
}
25+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# summary:
2+
description: A successful response from `GET /_security/enroll/kibana`.
3+
# type: response
4+
# response_code:
5+
value: |-
6+
{
7+
"token" : {
8+
"name" : "enroll-process-token-1629123923000",
9+
"value": "AAEAAWVsYXN0aWM...vZmxlZXQtc2VydmVyL3Rva2VuMTo3TFdaSDZ"
10+
},
11+
"http_ca" : "MIIJlAIBAzVoGCSqGSIb3...vsDfsA3UZBAjEPfhubpQysAICAA=",
12+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# summary:
2+
description: A successful response from `PGET /security/enroll/node`.
3+
# type: response
4+
# response_code:
5+
value: |-
6+
{
7+
"http_ca_key" : "MIIJlAIBAzCCCVoGCSqGSIb3DQEHAaCCCUsEgglHMIIJQzCCA98GCSqGSIb3DQ....vsDfsA3UZBAjEPfhubpQysAICCAA=",
8+
"http_ca_cert" : "MIIJlAIBAzCCCVoGCSqGSIb3DQEHAaCCCUsEgglHMIIJQzCCA98GCSqGSIb3DQ....vsDfsA3UZBAjEPfhubpQysAICCAA=",
9+
"transport_ca_cert" : "MIIJlAIBAzCCCVoGCSqGSIb3DQEHAaCCCUsEgglHMIIJQzCCA98GCSqG....vsDfsA3UZBAjEPfhubpQysAICCAA=",
10+
"transport_key" : "MIIEJgIBAzCCA98GCSqGSIb3DQEHAaCCA9AEggPMMIIDyDCCA8QGCSqGSIb3....YuEiOXvqZ6jxuVSQ0CAwGGoA==",
11+
"transport_cert" : "MIIEJgIBAzCCA98GCSqGSIb3DQEHAaCCA9AEggPMMIIDyDCCA8QGCSqGSIb3....YuEiOXvqZ6jxuVSQ0CAwGGoA==",
12+
"nodes_addresses" : [
13+
"192.168.1.2:9300"
14+
]
15+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
summary: Profile details for a UUID
2+
description: >
3+
A successful response from `GET /_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0`.
4+
By default, no content is returned in the `data` field.
5+
# type: response
6+
# response_code:
7+
value: |-
8+
{
9+
"profiles": [
10+
{
11+
"uid": "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0",
12+
"enabled": true,
13+
"last_synchronized": 1642650651037,
14+
"user": {
15+
"username": "jacknich",
16+
"roles": [
17+
"admin", "other_role1"
18+
],
19+
"realm_name": "native",
20+
"full_name": "Jack Nicholson",
21+
"email": "[email protected]"
22+
},
23+
"labels": {
24+
"direction": "north"
25+
},
26+
"data": {},
27+
"_doc": {
28+
"_primary_term": 88,
29+
"_seq_no": 66
30+
}
31+
}
32+
]
33+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
summary: Profile details for a UUID and data key
2+
description: >
3+
A successful response from `GET /_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0?data=app1.key1`.
4+
# type: response
5+
# response_code:
6+
value: |-
7+
{
8+
"profiles": [
9+
{
10+
"uid": "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0",
11+
"enabled": true,
12+
"last_synchronized": 1642650651037,
13+
"user": {
14+
"username": "jacknich",
15+
"roles": [
16+
"admin", "other_role1"
17+
],
18+
"realm_name": "native",
19+
"full_name": "Jack Nicholson",
20+
"email": "[email protected]"
21+
},
22+
"labels": {
23+
"direction": "north"
24+
},
25+
"data": {
26+
"app1": {
27+
"key1": "value1"
28+
}
29+
},
30+
"_doc": {
31+
"_primary_term": 88,
32+
"_seq_no": 66
33+
}
34+
}
35+
]
36+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
summary: Profile details with errors
2+
description: >
3+
A response that contains errors that occurred while retrieving user profiles.
4+
# type: response
5+
# response_code:
6+
value: |-
7+
{
8+
"profiles": [],
9+
"errors": {
10+
"count": 1,
11+
"details": {
12+
"u_FmxQt3gr1BBH5wpnz9HkouPj3Q710XkOgg1PWkwLPBW_5": {
13+
"type": "resource_not_found_exception",
14+
"reason": "profile document not found"
15+
}
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# summary:
2+
# method_request: POST /_security/profile/_has_privileges
3+
description: >
4+
Run `POST /_security/profile/_has_privileges` to check whether the two users associated with the specified profiles have all the requested set of cluster, index, and application privileges.
5+
# type: request
6+
value: |-
7+
{
8+
"uids": [
9+
"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0",
10+
"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1",
11+
"u_does-not-exist_0"
12+
],
13+
"privileges": {
14+
"cluster": [ "monitor", "create_snapshot", "manage_ml" ],
15+
"index" : [
16+
{
17+
"names": [ "suppliers", "products" ],
18+
"privileges": [ "create_doc"]
19+
},
20+
{
21+
"names": [ "inventory" ],
22+
"privileges" : [ "read", "write" ]
23+
}
24+
],
25+
"application": [
26+
{
27+
"application": "inventory_manager",
28+
"privileges" : [ "read", "data:write/inventory" ],
29+
"resources" : [ "product/1852563" ]
30+
}
31+
]
32+
}
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# summary:
2+
description: >
3+
A response from `POST /_security/profile/_has_privileges` that indicates only one of the three users has all the privileges and one of them is not found.
4+
# type: response
5+
# response_code:
6+
value: |-
7+
{
8+
"has_privilege_uids": ["u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1"],
9+
"errors": {
10+
"count": 1,
11+
"details": {
12+
"u_does-not-exist_0": {
13+
"type": "resource_not_found_exception",
14+
"reason": "profile document not found"
15+
}
16+
}
17+
}
18+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# summary:
2+
# method_request: POST /_security/oidc/authenticate
3+
description: >
4+
Run `POST /_security/oidc/authenticate` to exchange the response that was returned from the OpenID Connect Provider after a successful authentication for an Elasticsearch access token and refresh token.
5+
This example is from an authentication that uses the authorization code grant flow.
6+
# type: request
7+
value: |-
8+
{
9+
"redirect_uri" : "https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I",
10+
"state" : "4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I",
11+
"nonce" : "WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM",
12+
"realm" : "oidc1"
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# summary:
2+
description: >
3+
A successful response from `POST /_security/oidc/authenticate`.
4+
It contains the access and refresh tokens that were generated, the token duration (in seconds), and the type.
5+
# type: response
6+
# response_code:
7+
value: |-
8+
{
9+
"access_token" : "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==",
10+
"type" : "Bearer",
11+
"expires_in" : 1200,
12+
"refresh_token": "vLBPvmAB6KvwvJZr27cS"
13+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# summary:
2+
# method_request: POST /_security/oidc/logout
3+
description: Run `POST /_security/oidc/logout` to perform the logout.
4+
# type: request
5+
value: |-
6+
{
7+
"token" : "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==",
8+
"refresh_token": "vLBPvmAB6KvwvJZr27cS"
9+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# summary:
2+
description: A successful response from `POST /_security/oidc/logout`, which contains the URI pointing to the End Session Endpoint of the OpenID Connect Provider with all the parameters of the Logout Request as HTTP GET parameters.
3+
# type: response
4+
# response_code:
5+
value: |-
6+
{
7+
"redirect" : "https://op-provider.org/logout?id_token_hint=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c&post_logout_redirect_uri=http%3A%2F%2Foidc-kibana.elastic.co%2Floggedout&state=lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO"
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
summary: Prepare with realm
2+
# method_request: POST /_security/oidc/prepare
3+
description: >
4+
Run `POST /_security/oidc/prepare` to generate an authentication request for the OpenID Connect Realm `oidc1`.
5+
# type: request
6+
value: |-
7+
{
8+
"realm" : "oidc1"
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
summary: Prepare with realm, state, and nonce
2+
# method_request: POST /_security/oidc/prepare
3+
description: >
4+
Run `POST /_security/oidc/prepare` to generate an authentication request for the OpenID Connect Realm `oidc1`, where the values for the `state` and the `nonce` have been generated by the client.
5+
# type: request
6+
value: |-
7+
{
8+
"realm" : "oidc1",
9+
"state" : "lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO",
10+
"nonce" : "zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5"
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
summary: Prepare by realm
2+
# method_request: POST /_security/oidc/prepare
3+
description: >
4+
Run `POST /_security/oidc/prepare` to generate an authentication request for a third party initiated single sign on.
5+
Specify the issuer that should be used for matching the appropriate OpenID Connect Authentication realm.
6+
# type: request
7+
value: |-
8+
{
9+
"iss" : "http://127.0.0.1:8080",
10+
"login_hint": "this_is_an_opaque_string"
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# summary:
2+
description: >
3+
A successful response from `POST /_security/oidc/prepare`.
4+
It contains the URI pointing to the Authorization Endpoint of the OpenID Connect Provider with all the parameters of the Authentication Request as HTTP GET parameters.
5+
# type: response
6+
# response_code:
7+
value: |-
8+
{
9+
"redirect" : "http://127.0.0.1:8080/c2id-login?scope=openid&response_type=id_token&redirect_uri=https%3A%2F%2Fmy.fantastic.rp%2Fcb&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I&nonce=WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM&client_id=elasticsearch-rp",
10+
"state" : "4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I",
11+
"nonce" : "WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM",
12+
"realm" : "oidc1"
13+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# summary:
2+
# method_request: POST /_security/saml/authenticate
3+
description: >
4+
Run `POST /_security/saml/authenticate` to exchange a SAML Response indicating a successful authentication at the SAML IdP for an Elasticsearch access token and refresh token to be used in subsequent requests.
5+
# type: request
6+
value: |-
7+
{
8+
"content" : "PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMD.....",
9+
"ids" : ["4fee3b046395c4e751011e97f8900b5273d56685"]
10+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# summary:
2+
description: A successful response from `POST /_security/saml/authenticate`.
3+
# type: response
4+
# response_code:
5+
value: |-
6+
{
7+
"access_token" : "46ToAxZVaXVVZTVKOVF5YU04ZFJVUDVSZlV3",
8+
"username" : "Bearer",
9+
"expires_in" : 1200,
10+
"refresh_token": "mJdXLtmvTUSpoLwMvdBt_w",
11+
"realm": "saml1"
12+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
summary: HTTP-Redirect binding
2+
# method_request: POST /_security/saml/complete_logout
3+
description: >
4+
Run `POST /_security/saml/complete_logout` to verify the logout response sent by the SAML IdP using the HTTP-Redirect binding.
5+
# type: request
6+
value: |-
7+
{
8+
"realm": "saml1",
9+
"ids": [ "_1c368075e0b3..." ],
10+
"query_string": "SAMLResponse=fZHLasMwEEVbfb1bf...&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=CuCmFn%2BLqnaZGZJqK..."
11+
}

0 commit comments

Comments
 (0)