Type to search.

Get service accounts

Auth The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Generally available since 7.13 This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Get a list of service accounts that match the provided path parameters. Built-in service accounts ship with Elasticsearch in the elastic namespace; user-managed service accounts are created with the put user-managed service account API.

Note

When type is omitted, a request without a namespace reports built-in accounts only, which preserves the response of a whole-cluster listing. A request scoped to a namespace reports both kinds, so an account you created is found without naming its kind.

More about service accounts

Required privileges

Cluster privileges manage_service_account

Path parameters

namespace string optional

The name of the namespace. Omit this parameter to retrieve information about all service accounts. If you omit this parameter, you must also omit the service parameter.

Leave it out to use /_security/service.

service string optional

The service name. Omit this parameter to retrieve information about all service accounts that belong to the specified namespace.

Leave it out to use /_security/service.

Query parameters

type union enum | enum[] The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Planned We plan to add this functionality in a future Elastic Stack update. Subject to changes. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

A comma-separated list of the kinds of service account to return. If it is omitted, it defaults to built_in when no namespace is given and to built_in,user_managed otherwise.

Supported values include:

  • built_in: An account that ships with Elasticsearch, in the reserved elastic namespace.
  • user_managed: An account created with the put user-managed service account API.
Values: built_in user_managed
with_profile_uid boolean · default: false The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Planned We plan to add this functionality in a future Elastic Stack update. Subject to changes. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

If true, each user-managed service account also includes the profile UIDs of the users who created and last replaced it, under the created_by_profile_uid and updated_by_profile_uid fields. A profile UID is included only for a user who has an activated user profile.

Response

application/json

Response Type: map string to oneOf