Collect via Pseudo SIRI

Collect via Pseudo SIRI

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

Allows 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

Allows Ara:

  • find out the list of available stops

Request

<?xml version='1.0' encoding='utf-8'?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <sw:StopPointsDiscovery xmlns:sw="http://wsdl.siri.org.uk" xmlns:siri="http://www.siri.org.uk/siri"> <Request> <siri:RequestTimestamp>2030-01-01T11:28:00.359Z</siri:RequestTimestamp> <siri:RequestorRef>Ara</siri:RequestorRef> <!-- Valeur paramétrée dans Ara --> <siri:MessageIdentifier>0a4fa01e-f2fb-11ed-8dcc-c3147c90810b</siri:MessageIdentifier> </Request> <RequestExtension /> </sw:StopPointsDiscovery> </S:Body> </S:Envelope>

Response

Important elements:

  • StopPointRef: Stop identifier

  • StopName: Name of the stop

<?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <sw:StopPointsDiscoveryResponse xmlns:sw="http://wsdl.siri.org.uk" xmlns:siri="http://www.siri.org.uk/siri"> <Answer> <siri:ResponseTimestamp>2030-01-01T12:00:00.000Z</siri:ResponseTimestamp> <siri:Status>true</siri:Status> <siri:AnnotatedStopPointRef> <siri:StopPointRef>1</siri:StopPointRef> <!-- Identifiant de l'arrêt --> <siri:StopName>Stop Name 1</siri:StopName> <!-- Nom de l'arrêt --> </siri:AnnotatedStopPointRef> <siri:AnnotatedStopPointRef> <siri:StopPointRef>2</siri:StopPointRef> <!-- Identifiant de l'arrêt --> <siri:StopName>Stop Name 2</siri:StopName> <!-- Nom de l'arrêt --> </siri:AnnotatedStopPointRef> <!-- etc --> </Answer> <AnswerExtension /> </sw:StopPointsDiscoveryResponse> </S:Body> </S:Envelope>

 

Stop Monitoring

Allows Ara to know all the future passages at a requested stop. Ara will automatically send a request for each stop periodically.

Request

<?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <sw:GetStopMonitoring xmlns:sw="http://wsdl.siri.org.uk" xmlns:siri="http://www.siri.org.uk/siri"> <ServiceRequestInfo> <siri:RequestTimestamp>2030-01-01T07:54:52.977Z</siri:RequestTimestamp> <siri:RequestorRef>Ara</siri:RequestorRef> <!-- Valeur paramétrée dans Ara --> <siri:MessageIdentifier>a1c5b49c-f2fb-11ed-b909-1bfe7e6e7e85</siri:MessageIdentifier> </ServiceRequestInfo> <Request> <siri:RequestTimestamp>2030-01-01T07:54:52.977Z</siri:RequestTimestamp> <siri:MessageIdentifier>a1c5b49c-f2fb-11ed-b909-1bfe7e6e7e85</siri:MessageIdentifier> <siri:MonitoringRef>1</siri:MonitoringRef> <!-- Identifiant de l'arrêt souhaité --> <siri:StopVisitTypes>all</siri:StopVisitTypes> </Request> <RequestExtension /> </sw:GetStopMonitoring> </S:Body> </S:Envelope>

Response

Important elements for each future passage :

  • MonitoringRef / StopPointRef: Stop identifier

  • RecordedAtTime: Time at which the information was received (or the current time by default)

  • ItemIdentifier: Passage identifier, must be constant (e.g. vehicle journey id + order)

  • LineRef: Line identifier

  • DataFrameRef: must be constant (for example the day of operation)

  • DatedVehicleJourneyRef: Identifier of the vehicle journey, must be constant (and unique) over the day

  • DestinationName: the text describing the destination of the vehicle journey

  • Monitored: true if the information is reliable, false otherwise.

  • Order: The order in which the passage will take place into the vehicle journey (1st, 2nd stop, etc)

  • AimedArrivalTime: Theoretical arrival (optional)

  • ExpectedArrivalTime: Expected arrival

  • ArrivalStatus: onTime, arrived, cancelled (in the absence of the attribute, onTime is used by default by Ara)

  • AimedDepartureTime: Theoretical departure (optional)

  • ExpectedDepartureTime: Expected departure

  • DepartureStatus: onTime, departed, cancelled (in the absence of the attribute, onTime is used by default by Ara)

<?xml version='1.0' encoding='utf-8'?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <sw:GetStopMonitoringResponse xmlns:sw="http://wsdl.siri.org.uk" xmlns:siri="http://www.siri.org.uk/siri"> <ServiceDeliveryInfo> <siri:ResponseTimestamp>2030-01-01T12:00:00.0000Z</siri:ResponseTimestamp> <siri:ProducerRef>DKBUS</siri:ProducerRef> <siri:ResponseMessageIdentifier>2a3aa88c-f2fc-11ed-8f93-1bd2c8e54bc0</siri:ResponseMessageIdentifier> <siri:RequestMessageRef>a1c5b49c-f2fb-11ed-b909-1bfe7e6e7e85</siri:RequestMessageRef> </ServiceDeliveryInfo> <Answer> <!-- Arret 1 --> <siri:StopMonitoringDelivery> <siri:ResponseTimestamp>2030-01-01T12:00:00.0000Z</siri:ResponseTimestamp> <siri:RequestMessageRef>a1c5b49c-f2fb-11ed-b909-1bfe7e6e7e85</siri:RequestMessageRef> <siri:MonitoringRef>1</siri:MonitoringRef> <!-- Idenfiant de l'arrêt --> <siri:Status>true</siri:Status> <siri:MonitoredStopVisit> <siri:RecordedAtTime>2030-01-01T12:00:01.0000Z</siri:RecordedAtTime> <!-- Heure de remontée de l'info --> <siri:ItemIdentifier>VehicleJourney-1-10</siri:ItemIdentifier> <!-- Identifiant du passage, doit être constant (ex: id course + order) --> <siri:MonitoringRef>1</siri:MonitoringRef> <!-- Idenfiant de l'arrêt ... --> <siri:MonitoredVehicleJourney> <siri:LineRef>C6</siri:LineRef> <siri:FramedVehicleJourneyRef> <siri:DataFrameRef>2030-01-01</siri:DataFrameRef> <!-- Par example le jour d'exploitation --> <!-- Course VehicleJourney-1 --> <siri:DatedVehicleJourneyRef>VehicleJourney-1</siri:DatedVehicleJourneyRef> <!-- Identifiant de la course --> </siri:FramedVehicleJourneyRef> <siri:DestinationName>Les Côtes</siri:DestinationName> <siri:Monitored>true</siri:Monitored> <siri:MonitoredCall> <siri:StopPointRef>1</siri:StopPointRef> <!-- Idenfiant de l'arrêt ... --> <siri:Order>10</siri:Order> <!-- L'ordre de passage dans la course (1er, 2eme arrêt, etc) --> <!-- Arrivée prévue à 13h00 --> <siri:AimedArrivalTime>2030-01-01T13:00:00.000+02:00</siri:AimedArrivalTime> <!-- Arrivée théorique (optionnelle) --> <siri:ExpectedArrivalTime>2030-01-01T13:00:00.000+02:00</siri:ExpectedArrivalTime> <!-- Arrivée prévue --> <siri:ArrivalStatus>onTime</siri:ArrivalStatus> <!-- Etat d'arrivée: onTime, arrived, canceled --> <!-- Départ prévu à 13h01 --> <siri:AimedDepartureTime>2030-01-01T13:01:00.000+02:00</siri:AimedDepartureTime> <!-- Départ théorique (optionnelle) --> <siri:ExpectedDepartureTime>2030-01-01T13:01:00.000+02:00</siri:ExpectedDepartureTime> <!-- Départ prévu --> <siri:DepartureStatus>onTime</siri:DepartureStatus> <!-- Etat de départ: onTime, departed, canceled --> </siri:MonitoredCall> </siri:MonitoredVehicleJourney> </siri:MonitoredStopVisit> <siri:MonitoredStopVisit> <siri:RecordedAtTime>2030-01-01T12:00:02.0000Z</siri:RecordedAtTime> <siri:ItemIdentifier>VehicleJourney-2-5</siri:ItemIdentifier> <!-- Important --> <siri:MonitoringRef>1</siri:MonitoringRef> <siri:MonitoredVehicleJourney> <siri:LineRef>12</siri:LineRef> <siri:FramedVehicleJourneyRef> <siri:DataFrameRef>2030-01-01</siri:DataFrameRef> <!-- Course VehicleJourney-2 --> <siri:DatedVehicleJourneyRef>VehicleJourney-2</siri:DatedVehicleJourneyRef> </siri:FramedVehicleJourneyRef> <siri:DestinationName>Les Côtes</siri:DestinationName> <siri:Monitored>true</siri:Monitored> <siri:MonitoredCall> <siri:StopPointRef>1</siri:StopPointRef> <siri:Order>5</siri:Order> <!-- Arrivée prévue à 13h05 --> <siri:AimedArrivalTime>2030-01-01T13:05:00.000+02:00</siri:AimedArrivalTime> <siri:ExpectedArrivalTime>2030-01-01T13:05:00.000+02:00</siri:ExpectedArrivalTime> <siri:ArrivalStatus>onTime</siri:ArrivalStatus> <!-- Départ prévu à 13h06 --> <siri:AimedDepartureTime>2030-01-01T13:06:00.000+02:00</siri:AimedDepartureTime> <siri:ExpectedDepartureTime>2030-01-01T13:06:00.000+02:00</siri:ExpectedDepartureTime> <siri:DepartureStatus>onTime</siri:DepartureStatus> </siri:MonitoredCall> </siri:MonitoredVehicleJourney> </siri:MonitoredStopVisit> </siri:StopMonitoringDelivery> </Answer> <AnswerExtension /> </sw:GetStopMonitoringResponse> </S:Body> </S:Envelope>

Vehicle Monitoring

Allows Ara to know the position and status of vehicles currently in service. Ara will periodically send a request per line.

Request

<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <sw:GetVehicleMonitoring xmlns:sw="http://wsdl.siri.org.uk" xmlns:siri="http://www.siri.org.uk/siri"> <ServiceRequestInfo> <siri:RequestTimestamp>2030-01-01T15:00:00.000Z</siri:RequestTimestamp> <siri:RequestorRef>Ara</siri:RequestorRef> <siri:MessageIdentifier>f042152e-d60e-11ee-bd86-df3a8317c704</siri:MessageIdentifier> </ServiceRequestInfo> <Request> <siri:RequestTimestamp>2030-01-01T15:00:00.000Z</siri:RequestTimestamp> <siri:LineRef>Line:3</siri:LineRef> <!-- Identifiant de la ligne demandée --> </Request> <RequestExtension /> </sw:GetVehicleMonitoring> </soap:Body> </soap:Envelope>

Response

Important elements: for each vehicle (aka VehicleActivity):

  • RecordedAtTime: Time at which the information was retrieved (or the current time by default)

  • ValidUntilTime: End of validity time of the information (or the current time + 2/3 minutes)

  • VehicleMonitoringRef: Vehicle identifier

  • DatedVehicleJourneyRef: identifier of the current journey for this vehicle

  • VehicleLocation: the current position (latitude/longitude) of the vehicle

  • Bearing: the orientation/heading of the vehicle

  • Occupancy: the load on board the vehicle. Possible values:

    • unknown

    • empty

    • manySeatsAvailable

    • fewSeatsAvailable

    • standingRoomOnly

    • crushedStandingRoomOnly

    • full

    • notAcceptingPassengers

 

<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'> <soap:Body> <sw:GetVehicleMonitoringResponse xmlns:sw="http://wsdl.siri.org.uk" xmlns:siri="http://www.siri.org.uk/siri"> <ServiceDeliveryInfo> <siri:ResponseTimestamp>2030-01-01T12:00:00.000Z</siri:ResponseTimestamp> <siri:ProducerRef>DKBUS</siri:ProducerRef> <siri:ResponseMessageIdentifier>7dc3baec-d60f-11ee-9007-aff10886820c</siri:ResponseMessageIdentifier> <siri:RequestMessageRef>f042152e-d60e-11ee-bd86-df3a8317c704</siri:RequestMessageRef> </ServiceDeliveryInfo> <Answer> <siri:VehicleMonitoringDelivery> <siri:ResponseTimestamp>2030-01-01T12:00:00.000Z</siri:ResponseTimestamp> <siri:Status>true</siri:Status> <siri:VehicleActivity> <siri:RecordedAtTime>2030-01-01T12:00:00.000Z</siri:RecordedAtTime> <siri:ValidUntilTime>2030-01-01T12:05:00.000Z</siri:ValidUntilTime> <siri:VehicleMonitoringRef>Vehicle:201123</siri:VehicleMonitoringRef> <siri:MonitoredVehicleJourney> <siri:FramedVehicleJourneyRef> <siri:DataFrameRef>DataFrame:2030-01-01</siri:DataFrameRef> <siri:DatedVehicleJourneyRef>VehicleJourney:201</siri:DatedVehicleJourneyRef> </siri:FramedVehicleJourneyRef> <siri:Monitored>true</siri:Monitored> <siri:VehicleLocation> <siri:Longitude>1.234</siri:Longitude> <siri:Latitude>5.678</siri:Latitude> </siri:VehicleLocation> <siri:Bearing>123</siri:Bearing> <siri:Occupancy>seatsAvailable</siri:Occupancy> </siri:MonitoredVehicleJourney> </siri:VehicleActivity> <siri:VehicleActivity> <!-- ... --> </siri:VehicleActivity> </siri:VehicleMonitoringDelivery> </Answer> <AnswerExtension/> </sw:GetVehicleMonitoringResponse> </soap:Body> </soap:Envelope>

 

Situation Exchange

It allows Ara to know about current situations, especially associated to line(s) or stop(s). Ara will periodically send a global request.

More details about SIRI Situations:

Request

By default, Ara requests all defined situations:

<?xml version='1.0' encoding='utf-8'?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sw="http://wsdl.siri.org.uk" xmlns:siri="http://www.siri.org.uk/siri"> <soap:Body> <sw:GetSituationExchange> <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> </Request> <RequestExtension/> </sw:GetSituationExchange> </soap:Body> </soap:Envelope>

Response
Important elements, for each Situation:

  • CreationTime: Creation time of the Situation

  • SituationNumber: Situation identifier

  • VersionedAtTime: Update time of the Situation (must be changed when the Situation is updated)

  • Progress: Status of the Perturbation (mainly open or closed)

  • ValidityPeriod: Period during which the disturbance has impact

  • Summary: Summary or title

  • Description: Text description

  • Affects: list the network parts affected by/associated with this Situation

    • at least a Stop or a Line must be associated

    • StopPointRef: associated Stop identifiers

    • LineRef: associated Line identifiers

  • AlertCause: Situation cause (optional)

    • unknown

    • congestion

    • technicalProblem

    • vehicleFailure

    • serviceDisruption

    • etc. (all other valid SIRI values are accepted)

  • Severity: Situation severity (optional), among these values:

    • slight

    • normal 

    • severe

  • ReportType: (optional)

    • incident: for a disruption

    • general: for a commercial message

<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <wsdl:GetSituationExchangeResponse xmlns:wsdl="http://wsdl.siri.org.uk" xmlns:siri="http://www.siri.org.uk/siri"> <ServiceDeliveryInfo> <siri:ResponseTimestamp>2030-01-01T15:00:00.000Z</siri:ResponseTimestamp> <siri:RequestMessageRef>3a452efc-d611-11ee-812a-dfca6abd58a4</siri:RequestMessageRef> </ServiceDeliveryInfo> <Answer> <siri:SituationExchangeDelivery version="2.0"> <siri:ResponseTimestamp>2030-01-01T15:00:00.000Z</siri:ResponseTimestamp> <siri:Situations> <siri:PtSituationElement> <siri:CreationTime>2030-01-01T10:00:00.000Z</siri:CreationTime> <siri:SituationNumber>36926</siri:SituationNumber> <siri:VersionedAtTime>2030-01-01T11:00:00.000Z</siri:VersionedAtTime> <siri:Progress>open</siri:Progress> <siri:ValidityPeriod> <siri:StartTime>2030-01-01T10:00:00.000Z</siri:StartTime> <siri:EndTime>2030-01-01T18:00:00.000Z</siri:EndTime> </siri:ValidityPeriod> <siri:AlertCause>awaitingOncomingVehicle</siri:AlertCause> <siri:Severity>normal</siri:Severity> <siri:ReportType>incident</siri:ReportType> <siri:Summary>Arrêt Michel non desservi</siri:Summary> <siri:Description>L'arrêt La Poitevine n'est pas desservi en direction de Paul Fort.</siri:Description> <siri:Affects> <!-- Associated lines --> <siri:Networks> <siri:AffectedNetwork> <siri:AffectedLine> <siri:LineRef>Line:673</siri:LineRef> <siri:LineRef>Line:123</siri:LineRef> </siri:AffectedLine> </siri:AffectedNetwork> </siri:Networks> <!-- Associated Stops --> <siri:StopPoints> <siri:AffectedStopPoint> <siri:StopPointRef>Quay:3534</siri:StopPointRef> <siri:StopPointRef>Quay:2913</siri:StopPointRef> </siri:AffectedStopPoint> </siri:StopPoints> </siri:Affects> </siri:PtSituationElement> <siri:PtSituationElement> <!-- ... --> </siri:PtSituationElement> </siri:Situations> </siri:SituationExchangeDelivery> </Answer> <AnswerExtension></AnswerExtension> </wsdl:GetSituationExchangeResponse> </soap:Body> </soap:Envelope>

Facility Monitoring FUTURE

The Ara support for SIRI Facility Monitoring is a part of our 2025 roadmap.

It allows 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.