GET /works/scheduled/{scheduledWorkId}

Get a Scheduled Work

Planned Job Orders are referred in Infraspeak's API as Scheduled Works.

This endpoint allows you to get information about a specific Scheduled Work (Planned Job Order).

Operation ID: getScheduledWork
lock This endpoint requires a Bearer token in the Authorization header.

Path Parameters

Name Type Description
scheduledWorkId required
path
string

The Schedule Work ID

Responses

data object

Scheduled Order model structure details

id string required read-only

ID of the Scheduled Order

Example: 123

type string required read-only

Model type

scheduled_work

Example: scheduled_work

attributes object required
entity_id integer

The ID of the Entity where the Scheduled Work belongs.

Example: 123

complete_date string (date-time) | null

The datetime when the Scheduled Work was completed

Example: 2014-09-01 02:22:00

cost_center_name string | null

The name of the Cost Center associated with the Scheduled Work.

Example: abc

completed_by_id integer | null

The ID of the Operator that completed the Scheduled Work.

Example: 123

completed_percentage integer

The percentage of the Scheduled Work that is completed.

Example: 45

completed_date string (date-time) | null

The datetime when the Scheduled Work was completed

Example: 2014-09-01 02:22:00

confirmed boolean

Indicates if the Scheduled Work is confirmed.

Example: 1

failure_id integer | null

The ID of the Failure / Work Order associated with the Scheduled Work (Only if the Scheduled work originated from a Failure / Work Order)

last_status_change_date string (date-time) | null

The datetime when the Scheduled Work status changed for the last time

Example: 2014-09-01 02:22:00

last_status_change_operator string | null

The name of the Operator that changed the Scheduled Work status for the last time

Example: John

manpower_duration string | null

The total manpower duration of the Scheduled work in ISO-8601 duration format.

Example: P0Y0M0DT0H1M19S

manpower_cost number | null

The total manpower cost of the Scheduled work in the currency of the logged in user.

Example: 12.5

observation string | null

Observations added to the Scheduled Work.

Example: abc

real_start_date string (date-time) | null

The datetime when the Scheduled Work was actually started (not to confuse with the datetime when the Scheduled work planned to start)

Example: 2014-09-01 02:22:00

running boolean

Indicates if the Scheduled Work is currently in a running status

Example: 1

schedule_work_id integer

The ID of the Scheduled Work

Example: 123

signature_status string

Indicates if the Scheduled Work is signed by a responsible.

NOT_SIGNED SIGNED

Example: NOT_SIGNED

start_date string | null

The datetime when the Scheduled Work is/was planned to start

Example: 2021-07-21 18:38:00

started_by_id integer | null

The ID of the Operator that started the Scheduled Work.

Example: 123

state string

The current state of the Scheduled Work.

SCHEDULED RUNNING PAUSED COMPLETED CANCELED ARCHIVED COMPLETED_CANCELED

Example: COMPLETED

time_running string | null

The current running duration of the Scheduled work in ISO-8601 duration format.

Example: P0Y0M0DT0H1M19S

visit integer | null

Indicates the position/step of the Scheduled work in the parent Work / Planned Job that is originates from (e.g. can be the first Scheduled Work of the Work / Planned Job, the second, and so on)

Example: 1

work_id integer

The ID of the parent Work / Planned Job

Example: 123

next_sla_date string (date-time) | null

The datetime of the closest SLA that is still ongoing in the Scheduled Work (This field includes only SLAs that have not finished yet and are still ongoing, and will be null if there's none)

Example: 2014-09-01 02:22:00

next_sla_percentage number | null

The percentage of the Scheduled Work tasks that are completed in the closest SLA that is still ongoing (This field includes only SLAs that have not finished yet and are still ongoing, and will be null if there's none)

Example: 75.5

next_scheduled_work_sla_id integer | null

The ID of the next SLA (This field includes the next SLA, despite his current status being already finished or paused)

Example: 123

next_scheduled_work_sla_date string (date-time) | null

The datetime of the next SLA (This field includes the next SLA, despite his current status being already finished or paused)

Example: 2014-09-01 02:22:00

next_scheduled_work_sla_status_order integer | null

The status order of the next SLA (0 if status is 'RUNNING', 1 if status is 'PAUSED', 2 if status is 'FINISHED', otherwise 3) (This field includes the next SLA, despite his current status being already finished or paused)

Example: 0

rescheduled_by_user boolean

Indicates if the Scheduled Work was manually rescheduled by an User

Example:

network_id integer | null

ID used to reference a shared Planned Job Order

Example: 123

updated_at string | null

The datetime of the last update in the Scheduled Work

Example: 2021-07-21 18:38:00

display_start_date string | null

The start datetime to display in the Scheduled Work

Example: 2021-07-21 18:38:00

display_complete_date string | null

The complete datetime to display in the Scheduled Work

Example: 2021-07-21 18:38:00

estimated_duration_absolute_deviation integer | null

The absolute deviation between the actual manpower duration and the estimated task time in the Scheduled Work, representing the total difference regardless of whether the estimate was over or under

Example: 150

estimated_duration_relative_deviation integer | null

The relative deviation between the actual manpower duration and the estimated task time in the Scheduled Work. A negative value indicates the estimate was too low, while a positive value indicates it was too high

Example: -150

pause_reason_id integer | null

The ID of the Pause Reason associated with the Scheduled Work

Example: 123

last_status_description string | null

A description provided when the last status change occurred on the Scheduled Work

Example: Waiting for spare parts delivery

relationships object

The relationships of the Scheduled Work (Only present when expanded in the request)

auditStats object
data array<object>
type string read-only
audit_stats
id string read-only
buyOrders object
data array<object>
type string read-only
buy_order
id string read-only
client object
data object
type string read-only
client
id string read-only
completedBy object
data object
type string read-only
operator
id string read-only
elementRegistries object
data array<object>
type string read-only
element_registry
id string read-only
entity object
data object
type string read-only
entity
id string read-only
events object
data array<object>
type string read-only
event
id string read-only
eventsPlanned object
data array<object>
type string read-only
event
id string read-only
files object
data array<object>
type string read-only
file
id string read-only
gatekeeperAnswerRegistries object
data array<object>
type string read-only
gatekeeper_answer_registry
id string read-only
networkStatus object
data array<object>
type string read-only

If RECEIVER the Scheduled Work was received on Network, if SENDER the Scheduled Work was sent to the Network.

SENDER RECEIVER
action string read-only

If UNSHARED, the Scheduled Work was unshared from Network, if null, no action was taken.

id string read-only
in_sync boolean read-only

If the Scheduled Work is in sync of execution with the Network.

network_entity_uuid string read-only

The UUID of the Network Entity related to the Scheduled Work network status.

network_relation_id integer read-only

The ID of the Network Relation related to the Scheduled Work network status. It can be from a Client or a Supplier.

network_relation_type string read-only

The type of Network Relation related to the Scheduled Work network status. It can be from a Client or a Supplier, used to identify the relation ID and the relation the Network Entity has to the Scheduled Work.

CLIENT SUPPLIER
shared boolean read-only

If the Scheduled Work is actively shared on Network.

otherCosts object
data array<object>
type string read-only
other-cost
id string read-only
participants object
data array<object>
type string read-only
operator
id string read-only
pausedBy object
data object
type string read-only
operator
id string read-only
reminderRules object
data array<object>
type string read-only
reminder_rules
id string read-only
reminders object
data array<object>
type string read-only
reminder
id string read-only
requests object
data array<object>
type string read-only
request
id string read-only
scheduledWorkSlas object
data array<object>
type string read-only
schedule_work_sla
id string read-only
startedBy object
data object
type string read-only
operator
id string read-only
stock object
data array<object>
type string read-only
stock
id string read-only
stockTasks object
data array<object>
type string read-only
stock
id string read-only
survey object
data object
type string read-only
survey
id string read-only
surveyFeedbacks object
data array<object>
type string read-only
survey_feedback
id string read-only
work object
data object
type string read-only
work
id string read-only
realStartDateEditedBy object
data object
type string read-only
operator
id string read-only
completeDateEditedBy object
data object
type string read-only
operator
id string read-only
failureScheduleMapping object
data array<object>
type string read-only
failure_schedule_mapping
id string read-only
pause_reason object

The Pause Reason associated with the Scheduled Work

data object | null
type string read-only
pause_reason
id string read-only
assignees object

The Operators and Teams assigned to the Scheduled Work

data array<object>
type string read-only
scheduled_work_assignee
id string read-only
included array<object>

List of relationships to be included

status string
error
error object
properties object

Only present when related to property validation error

dev_message string

Example: Property validation error. Check the "properties" section in the response.

http_code integer
400
message string

Example: Property validation error.

more_info string
status string
error
error object
http_code integer
401
message string

Example: Authentication token invalid.

more_info string
status string
error
error object
http_code integer
404
message string

Example: Resource not found

more_info string | null
status string
error
error object
http_code integer
429
message string

Example: Too Many Requests.

more_info string
status string
error
error object
http_code integer
500
message string

Example: An error has occurred during the request.

more_info string