5.6 Check-Plan Endpoint

The check-plan endpoint is used to validate the inputs given to the optimiser for planning optimisation tasks.

5.6.1 Check-Plan Requests

A check-plan request is an HTTP POST to a URL of the following form:

https://server-name/mwo/v2/check-plan

where server-name will be provided by Opturion.

The body of the POST request is a JSON document containing a plan request object.

5.6.2 Check-Plan Request Example

Here is an example URL for a check-plan request:

    https://demo.opturion.com/mwo/v2/check-plan

On success (see below) a check-plan request will return with HTTP status code 200 (OK) and the response body will contain a JSON encoded check response object describing any errors in the input request.

Here is an example of a check response object:

    {
       "status": "OK"
    }

5.6.3 Check-Plan Responses

The following table lists of all of the HTTP status codes that check-plan specifically returns and their meanings. Any other HTTP status code returned by check-plan that is not covered by this table has its usual meaning.

Status Code

Description

Response Body

200 (Ok)

The input request has been checked for errors.

A JSON check response object describing if the input was valid or not.

401 (Unauthorized)

Authentication (if enabled) failed; the user is not authorized to access the optimiser.

Empty.

429 (Too Many Requests)

Rate limiting has been applied by the server.

Empty.

500 (Internal Server Error)

An error occurred on the server.

The body may contain a JSON object further describing the problem.

Note that in the case where rate limiting has been applied, clients should wait and then re-submit at a later time.