SmartGare
API referenceEndpoints

Search bays

Returns bays matching optional text, station area and status filters. **Required permission:** `referential.bay:read`

GET/referential/v1/bays

Returns bays matching optional text, station area and status filters.

Required permission: referential.bay:read

AuthorizationBearer <token>

In: header

Query Parameters

search?string

Matches part of a bay code.

station_area_id.value?string
status?string

Restrict to one lifecycle status; defaults to ACTIVE.

Value in

  • "ACTIVE"
  • "DECOMMISSIONED"
  • "ACTIVE"
  • "DECOMMISSIONED"
sort?string

Result ordering.

Value in

  • "codeAsc"
  • "codeDesc"
  • "newest"
  • "oldest"
  • "codeAsc"
  • "codeDesc"
  • "newest"
  • "oldest"
  • "codeAsc"
  • "codeDesc"
  • "newest"
  • "oldest"
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/referential/v1/bays"
{  "data": [    {      "code": "string",      "created_at": "2019-08-24T14:15:22Z",      "family": "string",      "height_m": 0,      "id": "string",      "length_m": 0,      "max_coach_length_m": 0,      "position": 0,      "sector": "string",      "spare": true,      "station_area_id": "string",      "status": "string",      "updated_at": "2019-08-24T14:15:22Z",      "use": "string",      "zone_id": "string"    }  ],  "page": 0,  "size": 0,  "total": 0}