Start or Stop Nodes by IDs

post

/v1/actions/nodes/state

Start or stop nodes in the specified node or Node Manager. You must provide the nodeIds, nmIds, or both fields in the request payload. If both fields are present, the nodeIds field is prioritized.

You specify whether to start or stop a node by setting the actionState field in the request payload to one of the following:

  • START_NODES to start the node.
  • STOP_NODES to stop the node.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
The details about the action to perform.
Show Source
Nested Schema : nmIds
Type: array
Unique Items Required: true
The list of Node Manager IDs to start or stop.
Show Source
Nested Schema : nodeIds
Type: array
Unique Items Required: true
The list of node IDs to start or stop.
Show Source
Back to Top

Response

Supported Media Types

200 Response

The node has been started or stopped successfully.

207 Response

The node has been started or stopped successfully, but there are multiple status codes.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

400 Response

The request cannot be processed due to a client error.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

401 Response

The client does not have the correct privileges.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

403 Response

The request was not authorized.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

404 Response

The requested resource cannot be found.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

405 Response

This method is not allowed.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

409 Response

The request could not be processed due to a conflict with the existing state of the resource.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

413 Response

The request payload is too large.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

415 Response

The media type is not supported.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

500 Response

The system has encountered an internal server error.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source
Back to Top

Examples

The following example shows how to start nodes by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.

The -d option specifies the file to attach as the request body.

curl -X POST 'http://hostname:port/V1/actions/nodes/state' -d @sampleStartNodes.json

Example of Request Body

The following is an example of the contents of the sampleStartNodes.json file sent as the request body.

{
  "actionState": "START_NODES",
  "nodeIds": [],
  "nmIds": [
    "NMGR-31eoeh-otm-ln3hrqc9"
  ],
  "includeRemoteNodes": true
}

Example of the Response Body

If successful, the response code 200 is returned with no response body.

Back to Top