Getting the ETA
Estimated Time of Arrival for stops
This API returns the ETA, either:
- For a given stop and a starting timestamp.
- For all trips reaching all stops.
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/stop/{public_stop_id}
To get the ETA for all trips reaching a given stop, you need to specify the path parameter public_stop_id, that is a specific identifier of a stop. If public_stop_id is not specified, the ETA is returned for all trips reaching all stops.
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 the ETA. The default is now. |
timeInterval |
NO |
Reference time interval. Duration associated to the ETA. The starting time is timeStamp. The ending time is timeStamp+timeInterval. The format is the ISO-8601 duration format PnDTnHnMn.nS. The default is PT15M (15 minutes). Example: PT20.345S, which corresponds to 20.345 seconds. |
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/stop/express_2744?timeStamp=2016-05-26T12:00:00&format=text&timeInterval=PT60M
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: 1464271115
}
entity {
id: "1"
trip_update {
trip {
trip_id: "915448"
route_id: "371"
}
stop_time_update {
stop_sequence: 21
arrival {
delay: 0
time: 1464278580
}
stop_id: "express_2744"
}
}
}
entity {
id: "2"
trip_update {
trip {
trip_id: "915447"
route_id: "371"
}
stop_time_update {
stop_sequence: 21
arrival {
delay: 0
time: 1464280980
}
stop_id: "express_2744"
}
}
}