PUT /api/index/{ContainerKey}/nodeconfig

Updates the Elasticsearch node configuration for the specified container.

Note: Restart of all containers is recommended after running this operation.

Authorization Roles/Permissions: System Administrator only. Note CSRF is not required for this operation.

This topic includes the following sections:

HTTP Method

PUT

Back to top

URL

https://{hostname}/api/index/{ContainerKey}/nodeconfig

Back to top

Sample Request

The example below shows a request to update the Elasticsearch embedded node configuration for the container.

Request URL

https://{hostname}/api/index/c1aeff4f-71de-40b1-ad23-629c1f46/nodeconfig

Sample request headers

PUT /api/index/c1aeff4f-71de-40b1-ad23-629c1f46/nodeconfig
Content-Type: application/json
Accept application/json

Sample request body

{
  "Name": "default_1473984894141_node_107",
  "IndexLocation": "/usr/tmp/elastic",
  "BindToAll":true,
  "NetworkBindAddress": "0.0.0.0",
  "NetworkPublishAddress": "192.168.1.118",
  "TransportPort": 9300,
  "HttpPort": 9200,
  "HttpEnabled": true,
  "MasterEligible": true,
  "DataNode": true
}

Back to top

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept

Any of the following media types is valid for the Accept header:

application/json, application/vnd.soa.v83+json

Content-Type

Any one of the following media types is valid for the request Content-Type:

application/json or application/vnd.soa.v83+json

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
ContainerKey path string Required

Unique key for the container.

In this scenario, it is the container where the Elasticsearch Embedded Node feature is installed.

EmbeddedNodeConfiguration Body EmbeddedNodeConfiguration Required

Contains information about the Elasticsearch embedded node configuration for a container.

INotes:

  • Include only the fields that are being updated.
  • NetworkBindAddress is not needed if BindToAll is set to true for the implementation.

Back to top

Response

If successful, this operation returns HTTP status code 200, with the updated node configuration.

Back to top

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers: application/json

Content-Type: application/json

Sample response body: application/json

{
  "Name": "default_1473984894141_node_107",
  "IndexLocation": "/usr/tmp/elastic",
  "BindToAll":true,
  "NetworkBindAddress": "0.0.0.0",
  "NetworkPublishAddress": "192.168.1.118",
  "TransportPort": 9300,
  "HttpPort": 9200,
  "HttpEnabled": true,
  "MasterEligible": true,
  "DataNode": true
}

Back to top

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type application/json, application/vnd.soa.v83+json

Back to top

Response Body

Name Type Description
EmbeddedNodeConfiguration EmbeddedNodeConfiguration Contains information about the Elasticsearch embedded node configuration for a container.

Back to top

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
401 Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.

Back to top

Related Topics