Parkings

Get parking state for all parkings

Returns the current occupancy state and count of all parkings and parking zones. See parking and parking zones for more info.

URL parameters

  • hostIp: ip address of the API host.

GET https://{hostIp}:7081/zonecounting/state

Example request:

GET /zonecounting/state HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...

Example response:

  HTTP/1.1 200 OK
  Content-Type: application/json; charset=utf-8

  {
    "Parkings": {
        "Parking0": {
        "OccupancyState": 0,
        "Capacity": 150,
        "Occupancy": 2,
        "Zones": {
            "Zone0": {
                "OccupancyState": 0,
                "Capacity": 50,
                "Occupancy": 2
            },
            "Zone1": {
                "OccupancyState": 0,
                "Capacity": 50,
                "Occupancy": 0
        },
        "Zone2": {
            "OccupancyState": 0,
            "Capacity": 50,
            "Occupancy": 0
            }
        }
    }}
}
Status Codes:
Response Headers:
  • Content-Type – defines the serialization format for the response body (this depends on the Accept header of the request)

Response JSON Object:

Get parking state for a specific parking

Returns the current occupancy state and count of a specific parking and its parking zones. See parking and parking zones for more info.

URL parameters

  • hostIp: ip address of the API host.

  • parkingName: name of the parking as defined in ALIOT

GET https://{hostIp}:7081/zonecounting/parking/{parkingName}/state

Example request:

GET /zonecounting/parking/Parking0/state HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...

Example response:

  HTTP/1.1 200 OK
  Content-Type: application/json; charset=utf-8

  {
    "Parking0": {
        "OccupancyState": 0,
        "Capacity": 150,
        "Occupancy": 0,
        "Zones": {
            "Zone0": {
                "OccupancyState": 0,
                "Capacity": 50,
                "Occupancy": 0
            },
            "Zone1": {
                "OccupancyState": 0,
                "Capacity": 50,
                "Occupancy": 0
            },
            "Zone2": {
                "OccupancyState": 0,
                "Capacity": 50,
                "Occupancy": 0
            }
     }}
}
Status Codes:
Response Headers:
  • Content-Type – defines the serialization format for the response body (this depends on the Accept header of the request)

Response JSON Object:

Reset the occupancy of a specific parking

Resets the occupancy of a parking. This will reset the occupancy of parking zones of the parking. See parking and parking zones for more info.

URL parameters

  • hostIp: ip address of the API host.

  • parkingName: name of the parking as defined in ALIOT

PUT https://{hostIp}:7081/zonecounting/parking/{parkingName}/reset-occupancy

Example request:

PUT /zonecounting/parking/Parking0/reset-occupancy HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Status Codes:
Response Headers:
  • Content-Type – defines the serialization format for the response body (this depends on the Accept header of the request)

Update the occupancy state of a specific parking

Updates the occupancy state of a parking. This will update the occupancy state of the parking zones of the parking and thus the parking itself. See parking and parking zones for more info.

URL parameters

  • hostIp: ip address of the API host.

  • parkingName: name of the parking as defined in ALIOT

  • occupancyState: (integer) See occupancy state for possible values.

PUT https://{hostIp}:7081/zonecounting/parking/{parkingName}/update-state?newState={occupancyState}

Example request:

PUT /zonecounting/parking/Parking0/update-state?newState=2 HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Status Codes:
Response Headers:
  • Content-Type – defines the serialization format for the response body (this depends on the Accept header of the request)

Get parking logs for all parkings

Returns ALL the parking logs created in a certain time period. see parking logs for more info.

URL parameters

  • hostIp: ip address of the API host.

  • fromUtc: earliest utc time of logs that need to be retrieved

  • toUtc : latest utc time of logs that need to be retrieved

GET https://{hostIp}:7081/zonecounting/logs

Example request:

GET /zonecounting/logs?fromUtc=2024-03-03T11%3A19%3A59.000Z&toUtc=2024-03-06T12%3A19%3A59.000Z HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
   "Logs": [{
      "Id": "fa91f529-2529-4b87-b98a-3dcbc810514b",
      "ParkingName": "Parking0",
      "TimeCreatedUtc": "2024-03-04T14:08:08.9701182Z",
      "OccupancyState": 0,
      "Occupancy": 48,
      "ThresholdFree": 2,
      "Capacity": 150
   },
   {
      "Id": "dfb65650-2c1c-435b-a179-871e85f5edb1",
      "ParkingName": "Parking0",
      "TimeCreatedUtc": "2024-03-05T10:41:25.2041251Z",
      "OccupancyState": 0,
      "Occupancy": 49,
      "ThresholdFree": 0,
      "Capacity": 50
   }]
}
Status Codes:
Response Headers:
  • Content-Type – defines the serialization format for the response body (this depends on the Accept header of the request)

Response JSON Object:
  • logs (array) – array with logs. See parking logs for more info.

Get parking logs for a specific parking

Returns the parking logs for a parking created in a certain time period. see parking logs for more info

URL parameters

  • hostIp: ip address of the API host.

  • parkingName: name of the parking as defined in ALIOT

  • fromUtc: earliest utc time of logs that need to be retrieved

  • toUtc : latest utc time of logs that need to be retrieved

GET https://{hostIp}:7081/zonecounting/parkings/{parkingName}/logs

Example request:

GET /zonecounting/parking/Parking0/logs?fromUtc=2024-03-03T11%3A19%3A59.000Z&toUtc=2024-03-06T12%3A19%3A59.000Z HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
"Logs": [{
  "Id": "fa91f529-2529-4b87-b98a-3dcbc810514b",
  "ParkingName": "Parking0",
  "TimeCreatedUtc": "2024-03-04T14:08:08.9701182Z",
  "OccupancyState": 0,
  "Occupancy": 48,
  "ThresholdFree": 2,
  "Capacity": 150
  },
  {
  "Id": "dfb65650-2c1c-435b-a179-871e85f5edb1",
  "ParkingName": "Parking0",
  "TimeCreatedUtc": "2024-03-05T10:41:25.2041251Z",
  "OccupancyState": 0,
  "Occupancy": 49,
  "ThresholdFree": 0,
  "Capacity": 50
  }]
}
Status Codes:
Response Headers:
  • Content-Type – defines the serialization format for the response body (this depends on the Accept header of the request)

Response JSON Object:
  • logs (array) – array with logs. See parking logs for more info.