Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

SIRI Request

A SIRI Request is simply an HTTP POST request with an XML body:

For example:

$ curl -d@- -s -X POST https://ara-api.enroute.mobi/bibus/siri <<EOF
<?xml version='1.0' encoding='utf-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
  <S:Body>
    <!-- Type de requete -->
    <sw:CheckStatus xmlns:sw="http://wsdl.siri.org.uk" xmlns:siri="http://www.siri.org.uk/siri">
      <Request>
        <siri:RequestTimestamp>2030-01-01T12:00:30.000Z</siri:RequestTimestamp>
        <siri:RequestorRef>opendata</siri:RequestorRef>
        <siri:MessageIdentifier>1</siri:MessageIdentifier>
      </Request>
      <RequestExtension />
    </sw:CheckStatus>
  </S:Body>
</S:Envelope>
EOF

Check Status

Allow Ara:

  • to check the communication with the SIRI Pseudo Server

  • to check the SIRI Pseudo Server operating status

  • for more complex use case, to detect a reboot of SIRI Server (via ServiceStartedTime)

Request

<?xml version='1.0' encoding='utf-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
  <S:Body>
    <sw:CheckStatus xmlns:sw="http://wsdl.siri.org.uk" xmlns:siri="http://www.siri.org.uk/siri">
      <Request>
        <siri:RequestTimestamp>2030-01-01T12:00:30.000Z</siri:RequestTimestamp>
        <siri:RequestorRef>Ara</siri:RequestorRef> <!-- Valeur paramétrée dans Ara -->
        <siri:MessageIdentifier>6ba7b814-9dad-11d1-2-00c04fd430c8</siri:MessageIdentifier>
      </Request>
      <RequestExtension/>
    </sw:CheckStatus>
  </S:Body>
</S:Envelope>

Response

Important elements:

  • Status: true (can be false in case of problem)

  • ServiceStartedTime: Should be the time of the latest data reload. Most of SIRI server reload daily to manage only one-day real-time data. if you need to craft a time, use the current day at midnight

<?xml version='1.0' encoding='utf-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
  <S:Body>
    <sw:CheckStatusResponse xmlns:sw="http://wsdl.siri.org.uk" xmlns:siri="http://www.siri.org.uk/siri">
      <CheckStatusAnswerInfo>
        <siri:ResponseTimestamp>2030-01-01T12:00:00.000Z</siri:ResponseTimestamp>
        <siri:ProducerRef>DKBUS</siri:ProducerRef>
        <siri:ResponseMessageIdentifier>4df001d4-f2fa-11ed-839a-9b941adcadcc</siri:ResponseMessageIdentifier>
        <siri:RequestMessageRef>6ba7b814-9dad-11d1-2-00c04fd430c8</siri:RequestMessageRef>
      </CheckStatusAnswerInfo>
      <Answer>
        <siri:Status>true</siri:Status> <!-- Peut-être false en cas de problème -->
        <siri:ServiceStartedTime>2017-01-01T04:05:00.000+01:00</siri:ServiceStartedTime> <!-- Heure de rédemarrage du SAE -->
      </Answer>
      <AnswerExtension />
    </sw:CheckStatusResponse>
  </S:Body>
</S:Envelope>

Stop Points Discovery

Available soon

Stop Monitoring

Available soon

Vehicle Monitoring

Available soon

Situation Exchange

Available soon

Facility Monitoring

Allow Ara to know the real-time status of facilities (for example: station equipments like lifts, escalators, etc.). Ara sent periodically a request per facility.

Request

Each request contains a FacilityRef with the Facility identifier:

<?xml version='1.0' encoding='utf-8'?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <sw:GetFacilityMonitoring xmlns:sw="http://wsdl.siri.org.uk" xmlns:siri="http://www.siri.org.uk/siri">
      <ServiceRequestInfo>
        <siri:RequestTimestamp>2030-01-01T12:01:10.000Z</siri:RequestTimestamp>
        <siri:RequestorRef>Ara</siri:RequestorRef>
        <siri:MessageIdentifier>6ba7b814-9dad-11d1-4-00c04fd430c8</siri:MessageIdentifier>
      </ServiceRequestInfo>

      <Request>
        <siri:RequestTimestamp>2030-01-01T12:01:10.000Z</siri:RequestTimestamp>
        <siri:FacilityRef>ABC1234</siri:FacilityRef> <!-- Facility Identifier -->
      </Request>
      <RequestExtension/>
    </sw:GetFacilityMonitoring>
  </soap:Body>
</soap:Envelope>

Response

The Response gives the Status of the requested Facility:

<?xml version='1.0' encoding='utf-8'?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <sw:GetFacilityMonitoringResponse xmlns:sw="http://wsdl.siri.org.uk" xmlns:siri="http://www.siri.org.uk/siri">
      <ServiceDeliveryInfo>
        <siri:ResponseTimestamp>2030-01-01T12:01:10.000Z</siri:ResponseTimestamp>
      </ServiceDeliveryInfo>

      <Answer>
        <siri:FacilityMonitoringDelivery>
          <siri:ResponseTimestamp>2030-01-01T15:00:00.000Z</siri:ResponseTimestamp>

          <siri:FacilityCondition>
            <siri:FacilityRef>ABC1234</siri:FacilityRef>
            <siri:FacilityStatus>
              <!-- Can be one of these values: unknown, available, notAvailable, partiallyAvailable, removed -->
              <siri:Status>available</siri:Status>
            </siri:FacilityStatus>
          </siri:FacilityCondition>
        </siri:FacilityMonitoringDelivery>
      </Answer>
      <AnswerExtension/>
    </sw:GetFacilityMonitoringResponse>
  </soap:Body>
</soap:Envelope>

Much other information can be returned in this response, but only mandatory attributes are described.

  • No labels