SmartGare
API referenceEndpoints

Read whose turn it is on a line

The line's authorizations in the order of its source document, the one whose turn is next — an authorization whose turn was given back first — and the latest turns taken, given back and used up, and the authorizations operators passed over with their reasons. Naming the next turn records nothing. **Required permission:** `traffic.assignment:read`

GET/traffic/v1/lines/{lineId}/rotation

The line's authorizations in the order of its source document, the one whose turn is next — an authorization whose turn was given back first — and the latest turns taken, given back and used up, and the authorizations operators passed over with their reasons. Naming the next turn records nothing.

Required permission: traffic.assignment:read

AuthorizationBearer <token>

In: header

Query Parameters

on*string
Formatdate

Response Body

*/*

curl -X GET "https://example.com/traffic/v1/lines/{lineId}/rotation?on=2019-08-24"
{  "line_id": "string",  "next": "string",  "on": "2019-08-24",  "order": [    "string"  ],  "skips": [    {      "departure_id": "string",      "line_id": "string",      "reason": "string",      "skipped_at": "2019-08-24T14:15:22Z",      "skipped_authorization_id": "string",      "skipped_by": "string",      "taken_by_authorization_id": "string",      "tie_break_rule_version_id": "string"    }  ],  "turns": [    {      "authorization_id": "string",      "departure_id": "string",      "id": "string",      "line_id": "string",      "service_date": "2019-08-24",      "settled_at": "2019-08-24T14:15:22Z",      "settled_by": "string",      "settled_cause": "string",      "status": "TAKEN",      "taken_at": "2019-08-24T14:15:22Z",      "taken_by": "string",      "tie_break_rule_version_id": "string"    }  ]}