Schedule

A schedule.

Create a schedule

Create a new schedule.

SecurityJWT
Request
Request Body schema: application/json

A JSON object containing schedule information.

name
required
string <= 1000 characters

The name of the new schedule.

start_time_tolerance_yellow
required
integer [ 0 .. 365 ]

The start time tolerance for a yellow traffic light of the new schedule.

The value must be smaller or equal to the start time tolerance for a red traffic light.

start_time_tolerance_red
required
integer [ 0 .. 365 ]

The start time tolerance for a red traffic light of the new schedule.

The value must be greater or equal to the start time tolerance for a yellow traffic light.

start_time_tolerance_started
integer or null [ 0 .. 365 ]
Default: 7

The start time tolerance for a started traffic light of the new schedule.

start_time_score_green
required
integer [ 0 .. 100 ]

The start time score value for a green traffic light of the new schedule.

The value must be greater or equal to the start time score for a yellow traffic light.

start_time_score_yellow
required
integer [ 0 .. 100 ]

The start time score value for a yellow traffic light of the new schedule.

The value must be smaller or equal to the start time score for a green and greater or equal to the start time score for a red traffic light.

start_time_score_red
required
integer [ 0 .. 100 ]

The start time score value for a red traffic light of the new schedule.

The value must be smaller or equal to the start time score for a yellow traffic light.

start_time_threshold_yellow
required
integer [ 0 .. 100 ]

The start time percentage threshold value for a yellow traffic light of the new schedule.

The value must be greater or equal to the start time threshold for a red traffic light.

start_time_threshold_red
required
integer [ 0 .. 100 ]

The start time percentage threshold value for a red traffic light of the new schedule.

The value must be smaller or equal to the start time threshold for a yellow traffic light.

end_time_tolerance_yellow
required
integer [ 0 .. 365 ]

The end time tolerance for a yellow traffic light of the new schedule.

The value must be smaller or equal to the end time tolerance for a red traffic light.

end_time_tolerance_red
required
integer [ 0 .. 365 ]

The end time tolerance for a red traffic light of the new schedule.

The value must be greater or equal to the end time tolerance for a yellow traffic light.

end_time_tolerance_finished
integer or null [ 0 .. 365 ]
Default: 7

The end time tolerance for a finished traffic light of the new schedule.

end_time_score_green
required
integer [ 0 .. 100 ]

The end time score value for a green traffic light of the new schedule.

The value must be greater or equal to the end time score for a yellow traffic light.

end_time_score_yellow
required
integer [ 0 .. 100 ]

The end time score value for a yellow traffic light of the new schedule.

The value must be smaller or equal to the end time score for a green and greater or equal to the end time score for a red traffic light.

end_time_score_red
required
integer [ 0 .. 100 ]

The end time score value for a red traffic light of the new schedule.

The value must be smaller or equal to the end time score for a yellow traffic light.

end_time_threshold_yellow
required
integer [ 0 .. 100 ]

The end time percentage threshold value for a yellow traffic light of the new schedule.

The value must be greater or equal to the end time threshold for a red traffic light.

end_time_threshold_red
required
integer [ 0 .. 100 ]

The end time percentage threshold value for a red traffic light of the new schedule.

The value must be smaller or equal to the end time threshold for a yellow traffic light.

Responses
201

Successful operation

422

Unprocessable Content

post/schedule
Request samples
application/json
{
  • "name": "Airborne",
  • "start_time_tolerance_yellow": 3,
  • "start_time_tolerance_red": 7,
  • "start_time_score_green": 3,
  • "start_time_score_yellow": 1,
  • "start_time_score_red": 0,
  • "start_time_threshold_yellow": 90,
  • "start_time_threshold_red": 65,
  • "end_time_tolerance_yellow": 3,
  • "end_time_tolerance_red": 7,
  • "end_time_score_green": 3,
  • "end_time_score_yellow": 1,
  • "end_time_score_red": 0,
  • "end_time_threshold_yellow": 90,
  • "end_time_threshold_red": 65
}
Response samples
application/json
{
  • "success": true,
  • "hash": "e03429dc94d99e8beea4443409c88a7c524e5c29",
  • "data": {
    },
  • "timestamp": 1657891183010
}

Get all schedules

Get all schedules of the authenticated hub.

SecurityJWT
Responses
200

Successful operation

401

Unauthorized

get/schedule
Request samples
Response samples
application/json
{
  • "success": true,
  • "hash": "e46d4f508143daf4869b678c2e96a6f234ee89cd",
  • "data": [
    ],
  • "timestamp": 1657893664305
}

Get a schedule

Get a schedule.

SecurityJWT
Request
path Parameters
schedule
required
string or integer

The id/hash of the schedule.

Responses
200

Successful operation

404

Not Found

get/schedule/{schedule}
Request samples
Response samples
application/json
{
  • "success": true,
  • "hash": "fb35225599e2db01ecf7b627d79de02f50012156",
  • "data": {
    },
  • "timestamp": 1657895194580
}

Update a schedule

Update a schedule

SecurityJWT
Request
path Parameters
schedule
required
string or integer

The id/hash of the schedule.

Request Body schema: application/json

A JSON object containing schedule information

name
string <= 1000 characters

The name of the schedule.

start_time_tolerance_yellow
integer [ 0 .. 365 ]

The start time tolerance for a yellow traffic light of the schedule.

The value must be smaller or equal to the start time tolerance for a red traffic light.

start_time_tolerance_red
integer [ 0 .. 365 ]

The start time tolerance for a red traffic light of the schedule.

The value must be greater or equal to the start time tolerance for a yellow traffic light.

start_time_tolerance_started
integer or null [ 0 .. 365 ]

The start time tolerance for a started traffic light of the schedule.

start_time_score_green
integer [ 0 .. 100 ]

The start time score value for a green traffic light of the schedule.

The value must be greater or equal to the start time score for a yellow traffic light.

start_time_score_yellow
integer [ 0 .. 100 ]

The start time score value for a yellow traffic light of the schedule.

The value must be smaller or equal to the start time score for a green and greater or equal to the start time score for a red traffic light.

start_time_score_red
integer [ 0 .. 100 ]

The start time score value for a red traffic light of the schedule.

The value must be smaller or equal to the start time score for a yellow traffic light.

start_time_threshold_yellow
integer [ 0 .. 100 ]

The start time percentage threshold value for a yellow traffic light of the schedule.

The value must be greater or equal to the start time threshold for a red traffic light.

start_time_threshold_red
integer [ 0 .. 100 ]

The start time percentage threshold value for a red traffic light of the schedule.

The value must be smaller or equal to the start time threshold for a yellow traffic light.

end_time_tolerance_yellow
integer [ 0 .. 365 ]

The end time tolerance for a yellow traffic light of the schedule.

The value must be smaller or equal to the end time tolerance for a red traffic light.

end_time_tolerance_red
integer [ 0 .. 365 ]

The end time tolerance for a red traffic light of the schedule.

The value must be greater or equal to the end time tolerance for a yellow traffic light.

end_time_tolerance_finished
integer or null [ 0 .. 365 ]

The end time tolerance for a finished traffic light of the schedule.

end_time_score_green
integer [ 0 .. 100 ]

The end time score value for a green traffic light of the schedule.

The value must be greater or equal to the end time score for a yellow traffic light.

end_time_score_yellow
integer [ 0 .. 100 ]

The end time score value for a yellow traffic light of the schedule.

The value must be smaller or equal to the end time score for a green and greater or equal to the end time score for a red traffic light.

end_time_score_red
integer [ 0 .. 100 ]

The end time score value for a red traffic light of the schedule.

The value must be smaller or equal to the end time score for a yellow traffic light.

end_time_threshold_yellow
integer [ 0 .. 100 ]

The end time percentage threshold value for a yellow traffic light of the schedule.

The value must be greater or equal to the end time threshold for a red traffic light.

end_time_threshold_red
integer [ 0 .. 100 ]

The end time percentage threshold value for a red traffic light of the schedule.

The value must be smaller or equal to the end time threshold for a yellow traffic light.

Responses
200

Successful operation

404

Not Found

422

Unprocessable Content

put/schedule/{schedule}
Request samples
application/json
{
  • "name": "Schedule for Airborne",
  • "start_time_tolerance_yellow": 2,
  • "start_time_tolerance_red": 5,
  • "start_time_tolerance_started": 5,
  • "end_time_threshold_yellow": 95,
  • "end_time_threshold_red": 85
}
Response samples
application/json
{
  • "success": true,
  • "hash": "44b86a23a2bd02409597b2ddc32f0b6d64081845",
  • "data": {
    },
  • "timestamp": 1657895712073
}

Delete a schedule

Delete a schedule

SecurityJWT
Request
path Parameters
schedule
required
string or integer

The id/hash of the schedule.

Responses
200

Successful operation

404

Not Found

delete/schedule/{schedule}
Request samples
Response samples
application/json
{
  • "success": true,
  • "hash": "8739602554c7f3241958e3cc9b57fdecb474d508",
  • "data": [ ],
  • "timestamp": 1657896117950
}

Copy a schedule

Copy a schedule.

SecurityJWT
Request
path Parameters
schedule
required
string or integer

The id/hash of the schedule.

Responses
200

Successful operation

404

Not Found

post/schedule/{schedule}/copy
Request samples
Response samples
application/json
{
  • "success": true,
  • "hash": "8739602554c7f3241958e3cc9b57fdecb474d508",
  • "data": [ ],
  • "timestamp": 1657896446432
}

Restore a schedule

Restore a schedule.

SecurityJWT
Request
path Parameters
schedule
required
string or integer

The id/hash of the schedule.

Responses
200

Successful operation

404

Not Found

put/schedule/{schedule}/restore
Request samples
Response samples
application/json
{
  • "success": true,
  • "hash": "8739602554c7f3241958e3cc9b57fdecb474d508",
  • "data": [ ],
  • "timestamp": 1657896419126
}