Skip to content

Commit 9c1fae6

Browse files
committed
Add more examples
1 parent 5ad700e commit 9c1fae6

File tree

63 files changed

+1565
-9
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1565
-9
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# summary:
2+
# method_request: POST /_security/user/jacknich
3+
description: >
4+
Run `POST /_security/user/jacknich` to create a user.
5+
# type: request
6+
value: |-
7+
{
8+
"password" : "l0ng-r4nd0m-p@ssw0rd",
9+
"roles" : [ "admin", "other_role1" ],
10+
"full_name" : "Jack Nicholson",
11+
"email" : "[email protected]",
12+
"metadata" : {
13+
"intelligence" : 7
14+
}
15+
}
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: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# summary:
2+
# method_request: POST /_security/cross_cluster/api_key
3+
description: >
4+
Run `POST /_security/cross_cluster/api_key` to create a cross-cluster API key.
5+
# type: request
6+
value: |-
7+
{
8+
"name": "my-cross-cluster-api-key",
9+
"expiration": "1d",
10+
"access": {
11+
"search": [
12+
{
13+
"names": ["logs*"]
14+
}
15+
],
16+
"replication": [
17+
{
18+
"names": ["archive*"]
19+
}
20+
]
21+
},
22+
"metadata": {
23+
"description": "phase one",
24+
"environment": {
25+
"level": 1,
26+
"trusted": true,
27+
"tags": ["dev", "staging"]
28+
}
29+
}
30+
}
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/service/elastic/fleet-server/credential/token`.
4+
# type: response
5+
# response_code:
6+
value: |-
7+
{
8+
"created": true,
9+
"token": {
10+
"name": "Jk5J1HgBuyBK5TpDrdo4",
11+
"value": "AAEAAWVsYXN0aWM...vZmxlZXQtc2VydmVyL3Rva2VuMTo3TFdaSDZ"
12+
}
13+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# summary:
2+
description: >
3+
A successful response from `POST /_security/user/jacknich`.
4+
When an existing user is updated, `created` is set to `false`.
5+
# type: response
6+
# response_code:
7+
value: |-
8+
{
9+
"created": true
10+
}
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 `DELETE /_security/privilege/myapp/read`.
4+
# type: response
5+
# response_code:
6+
value: |-
7+
{
8+
"myapp": {
9+
"read": {
10+
"found" : true
11+
}
12+
}
13+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# summary:
2+
description: >
3+
A successful response from `DELETE /_security/role/my_admin_role`.
4+
# type: response
5+
# response_code:
6+
value: |-
7+
{
8+
"found" : true
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# summary:
2+
description: >
3+
A successful response from `DELETE /_security/role_mapping/mapping1`.
4+
# type: response
5+
# response_code:
6+
value: |-
7+
{
8+
"found" : true
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# summary:
2+
description: >
3+
A successful response from `DELETE /_security/service/elastic/fleet-server/credential/token/token42`.
4+
# type: response
5+
# response_code:
6+
value: |-
7+
{
8+
"found" : true
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# summary:
2+
description: >
3+
A successful response from `DELETE /_security/user/jacknich`.
4+
# type: response
5+
# response_code:
6+
value: |-
7+
{
8+
"found" : true
9+
}

0 commit comments

Comments
 (0)