Create user-managed service accounts

  • PUT /_security/service/{namespace}/{service}

Create a service account in a namespace of your own, or replace one that already exists. A replacement is not a partial update: every write applies the defaults, so an account that was disabled and is then written again without enabled comes back enabled.

Creating an account whose name still has leftover service tokens is rejected. Delete those tokens first.

NOTE: The elastic namespace is reserved for the built-in service accounts that ship with Elasticsearch. The manage_service_account privilege does not authorize this API.

  • Cluster privileges: manage_security
More about service accounts

Query Parameters

refresh enum Refresh · default: wait_for

If wait_for (the default) then wait for a refresh to make this operation visible to search, if true then refresh the affected shards to make this operation visible to search, if false then do nothing with refreshes.

Values: true false wait_for

Response