Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Add metadata to GrantApiKey rest api page (#73451) #73461

Merged
merged 1 commit into from
May 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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