GET /works

List all Works

Planned Jobs are refered in Infraspeak's API as Works.

This endpoint allows you to obtain all the Works (Planned Jobs).

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

Query Parameters

Name Type Description
expanded
query
string

Available expands for the Works

client costCenter entity events eventsPlanned failure files firstWorkScheduled gatekeeper gatekeeperNotifications interventions lastWorkScheduled locals locations previousWorkScheduled nextWorkScheduled ongoingWorkScheduled operators responsibles supplier technicalSkills workInterventions workMaintenanceProcedures workNetwork workPeriodicity workReminderRules workSchedules workSlaRules workType workUsageTrigger workAutoSchedule workNotifications template
limit
query
integer

Limit of records per page

page
query
integer

Current Page number

sort
query
string

Sort the results by a specific field. The field can be suffixed with '-' to sort in descending order.

Responses

data array<object>
id string read-only

ID of the planned job

type string read-only

Model type

work
attributes object
calendar_id integer | null

ID for the Calendar

Example: 259

description string | null

Description of the planned job

Example: PMP description

type string | null

Type of the planned job. Null if the Planned Job is related to a Work Order (failure)

CYCLIC PLAN SPECIAL
any_responsible boolean
auto_close boolean

Indication if the planned job order can be automatically closed, when all tasks are completed

Example:

auto_pilot boolean

Indication if any user can start this planned job

Example:

client_id integer

ID of the Client

Example: 22349

cost_center_id integer | null

ID of the Cost Center

Example: 17

entity_id integer

ID of the Entity

Example: 12

failure_id integer | null

ID of the Work Order

Example: 1448321

gatekeeper_id integer | null

ID for the Gatekeeper

Example: 159

is_protected boolean | null

Protect Planned Job from Manager edition / deletion

Example: 1

name string

Description of the planned job

Example: PMP HVAC

network_work_id integer

ID used to reference a shared Planned Job

Example: 123

periodicity string | null

Description of the Planned Job periodicity. Null if the Planned Job is related to a Work Order (failure)

Example: Plano de 1 ano, com visita em Setembro

recurrence object | null

Information about the Planned Job recurrence. Null if the Planned Job is related to a Work Order (failure)

DTSTART string (date-time)

Example: 2022-04-01 09:00:00

supplier_id integer | null

ID of the Supplier

Example: 54

work_id integer

ID of the planned job

work_type_id integer

ID of the Planned Job Type

Example: 448

relationships object

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

networkStatus object
data array<object>
type string read-only

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

SENDER RECEIVER
id string read-only
shared boolean read-only

If the Work is actively shared on Network.

in_sync boolean read-only

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

action string read-only

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

network_entity_uuid string read-only

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

network_relation_id integer read-only

The ID of the Network Relation related to the 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 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 Work.

CLIENT SUPPLIER
meta object

Meta model structure details

pagination object
total integer required

Total items.

Example: 1

count integer required

Total items returned for the current page.

Example: 1

per_page integer required

Maximum number of records per page.

Example: 1

current_page integer required

Number of the current page.

total_pages integer required

Number of the total pages.

links object

Requests that return multiple items include a `links` attribute, with links related to request's context.

self string required read-only

Current response link.

Example: /path?page=1

first string required read-only

Link to the first page result.

Example: /path?page=1

last string required read-only

Link to the previous page result.

Example: /path?page=1

next string read-only

Link to the next page result.

Example: /path?page=1

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
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