Skip to content

Commit 8dbec28

Browse files
authored
[Docs] Add metadata to GrantApiKey rest api page (#73451)
This PR adds the missing doc update to the grant api key rest api page for the new API key metadata field added by #70292 Relates: #48182
1 parent b8fb1eb commit 8dbec28

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

x-pack/docs/en/rest-api/security/create-api-keys.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ authentication; it will not have authority to call {es} APIs.
7575
expire.
7676

7777
`metadata`::
78-
(object) Arbitrary metadata that you want to associate with the API key.
78+
(Optional, object) Arbitrary metadata that you want to associate with the API key.
7979
It supports nested data structure.
8080
Within the `metadata` object, keys beginning with `_` are reserved for
8181
system usage.

x-pack/docs/en/rest-api/security/grant-api-keys.asciidoc

+14
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ intersection of API keys permissions and the permissions of the user or access
7373
token. The structure of role descriptor is the same as the request for create
7474
role API. For more details, see <<security-api-put-role>>.
7575

76+
`metadata`:::
77+
(Optional, object) Arbitrary metadata that you want to associate with the API key.
78+
It supports nested data structure.
79+
Within the `metadata` object, keys beginning with `_` are reserved for
80+
system usage.
81+
7682
`grant_type`::
7783
(Required, string)
7884
The type of grant. Supported grant types are: `access_token`,`password`.
@@ -129,6 +135,14 @@ POST /_security/api_key/grant
129135
}
130136
]
131137
}
138+
},
139+
"metadata": {
140+
"application": "my-application",
141+
"environment": {
142+
"level": 1,
143+
"trusted": true,
144+
"tags": ["dev", "staging"]
145+
}
132146
}
133147
}
134148
}

0 commit comments

Comments
 (0)