Optima Micro: error codes and response status

Error codes of the Optima Micro API

PTV Optima Micro API handles error codes and error messages.

These error codes are used when the HTTP status of the response is not 200.

In this case the response content-type is application/JSON and has the following structure:

{
    "errors": [
        {
            "code": "OPTMICRO-003",
            "message": "No scenario simulations found"
        }
    ]
}
Error Code Error Message HTTP Code Resource

OPTMICRO-001

"No scenarios group, with at least one simulation request, found from UUID" + other dynamic information.

404

optima-as/optimissim/simulations

OPTMICRO-002

"One or more of the status specified in the query parameters are not existing... " + other dynamic information.

400

optima-as/optimissim/simulations

OPTMICRO-003

"No scenario simulations found"

404

optima-as/optimissim/simulations

OPTMICRO-004

"No request was provided!"

400

optima-as/optimissim/simulations

OPTMICRO-005

"Simulation request failed. SubnetId provided is not in DB!"

400

optima-as/optimissim/simulations

OPTMICRO-006

"Simulations Group request failed. At least one Scenario ID in activeScenarioIds list provided is not existing!"

400

optima-as/optimissim/simulations

OPTMICRO-007

"Rejecting request. Requested a scenarios number greater than the maximum number licenced." + other dynamic information.

412

optima-as/optimissim/simulations

OPTMICRO-008

"Simulation request delayed. Requested scenarioes number not licenced, considered previous parallel requests still running." + other dynamic information.

412

optima-as/optimissim/simulations

OPTMICRO-009

"Did not receive a simulationrequest from Backend, something went wrong"

500

optima-as/optimissim/simulations

OPTMICRO-010

"No micro simulation request found from UUID {MicroSimulationId}"

404

optima-as/optimissim/simulation/{MicroSimulationId}

OPTMICRO-011

"No Vissim Offline Data zip file found from UUID {MicroSimulationId}"

404

optima-as/optimissim/simulation/ {MicroSimulationId}/vissim-data

OPTMICRO-012

"No microsimulation subnetwork found from Subnet ID {SubnetworkId}"

404

optima-as/optimissim/subnetwork

OPTMICRO-013

"No Signal Controller found for Subnetwork with Subnet ID {SubnetworkId}"

404

optima-as/optimissim/subnetwork/ {SubnetworkId}/controller

OPTMICRO-014

"No Scenario found for Subnetwork with Subnet ID {SubnetworkId}"

404

optima-as/optimissim/subnetwork/ {SubnetworkId}/scenario

OPTMICRO-015

"Simulation request rejected. simulationPeriod is non-positive"

400

optima-as/optimissim/simulations

OPTMICRO-016

"Simulation request rejected. simulationPeriod reaches further in the future than the macroscopic simulation. This does not provide reliable results"

400

optima-as/optimissim/simulations

Response Status

PTV Optima Micro engine handles a set of status associated to the JSON entity involved in API requests, as listed in the table:

Status Description

ACCEPTED

The request has been accepted and is in preparation.

DELAYED

​The request has been delayed due to license constraints.

CANCELLED_QUEUE_TIMEOUT

The request has been cancelled because it has been in delayed state for longer than the limit set in <queueCleanupTimeout> (see → <queueCleanupTimeout>, <simulationTimeout> tags).

ISSUED

The request has been accepted and sent to the back-end.

FAILED

​The request has failed.

FAILED_SIMULATION_TIMEOUT

The request has failed due to violating the limit set in <simulationTimeout> (see → <queueCleanupTimeout>, <simulationTimeout> tags).

FINISHED

The request has been completed successfully and the results are available.

RECEIVED

The request accepted and the back-end has started computation.