SmartGare
API referenceEndpoints

Search bay assignments

Returns the commitments matching the filter, page by page, in the order coaches stand at the bay. A period selects every commitment whose occupancy window overlaps it, so one running from before the period into it is included. **Required permission:** `traffic.assignment:read`

GET/traffic/v1/bay-assignments

Returns the commitments matching the filter, page by page, in the order coaches stand at the bay. A period selects every commitment whose occupancy window overlaps it, so one running from before the period into it is included.

Required permission: traffic.assignment:read

AuthorizationBearer <token>

In: header

Query Parameters

bay_id?string

The bay whose commitments are read.

scheduled_departure_id?string

The departure whose commitments are read.

from?string

Start of the period, inclusive.

Formatdate-time
to?string

End of the period, exclusive.

Formatdate-time
page?integer

Zero-based page index.

Formatint32
Range0 <= value
size?integer

Page size, at most 200.

Formatint32
Range0 <= value <= 200

Response Body

*/*

curl -X GET "https://example.com/traffic/v1/bay-assignments"
{  "data": [    {      "assigned_at": "2019-08-24T14:15:22Z",      "assigned_by": "string",      "bay_id": "string",      "eligibility_status": "PENDING_VEHICLE",      "family_override_reason": "string",      "id": "string",      "length_unknown_reason": "string",      "open_conflict_ids": [        "string"      ],      "originated_from": "OPERATOR",      "planned_from": "2019-08-24T14:15:22Z",      "planned_until": "2019-08-24T14:15:22Z",      "pre_assigned": true,      "released_at": "2019-08-24T14:15:22Z",      "released_by": "string",      "released_reason": "DEPARTURE_CANCELLED",      "rule_version_id": "string",      "scheduled_departure_id": "string",      "status": "CONFIRMED",      "superseded_at": "2019-08-24T14:15:22Z",      "superseded_by": "string",      "superseded_reason": "CONFLICT_RESOLUTION"    }  ],  "page": 0,  "size": 0,  "total": 0}