File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
x-pack/docs/en/rest-api/security Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ authentication; it will not have authority to call {es} APIs.
7575expire.
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.
7979It supports nested data structure.
8080Within the `metadata` object, keys beginning with `_` are reserved for
8181system usage.
Original file line number Diff line number Diff line change @@ -73,6 +73,12 @@ intersection of API keys permissions and the permissions of the user or access
7373token. The structure of role descriptor is the same as the request for create
7474role 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)
7884The 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}
You can’t perform that action at this time.
0 commit comments