Opencast

Termination State Service REST Documentation

/termination
When put into a termination 'wait' state, this service stops the node accepting further jobs, and once any running jobs complete will change termination to 'ready'. NOTE: The service does not actually shut down the node or instance.

General Notes

Table of Contents

Read methods

Method / Path: GET /state
Description: Returns the Termination State as JSON. Possible termination states are none, wait and ready.
Path params: NONE
Optional (query) params: NONE
Response formats: application/json
Status codes: 200: OK, A JSON representation of the termination state.
503: Service Unavailable, The Termination State Service is disabled or unavailable
Notes:
  • Return value description: A JSON representation of the termination state.
Testing:
Sample: /state
/termination/state

Write methods

Method / Path: PUT /state
Description: Set the termination state. The only permissable values are 'none', 'wait' or 'ready'
Path params: NONE
Required (form) params: state: The termination state, the only valid value is 'wait'
Optional (form) params: NONE
Status codes: 204: No Content, The node is preparing to terminate
400: Bad Request, The state was not valid
503: Service Unavailable, The Termination State Service is disabled or unavailable
Notes:
  • Return value description: Whether the termination state was set successfully
Testing:
Sample: /state
Testing form (click to reveal)