5.4 Cancel-Plan Endpoint

The cancel-plan endpoint is used to cancel previously submitted planning tasks.

5.4.1 Cancel-Plan Requests

A cancel-plan request takes the form of an HTTP DELETE request to a URL of the following form:

https://server-name/mwo/v2/cancel-plan/task-identifier

where server-name will be provided by Opturion and task-identifier is the task identifier returned by a successful call to the submit-plan service.

5.4.2 Cancel-Plan Request Example

Here is an example cancel-plan request URL:

    https://demo.opturion.com/mwo/v2/cancel-plan/9046b6e9-7d7d-4453-a935-d331edb268bb

5.4.3 Cancel-Plan Responses

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

Status Code

Description

Response Body

200 (OK)

The task has been cancelled.

Empty.

401 (Unauthorized)

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

Empty.

404 (Not Found)

A task matching the given task identifier and owned by the authenticated user could not be found.

Empty.

429 (Too Many Requests)

May be returned if rate limiting has been applied by the server.

Empty.

500 (Internal Server Error)

Indicates that an error occurred on the server.

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