Contents:
This call retrieves a single location from an infrastructure dataset.
Data returned is licensed as per the respective owners.
Example which retrieves an infrastructure location record.
https://api.cyclestreets.net/v2/infrastructure.location?dataset=tflcid&id=ABC123
Result:
{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "_type": "cycle_parking", "type": "sheffield", "capacity": 2, "osm_id": 476102903, "images": [], "iconUrl": "https://www.example.com/images/icons/point.svg" }, "geometry": { "type": "Point", "coordinates": [ -0.118422, 51.509905 ] } } ] }
Example which retrieves an infrastructure location record, with all versions (revisions). Note that each feature has an id field added, representing the version (revision) metadata.
https://api.cyclestreets.net/v2/infrastructure.location?dataset=tflcid&id=ABC123&versions=true
Result:
{ "type": "FeatureCollection", "features": [ { "type": "Feature", "id": { "version": 1, "surveydate": "2017-06-26", "status": "initial" }, "properties": { "_type": "cycle_parking", "type": "sheffield", "capacity": 2, "osm_id": 476102903, "images": [], "iconUrl": "https://www.example.com/images/icons/point.svg" }, "geometry": { "type": "Point", "coordinates": [ -0.118422, 51.509905 ] } }, { "type": "Feature", "id": { "version": 2, "surveydate": "2019-05-28", "status": "changed" }, "properties": { "_type": "cycle_parking", "type": "sheffield", "capacity": 10, "covered": "yes", "osm_id": 476102903, "images": [], "iconUrl": "https://www.example.com/images/icons/point.svg" }, "geometry": { "type": "Point", "coordinates": [ -0.118422, 51.509905 ] } } ] }
JSON structure as per example above.
JSON object containing an error key and a text string.
Example error (text string may vary):
{ "error": "There is no such record." }