- Enterprise Search Guide: other versions:
- Introduction
- Installation
- Configuration
- Users and access
- Platinum features
- Upgrading & migrating
- Management APIs
- User interfaces
- Programming language clients
- Log retention
- Release notes
- 7.15.2 release notes
- 7.15.1 release notes
- 7.15.0 release notes
- 7.14.2 release notes
- 7.14.1 release notes
- 7.14.0 release notes
- 7.13.4 release notes
- 7.13.3 release notes
- 7.13.2 release notes
- 7.13.1 release notes
- 7.13.0 release notes
- 7.12.1 release notes
- 7.12.0 release notes
- 7.11.2 release notes
- 7.11.1 release notes
- 7.11.0 Release notes
- 7.10.2 Release notes
- 7.10.1 Release notes
- 7.10.0 Release notes
- 7.9.3 Release notes
- 7.9.2 Release notes
- 7.9.1 Release notes
- 7.9.0 Release notes
- 7.8.1 Release notes
- 7.8.0 Release Notes
- 7.7.1 Release Notes
- 7.7.0 Release Notes
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 http://localhost:3002/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 http://localhost:3002/api/ent/v1/internal/read_only_mode \ -d '{ "enabled": true }' \ -H "Content-Type: application/json" \ -u username:password
An example response:
{"enabled":true}