Setting index paths

The path for the index files can be configured with POST /nodes/self/controller/settings.

HTTP method and URI

The path for the index files is configured with the index_path parameter.


POST /nodes/self/controller/settings
      

Syntax

Curl request syntax:

curl -X POST -u [admin]:[password]
    -d index_path=[index file and path]
    http://[localhost]:8091/nodes/self/controller/settings     
    

Example

Raw HTTP request:

POST /nodes/self/controller/settings HTTP/1.1
Host: localhost:8091
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Authorization: Basic YWRtaW46YWRtaW4=
Content-Length: xx path=/var/tmp/test_indexpath

Curl request example

curl -X POST -u admin:password \
    -d index_path=/var/tmp/test_indexpath \
    http://127.0.0.1:8091/nodes/self/controller/settings

Response codes

The HTTP response contains the response code and optional error message:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 0
Note: If you try to set the data path at this endpoint, the following error displays:

ERROR: unable to init 10.3.4.23 (400) Bad Request
{u'error': u'Changing data of nodes that are part of provisioned cluster is not supported'}