Runsheet Broadcast Planning Service API (1.0.0)

Perform CRUD actions for runsheet broadcast plannings.

Authentication

bearerAuth

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

Return the list of plannings

Return the list of plannings

Authorizations:
query Parameters
page
integer <int64> >= 1
Default: 1
per_page
integer <int64> >= 1
Default: 200
order
string
Default: "desc"
Enum: "asc" "desc"

The direction of the sort

range_start_created_at
string <date-time>

Range start (inclusive) of Created At

range_end_created_at
string <date-time>

Range end (inclusive) of Created At

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "plannings": [
    ]
}

Create a planning

Create a planning

Authorizations:
Request Body schema: application/json
name
string

Responses

Request samples

Content type
application/json
{
  • "name": "My Runsheet Broadcast Planning"
}

Response samples

Content type
application/json
{
  • "server_time": "2019-08-24T14:15:22Z",
  • "id": "000000000000000000000000",
  • "name": "My Runsheet Broadcast Planning",
  • "runsheets": [
    ],
  • "drivers": [
    ],
  • "total_runsheets": 1,
  • "total_drivers": 1,
  • "last_executed_at_client_time_utc": "2019-08-24T14:15:22Z",
  • "last_executed_at_client_timezone": "Asia/Singapore",
  • "last_executed_at_server_time": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "version_seq": 0,
  • "version_rev": "0-OqQ6QSWl"
}

Read an existing planning

Read an existing planning

Authorizations:
path Parameters
planningID
required
string

ID of the planning to be read

Responses

Response samples

Content type
application/json
{
  • "server_time": "2019-08-24T14:15:22Z",
  • "id": "000000000000000000000000",
  • "name": "My Runsheet Broadcast Planning",
  • "runsheets": [
    ],
  • "drivers": [
    ],
  • "total_runsheets": 1,
  • "total_drivers": 1,
  • "last_executed_at_client_time_utc": "2019-08-24T14:15:22Z",
  • "last_executed_at_client_timezone": "Asia/Singapore",
  • "last_executed_at_server_time": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "version_seq": 0,
  • "version_rev": "0-OqQ6QSWl"
}

Update planning

Update planning

Authorizations:
path Parameters
planningID
required
string

ID of the planning to be update

Request Body schema: application/json
name
string
version_rev
string

Responses

Request samples

Content type
application/json
{
  • "name": "My Runsheet Broadcast Planning",
  • "version_rev": "9-RnVQTn5z"
}

Response samples

Content type
application/json
{
  • "server_time": "2019-08-24T14:15:22Z",
  • "id": "000000000000000000000000",
  • "name": "My Runsheet Broadcast Planning",
  • "runsheets": [
    ],
  • "drivers": [
    ],
  • "total_runsheets": 1,
  • "total_drivers": 1,
  • "last_executed_at_client_time_utc": "2019-08-24T14:15:22Z",
  • "last_executed_at_client_timezone": "Asia/Singapore",
  • "last_executed_at_server_time": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "version_seq": 0,
  • "version_rev": "0-OqQ6QSWl"
}

Add a runsheet to an existing planning

Add a runsheet to an existing planning

Authorizations:
path Parameters
planningID
required
string

ID of the planning to be modified

Request Body schema: application/json
required
Array of objects (runsheet)

Responses

Request samples

Content type
application/json
{
  • "runsheets": [
    ]
}

Response samples

Content type
application/json
{
  • "server_time": "2019-08-24T14:15:22Z",
  • "id": "000000000000000000000000",
  • "name": "My Runsheet Broadcast Planning",
  • "runsheets": [
    ],
  • "drivers": [
    ],
  • "total_runsheets": 1,
  • "total_drivers": 1,
  • "last_executed_at_client_time_utc": "2019-08-24T14:15:22Z",
  • "last_executed_at_client_timezone": "Asia/Singapore",
  • "last_executed_at_server_time": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "version_seq": 0,
  • "version_rev": "0-OqQ6QSWl"
}

Remove runsheet from Planning

Remove runsheet from Planning

Authorizations:
path Parameters
planningID
required
string

ID of the planning to be modified

runsheetID
required
string

ID of the runsheet to be removed

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully deleted the Runsheet from Planning Job"
}

Add drivers to an existing planning

Add drivers to an existing planning

Authorizations:
path Parameters
planningID
required
string

ID of the planning to be modified

Request Body schema: application/json
required
Array of objects (driver)

Responses

Request samples

Content type
application/json
{
  • "drivers": [
    ]
}

Response samples

Content type
application/json
{
  • "server_time": "2019-08-24T14:15:22Z",
  • "id": "000000000000000000000000",
  • "name": "My Runsheet Broadcast Planning",
  • "runsheets": [
    ],
  • "drivers": [
    ],
  • "total_runsheets": 1,
  • "total_drivers": 1,
  • "last_executed_at_client_time_utc": "2019-08-24T14:15:22Z",
  • "last_executed_at_client_timezone": "Asia/Singapore",
  • "last_executed_at_server_time": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "version_seq": 0,
  • "version_rev": "0-OqQ6QSWl"
}

Remove driver from Planning

Remove driver from Planning

Authorizations:
path Parameters
planningID
required
string

ID of the planning to be modified

driverID
required
string

ID of the driver to be removed

Responses

Response samples

Content type
application/json
{
  • "message": "Successfully deleted the Driver from Planning Job"
}

Start an existing Runsheet Broadcast Planning Job.

Authorizations:
path Parameters
planningID
required
string

ID of the Runsheet Broadcast Planning Job to be started.

Request Body schema: application/json
version_rev
required
string

Responses

Request samples

Content type
application/json
{
  • "version_rev": "0-RnVQTn5z"
}

Response samples

Content type
application/json
{
  • "server_time": "2019-08-24T14:15:22Z",
  • "id": "000000000000000000000000",
  • "name": "My Runsheet Broadcast Planning",
  • "runsheets": [
    ],
  • "drivers": [
    ],
  • "total_runsheets": 1,
  • "total_drivers": 1,
  • "last_executed_at_client_time_utc": "2019-08-24T14:15:22Z",
  • "last_executed_at_client_timezone": "Asia/Singapore",
  • "last_executed_at_server_time": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "version_seq": 0,
  • "version_rev": "0-OqQ6QSWl"
}

Create Planning Job Result

Authorizations:
path Parameters
planningID
required
string

ID of the Runsheet Broadcast Planning Job.

Request Body schema: application/json
planning_job_id
required
string <uuid>
total_pairs_counted
required
integer
total_runsheets_counted
required
integer
total_drivers_counted
required
integer
start_time
required
string <date-time>
end_time
required
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "planning_job_id": "ee4c8ab8-4dc8-4ef8-85ba-bc764e3dc779",
  • "total_pairs_counted": 100,
  • "total_runsheets_counted": 10,
  • "total_drivers_counted": 100,
  • "start_time": "2019-08-24T14:15:22Z",
  • "end_time": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  • "planning_job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  • "total_pairs_counted": 2550,
  • "total_runsheets_counted": 51,
  • "total_drivers_counted": 50,
  • "start_time": "2021-01-14 15:42:05.380+07:00",
  • "end_time": "2021-01-14 15:42:07.179+07:00",
  • "server_time": "2021-01-14 15:42:07.179+07:00"
}

Get Planning Job Result

Authorizations:
path Parameters
planningID
required
string

ID of the Runsheet Broadcast Planning Job.

Responses

Response samples

Content type
application/json
{
  • "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  • "planning_job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  • "total_pairs_counted": 2550,
  • "total_runsheets_counted": 51,
  • "total_drivers_counted": 50,
  • "start_time": "2021-01-14 15:42:05.380+07:00",
  • "end_time": "2021-01-14 15:42:07.179+07:00",
  • "server_time": "2021-01-14 15:42:07.179+07:00"
}

Get Planning Job status

Authorizations:
path Parameters
planningID
required
string

ID of the Runsheet Broadcast Planning Job.

Responses

Response samples

Content type
application/json
{
  • "current_status": "string",
  • "server_time": "2019-08-24T14:15:22Z",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "planning_job_id": "ee4c8ab8-4dc8-4ef8-85ba-bc764e3dc779",
  • "status_updated_at": "2019-08-24T14:15:22Z",
  • "statuses": [
    ]
}

Update Planning Job status to QUEUED

Authorizations:
path Parameters
planningID
required
string

ID of the Runsheet Broadcast Planning Job.

Responses

Response samples

Content type
application/json
{
  • "current_status": "string",
  • "server_time": "2019-08-24T14:15:22Z",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "planning_job_id": "ee4c8ab8-4dc8-4ef8-85ba-bc764e3dc779",
  • "status_updated_at": "2019-08-24T14:15:22Z",
  • "statuses": [
    ]
}

Update Planning Job status to IN PROGRESS

Authorizations:
path Parameters
planningID
required
string

ID of the Runsheet Broadcast Planning Job.

Responses

Response samples

Content type
application/json
{
  • "current_status": "string",
  • "server_time": "2019-08-24T14:15:22Z",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "planning_job_id": "ee4c8ab8-4dc8-4ef8-85ba-bc764e3dc779",
  • "status_updated_at": "2019-08-24T14:15:22Z",
  • "statuses": [
    ]
}

Update Planning Job status to COMPLETED

Authorizations:
path Parameters
planningID
required
string

ID of the Runsheet Broadcast Planning Job.

Responses

Response samples

Content type
application/json
{
  • "current_status": "string",
  • "server_time": "2019-08-24T14:15:22Z",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "planning_job_id": "ee4c8ab8-4dc8-4ef8-85ba-bc764e3dc779",
  • "status_updated_at": "2019-08-24T14:15:22Z",
  • "statuses": [
    ]
}

Update Planning Job status to FAILED

Authorizations:
path Parameters
planningID
required
string

ID of the Runsheet Broadcast Planning Job.

Responses

Response samples

Content type
application/json
{
  • "current_status": "string",
  • "server_time": "2019-08-24T14:15:22Z",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "planning_job_id": "ee4c8ab8-4dc8-4ef8-85ba-bc764e3dc779",
  • "status_updated_at": "2019-08-24T14:15:22Z",
  • "statuses": [
    ]
}