Get service account credentials

Auth

To use this API, you must have at least the read_security cluster privilege (or a greater privilege such as manage_service_account or manage_security).

The response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster.

Note

For tokens backed by the service_tokens file, the API collects them from all nodes of the cluster. Tokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens.

More about service accounts

Required authorization

Cluster privileges read_security

Path parameters

namespace string required

The name of the namespace.

service string required

The service name.

Response

application/json
service_account string required
count number required
tokens map string to string to object required
nodes_credentials object required

Service account credentials collected from all nodes of the cluster.

_nodes object required

General status showing how nodes respond to the above collection request

failures object[]
type string required

The type of error

reason union string nullable

A human-readable explanation of the error, in English.

One of: string
stack_trace string

The server stack trace. Present only if the error_trace=true parameter was sent with the request.

caused_by object
Same fields as failures in _nodes
root_cause object[]
Same fields as failures in _nodes
suppressed object[]
Same fields as failures in _nodes
total number required

Total number of nodes selected by the request.

successful number required

Number of nodes that responded successfully to the request.

failed number required

Number of nodes that rejected the request or failed to respond. If this value is not 0, a reason for the rejection or failure is included in the response.

file_tokens map string to object required

File-backed tokens collected from all nodes

<string> object
nodes string[] required