39 lines
1.3 KiB
Plaintext
39 lines
1.3 KiB
Plaintext
|
|
||
|
--
|
||
|
: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`.
|
||
|
|