mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 01:44:36 -04:00
This PR adds corresponding components in High Level Rest Client for the new APIs related to the service accounts feature.
38 lines
1.3 KiB
Text
38 lines
1.3 KiB
Text
|
|
--
|
|
:api: get-service-account-credentials
|
|
:request: GetServiceAccountCredentialsRequest
|
|
:response: GetServiceAccountCredentialsResponse
|
|
--
|
|
[role="xpack"]
|
|
[id="{upid}-{api}"]
|
|
=== Get Service Account Credentials API
|
|
|
|
[id="{upid}-{api}-request"]
|
|
==== Get Service Account Credentials Request
|
|
|
|
Retrieving all credentials for a service account can be performed by setting the namespace
|
|
and service-name on +{request}+:
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
--------------------------------------------------
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
|
--------------------------------------------------
|
|
|
|
include::../execution.asciidoc[]
|
|
|
|
[id="{upid}-{api}-response"]
|
|
==== Get Service Account Credentials Response
|
|
|
|
The returned +{response}+ contains a list of service account tokens for the requested service account.
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
--------------------------------------------------
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
|
--------------------------------------------------
|
|
<1> Principal of the service account
|
|
<2> Name of the node that processed the request. Information of file service tokens is only collected from this node.
|
|
<3> List of service token information
|
|
<4> Name of the first service account token
|
|
<5> Source of the first service account token. The value is either `file` or `index`.
|
|
|