trefu-be (1.1)

Download OpenAPI specification:Download

Packets

Returns a list of packets

query Parameters
offset
integer <int32> >= 0
Default: 0

Number of items to skip before returning the results.

limit
integer <int32> [ 1 .. 100 ]
Default: 20

Maximum number of items to return.

activeAfter
string <date>
activeBefore
string <date>
valid
boolean

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new packet

Request Body schema: application/json
id
integer
activeFrom
string <date>
activeTo
string <date>
valid
boolean
code
required
integer

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "activeFrom": "2019-08-24",
  • "activeTo": "2019-08-24",
  • "valid": true,
  • "code": 0
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "activeFrom": "2019-08-24",
  • "activeTo": "2019-08-24",
  • "valid": true,
  • "code": 0
}

Delete packets

Responses

Response samples

Content type
application/json
{
  • "numOfDeletedItems": 0
}

Get a single packet by ID

path Parameters
id
required
integer >= 1

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "activeFrom": "2019-08-24",
  • "activeTo": "2019-08-24",
  • "valid": true,
  • "code": 0
}

Update a packet by ID

path Parameters
id
required
integer >= 1
Request Body schema: application/json
id
integer
activeFrom
string <date>
activeTo
string <date>
valid
boolean
code
required
integer

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "activeFrom": "2019-08-24",
  • "activeTo": "2019-08-24",
  • "valid": true,
  • "code": 0
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "activeFrom": "2019-08-24",
  • "activeTo": "2019-08-24",
  • "valid": true,
  • "code": 0
}

Delete a packet by ID

path Parameters
id
required
integer >= 1

Responses

Response samples

Content type
application/json
{
  • "code": 500,
  • "message": "Something went wrong"
}

Returns a list of lines

Returns a list of lines connected to specific packet.

path Parameters
id
required
integer >= 1
query Parameters
offset
integer <int32> >= 0
Default: 0

Number of items to skip before returning the results.

limit
integer <int32> [ 1 .. 100 ]
Default: 20

Maximum number of items to return.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Lines

Returns a list of lines

query Parameters
offset
integer <int32> >= 0
Default: 0

Number of items to skip before returning the results.

limit
integer <int32> [ 1 .. 100 ]
Default: 20

Maximum number of items to return.

packetId
integer >= 1

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new line

Request Body schema: application/json
id
integer
packetId
required
integer
shortCode
required
integer
fullCode
required
string

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "packetId": 1,
  • "shortCode": 204,
  • "fullCode": 905201
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "packetId": 1,
  • "shortCode": 204,
  • "fullCode": 905201
}

Delete lines

Responses

Response samples

Content type
application/json
{
  • "numOfDeletedItems": 0
}

Get a single line by ID

path Parameters
id
required
integer >= 1

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "packetId": 1,
  • "shortCode": 204,
  • "fullCode": 905201
}

Update a line by ID

path Parameters
id
required
integer >= 1
Request Body schema: application/json
id
integer
packetId
required
integer
shortCode
required
integer
fullCode
required
string

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "packetId": 1,
  • "shortCode": 204,
  • "fullCode": 905201
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "packetId": 1,
  • "shortCode": 204,
  • "fullCode": 905201
}

Delete a line by ID

path Parameters
id
required
integer >= 1

Responses

Response samples

Content type
application/json
{
  • "code": 500,
  • "message": "Something went wrong"
}

Returns a list of routes

Returns a list of routes connected to specific line.

path Parameters
id
required
integer >= 1
query Parameters
offset
integer <int32> >= 0
Default: 0

Number of items to skip before returning the results.

limit
integer <int32> [ 1 .. 100 ]
Default: 20

Maximum number of items to return.

direction
integer
Enum: 0 1
packetId
integer >= 1

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Routes

Returns a list of routes

query Parameters
offset
integer <int32> >= 0
Default: 0

Number of items to skip before returning the results.

limit
integer <int32> [ 1 .. 100 ]
Default: 20

Maximum number of items to return.

lineId
integer >= 1
direction
integer
Enum: 0 1
packetId
integer >= 1

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new route

Request Body schema: application/json
id
integer
lineId
required
integer
length
required
integer
direction
required
integer
Enum: 0 1

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "lineId": 1,
  • "length": 5,
  • "direction": 0
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "lineId": 1,
  • "length": 5,
  • "direction": 0
}

Delete routes

Responses

Response samples

Content type
application/json
{
  • "numOfDeletedItems": 0
}

Get a single route by ID

path Parameters
id
required
integer >= 1

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "lineId": 1,
  • "length": 5,
  • "direction": 0
}

Update a route by ID

path Parameters
id
required
integer >= 1
Request Body schema: application/json
id
integer
lineId
required
integer
length
required
integer
direction
required
integer
Enum: 0 1

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "lineId": 1,
  • "length": 5,
  • "direction": 0
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "lineId": 1,
  • "length": 5,
  • "direction": 0
}

Delete a route by ID

path Parameters
id
required
integer >= 1

Responses

Response samples

Content type
application/json
{
  • "code": 500,
  • "message": "Something went wrong"
}

Returns a list of connections

Returns a list of connections connected to specific route.

path Parameters
id
required
integer >= 1
query Parameters
offset
integer <int32> >= 0
Default: 0

Number of items to skip before returning the results.

limit
integer <int32> [ 1 .. 100 ]
Default: 20

Maximum number of items to return.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Returns a list of route-stop relations

Returns a list of route-stop relations connected to specific route.

path Parameters
id
required
integer >= 1
query Parameters
offset
integer <int32> >= 0
Default: 0

Number of items to skip before returning the results.

limit
integer <int32> [ 1 .. 100 ]
Default: 20

Maximum number of items to return.

stopId
integer >= 1
index
integer >= 1
served
boolean

Responses

Response samples

Content type
application/json
[
  • {
    }
]

RouteStops

Returns a list of route-stop relations

query Parameters
offset
integer <int32> >= 0
Default: 0

Number of items to skip before returning the results.

limit
integer <int32> [ 1 .. 100 ]
Default: 20

Maximum number of items to return.

stopId
integer >= 1
routeId
integer >= 1
index
integer >= 1
served
boolean

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new route-stop relation

Request Body schema: application/json
routeId
required
integer
stopId
required
integer
index
integer
served
boolean

Responses

Request samples

Content type
application/json
{
  • "routeId": 1,
  • "stopId": 1,
  • "index": 5,
  • "served": true
}

Response samples

Content type
application/json
{
  • "routeId": 1,
  • "stopId": 1,
  • "index": 5,
  • "served": true
}

Delete route-stop relations

Responses

Response samples

Content type
application/json
{
  • "numOfDeletedItems": 0
}

Stops

Returns a list of stops

query Parameters
offset
integer <int32> >= 0
Default: 0

Number of items to skip before returning the results.

limit
integer <int32> [ 1 .. 100 ]
Default: 20

Maximum number of items to return.

packetId
integer >= 1

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new stop

Request Body schema: application/json
id
integer
latitude
required
string
longtitude
required
string
code
required
integer

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "latitude": "49.9390617N",
  • "longtitude": "17.9026936E",
  • "code": 12345
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "latitude": "49.9390617N",
  • "longtitude": "17.9026936E",
  • "code": 12345
}

Delete stops

Responses

Response samples

Content type
application/json
{
  • "numOfDeletedItems": 0
}

Get a single stop by ID

path Parameters
id
required
integer >= 1

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "latitude": "49.9390617N",
  • "longtitude": "17.9026936E",
  • "code": 12345
}

Update a stop by ID

path Parameters
id
required
integer >= 1
Request Body schema: application/json
id
integer
latitude
required
string
longtitude
required
string
code
required
integer

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "latitude": "49.9390617N",
  • "longtitude": "17.9026936E",
  • "code": 12345
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "latitude": "49.9390617N",
  • "longtitude": "17.9026936E",
  • "code": 12345
}

Delete a stop by ID

path Parameters
id
required
integer >= 1

Responses

Response samples

Content type
application/json
{
  • "code": 500,
  • "message": "Something went wrong"
}

Connections

Returns a list of connections

query Parameters
offset
integer <int32> >= 0
Default: 0

Number of items to skip before returning the results.

limit
integer <int32> [ 1 .. 100 ]
Default: 20

Maximum number of items to return.

packetId
integer >= 1
routeId
integer >= 1

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new connection

Request Body schema: application/json
id
integer
routeId
required
integer
number
required
integer

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "routeId": 1,
  • "number": 22
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "routeId": 1,
  • "number": 22
}

Delete connections

Responses

Response samples

Content type
application/json
{
  • "numOfDeletedItems": 0
}

Get a single connection by ID

path Parameters
id
required
integer >= 1

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "routeId": 1,
  • "number": 22
}

Update a connection by ID

path Parameters
id
required
integer >= 1
Request Body schema: application/json
id
integer
routeId
required
integer
number
required
integer

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "routeId": 1,
  • "number": 22
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "routeId": 1,
  • "number": 22
}

Delete a connection by ID

path Parameters
id
required
integer >= 1

Responses

Response samples

Content type
application/json
{
  • "code": 500,
  • "message": "Something went wrong"
}

Returns a list of departures

Returns a list of departures connected to specific connection.

path Parameters
id
required
integer >= 1
query Parameters
offset
integer <int32> >= 0
Default: 0

Number of items to skip before returning the results.

limit
integer <int32> [ 1 .. 100 ]
Default: 20

Maximum number of items to return.

index
integer >= 1
after
string <time>
before
string <time>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Returns a list of rules

Returns a list of rules connected to specific connection.

path Parameters
id
required
integer >= 1
query Parameters
offset
integer <int32> >= 0
Default: 0

Number of items to skip before returning the results.

limit
integer <int32> [ 1 .. 100 ]
Default: 20

Maximum number of items to return.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

ConnectionRules

Returns a list of connection-rule relations

query Parameters
offset
integer <int32> >= 0
Default: 0

Number of items to skip before returning the results.

limit
integer <int32> [ 1 .. 100 ]
Default: 20

Maximum number of items to return.

connectionId
integer >= 1
ruleId
integer >= 1

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new connection-rule relation

Request Body schema: application/json
connectionId
required
integer
ruleId
required
integer

Responses

Request samples

Content type
application/json
{
  • "connectionId": 1,
  • "ruleId": 1
}

Response samples

Content type
application/json
{
  • "connectionId": 1,
  • "ruleId": 1
}

Delete connection-rule relations

Responses

Response samples

Content type
application/json
{
  • "numOfDeletedItems": 0
}

Departures

Returns a list of departures

query Parameters
offset
integer <int32> >= 0
Default: 0

Number of items to skip before returning the results.

limit
integer <int32> [ 1 .. 100 ]
Default: 20

Maximum number of items to return.

connectionId
integer >= 1
index
integer >= 1
after
string <time>
before
string <time>
packetId
integer >= 1

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new departure

Request Body schema: application/json
id
integer
connectionId
required
integer
time
required
integer

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "connectionId": 1,
  • "time": 0
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "connectionId": 1,
  • "time": 0
}

Delete departures

Responses

Response samples

Content type
application/json
{
  • "numOfDeletedItems": 0
}

Get a single departure by ID

path Parameters
id
required
integer >= 1

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "connectionId": 1,
  • "time": 0
}

Update a departure by ID

path Parameters
id
required
integer >= 1
Request Body schema: application/json
id
integer
connectionId
required
integer
time
required
integer

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "connectionId": 1,
  • "time": 0
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "connectionId": 1,
  • "time": 0
}

Delete a departure by ID

path Parameters
id
required
integer >= 1

Responses

Response samples

Content type
application/json
{
  • "code": 500,
  • "message": "Something went wrong"
}

Rules

Returns a list of rules

query Parameters
offset
integer <int32> >= 0
Default: 0

Number of items to skip before returning the results.

limit
integer <int32> [ 1 .. 100 ]
Default: 20

Maximum number of items to return.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new rule

Request Body schema: application/json
id
integer
description
string

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "description": "Is valid during weekends"
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "description": "Is valid during weekends"
}

Delete rules

Responses

Response samples

Content type
application/json
{
  • "numOfDeletedItems": 0
}

Get a single rule by ID

path Parameters
id
required
integer >= 1

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "description": "Is valid during weekends"
}

Update a rule by ID

path Parameters
id
required
integer >= 1
Request Body schema: application/json
id
integer
description
string

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "description": "Is valid during weekends"
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "description": "Is valid during weekends"
}

Delete a rule by ID

path Parameters
id
required
integer >= 1

Responses

Response samples

Content type
application/json
{
  • "code": 500,
  • "message": "Something went wrong"
}