cityworks
    Preparing search index...

    Class Inspection

    Index

    Inspection Object Search

    • Get the records on the basis of inspectionId, only populates InspectionId, InspTemplateName, and Location properties

      Parameters

      • inspectionId: string

        ???, see instance docs: /{subdirectory}/apidocs/#/service-info/Ams/Inspection

      Returns Promise<unknown>

      Returns Promise that represents a collection of the matching (limited) inspection objects

    Inspection Options

    • Get cycle from

      Returns Promise<unknown>

      Returns Promise that represents ... I have no idea what this endpoint does

    • Get cycle intervals

      Returns Promise<unknown>

      Returns Promise that represents a Dictionary of the cycle intervals available

    • Get cycle types

      Returns Promise<unknown>

      Returns Promise that represents a Dictionary of the cycle types available

    • Get districts

      Returns Promise<unknown>

      Returns Promise that represents an Array of the districts

    • Get Inspection Employee lists. Abstraction done here, though only one employee list field, AFAIK.

      Parameters

      • listType: string

        Which list (endpoint) to get. Includes only 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 list of statuses

      Returns Promise<unknown>

      Returns object that represents an array of all possible statuses for an Inspection

    • Get inspection submit to list

      Parameters

      • OptionalincludeInactiveEmployees: boolean = false

        whether to include inactive employees in the return. Defaults to false.

      • OptionaldomainIds: number[]

        which domains to include in the return, default to All domains

      Returns Promise<unknown>

      Returns object that represents a collection of all possible employees for an Inspection's SubmitTo

    Inspection Search

    • Search for inspections

      Parameters

      • searchData: Object

        The search information to retrieve matched inspections, see instance docs: /{subdirectory}/apidocs/#/service-info/Ams/Inspection

      Returns Promise<unknown>

      Returns Promise that represents an array of the matching inspection IDs

    Inspection Templates

    • Get the questions and answers for inspection template(s)

      Parameters

      • inspTemplateIds: number[]

        An array of the IDs to reopen the matched inspections

      Returns Promise<unknown>

      Returns object that represents an array which contains a list of InspQuestionPanel for the template

    • Get inspection template question conditions

      Parameters

      • inspTemplateIds: number[]

        An array of template IDs to get the matched inspection template Question conditions for

      Returns Promise<unknown>

      Returns object that represents an array which contains a dictionary of InspQuestion IDs to configs

    • Get entity types for inspection template(s)

      Parameters

      • inspTemplateIds: number[]

        An array of the IDs to reopen the matched inspections

      Returns Promise<unknown>

      Returns object that represents an array of Entity Types

    • Get inspection templates

      Parameters

      • OptionalentityTypes: string[]

        The Entity Type(s) to return potential inspections for

      • OptionalcanCreate: boolean

        If true, only return templates the user can create, ignored if false or null, default is true

      • Optionaloptions: {
            IncludeInactive?: boolean;
            MaximumDateModified?: Date;
            MinimumDateModified?: Date;
            TemplateIds?: number[];
        }

        An object which can include: [IncludeInactive]: boolean, MaximumDateModified: Date, MinimumDateModified: Date, TemplateIds: Array

      Returns Promise<unknown>

      Returns Promise that represents a collection of all Inspections matching the provided parameters

    • Get a list of templates by IDs

      Parameters

      • inspTemplateIds: number[]
      • Optionaloptions: { MaximumDateModified?: Date; MinimumDateModified?: Date }

        An object which can include: [IncludeInactive]: boolean, MaximumDateModified: Date, MinimumDateModified: Date, TemplateIds: Array

      Returns Promise<unknown>

      Returns object that represents an object describing the inspection

    Inspections

    • Cancel inspections

      Parameters

      • inspectionIds: number[]

        An array of the IDs to cancel the matched inspections

      • OptionalcancelReason: string

        A reason for cancelling the inspection(s)

      • OptionaldateCancelled: Date

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

      Returns Promise<unknown>

      Returns object that represents a collection of inspections

    • Close inspections

      Parameters

      • inspectionIds: number[]

        An array of the IDs to close the matched inspections

      Returns Promise<unknown>

      Returns object that represents a collection of inspections

    • Add an entity to an existing inspection This method requires an Entity/Asset to be specified. You can either specify the Entity Type and its UID or a WorkOrderEntityBase Object.

      Parameters

      • entity: { Entity?: Object; EntityType?: string; EntityUid?: string }

        Either of two attribute combinations are valid: entityType & entityUid OR Entity as a fully-inflated WorkOrderEntity (WorkOrderEntityBase) object.

      • inspectionId: number

        An Inspection ID to attach the entity/asset to.

      • updateXY: boolean = true

        Provide a boolean to whether the inspection's X/Y coordinates should be updated. Default is true.

      • facility: { Facility_Id?: string; Level_Id?: string } = {}

        Add Facility_Id for the Facility Identifier and Level_id for the Facility Level Identifier. Defaults to empty so that no facility is specified.

      Returns Promise<unknown>

      Returns object that represents an object which describes an Inspection Entity

    • Create new inspection

      Parameters

      • insp_data: Object

        See /{subdirectory}/apidocs/#/data-type-infodataType=InspectionBase on your Cityworks instance

      Returns Promise<unknown>

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

    • Create inspections from an array of entities

      Parameters

      • insp_data: Object

        See /{subdirectory}/apidocs/#/data-type-infodataType=InspectionBase on your Cityworks instance

      Returns Promise<unknown>

      Returns Promise that represents a collection of objects describing the newly-created inspections

    • Create an inspection from a parent inspection (TODO: what parent!?)

      Parameters

      • insp_data: Object

        See /{subdirectory}/apidocs/#/data-type-infodataType=InspectionBase on your Cityworks instance

      Returns Promise<unknown>

      Returns object that represents an object describing the newly-created inspection

    • Create an inspection from a service request

      Parameters

      • insp_data: Object

        See /{subdirectory}/apidocs/#/data-type-infodataType=InspectionBase on your Cityworks instance

      Returns Promise<unknown>

      Returns object that represents an object describing the newly-created inspection

    • Create an inspection from a WorkOrder

      Parameters

      • insp_data: Object

        See /{subdirectory}/apidocs/#/data-type-infodataType=InspectionBase on your Cityworks instance

      Returns Promise<unknown>

      Returns object that represents an object describing the newly-created inspection

    • Create a search definition. Save the definition by setting SaveDefinition = true and supplying a SearchName.

      Parameters

      • searchData: Object

        Search data variables. See /{subdirectory}/apidocs/#/service-info/Ams/Inspection

      • OptionalsearchName: string

        What to name your search (if it should be saved)

      • OptionalsharedWithin: number

        What group or domain to share the search to.

      • saveDefinition: boolean = true

        Whether or not to save the search definition. Defaults to true when a search name is specified.

      • enableEurl: boolean = true

        Whether or not to enable EURL for the saved search. Defaults to true.

      Returns Promise<unknown>

      Returns Promise that represents a collection of Cityworks Metadata Objects

    • Delete inspections

      Parameters

      • inspectionIds: number[]

        An array of the IDs to delete the matched inspections

      Returns Promise<unknown>

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

    • Delete Map Layer Fields

      Parameters

      • inspectionId: number

        The inspection ID to delete the map layer fields for.

      Returns Promise<unknown>

      Returns Promise that represents a collection of Objects describing the workorders

    • Get the answers for inspections

      Parameters

      • inspections: number[]

        An Array of one or more Inspection IDs

      Returns Promise<unknown>

      Returns Promise that represents a collection of Inspection Answers

    • Get the audit log for a specific Inspection

      Parameters

      • inspectionId: number

        An Inspection ID to get the audit log for

      Returns Promise<unknown>

      Returns Promise that represents a collection of Cityworks Metadata Objects

    • Get an inspection by ID

      Parameters

      • inspectionId: number

        The inspection ID to retrieve

      Returns Promise<unknown>

      Returns Promise that represents an object describing the inspection

    • Get inspections by array of IDs

      Parameters

      • inspectionIds: number[]

        The inspection IDs to retrieve

      Returns Promise<unknown>

      Returns Promise that represents a collection of Objects describing the inspections

    • Get Map Layer Fields

      Parameters

      • requestId: number

        The inspection ID to get the map layer fields for.

      Returns Promise<unknown>

      Returns Promise that represents a collection of Objects describing the inspections

    • Move inspection by InspectionId. Must provide well known id (WKID) or well known text (WKT)

      Parameters

      • inspectionId: number

        The ID of the inspection that should be moved

      • x: number

        The X coordinate for the move

      • y: number

        The Y coordinate for the move

      • projection: { VcsWKID?: string; WKID?: string; WKT?: string }

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

      • Optionalz: number

        the optional Z coordinate for the move

      Returns Promise<unknown>

      Returns Promise that represents an object describing the updated GISPoint

    • Reopen closed inspections

      Parameters

      • inspectionIds: number[]

        An array of the IDs to reopen the matched inspections

      Returns Promise<unknown>

      Returns object that represents a collection of inspections

    • Update an inspection

      Parameters

      • insp_data: Object

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

      Returns Promise<unknown>

      Returns Promise that represents an object describing the updated inspection

    • Update Map Layer Fields

      Parameters

      • inspectionId: number

        The inspection ID to get the map layer fields for.

      • coordinates: Coordinates

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

      • OptionalinspTemplateId: number

        Optional. Inspection's template ID. If provided, the map layer fields will be updated from the inspection template otherwise, only existing updated.

      • OptionaldomainId: number

        Optional. Domain ID of org

      Returns Promise<unknown>

      Returns Promise that represents a ...

    Other

    admin?: any

    Inspection Administration methods

    attachments?: any

    Inspection Administration methods

    costs: any

    Inspection Costing methods

    Requests

    • Uncancel inspections

      Parameters

      • inspectionIds: number[]

        An array of the IDs to uncancel the matched requests

      Returns Promise<unknown>

      Returns object that represents a collection of requests

    WorkOrder Options

    • 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