Integrating Server State

HTTP Interface

Method URL Description
GET /mdworkbench/server/state Provides access to the state of the server.
@Since 2.2.0

Request Header

  • Authorization: credentials of an administrator user set as Basic authentication. It is highly recommended that the server is handling HTTPS only when using this servlet.
  • Accept (optional): the media type which is acceptable for the response. Values can either be application/json (default) or application/xml.

Response Status

  • 200: administrator is authenticated and the response body contains state information.
  • 401: Authorization request header is not present or its content is rejected.
  • 403: the credentials set as Authorization request header is recognized but does not match an mdw-admin user.

Response Header

  • Content-Type: the media type of the response content. Values can either be application/json (default) or application/xml.

Response Body

A JSON or XML node:
  • state:
    • value: the state of the server, which can be active, suspended or maintenance.
    • resumeOnRestart: determines whether the launch queue is automatically resumed when the server is restarted, if the current state is maintenance.
  • launch:
    • running: number of launches currently being executed.
    • waiting: number of launches currently waiting to execute.
PUT /mdworkbench/server/state Changes the state of the server.
@Since 2.2.0

Query Parameters

  • value: the new state to apply on the server, which can be active, suspended or maintenance.
  • resumeOnRestart (optional): determines whether the launch queue is automatically resumed when the server is restarted, if the new state is maintenance. Default is true.

Request Header

  • Authorization: credentials of an administrator user set as Basic authentication. It is highly recommended that the server is handling HTTPS only when using this servlet.

Response Status

  • 200: administrator is authenticated and the server was changed.
  • 400: the value parameter is not set or is invalid.
  • 401: Authorization request header is not present or its content is rejected.
  • 403: the credentials set as Authorization request header is recognized but does not match an mdw-admin user.

Related tasks
Configuring Administration
Administering State
Integrating Launches