SmartNottingham API documentation version v1
http://localhost/parking-api/v1/
/parking_id
Get corresponding id for each car parks.
Access to ids for each car parks.
The response will provide a list of id for corresponding car parks, which can be used in other requests to this API.
get /parking_id
/{time}/all
Get occupancy data for all car parks in a time interval.
User can specify specific time interval for occupancy data.
The time interval is in format of an hour for specific date.
Occupancy data for all car parks at requested interval will be returned.
get /{time}/all
User can specify specific time interval for occupancy data.
The time interval is in format of an hour for specific date.
Occupancy data for all car parks at requested interval will be returned.
URI Parameters
- time: required(string)
Specific time interval, in format of an hour for specific date (yyyy-MM-dd HH).
Example:
2020-01-06%2015
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"@id": "12233069",
"definition": {
"parkingRecord": {
"@xmlns": "http://datex2.eu/schema/2/2_0",
"@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
"parkingRecord": {
"@xsi:type": "UrbanParkingSite",
"@id": "12233069",
"@version": "2.5",
"parkingName": {
"values": {
"value": {
"@lang": "en",
"#text": "PHNXPR: Phoenix Park and Ride"
}
}
},
"parkingDescription": {
"values": {
"value": {
"@lang": "en",
"#text": "Park and Ride (OMU-GPRS)"
}
}
},
"parkingRecordVersionTime": "2020-01-06T15:11:15.000Z",
"parkingNumberOfSpaces": "657",
"parkingLocation": {
"@xsi:type": "Point",
"locationForDisplay": {
"latitude": "52.987972",
"longitude": "-1.2096462"
}
},
"parkingThresholds": {
"almostFullDecreasing": "80",
"almostFullIncreasing": "85",
"fullDecreasing": "90",
"fullIncreasing": "95"
},
"urbanParkingSiteType": "offStreetParking"
}
}
},
"status": {
"parkingRecord": {
"@xmlns": "http://datex2.eu/schema/2/2_0",
"@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
"parkingRecordStatus": {
"@xsi:type": "ParkingSiteStatus",
"parkingRecordReference": {
"@targetClass": "ParkingRecord",
"@id": "12233069",
"@version": "2.5"
},
"parkingStatusOriginTime": "2020-01-06T14:57:31.000Z",
"parkingOccupancy": {
"parkingNumberOfOccupiedSpaces": "589",
"parkingOccupancy": "90.0",
"vehicleCountAndRate": {
"measurementTimeDefault": "2020-01-06T15:08:03.000Z",
"vehicleRate": {
"measurementOrCalculationTime": "2020-01-06T15:08:03.000Z",
"fillRate": {
"vehicleFlowRate": "0"
},
"exitRate": {
"vehicleFlowRate": "1"
}
}
}
},
"parkingSiteStatus": "almostFull",
"parkingSiteOpeningStatus": "open"
}
}
}
}
/{time}/{id}
Get occupancy data for a specified car park in a time interval.
User can specify specific time interval and car park for occupancy data.
The time interval is in format of an hour for specific date.
Occupancy data for specific car park at requested interval will be returned.
get /{time}/{id}
User can specify specific time interval and car park for occupancy data.
The time interval is in format of an hour for specific date.
Occupancy data for specific car park at requested interval will be returned.
URI Parameters
- time: required(string)
Specific time interval, in format of an hour for specific date (yyyy-MM-dd HH).
Example:
2020-01-06%2015
- id: required(string)
Unique number assigned to specific car park.
Example:
0
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"@id": "12233069",
"definition": {
"parkingRecord": {
"@xmlns": "http://datex2.eu/schema/2/2_0",
"@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
"parkingRecord": {
"@xsi:type": "UrbanParkingSite",
"@id": "12233069",
"@version": "2.5",
"parkingName": {
"values": {
"value": {
"@lang": "en",
"#text": "PHNXPR: Phoenix Park and Ride"
}
}
},
"parkingDescription": {
"values": {
"value": {
"@lang": "en",
"#text": "Park and Ride (OMU-GPRS)"
}
}
},
"parkingRecordVersionTime": "2020-01-06T15:11:15.000Z",
"parkingNumberOfSpaces": "657",
"parkingLocation": {
"@xsi:type": "Point",
"locationForDisplay": {
"latitude": "52.987972",
"longitude": "-1.2096462"
}
},
"parkingThresholds": {
"almostFullDecreasing": "80",
"almostFullIncreasing": "85",
"fullDecreasing": "90",
"fullIncreasing": "95"
},
"urbanParkingSiteType": "offStreetParking"
}
}
},
"status": {
"parkingRecord": {
"@xmlns": "http://datex2.eu/schema/2/2_0",
"@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
"parkingRecordStatus": {
"@xsi:type": "ParkingSiteStatus",
"parkingRecordReference": {
"@targetClass": "ParkingRecord",
"@id": "12233069",
"@version": "2.5"
},
"parkingStatusOriginTime": "2020-01-06T14:57:31.000Z",
"parkingOccupancy": {
"parkingNumberOfOccupiedSpaces": "589",
"parkingOccupancy": "90.0",
"vehicleCountAndRate": {
"measurementTimeDefault": "2020-01-06T15:08:03.000Z",
"vehicleRate": {
"measurementOrCalculationTime": "2020-01-06T15:08:03.000Z",
"fillRate": {
"vehicleFlowRate": "0"
},
"exitRate": {
"vehicleFlowRate": "1"
}
}
}
},
"parkingSiteStatus": "almostFull",
"parkingSiteOpeningStatus": "open"
}
}
}
}