cityworks
    Preparing search index...

    Class WorkOrder

    Index

    Other

    admin: any

    WorkOrder Administration methods

    attachments: any

    WorkOrder Comments methods

    comment: any

    WorkOrder Comments methods

    costs: any

    WorkOrder Costing methods

    WorkOrder Options

    • Get Categories

      Returns Promise<unknown>

      Returns Promise that represents an array of configured workorder category code descriptions

    • Get Cycle From

      Returns Promise<unknown>

      Returns Promise that represents an array of string/string Cycle From options for workorders

    • Get Cycle Intervals

      Returns Promise<unknown>

      Returns Promise that represents an array of string/string Cycle Interval options for workorders

    • Get Cycle Types

      Returns Promise<unknown>

      Returns Promise that represents an array of string/string Cycle Type options for workorders

    • Get WorkOrder Employee lists

      Parameters

      • listType: string

        Which list (endpoint) to get. Includes Supervisors & SubmitTos.

      • includeInactiveEmployees: boolean = false

        Whether to include inactive employees in the returned list. Defaults to false.

      • OptionaldomainIds: number[]

        Filter to certain domains within the Cityworks instance.

      Returns Promise<unknown>

      Returns Promise that represents a collection of employees. See: /{subdirectory}/apidocs/#/data-type-info;dataType=EmployeeNameId

    • Get Expense Types

      Returns Promise<unknown>

      Returns Promise that represents an array of string/string Expense Type options for workorders

    • Get Priorities

      Returns Promise<unknown>

      Returns Promise that represents an array of configured workorder priorities

    • Get WorkOrder Stages

      Returns Promise<unknown>

      Returns Promise that represents an array of string/string Stage options for WorkOrders

    • Get Status Options

      Returns Promise<unknown>

      Returns Promise that represents a collection of codes. See: /{subdirectory}/apidocs/#/data-type-info;dataType=CodeDesc

    • Get SubmitTo list

      Parameters

      • includeInactiveEmployees: boolean = false

        Whether to include inactive employees in the returned list. Defaults to false.

      • OptionaldomainIds: number[]

        Filter to certain domains within the Cityworks instance.

      Returns Promise<unknown>

      Returns Promise that represents a collection of employees. See: /{subdirectory}/apidocs/#/data-type-info;dataType=EmployeeNameId

    • Get Supervisors list

      Parameters

      • includeInactiveEmployees: boolean = false

        Whether to include inactive employees in the returned list. Defaults to false.

      • OptionaldomainIds: number[]

        Filter to certain domains within the Cityworks instance.

      Returns Promise<unknown>

      Returns Promise that represents a collection of employees. See: /{subdirectory}/apidocs/#/data-type-info;dataType=EmployeeNameId

    WorkOrder Search

    • Get WorkOrderSid and description for provided WorkOrderId

      Parameters

      • workOrderId: string

        The WorkOrderId for which to get the WorkOrderSid and description

      Returns Promise<unknown>

      Returns Promise that represents an object with WorkOrderS/IDs & Description

    • Get WorkOrderS/IDs connected to provided entities

      Parameters

      • entityType: string

        The entity type to find connected WorkOrders

      • entityUids: string[]
      • Optionalsearch: (string | number)[]

        Any additional search properties of the WorkOrder (open/closed, etc)

      • s: boolean = true

        Get WorkOrderSids. Defaults to true. When false, returned list is WorkOrderIds

      Returns Promise<unknown>

      Returns Promise that represents an array of WorkOrderS/IDs

    WorkOrders

    • Add entities to an existing WorkOrder

      Parameters

      • workOrderSId: string | number

        The workorder S/ID which the entities should be added to. # for SID, string for ID.

      • entityInfo: Object

        Entity info object including: (req) EntityType: {string}, (req) EntityUids: {Array}, Facility_Id: {string}, Level_Id: {string}

      • updateXY: boolean = true

        Update WorkOrder xy after adding entit(y|ies), default is true.

      Returns Promise<unknown>

      Returns object that represents a list of entities removed.

    • Cancel workorders

      Parameters

      • workOrderIds: number[]

        An array of the IDs to cancel the matched workorders

      • OptionalcancelReason: string

        A reason for cancelling the workorder(s)

      • OptionaldateCancelled: Date

        The date/time that it should be indicated the workorder was cancelled

      Returns Promise<unknown>

      Returns object that represents a collection of workorders

    • Close WorkOrders

      Parameters

      • workOrderIds: number[]

        An array of the IDs to close the matched WorkOrders

      Returns Promise<unknown>

      Returns object that represents a collection of WorkOrders

    • Combine WorkOrders

      Parameters

      • fromWorkOrderIds: string[]

        The workorder IDs which should be combined.

      • toWorkOrderId: string

        The WorkOrder ID for the single WorkOrder that should contain the info/entities from the other WorkOrders

      • cancelCombinedWorkOrders: boolean = true

        If the WorkOrders combined into the single should then be canceled, default is true.

      Returns Promise<unknown>

      Returns object that represents a collection of WorkOrders

    • Create new workorders, including linkin to Requests & Inspections (optionally)

      Parameters

      • wo_data: Object

        See /{subdirectory}/apidocs/#/data-type-infodataType=WorkOrder on the Cityworks instance

      • OptionalinspectionIds: number[]

        The inspection IDs which the workorder should be linked to.

      • OptionalrequestIds: number[]

        The inspection IDs which the workorder should be linked to.

      Returns Promise<unknown>

      Returns Promise that represents an object describing the newly-created workorder

    • Create new workorder linked to parent workorder

      Parameters

      • wo_data: Object

        See /{subdirectory}/apidocs/#/data-type-infodataType=WorkOrder on the Cityworks instance

      • workOrderSId: string | number

        The workorder S/ID which the entities should be added to. # for SID, string for ID.

      • s: boolean = true

      Returns Promise<unknown>

      Returns Promise that represents an object describing the newly-created workorder

    • Delete WorkOrders

      Parameters

      • workOrderIds: number[]

        An array of the IDs to delete the matched WorkOrders

      Returns Promise<unknown>

      Returns object that represents a collection of WorkOrder Ids which have been deleted

    • Delete Map Layer Fields

      Parameters

      • workOrderSId: string

        The workorder S/ID to delete the map layer fields for.

      Returns Promise<unknown>

      Returns Promise that represents a collection of Objects describing the workorders

    • Get the audit log for a specific workorder

      Parameters

      • workOrderSId: number

        A WorkOrder S/ID to get the audit log for. SID is default.

      Returns Promise<unknown>

      Returns Promise that represents a collection of Cityworks Metadata Objects

    • Get a workorder by S/ID

      Parameters

      • workOrderSId: string | number

        The S/ID of the workorder to retrieve. # for SID, string for ID.

      • s: boolean = true

        Whether first argument is an SID (true) or an ID (false). Defaults to true.

      Returns Promise<unknown>

      Returns Promise that represents an object describing the workorder

    • Get workorders by an array of S/IDs

      Parameters

      • workOrderSIds: (string | number)[]

        The workorder S/IDs to retrieve. If providing WorkOrderID, should be all strings, else provide all numbers for WorkOrderSID

      Returns Promise<unknown>

      Returns Promise that represents a collection of Objects describing the workorders

    • Get custom field values for the workorder S/IDs

      Parameters

      • workOrderSIds: (string | number)[]

        The workorder S/IDs to retrieve. #s for SID, strings for ID.

      Returns Promise<unknown>

      Returns Promise that represents a collection of Objects describing the workorders

    • Get entities on an existing WorkOrder

      Parameters

      • workOrderSIds: (string | number)[]

        The workorder S/IDs which the entities should be added to. # for SID, string for ID.

      • getGisData: boolean = true

        Query gis to populate Entity.Attributes with current gis data. Defaults to true.

      Returns Promise<unknown>

      Returns object that represents a list of entities removed.

    • Get instructions by an array of workorders S/IDs

      Parameters

      • workOrderSIds: (string | number)[]

        The workorder S/IDs to retrieve. If providing WorkOrderID, should be all strings, else provide all numbers for WorkOrderSID

      Returns Promise<unknown>

      Returns Promise that represents an array of String, String describing the workorder instructions

    • Get Map Layer Fields

      Parameters

      • workOrderSId: string

        The workorder S/ID to get the map layer fields for.

      Returns Promise<unknown>

      Returns Promise that represents a collection of Objects describing the workorders

    • Move a workorder's point

      Parameters

      • workOrderId: string
      • x: number
      • y: number
      • projection: Object

        Should include WKT or WKID attribute. Can also include VcsWKID attribute.

      • Optionalz: number

        Optional Z coordinate

      Returns Promise<unknown>

      Returns Promise that represents an object describing the updated workorder

    • Remove entities from a WorkOrder. Provide WorkOrderId and either ObjectIds or EntityType and EntityUids

      Parameters

      • workOrderSId: string | number

        The workorder S/ID which the entities should be removed from. # for SID, string for ID.

      • entityInfo: Object

        Remove entities by WorkOrderEntity.ObjectId (not gis objectId).

      • updateXY: boolean = true

        Update WorkOrder xy after removing entities, default is true.

      Returns Promise<unknown>

      Returns object that represents a list of entities removed.

    • Reopen closed WorkOrders

      Parameters

      • workOrderIds: number[]

        An array of the IDs to reopen the matched WorkOrders

      Returns Promise<unknown>

      Returns object that represents a collection of WorkOrders

    • Uncancel workorders

      Parameters

      • workOrderIds: number[]

        An array of the IDs to uncancel the matched workorders

      Returns Promise<unknown>

      Returns object that represents a collection of workorders

    • Update a WorkOrder

      Parameters

      • wo_data: Object

        See /{subdirectory}/apidocs/#/data-type-infodataType=WorkOrder on the Cityworks instance

      Returns Promise<unknown>

      Returns Promise that represents an object describing the updated workorder

    • Update a WorkOrder entity

      Parameters

      • workOrderSId: string | number

        The workorder S/ID which the entities should be added to. # for SID, string for ID.

      • entityInfo: Object

        Entity info object including: (req) EntityType: {string}, (req) EntityUid: {string}, Facility_Id: {string}, Level_Id: {string}

      • workComplete: boolean = false

        Update WorkOrder completeness, default is true.

      Returns Promise<unknown>

      Returns object that represents a list of entities removed.

    • Update Map Layer Fields

      Parameters

      • workOrderSId: string | number

        The workorder S/ID to get the map layer fields for.

      • coordinates: Coordinates

        Object with X, Y, and optional Z coordinate specified.

      • OptionalwoTemplateId: number

        Optional. Work Order's Template ID. If provided, the map layer fields will be updated from the work order template otherwise, only existing updated.

      • OptionaldomainId: number

        Optional. Domain ID of org

      Returns Promise<unknown>

      Returns Promise that represents an object with all the updated GIS info for the workorder, including a collection of the updated map layer fields