SIRI ET (Orario Stimato) fornisce informazioni in tempo reale sull’intera rete di trasporto pubblico svizzera. SIRI PT (Orario programmato) fornisce ogni mattina l’orario di servizio attuale dei trasporti pubblici svizzeri.
Descrizione tecnica
Per tutte le organizzazioni aziendali che forniscono dati in tempo reale, li rendiamo disponibili come SIRI ET, ovvero dati in tempo reale.
L’orario di servizio viene reso disponibile ogni mattina. Dovrebbe essere occupato dalle 04:00 circa. Lo aggiorniamo ogni 30 minuti.
Aspetti tecnici
L’accesso avviene tramite il seguente URL:
La chiave API necessaria può essere ottenuta tramite il portale self-service.
L’interrogazione viene effettuata con una richiesta GET senza parametri.
I test possono essere eseguiti con i seguenti script CURL:
1 |
curl -H "Authorization: Bearer eyJvcmciOiI2NDA2NTFhNTIyZmEwNTAwMDEyOWJiZTEiLCJpZCI6IjkwNzE3Y2Q0MDcwNDQ5NDFhMjU2ZjgyNzk5NzBmZmNlIiwiaCI6Im11cm11cjEyOCJ9" https://api.opentransportdata.swiss/siri-et |
Si noti che la risposta ET è di circa 100 MB e la risposta PT è di circa 500 MB. Nel caso di PT, il parametro
1 |
--compressed |
può essere inserito in curl.
I valori ET hanno un massimo di 1,5 minuti. L’interrogazione può essere effettuata al massimo ogni 30 secondi. PT genera una versione aggiornata ogni 30 minuti, che viene poi consegnata con un ritardo massimo di un’ora. È possibile che nel corso della giornata venga creata una nuova versione.
Risposta
Ecco un esempio di risposta a un singolo viaggio (senza intestazioni)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
<EstimatedVehicleJourney> <RecordedAtTime>2024-05-16T12:26:50Z</RecordedAtTime> <LineRef>4378</LineRef> <DirectionRef>H</DirectionRef> <FramedVehicleJourneyRef> <DataFrameRef>2024-05-16</DataFrameRef> <DatedVehicleJourneyRef>ch:1:sjyid:100015:4378-002_x0023__x0021_ADD_x0021__x0023_sbb_prod_x0023_</DatedVehicleJourneyRef> </FramedVehicleJourneyRef> <PublishedLineName>RE7</PublishedLineName> <DirectionName>Bern</DirectionName> <OriginName>Wolhusen</OriginName> <OperatorRef>85:33</OperatorRef> <ProductCategoryRef>Zug</ProductCategoryRef> <Monitored>true</Monitored> <MonitoringError>NoError</MonitoringError> <TrainNumbers> <TrainNumberRef>4378</TrainNumberRef> </TrainNumbers> <EstimatedCalls> <EstimatedCall> <StopPointRef>8508215</StopPointRef> <VisitNumber>1</VisitNumber> <StopPointName>Wolhusen</StopPointName> <DestinationDisplay>Bern</DestinationDisplay> <ArrivalBoardingActivity>alighting</ArrivalBoardingActivity> <AimedDepartureTime>2024-05-16T14:15:00Z</AimedDepartureTime> <ExpectedDepartureTime>2024-05-16T14:15:12Z</ExpectedDepartureTime> <DeparturePlatformName>3</DeparturePlatformName> <DepartureBoardingActivity>boarding</DepartureBoardingActivity> </EstimatedCall> <EstimatedCall> <StopPointRef>8508213</StopPointRef> <VisitNumber>2</VisitNumber> <StopPointName>Entlebuch</StopPointName> <OriginDisplay>Wolhusen</OriginDisplay> <DestinationDisplay>Bern</DestinationDisplay> <CallNote>Aussteigeseite: Links</CallNote> <AimedArrivalTime>2024-05-16T14:22:00Z</AimedArrivalTime> <ExpectedArrivalTime>2024-05-16T14:22:24Z</ExpectedArrivalTime> <ArrivalBoardingActivity>alighting</ArrivalBoardingActivity> <AimedDepartureTime>2024-05-16T14:22:00Z</AimedDepartureTime> <ExpectedDepartureTime>2024-05-16T14:23:12Z</ExpectedDepartureTime> <DepartureBoardingActivity>boarding</DepartureBoardingActivity> </EstimatedCall> <EstimatedCall> <StopPointRef>8508211</StopPointRef> <VisitNumber>3</VisitNumber> <StopPointName>Schüpfheim</StopPointName> <OriginDisplay>Wolhusen</OriginDisplay> <DestinationDisplay>Bern</DestinationDisplay> <CallNote>Aussteigeseite: Links</CallNote> <AimedArrivalTime>2024-05-16T14:28:00Z</AimedArrivalTime> <ExpectedArrivalTime>2024-05-16T14:28:48Z</ExpectedArrivalTime> <ArrivalPlatformName>3</ArrivalPlatformName> <ArrivalBoardingActivity>alighting</ArrivalBoardingActivity> <AimedDepartureTime>2024-05-16T14:29:00Z</AimedDepartureTime> <ExpectedDepartureTime>2024-05-16T14:29:48Z</ExpectedDepartureTime> <DeparturePlatformName>3</DeparturePlatformName> <DepartureBoardingActivity>boarding</DepartureBoardingActivity> </EstimatedCall> <EstimatedCall> <StopPointRef>8508210</StopPointRef> <VisitNumber>4</VisitNumber> <StopPointName>Escholzmatt</StopPointName> <OriginDisplay>Wolhusen</OriginDisplay> <DestinationDisplay>Bern</DestinationDisplay> <CallNote>Aussteigeseite: Rechts</CallNote> <AimedArrivalTime>2024-05-16T14:36:00Z</AimedArrivalTime> <ExpectedArrivalTime>2024-05-16T14:36:12Z</ExpectedArrivalTime> <ArrivalBoardingActivity>alighting</ArrivalBoardingActivity> <AimedDepartureTime>2024-05-16T14:36:00Z</AimedDepartureTime> <ExpectedDepartureTime>2024-05-16T14:36:54Z</ExpectedDepartureTime> <DepartureBoardingActivity>boarding</DepartureBoardingActivity> </EstimatedCall> <EstimatedCall> <StopPointRef>8508208</StopPointRef> <VisitNumber>5</VisitNumber> <StopPointName>Trubschachen</StopPointName> <OriginDisplay>Wolhusen</OriginDisplay> <DestinationDisplay>Bern</DestinationDisplay> <CallNote>Aussteigeseite: Rechts</CallNote> <AimedArrivalTime>2024-05-16T14:44:00Z</AimedArrivalTime> <ExpectedArrivalTime>2024-05-16T14:44:06Z</ExpectedArrivalTime> <ArrivalBoardingActivity>alighting</ArrivalBoardingActivity> <AimedDepartureTime>2024-05-16T14:44:00Z</AimedDepartureTime> <ExpectedDepartureTime>2024-05-16T14:45:06Z</ExpectedDepartureTime> <DepartureBoardingActivity>boarding</DepartureBoardingActivity> </EstimatedCall> <EstimatedCall> <StopPointRef>8508207</StopPointRef> <VisitNumber>6</VisitNumber> <StopPointName>Langnau i.E.</StopPointName> <OriginDisplay>Wolhusen</OriginDisplay> <DestinationDisplay>Bern</DestinationDisplay> <CallNote>Aussteigeseite: Rechts</CallNote> <AimedArrivalTime>2024-05-16T14:51:00Z</AimedArrivalTime> <ExpectedArrivalTime>2024-05-16T14:51:18Z</ExpectedArrivalTime> <ArrivalPlatformName>1</ArrivalPlatformName> <ArrivalBoardingActivity>alighting</ArrivalBoardingActivity> <AimedDepartureTime>2024-05-16T14:54:00Z</AimedDepartureTime> <ExpectedDepartureTime>2024-05-16T14:54:12Z</ExpectedDepartureTime> <DeparturePlatformName>1</DeparturePlatformName> <DepartureBoardingActivity>boarding</DepartureBoardingActivity> </EstimatedCall> <EstimatedCall> <StopPointRef>8508202</StopPointRef> <VisitNumber>7</VisitNumber> <StopPointName>Konolfingen</StopPointName> <OriginDisplay>Wolhusen</OriginDisplay> <DestinationDisplay>Bern</DestinationDisplay> <CallNote>Aussteigeseite: Links</CallNote> <AimedArrivalTime>2024-05-16T15:06:00Z</AimedArrivalTime> <ExpectedArrivalTime>2024-05-16T15:06:26Z</ExpectedArrivalTime> <ArrivalPlatformName>3</ArrivalPlatformName> <ArrivalBoardingActivity>alighting</ArrivalBoardingActivity> <AimedDepartureTime>2024-05-16T15:07:00Z</AimedDepartureTime> <ExpectedDepartureTime>2024-05-16T15:08:00Z</ExpectedDepartureTime> <DeparturePlatformName>3</DeparturePlatformName> <DepartureBoardingActivity>boarding</DepartureBoardingActivity> </EstimatedCall> <EstimatedCall> <StopPointRef>8507000</StopPointRef> <VisitNumber>8</VisitNumber> <StopPointName>Bern</StopPointName> <OriginDisplay>Wolhusen</OriginDisplay> <CallNote>Aussteigeseite: Links</CallNote> <AimedArrivalTime>2024-05-16T15:26:00Z</AimedArrivalTime> <ExpectedArrivalTime>2024-05-16T15:26:47Z</ExpectedArrivalTime> <ArrivalPlatformName>2</ArrivalPlatformName> <ArrivalBoardingActivity>alighting</ArrivalBoardingActivity> <DepartureBoardingActivity>boarding</DepartureBoardingActivity> </EstimatedCall> </EstimatedCalls> <IsCompleteStopSequence>true</IsCompleteStopSequence> </EstimatedVehicleJourney> |
Al momento, la consegna avviene in corrispondenza di fermate specifiche (StopPointRef) e non ancora con SLOID.
Domande e risposte
Ulteriori indicazioni.
- Dataset con i dettagli per SIRI ET: SIRI Estimated Timetable – Dataset | Piattaforma open data sulla mobilità in Svizzera (opentransportdata.swiss)
- Dataset con i dettagli per SIRI PT: SIRI Planned Timetable – Dataset | Piattaforma open data sulla mobilità in Svizzera (opentransportdata.swiss)
- Specifiche SIRI: https://github.com/SIRI-CEN/SIRI
- Norma CEN-SIRI: CEN TS 15531 (disponibile presso gli enti di normazione nazionali)
- Introduzione a SIRI: https://www.siri-cen.eu/
- Profilo di SIRI Svizzera: https://www.tp-info.ch/it/standard-del-ramo/standards/real-time-data