API documentation

Get Parking requests for a certain parking

GET /api/car_driver/requests

Include access_token in HTTP header:

Authorization: Bearer 09ba487fc3df...

Description

This web service returns all of the un-responded parking requests from a parking if the current user is the parking owner on that certain parking

Request Parameters

Parameter name Parameter type Description
secured_parking_id int id of the secured parking on which we want to get requests

Response

Status Code: 200 if OK

{
  "requests": [
    {
      "request": {
        "id": 2,
        "secured_parking_id": 1,
        "name": "Secured P 1",
        "description": null,
        "start_time": "2015-07-27T12:00:00Z",
        "end_time": "2015-07-27T14:00:00Z",
        "email": "colten-brekke@grady.org"
      }
    },
    ...
  ]
}
Parameter name Parameter type Description
requests list of objects list of request objects
request object object containing all the info about a request
id int the id of the request
secured_parking_id int id of the parking
name string name of the parking
description string Description of the request
start_time DateTime the start time from which the access command will work
end_time DateTime the end time from which the access command will work
{
requests:[]
}

Status Code: 400 if the secured_parking_id param is missing

Status Code: 404 if the secured_parking with secured_parking_id doesn't exist

Status Code: 401 if request not ok or if the current user does not have parking owner rights on this parking