- Enterprise Search Guide: other versions:
- Introduction
- Installation
- Configuration
- Users and access
- Subscriptions and features
- Upgrading & migrating
- Management APIs
- User interfaces
- Programming language clients
- Logs and logging
- Troubleshooting
- Release notes
- 8.2.3 release notes
- 8.2.2 release notes
- 8.2.1 release notes
- 8.2.0 release notes
- 8.1.3 release notes
- 8.1.2 release notes
- 8.1.1 release notes
- 8.1.0 release notes
- 8.0.1 release notes
- 8.0.0 release notes
- 8.0.0-rc2 release notes
- 8.0.0-rc1 release notes
- 8.0.0-beta1 release notes
- 8.0.0-alpha2 release notes
- 8.0.0-alpha1 release notes
- Endpoints reference
Managing Read-Only Mode via API
editManaging Read-Only Mode via API
editThe read-only mode flag for your deployment can be managed with the dedicated Read-Only Management API.
Authentication and Authorization
editTo make a call to one of the Read-Only Management APIs, you need to have a set of Elasticsearch credentials
(username/password) for a user that has a manage
Elasticsearch cluster privilege.
Getting read-only flag state
editIf you need to know if your deployment is in read-only mode, you can perform a GET
call on this
API endpoint. The response will have a single boolean field called enabled
representing the state
of the read-only flag for your deployment.
Here is how you can get the state of the read-only mode on your deployment using a curl
command:
curl -X GET <ENTERPRISE_SEARCH_BASE_URL>/api/ent/v1/internal/read_only_mode \ -H "Content-Type: application/json" \ -u username:password
An example response:
{"enabled":false}
Updating Read-Only Flag
editWhen you want to change the read-only mode flag for your deployment, you need to perform a PUT
call to
the read-only mode API endpoint with the value for the flag you want to set. The response will have
a single boolean field called enabled
representing the state of the read-only flag for your
deployment.
To set the new value for the read-only flag, you can use the following curl
command:
curl -X PUT <ENTERPRISE_SEARCH_BASE_URL>/api/ent/v1/internal/read_only_mode \ -d '{ "enabled": true }' \ -H "Content-Type: application/json" \ -u username:password
An example response:
{"enabled":true}