WorkOrder Comments methods
WorkOrder Comments methods
WorkOrder Costing methods
Get Categories
Returns Promise that represents an array of configured workorder category code descriptions
Get Cycle From
Returns Promise that represents an array of string/string Cycle From options for workorders
Get Cycle Intervals
Returns Promise that represents an array of string/string Cycle Interval options for workorders
Get Cycle Types
Returns Promise that represents an array of string/string Cycle Type options for workorders
Get WorkOrder Employee lists
Which list (endpoint) to get. Includes Supervisors & SubmitTos.
Whether to include inactive employees in the returned list. Defaults to false.
Optional
domainIds: number[]Filter to certain domains within the Cityworks instance.
Returns Promise that represents a collection of employees. See: /{subdirectory}/apidocs/#/data-type-info;dataType=EmployeeNameId
Get Expense Types
Returns Promise that represents an array of string/string Expense Type options for workorders
Get Priorities
Returns Promise that represents an array of configured workorder priorities
Get WorkOrder Stages
Returns Promise that represents an array of string/string Stage options for WorkOrders
Get Status Options
Returns Promise that represents a collection of codes. See: /{subdirectory}/apidocs/#/data-type-info;dataType=CodeDesc
Get SubmitTo list
Whether to include inactive employees in the returned list. Defaults to false.
Optional
domainIds: number[]Filter to certain domains within the Cityworks instance.
Returns Promise that represents a collection of employees. See: /{subdirectory}/apidocs/#/data-type-info;dataType=EmployeeNameId
Get Supervisors list
Whether to include inactive employees in the returned list. Defaults to false.
Optional
domainIds: number[]Filter to certain domains within the Cityworks instance.
Returns Promise that represents a collection of employees. See: /{subdirectory}/apidocs/#/data-type-info;dataType=EmployeeNameId
Get WorkOrderSid and description for provided WorkOrderId
The WorkOrderId for which to get the WorkOrderSid and description
Returns Promise that represents an object with WorkOrderS/IDs & Description
Get WorkOrderS/IDs connected to provided entities
The entity type to find connected WorkOrders
Optional
search: (string | number)[]Any additional search properties of the WorkOrder (open/closed, etc)
Get WorkOrderSids. Defaults to true. When false, returned list is WorkOrderIds
Returns Promise that represents an array of WorkOrderS/IDs
Add entities to an existing WorkOrder
The workorder S/ID which the entities should be added to. # for SID, string for ID.
Entity info object including: (req) EntityType: {string}, (req) EntityUids: {Array
Update WorkOrder xy after adding entit(y|ies), default is true.
Returns object that represents a list of entities removed.
Cancel workorders
An array of the IDs to cancel the matched workorders
Optional
cancelReason: stringA reason for cancelling the workorder(s)
Optional
dateCancelled: DateThe date/time that it should be indicated the workorder was cancelled
Returns object that represents a collection of workorders
Close WorkOrders
An array of the IDs to close the matched WorkOrders
Returns object that represents a collection of WorkOrders
Combine WorkOrders
The workorder IDs which should be combined.
The WorkOrder ID for the single WorkOrder that should contain the info/entities from the other WorkOrders
If the WorkOrders combined into the single should then be canceled, default is true.
Returns object that represents a collection of WorkOrders
Create new workorders, including linkin to Requests & Inspections (optionally)
See /{subdirectory}/apidocs/#/data-type-infodataType=WorkOrder on the Cityworks instance
Optional
inspectionIds: number[]The inspection IDs which the workorder should be linked to.
Optional
requestIds: number[]The inspection IDs which the workorder should be linked to.
Returns Promise that represents an object describing the newly-created workorder
Create new workorder linked to parent workorder
See /{subdirectory}/apidocs/#/data-type-infodataType=WorkOrder on the Cityworks instance
The workorder S/ID which the entities should be added to. # for SID, string for ID.
Returns Promise that represents an object describing the newly-created workorder
Delete WorkOrders
An array of the IDs to delete the matched WorkOrders
Returns object that represents a collection of WorkOrder Ids which have been deleted
Delete Map Layer Fields
The workorder S/ID to delete the map layer fields for.
Returns Promise that represents a collection of Objects describing the workorders
Get the audit log for a specific workorder
A WorkOrder S/ID to get the audit log for. SID is default.
Returns Promise that represents a collection of Cityworks Metadata Objects
Get a workorder by S/ID
The S/ID of the workorder to retrieve. # for SID, string for ID.
Whether first argument is an SID (true) or an ID (false). Defaults to true.
Returns Promise that represents an object describing the workorder
Get workorders by an array of S/IDs
The workorder S/IDs to retrieve. If providing WorkOrderID, should be all strings, else provide all numbers for WorkOrderSID
Returns Promise that represents a collection of Objects describing the workorders
Get custom field values for the workorder S/IDs
The workorder S/IDs to retrieve. #s for SID, strings for ID.
Returns Promise that represents a collection of Objects describing the workorders
Get entities on an existing WorkOrder
The workorder S/IDs which the entities should be added to. # for SID, string for ID.
Query gis to populate Entity.Attributes with current gis data. Defaults to true.
Returns object that represents a list of entities removed.
Get instructions by an array of workorders S/IDs
The workorder S/IDs to retrieve. If providing WorkOrderID, should be all strings, else provide all numbers for WorkOrderSID
Returns Promise that represents an array of String, String describing the workorder instructions
Get Map Layer Fields
The workorder S/ID to get the map layer fields for.
Returns Promise that represents a collection of Objects describing the workorders
Move a workorder's point
Should include WKT or WKID attribute. Can also include VcsWKID attribute.
Optional
z: numberOptional Z coordinate
Returns Promise that represents an object describing the updated workorder
Remove entities from a WorkOrder. Provide WorkOrderId and either ObjectIds or EntityType and EntityUids
The workorder S/ID which the entities should be removed from. # for SID, string for ID.
Remove entities by WorkOrderEntity.ObjectId (not gis objectId).
Update WorkOrder xy after removing entities, default is true.
Returns object that represents a list of entities removed.
Reopen closed WorkOrders
An array of the IDs to reopen the matched WorkOrders
Returns object that represents a collection of WorkOrders
Uncancel workorders
An array of the IDs to uncancel the matched workorders
Returns object that represents a collection of workorders
Update a WorkOrder
See /{subdirectory}/apidocs/#/data-type-infodataType=WorkOrder on the Cityworks instance
Returns Promise that represents an object describing the updated workorder
Update a WorkOrder entity
The workorder S/ID which the entities should be added to. # for SID, string for ID.
Entity info object including: (req) EntityType: {string}, (req) EntityUid: {string}, Facility_Id: {string}, Level_Id: {string}
Update WorkOrder completeness, default is true.
Returns object that represents a list of entities removed.
Update Map Layer Fields
The workorder S/ID to get the map layer fields for.
Object with X, Y, and optional Z coordinate specified.
Optional
woTemplateId: numberOptional. Work Order's Template ID. If provided, the map layer fields will be updated from the work order template otherwise, only existing updated.
Optional
domainId: numberOptional. Domain ID of org
Returns Promise that represents an object with all the updated GIS info for the workorder, including a collection of the updated map layer fields
WorkOrder Administration methods