SmartGare
API referenceEndpoints

Search bay occupancies

Returns the occupancies of a bay or of a coach, newest first, page by page, each with its coach. With open=true, only the one standing now: an empty page means the bay is free, or the coach stands at no bay. **Required permission:** `traffic.assignment:read`

GET/traffic/v1/bay-occupancies

Returns the occupancies of a bay or of a coach, newest first, page by page, each with its coach. With open=true, only the one standing now: an empty page means the bay is free, or the coach stands at no bay.

Required permission: traffic.assignment:read

AuthorizationBearer <token>

In: header

Query Parameters

bay_id?string

The bay whose occupancies are read. A bay or a coach is required.

vehicle_id?string

The coach whose occupancies are read. A bay or a coach is required.

open?boolean

Only the occupancy standing now when true, only ended ones when false.

page?integer

Zero-based page index, at most 10000.

Formatint32
size?integer

Page size, at most 200; 50 when absent.

Formatint32

Response Body

*/*

curl -X GET "https://example.com/traffic/v1/bay-occupancies"
{  "data": [    {      "bay_assignment_id": "string",      "bay_id": "string",      "correction_status": "NONE",      "freed_at": "2019-08-24T14:15:22Z",      "freed_by": "string",      "freed_source": "string",      "id": "string",      "occupied_at": "2019-08-24T14:15:22Z",      "occupied_by": "string",      "occupied_source": "string",      "vehicle_id": "string"    }  ],  "page": 0,  "size": 0,  "total": 0}