Getting the status of the MTF scheduler
This endpoint enables you to get the status of the Mid-Term Forecast (MTF) scheduler.
For more details about MTF engine, see → Mid-Term Forecast (MTF).
The response provide an XML file according to orca2.xsd (see ORCA2.xsd).
The response hosts (into the orca2.xsd <job> element) the detailed status of each job configured in MTF.
Status of the MTF scheduler
The XML tag <Job> hosts a set of information:
Status of the job | Description |
---|---|
status |
Contains the status of the job:
|
startTime |
Contains the start time of the job's latest execution. This information is missing if the job has never ran yet. |
endTime |
Contains the end time of the job's latest execution. This information is missing if the job is currently running or never ran yet. |
nextStartTime |
Contains the start time of the next scheduled job execution. |

Response status
HTTP status | Description |
---|---|
200 OK |
The MTF engine is able to answer; the XML message provides valid details on the current status of the engine. |
401 Unauthorized |
The requested resource is restricted and requires authentication. Please see → Login (deprecated). |
500 Internal server error |
Several conditions can be classified under this code. For example:
|
502 Bad gateway |
MTF can not be reached either because the configuration pointed to a wrong host, or because MTF is down. |
Response content-type
application/xml
Response output
Orca2 XML message containing information on the MTF scheduler.

Request
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-as/datex-interface/scheduler/MTF
Response status
HTTP status | Description |
---|---|
200 OK |
Result of the processed request. |
Response output
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Orca2Model xmlns="http://sistemaits.com/orca2/1" xmlns:ns2="http://datex2.eu/schema/2/2_0">
<exchange>
<provider>PTV-OPTIMA</provider>
</exchange>
<payloadPublication xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SchedulerStatus">
<job name="RestOfDay">
<status>Running</status>
<startTime>2020-05-12T18:40:00.0163266</startTime>
<nextStartTime>2020-05-12T18:50:00</nextStartTime>
</job>
</payloadPublication>
</Orca2Model>

Request
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-as/datex-interface/scheduler/MTF
Response status
HTTP status | Description |
---|---|
200 OK |
Result of the processed request. |
Response output
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Orca2Model xmlns="http://sistemaits.com/orca2/1" xmlns:ns2="http://datex2.eu/schema/2/2_0">
<exchange>
<provider>PTV-OPTIMA</provider>
</exchange>
<payloadPublication xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SchedulerStatus">
<job name="RestOfDay">
<status>Idle</status>
<startTime>2020-05-12T18:40:00.0163266</startTime>
<endTime>2020-05-12T18:43:18.3791218</endTime>
<nextStartTime>2020-05-12T18:50:00</nextStartTime>
</job>
</payloadPublication>
</Orca2Model>

Request
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-as/datex-interface/scheduler/MTF
Response status
HTTP status | Description |
---|---|
200 OK |
Result of the processed request. |
Response output
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Orca2Model xmlns="http://sistemaits.com/orca2/1" xmlns:ns2="http://datex2.eu/schema/2/2_0">
<exchange>
<provider>PTV-OPTIMA</provider>
</exchange>
<payloadPublication xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SchedulerStatus">
<job name="RestOfDay">
<status>Idle</status>
<nextStartTime>2020-05-13T10:20:00</nextStartTime>
</job>
</payloadPublication>
</Orca2Model>
Important: In this case, both startTime and endTime are missing.

Request
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-as/datex-interface/scheduler/MTF
Response status
HTTP status | Description |
---|---|
500 Internal server error |
Several conditions can be classified under this code. For example:
|
Response output
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Orca2Model xmlns="http://sistemaits.com/orca2/1" xmlns:ns2="http://datex2.eu/schema/2/2_0">
<error>
<code xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:int">500</code>
<message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">Internal Server Error</message>
</error>
<message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">java.lang.IllegalArgumentException: Missing or bad configuration for MTF status URL</message>
</Orca2Model>

A job can be composed by one or more tasks (see → Mid-Term Forecast (MTF) > MTF Jobs, tasks, and operations).
The API response ignores:
- Which are the tasks associated to the job and their behaviors.
- The time period covered by the job.