Last 7 days, UTC

Average Latency
1224ms

Average Uptime
91.58%

Current Status
Online

  • No information
  • Outage
  • Disruption
  • Normal
Average latency determined from Mashape to API Response time

Endpoints

HTTP 200 : Response GET/runs/{id}/rt/addCheckPoint
						{
  "message": "OK",
  "status": 200
}						
addCheckPoint

/runs/{id}/rt/addCheckPoint?time={time}&lat={lat}&lon={lon} Updates Run position and add a new CheckPoint in current position. The new CheckPoint dt (delta-time) will be assigned calculating distances from the previous and the next CheckPoints.


Test console
Description
Parameter
number

id of the Run
Example: 5

id

Required

number

Latitude of the current position.
Example: 42.352

lat

Required

number

Longitude of the current position.
Example: 13.349

lon

Required

number

The current time (expressed in minutes from midnight. This field is used just for locating the Run position and find the previous and the next CheckPoints.
Example: 530

time

Required

HTTP 200 : Response GET/runs/{id}/rt/checkpointpass
						{
  "message": "OK",
  "status": 200
}						
checkPointPassage

/runs/{id}/rt/checkpointpass?checkpointid={checkpointid}&time={time} Set the last visited CheckPoint in the Run


Test console
Description
Parameter
number

id of the visited CheckPoint
Example: 7803

checkpointid

Required

number

id of the Run
Example: 11

id

Required

number

The current time (expressed in minutes from midnight
Example: 830

time

Optional

HTTP 200 : CheckPointList GET/runs/{id}/checkpoints/getall
						{
  "checkpointlist": [
    "/runs/651/checkpoints/18288",
    "/runs/651/checkpoints/18284",
    "/runs/651/checkpoints/18285",
    "/runs/651/checkpoints/18286",
    "/runs/651/checkpoints/18287"
  ]
}						
getAllCheckPointsInRun

/runs/{id}/checkpoints/getall?objects={objects} Returns all the CheckPoints of a Run


Test console
Description
Parameter
number

id of the Run
Example: 5

id

Required

boolean

if TRUE returns objects else returns URLs

objects

Optional

HTTP 200 : RouteList GET/routes/getall
						{
  "routelist": [
    "/routes/115",
    "/routes/11",
    "/routes/88",
    "/routes/140",
    "/routes/167"
  ]
}						
getAllRoutes

/routes/getall?objects={objects} Returns all the Routes


Test console
Description
Parameter
boolean

if TRUE returns objects else returns URLs

objects

Optional

HTTP 200 : RouteList GET/stations/{id}/getallroutes
						{
  "routelist": [
    "/routes/115",
    "/routes/11",
    "/routes/88",
    "/routes/140",
    "/routes/167"
  ]
}						
getAllRoutesInStation

/stations/{id}/getallroutes?objects={objects} Returns all the Routes passing in the Station


Test console
Description
Parameter
number

id of the Station
Example: 5

id

Required

boolean

if TRUE returns objects else returns URLs

objects

Optional

HTTP 200 : RunList GET/runs/getallrunningbuses
						{
  "runlist": [
    "/runs/0",
    "/runs/1",
    "/runs/4",
    "/runs/3",
    "/runs/2"
  ]
}						
getAllRunningBuses

/runs/getallrunningbuses?objects={objects} Returns all the running Runs


Test console
Description
Parameter
boolean

if TRUE returns objects else returns URLs

objects

Optional

HTTP 200 : RunList GET/runs/getall
						{
  "runlist": [
    "/runs/0",
    "/runs/1",
    "/runs/4",
    "/runs/3",
    "/runs/2"
  ]
}						
getAllRuns

/runs/getall?objects={objects} Returns all the Runs


Test console
Description
Parameter
boolean

if TRUE returns objects else returns URLs

objects

Optional

HTTP 200 : RunList GET/routes/{id}/getallruns
						{
  "runlist": [
    "/runs/0",
    "/runs/1",
    "/runs/4",
    "/runs/3",
    "/runs/2"
  ]
}						
getAllRunsInRoute

/routes/{id}/getallruns?objects={objects} Returns all the Runs of the Route


Test console
Description
Parameter
number

id of the Route
Example: 12

id

Required

boolean

if TRUE returns objects else returns URLs

objects

Optional

HTTP 200 : StationList GET/stations/getall
						{
  "stationlist": [
    "/stations/1",
    "/stations/2",
    "/stations/3",
    "/stations/4",
    "/stations/5"
  ]
}						
getAllStations

/stations/getall?objects={objects} Returns all the Stations


Test console
Description
Parameter
boolean

if TRUE returns objects else returns URLs

objects

Optional

HTTP 200 : StationList GET/routes/{id}/getallstations
						{
  "stationlist": [
    "/stations/1",
    "/stations/2",
    "/stations/3",
    "/stations/4",
    "/stations/5"
  ]
}						
getAllStationsInRoute

/routes/{id}/getallstations?objects={objects}


Test console
Description
Parameter
number

id of the Route
Example: 12

id

Required

boolean

if TRUE returns objects else returns URLs

objects

Optional

HTTP 200 : StopList GET/stops/getall
						{
  "stoplist": [
    "/stops/731",
    "/stops/730",
    "/stops/729",
    "/stops/728",
    "/stops/727"
  ]
}						
getAllStops

/stops/getall?objects={objects} Returns all the Stops


Test console
Description
Parameter
boolean

if TRUE returns objects else returns URLs

objects

Optional

HTTP 200 : StopList GET/runs/{id}/getallstops
						{
  "stoplist": [
    "/stops/731",
    "/stops/730",
    "/stops/729",
    "/stops/728",
    "/stops/727"
  ]
}						
getAllStopsInRun

/runs/{id}/getallstops?objects={objects} Returns all the Stops of the Run


Test console
Description
Parameter
number

id of the Run
Example: 5

id

Required

boolean

if TRUE returns objects else returns URLs

objects

Optional

HTTP 200 : CheckPoint GET/runs/{id}/checkpoints/{checkpointid}
						{"dt":"0","from":"/stops/3202","id":"9426","latLon":{"lat":"42.36226","lon":"13.40046"},"next":"/runs/11/checkpoints/9427","prev":"/runs/11/checkpoints/9425","towards":"/stops/3202","url":"/runs/11/checkpoints/9426"}						
getCheckPointById

/runs/{id}/checkpoints/{checkpointid} Returns the CheckPoint having the specified Id in the Run


Test console
Description
Parameter
number

id of the CheckPoint
Example: 7811

checkpointid

Required

number

id of the Run
Example: 11

id

Required

HTTP 200 : Time GET/runs/{id}/checkpoints/{checkpointid}/gettime
						{
  "time": "448"
}						
getCheckPointTime

/runs/{id}/checkpoints/{checkpointid}/gettime Returns the expected time of passage at the CheckPoint


Test console
Description
Parameter
number

id of the CheckPoint
Example: 7811

checkpointid

Required

number

id of the Run
Example: 11

id

Required

HTTP 200 : DirectionList GET/directions/getdirections
						{
  "directionlist": [
    {
      "arrivalTime": 766,
      "departureTime": 622,
      "routes": [
        {
          "arrival": "/stops/569",
          "departure": "/stops/244"
        }
      ],
      "walks": [
        {
          "arrival": {
            "lat": 13.349,
            "lon": 42.352
          },
          "change": false,
          "departure": {
            "lat": 13.349,
            "lon": 42.352
          },
          "distance": 500,
          "duration": 12
        }
      ],
      "numChanges": 3,
      "walkingDistance": 58
    }
  ]
}						
getDirections

/directions/getdirections?lat1={lat1}&lon1={lon1}&lat2={lat2}&lon2={lon2}&departureday={departureday}&departuretime={departuretime}&minchangetime={minchangetime}&criterion={criterion} Calculates the Pareto frontier of the paths for (arrival time, (secondary criterion, other criteria)), sorted by arrival time of the founded paths (and reversely sorted by (secondary criterion, other criteria)).


Test console
Description
Parameter
number

Departure day of the week as number (1 = Monday, ... , 7 = Sunday)
Example: 5

departureday

Required

number

Departure time in minutes from midnight
Example: 520

departuretime

Required

number

Departure latitude
Example: 42.3799

lat1

Required

number

Arrival latitude
Example: 42.3430

lat2

Required

number

Departure longitude
Example: 13.2985

lon1

Required

number

Arrival longitude
Example: 13.4630

lon2

Required

string

Secondary criterion of optimization (first optimization criterion is always the arrival time). Allowed values: - DURATION: least during path - SAFEST: safest changes path (NOT YET IMPLEMENTED!) - MINCHANGES: minimum number of changes - MINWALK: minimum walk distance.
Example: MINCHANGES

criterion

Optional

number

Minimum time (in minutes) allowed for a bus change. NOT YET IMPLEMENTED!
Example: 3

minchangetime

Optional

HTTP 200 : Stop GET/stations/{id}/getfirststopfrom
						{
  "id": 81,
  "nextInRun": "/stops/82",
  "prevInRun": "/stops/80",
  "run": "/runs/260",
  "staticTime": 830,
  "station": "/stations/12",
  "url": "/stops/81"
}						
getFirstStopFrom

/stations/{id}/getfirststopfrom?time={time} Returns the first Stop in the Station from specified time


Test console
Description
Parameter
number

id of the Station
Example: 12

id

Required

number

time in minutes from midnight
Example: 830

time

Optional

HTTP 200 : CheckPoint GET/runs/{id}/rt/getlastgpscheckpoint
						{"dt":"0","from":"/stops/3202","id":"9426","latLon":{"lat":"42.36226","lon":"13.40046"},"next":"/runs/11/checkpoints/9427","prev":"/runs/11/checkpoints/9425","towards":"/stops/3202","url":"/runs/11/checkpoints/9426"}						
getLastGPSCheckPoint

/runs/{id}/rt/getlastgpscheckpoint Returns the last visited CheckPoint


Test console
Description
Parameter
number

id of the Run
Example: 11

id

Required

HTTP 200 : Position GET/runs/{id}/rt/getlastgpsposition
						{
  "latLon": {
    "lat": 13.349,
    "lon": 42.352
  },
  "time": 532
}						
getLastGPSPosition

/runs/{id}/rt/getlastgpsposition Returns the current position of the Run and the time when the last position has been detected. If the Run is not circulating it will be returned the position of the last Stop of the Run.


Test console
Description
Parameter
number

id of the Run
Example: 11

id

Required

HTTP 200 : Stop GET/runs/{id}/rt/getlastgpsstop
						{
  "id": 81,
  "nextInRun": "/stops/82",
  "prevInRun": "/stops/80",
  "run": "/runs/260",
  "staticTime": 830,
  "station": "/stations/12",
  "url": "/stops/81"
}						
getLastGPSStop

/runs/{id}/rt/getlastgpsstop Returns the last Stop passed by the Run


Test console
Description
Parameter
number

id of the Run
Example: 11

id

Required

HTTP 200 : StationList GET/stations/getneareststations
						{
  "stationlist": [
    "/stations/1",
    "/stations/2",
    "/stations/3",
    "/stations/4",
    "/stations/5"
  ]
}						
getNearestStations

/stations/getneareststations?lat={lat}&lon={lon}&range={range} Returns an array of Stations sorted by distance from the input point (lat,lon).


Test console
Description
Parameter
number

Latitude
Example: 42.352

lat

Required

number

Longitude
Example: 13.349

lon

Required

number

Range in meters (distance limit). If not specified all stations will be returned.
Example: 500

range

Optional

HTTP 200 : Stop GET/stops/{id}/getnextinstation
						{
  "id": 81,
  "nextInRun": "/stops/82",
  "prevInRun": "/stops/80",
  "run": "/runs/260",
  "staticTime": 830,
  "station": "/stations/12",
  "url": "/stops/81"
}						
getNextInStation

/stops/{id}/getnextinstation Returns the next Stop in the Station


Test console
Description
Parameter
number

id of the Stop
Example: 81

id

Required

HTTP 200 : Stop GET/stops/{id}/getprevinstation
						{
  "id": 81,
  "nextInRun": "/stops/82",
  "prevInRun": "/stops/80",
  "run": "/runs/260",
  "staticTime": 830,
  "station": "/stations/12",
  "url": "/stops/81"
}						
getPrevInStation

/stops/{id}/getprevinstation Returns the previous Stop in the Station


Test console
Description
Parameter
number

id of the Stop
Example: 81

id

Required

HTTP 200 : Route GET/routes/{id}
						{
  "from": "/stations/25",
  "id": 12,
  "line": "7/A",
  "towards": "/stations/48",
  "url": "/routes/12"
}						
getRouteById

/routes/{id} Returns the Route having the specified Id


Test console
Description
Parameter
number

id of the Route
Example: 12

id

Required

HTTP 200 : Run GET/runs/{id}
						{
  "firstCheckPoint": "/runs/11/checkpoints/7803",
  "firstStop": "/stops/4474",
  "id": 11,
  "route": "/routes/158",
  "url": "/runs/11"
}						
getRunById

/runs/{id} Returns the Run having th specified id


Test console
Description
Parameter
number

id of the Run
Example: 11

id

Required

HTTP 200 : Station GET/stations/{id}
						{
  "id": 32,
  "latLon": {
    "lat": 13.349,
    "lon": 42.352
  },
  "name": "Terminal Bus",
  "url": "/stations/32"
}						
getStationById

/stations/{id} Returns the Station having the specified Id


Test console
Description
Parameter
number

id of the Station
Example: 32

id

Required

HTTP 200 : Stop GET/stops/{id}
						{
  "id": 81,
  "nextInRun": "/stops/82",
  "prevInRun": "/stops/80",
  "run": "/runs/260",
  "staticTime": 830,
  "station": "/stations/12",
  "url": "/stops/81"
}						
getStopById

/stops/{id} Returns the Stop having th specified id


Test console
Description
Parameter
number

id of the Stop
Example: 81

id

Required

HTTP 200 : Time GET/stops/{id}/gettime
						{
  "time": "448"
}						
getStopTime

/stops/{id}/gettime Returns the time of the Stop. The returned value is updated with the delay time of the Run.


Test console
Description
Parameter
number

id of the Stop
Example: 345

id

Required

HTTP 200 : string GET/runs/restoreall
restoreAllRuns

/runs/restoreall Restore all the Stops to static time


HTTP 200 : Response GET/runs/{id}/rt/restore
						{
  "message": "OK",
  "status": 200
}						
restoreRun

/runs/{id}/rt/restore Restores the time of each Stop in the Run to its staticTime value.


Test console
Description
Parameter
number

id of the Run
Example: 11

id

Required

HTTP 200 : Response GET/runs/{id}/rt/updateposition
						{
  "message": "OK",
  "status": 200
}						
updateRunPosition

/runs/{id}/rt/updateposition?time={time}&lat={lat}&lon={lon} Updates Run position, calculates and set the last visited CheckPoint


Test console
Description
Parameter
number

id of the Run
Example: 11

id

Required

number

Latitude of the current position.
Example: 42.352

lat

Required

number

Longitude of the current position.
Example: 13.349

lon

Required

number

The current time (expressed in minutes from midnight.
Example: 830

time

Required

Consume this API completely for free!


By joining the mashape API marketplace you can start using BusOnAir API today!

Login to your account or signup: Create Account

or
   Signup with GitHub

By signing up you agree to our terms of service.