Change runtime state

Changes the state of a runtime. Currently, it is only possible to start and to stop a runtime.

JSON input

{
  "status": string
}

The “status” field can only contain “start” or “stop”.

Example

{
  "status": "start"
}

JSON output

When successful:

{
  "action": "Start runtime",
  "name": string,
  "success": true,
  "time": datetime
}

The platform returns the name of the runtime and the time that it was started.

On failure:

{
  "action": "Start runtime",
  "success": false,
  "reason": string,
  "details": string
}

When the API call fails, the platform returns the reason of the failure and a stack trace of the failure.

Example

When successful:

200 OK
{
  "action": "Start runtime",
  "name": "runtime1",
  "success": true,
  "time": "2015-12-29T15:39:51"
}

On failure:

503 Bad request
{
  "success": false,
  "reason": "Owner with name neo not found."
  "details": "<stacktrace>"
}

Errors

status code description reason
503 Bad request When a status other than “start” or “stop” is given, or when “start” is given when the runtime was already started.