It is time to say goodbye: This version of Elastic Cloud Enterprise has reached end-of-life (EOL) and is no longer supported.
The documentation for this version is no longer being maintained. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Set legacy security settings
editSet legacy security settings
editSets legacy security (Shield) settings for a 2.x Elasticsearch cluster. Newer (> 2.x) clusters have their Shield settings managed externally via X-Pack in Kibana.
Request
editPUT /api/v1/clusters/elasticsearch/{cluster_id}/settings/security/legacy
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
The Elasticsearch cluster identifier. |
Request body
edit(LegacySecuritySettings
) (required) The legacy security settings
Responses
edit-
200
-
(
LegacySecuritySettings
) Returns the updated legacy security settings for the specified cluster -
404
-
(
BasicFailedReply
) The cluster specified at {cluster_id} could not be found (code: 'clusters.cluster_not_found') -
449
-
(
BasicFailedReply
) elevated permissions are required. (code: '"root.needs_elevated_permissions"')
To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.
Request example
editcurl -XPUT {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/settings/security/legacy \ -u $CLOUD_USER:$CLOUD_KEY \ -H 'Content-Type: application/json' \ -d ' { "roles_yaml" : "string", "users_roles_yaml" : "string", "users_yaml" : "string" } '