Getting the ETA
Estimated Time of Arrival for trips
This API returns the ETA for the next reachable stops, either:
-
For a given trip and a starting timestamp.
- For all trips.
Authentication phase
Before using the endpoint, you must run the authentication phase (→ Login).
After the authentication, a session opens and a valid session token persists until:
- The end of the session time-out, that is set through the parameter sessionTimeout (→ OptimaWSI configuration > OptimaAuth section).
- An explicit Logout call (→ Logout).

Request
GET
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-put/eta/trip/{tripId}
To get the ETA for a given trip, you need to specify the path parameter tripId, that is a specific identifier of a trip. If tripId is not specified, the response returns the ETA for all trips.
Request parameters
Parameter | Required | Description |
---|---|---|
format |
NO |
Response format. It can be bytes or text. The default is bytes. |
timestamp |
NO |
Reference timestamp associated to ETA. The default is now. |
Request content-type
Not applicable
Request body (payload)
Not applicable

Response status
HTTP status | Description |
---|---|
200 OK |
Result of the processed request. |
400 Bad request |
Several conditions can be classified under this code. Generally, when the API has been called with wrong arguments. |
Response content-type
If in the request:
- format=bytes, the format of the response is application/x-google-protobuf.
- format=text, the format of the response is text/plain.
Response output
Text containing all information about the ETA.
In case of a bad request, a text message is returned, explaining what has caused the problem.

Request
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-put/eta/trip/915422?timeStamp=2016-05-26T00:00:00&format=text
Response status
HTTP status | Description |
---|---|
200 OK |
The processing request has been accepted. |
Response output
header {
gtfs_real time_version: "1.0"
incrementality: FULL_DATASET
timestamp: 1464269975
}
entity {
id: "1"
trip_update {
trip {
trip_id: "915422"
route_id: "371"
}
stop_time_update {
stop_sequence: 1
arrival {
delay: 0
time: 1464249840
}
stop_id: "5301"
}
stop_time_update {
stop_sequence: 2
arrival {
delay: 0
time: 1464249900
}
stop_id: "express_6403"
}
stop_time_update {
stop_sequence: 3
arrival {
delay: 0
time: 1464249958
}
stop_id: "express_6405"
}
stop_time_update {
stop_sequence: 4
arrival {
delay: 0
time: 1464250020
}
stop_id: "express_2744"
}
stop_time_update {
stop_sequence: 5
arrival {
delay: 0
time: 1464250088
}
stop_id: "express_6008"
}
stop_time_update {
stop_sequence: 6
arrival {
delay: 0
time: 1464250140
}
stop_id: "2745"
}
stop_time_update {
stop_sequence: 7
arrival {
delay: 0
time: 1464250174
}
stop_id: "2746"
}
stop_time_update {
stop_sequence: 8
arrival {
delay: 0
time: 1464250218
}
stop_id: "2747"
}
stop_time_update {
stop_sequence: 9
arrival {
delay: 0
time: 1464250292
}
stop_id: "2748"
}
stop_time_update {
stop_sequence: 10
arrival {
delay: 0
time: 1464250333
}
stop_id: "2749"
}
stop_time_update {
stop_sequence: 11
arrival {
delay: 0
time: 1464250380
}
stop_id: "2753"
}
stop_time_update {
stop_sequence: 12
arrival {
delay: 0
time: 1464250428
}
stop_id: "express_2754"
}
stop_time_update {
stop_sequence: 13
arrival {
delay: 0
time: 1464250485
}
stop_id: "express_54"
}
stop_time_update {
stop_sequence: 14
arrival {
delay: 0
time: 1464250516
}
stop_id: "2755"
}
stop_time_update {
stop_sequence: 15
arrival {
delay: 0
time: 1464250560
}
stop_id: "56"
}
stop_time_update {
stop_sequence: 16
arrival {
delay: 0
time: 1464250604
}
stop_id: "2756"
}
stop_time_update {
stop_sequence: 17
arrival {
delay: 0
time: 1464250641
}
stop_id: "2757"
}
stop_time_update {
stop_sequence: 18
arrival {
delay: 0
time: 1464250679
}
stop_id: "2758"
}
stop_time_update {
stop_sequence: 19
arrival {
delay: 0
time: 1464250698
}
stop_id: "2759"
}
stop_time_update {
stop_sequence: 20
arrival {
delay: 0
time: 1464250740
}
stop_id: "1430"
}
stop_time_update {
stop_sequence: 21
arrival {
delay: 0
time: 1464250759
}
stop_id: "2913"
}
stop_time_update {
stop_sequence: 22
arrival {
delay: 0
time: 1464250823
}
stop_id: "2919"
}
stop_time_update {
stop_sequence: 23
arrival {
delay: 0
time: 1464250882
}
stop_id: "1432"
}
stop_time_update {
stop_sequence: 24
arrival {
delay: 0
time: 1464250929
}
stop_id: "2918"
}
stop_time_update {
stop_sequence: 25
arrival {
delay: 0
time: 1464250977
}
stop_id: "2912"
}
stop_time_update {
stop_sequence: 26
arrival {
delay: 0
time: 1464251018
}
stop_id: "5192"
}
stop_time_update {
stop_sequence: 27
arrival {
delay: 0
time: 1464251040
}
stop_id: "3020"
}
stop_time_update {
stop_sequence: 28
arrival {
delay: 0
time: 1464251070
}
stop_id: "3166"
}
stop_time_update {
stop_sequence: 29
arrival {
delay: 0
time: 1464251082
}
stop_id: "6120"
}
stop_time_update {
stop_sequence: 30
arrival {
delay: 0
time: 1464251126
}
stop_id: "5624"
}
stop_time_update {
stop_sequence: 31
arrival {
delay: 0
time: 1464251175
}
stop_id: "6249"
}
stop_time_update {
stop_sequence: 32
arrival {
delay: 0
time: 1464251212
}
stop_id: "6426"
}
stop_time_update {
stop_sequence: 33
arrival {
delay: 0
time: 1464251340
}
stop_id: "6165"
}
}
}