API URL: http://data.mycity.example.com/transport/api/
GET http://data.mycity.example.com/transport/api/bus/routes
{
"routes":[
{"id":"1", "uri": "http://data.mycity.example.com/transport/bus/routes/1"},
{"id":"3", "uri": "http://data.mycity.example.com/transport/bus/routes/3"},
{"id":"5", "uri": "http://data.mycity.example.com/transport/bus/routes/5"},
{"id":"8", "uri": "http://data.mycity.example.com/transport/bus/routes/8"},
{"id":"10", "uri": "http://data.mycity.example.com/transport/bus/routes/10"},
{"id":"12a", "uri": "http://data.mycity.example.com/transport/bus/routes/12"}
]
}
GET http://data.mycity.example.com/transport/api/bus/stops
{
"stops":[
{"stop_id":"345",
"stop_name": "Castle Avenue, Sunset Drive",
"stop_desc": "Castle Avenue, Sunset Drive",
"stop_lat": "-3.731862",
"stop_long": "-38.526670",
"zone_id": "x20",
"stop_url": "http://data.mycity.example.com/transport/bus/stops/345"
},
{"stop_id":"483",
"stop_name": "Main Street, Lily Park",
"stop_desc": "Main Street, Lily Park",
"stop_lat": "-3.731541",
"stop_long": "-38.535157",
"zone_id": "x20",
"stop_url": "http://data.mycity.example.com/transport/bus/stops/483"
},
{"stop_id":"541",
"stop_name": "West Avenue, Beech Road",
"stop_desc": "West Avenue, Beech Road",
"stop_lat":"-3.734957"
"stop_long":"-38.514354",
"zone_id": "x22",
"stop_url": "http://data.mycity.example.com/transport/bus/stops/541"
}
]
}
}
GET http://data.mycity.example.com/transport/api/bus/stops/routes/{id}
{
"results": {"route": "http://data.mycity.example.com/transport/bus/stops/routes/5",
"stops":[
{"stop_id":"345",
"stop_name": "Castle Avenue, Sunset Drive",
"stop_desc": "Castle Avenue, Sunset Drive",
"stop_lat": "-3.731862",
"stop_long": "-38.526670",
"zone_id": "x20",
"stop_url": "http://data.mycity.example.com/transport/bus/stops/345"
},
{"stop_id":"483",
"stop_name": "Main Street, Lily Park",
"stop_desc": "Main Street, Lily Park",
"stop_lat": "-3.731541",
"stop_long": "-38.535157",
"zone_id": "x20",
"stop_url": "http://data.mycity.example.com/transport/bus/stops/483"
},
{"stop_id":"541",
"stop_name": "West Avenue, Beech Road",
"stop_desc": "West Avenue, Beech Road",
"stop_lat":"-3.734957"
"stop_long":"-38.514354",
"zone_id": "x22",
"stop_url": "http://data.mycity.example.com/transport/bus/stops/541"
}
]
}
}
GET http://data.mycity.example.com/transport/api/bus/stops/realtime/{stopid}
http://data.mycity.example.com/transport/api/bus/stops/realtime/345
{
"results": {"id":"345",
"uri":"http://data.mycity.example.com/transport/bus/stops/345",
"timestamp":"2016-05-03T13:54:16Z",
"realtime":[
{"route": "http://data.mycity.example.com/transport/bus/stops/routes/5",
"duetime":"2016-05-03T14:00Z"
},
{"route": "http://data.mycity.example.com/transport/bus/stops/routes/8",
"duetime":"2016-05-03T14:03Z"
},
{"route": "http://data.mycity.example.com/transport/bus/stops/routes/12",
"duetime":"2016-05-03T14:05Z"
},
{"route": "http://data.mycity.example.com/transport/bus/stops/routes/9",
"duetime":"2016-05-03T14:06Z"
}
]
}
}