Skip to content

Commit

Permalink
[Docs] Add metadata to GrantApiKey rest api page (#73451) (#73461)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ywangd authored May 27, 2021
1 parent 779d82e commit b934c9b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion x-pack/docs/en/rest-api/security/create-api-keys.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ authentication; it will not have authority to call {es} APIs.
expire.

`metadata`::
(object) Arbitrary metadata that you want to associate with the API key.
(Optional, object) Arbitrary metadata that you want to associate with the API key.
It supports nested data structure.
Within the `metadata` object, keys beginning with `_` are reserved for
system usage.
Expand Down
14 changes: 14 additions & 0 deletions x-pack/docs/en/rest-api/security/grant-api-keys.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ intersection of API keys permissions and the permissions of the user or access
token. The structure of role descriptor is the same as the request for create
role API. For more details, see <<security-api-put-role>>.

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

`grant_type`::
(Required, string)
The type of grant. Supported grant types are: `access_token`,`password`.
Expand Down Expand Up @@ -129,6 +135,14 @@ POST /_security/api_key/grant
}
]
}
},
"metadata": {
"application": "my-application",
"environment": {
"level": 1,
"trusted": true,
"tags": ["dev", "staging"]
}
}
}
}
Expand Down

0 comments on commit b934c9b

Please sign in to comment.