cityworks
    Preparing search index...

    Class Request

    Index

    Other

    admin?: any

    Request Administration methods

    attachments: any

    Attachments methods

    comment: any

    Request Comments methods

    costs: any

    Request Costing methods

    Request Categorization

    • Get a list of problem nodes for a domain

      Parameters

      • domainId: number

        The domain ID for which to retrieve problem nodes.

      • viewOnly: boolean = false

        Return only view only problem nodes. Defaults to false.

      • OptionaldisplayMode: Object

        Object that should contain two properties if you provide it: DisplayTextMode: string (C = Code, D = Description, CD = Code ~ Description). DisplayTextDelimeter: string, only impacts CD display text mode.

      • includeCancelled: boolean = false

        Return only cancelled problem nodes as well. Defaults to false.

      Returns Promise<unknown>

      Returns Promise that represents a collection of problem node objects.

    Request Object Search

    • Get the records on the basis of RequestId, only populates RequestId, Description, ProblemCode properties

      Parameters

      • requestId: string

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

      Returns Promise<unknown>

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

    Request Options

    • Get custom field templates for problem code

      Parameters

      • problemSid: number

        The problemSid whose template custom fields should be returned

      Returns Promise<unknown>

      Returns Promise that represents a collection of custom fields

    • Get a list of possible DispatchTo values

      Parameters

      • domainId: number

        Domain to return possible dispatchTo values for

      Returns Promise<unknown>

      Returns Promise that represents an Array of dispatchTo options.

    • Get a list of possible Employee values

      Parameters

      • listType: string

        Which list (endpoint) to get. Includes only DispatchTo & SubmitTo.

      • domainId: number

        Domain to return possible dispatchTo values for

      Returns Promise<unknown>

      Returns Promise that represents an Array of Employee options.

    • Get a list of a problem code's priorities

      Parameters

      • problemSid: number

        Return priorities for given problemSid

      Returns Promise<unknown>

      Returns Promise that represents an Array of priorities

    • Get problem leaf (template) by Sid

      Parameters

      • problemSid: number

        Return problem leaf for given problemSid

      Returns Promise<unknown>

      Returns Promise that represents an Object that describes the problem leaf (template)

    • Get a list of problem codes

      Parameters

      • forPublicOnly: boolean = false

        Return only publicly-available service requests. Defaults to false.

      • onlyActiveTemplates: boolean = true

        Return only active templates. Defaults to true.

      • OptionaldomainIds: number[]

      Returns Promise<unknown>

      Returns Promise that represents an Array of problem name objects.

    • Get a list of problem codes by keywords

      Parameters

      • keywords: string

        Keywords to search for potential problem codes

      Returns Promise<unknown>

      Returns Promise that represents an Array of problem name objects.

    • Get the questions and answer options for a problem code

      Parameters

      • problemSid: number

        The problemSid whose Q&A should be returned

      Returns Promise<unknown>

      Returns Promise that represents a collection of questions and answer settings

    • Get a list of default statuses

      Parameters

      • domainIds: number[]

        List of domains to return default statuses for

      Returns Promise<unknown>

      Returns Promise that represents an Array of statuses.

    • Get a list of possible SubmitTo values

      Parameters

      • domainId: number

        Domain to return possible submitTo values for

      Returns Promise<unknown>

      Returns Promise that represents an Array of submitTo options.

    • Get street codes

      Returns Promise<unknown>

      Returns Promise that represents an Array of Street Codes.

    Request Search

    • Search for requests

      Parameters

      • searchData: Object

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

      Returns Promise<unknown>

      Returns Promise that represents an Array of the matching request IDs

    Request Templates

    • 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/ServiceRequestTemplate

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

      Returns Promise<unknown>

      Returns Promise that represents a collection of Cityworks Metadata Objects. See: /{subdirectory}/apidocs/#/data-type-info;dataType=CWMetadata

    • Get the questions and answers for a(many) request template(s)

      Parameters

      • problemSids: number[]

        An array list of problemSids to retrieve templates for

      • OptionalminimumDateModified: Date
      • OptionalmaximumDateModified: Date

      Returns Promise<unknown>

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

    • Get request templates (problem leaf[s])

      Parameters

      • OptionaltemplateIds: number[]

        Array of specific template IDs to retrieve

      • canCreate: boolean = false

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

      • includeInactiveIf: boolean = false

        If true, returns inactive templates, default is false

      • OptionalminimumDateModified: Date

        ?

      • OptionalmaximumDateModified: Date

        ?

      Returns Promise<unknown>

      Returns Promise that represents a collection of Problem Leafs. See /{subdirectory}/apidocs/#/data-type-info;dataType=ProblemLeaf

    • Get a list of templates

      Parameters

      • problemSids: number[]

        An array list of problemSids to retrieve templates for

      • OptionalminimumDateModified: Date

        ?

      • OptionalmaximumDateModified: Date

        ?

      Returns Promise<unknown>

      Returns Promise that represents

    • Get WorkOrder templates that are associated to this request template type

      Parameters

      • problemSids: number[]

        An array list of problemSids to retrieve Problem WO templates for

      • includeInactive: boolean = false

      Returns Promise<unknown>

      Returns Promise that represents a collection of Problem WO Templates. See /{subdirectory}/apidocs/#/data-type-info;dataType=ProblemWOTemplate

    • Get a list of template id results for a provided search parameters

      Parameters

      • searchData: Object

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

      Returns Promise<unknown>

      Returns Promise that represents a list of template IDs.

    Requests

    • Cancel requests

      Parameters

      • requestIds: number[]

        An array of the IDs to cancel the matched requests

      • OptionalcancelReason: string

        A reason for cancelling the request(s)

      • OptionaldateCancelled: Date

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

      Returns Promise<unknown>

      Returns object that represents a collection of requests

    • Change custom field category for provided requests

      Parameters

      • requestIds: number[]

        The RequestIds whose custom fields should be returned

      • categoryId: number

        The new custom field grouping/category which should be assigned to the provided requests

      Returns Promise<unknown>

      Returns Promise that represents a collection of requests

    • Change a request's problem code

      Parameters

      • requestId: number

        The request ID to change

      • problemSid: number

        The request's new ProblemSID

      Returns Promise<unknown>

      Returns Promise that represents an object describing the updated request

    • Close requests

      Parameters

      • requestIds: number[]

        An array of the IDs to close the matched requests

      Returns Promise<unknown>

      Returns object that represents a collection of requests

    • Create new requests

      Parameters

      • sr_data: Object

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

      Returns Promise<unknown>

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

    • 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/ServiceRequest

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

      Parameters

      • requestIds: number[]

        An array of the IDs to delete the matched requests

      Returns Promise<unknown>

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

    • Delete Map Layer Fields

      Parameters

      • requestId: number

        The request ID to delete the map layer fields for.

      Returns Promise<unknown>

      Returns Promise that represents a collection of Objects describing the deleted map layer fields

    • Get the audit log for a specific request

      Parameters

      • requestId: number

        A Request ID to get the audit log for

      Returns Promise<unknown>

      Returns Promise that represents a collection of Cityworks Metadata Objects

    • Get a request by ID

      Parameters

      • requestId: number

        The ID of the request to retrieve

      Returns Promise<unknown>

      Returns Promise that represents an object describing the request

    • Get requests by array of IDs

      Parameters

      • requestIds: number[]

        The request IDs to retrieve

      Returns Promise<unknown>

      Returns Promise that represents a collection of Objects describing the requests

    • Get custom fields for provided requests

      Parameters

      • requestIds: number[]

        The RequestIds whose custom fields should be returned

      Returns Promise<unknown>

      Returns Promise that represents a collection of custom fields

    • Get Map Layer Fields

      Parameters

      • requestId: number

        The request ID to get the map layer fields for.

      Returns Promise<unknown>

      Returns Promise that represents a collection of Objects describing the request map layer fields

    • Move a request's point

      Parameters

      • requestId: number
      • x: number
      • y: number
      • projection: { VcsWKID?: string; WKID?: string; WKT?: string }

        Should include at least 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 GISPoint

    • Reopen closed requests

      Parameters

      • requestIds: number[]

        An array of the IDs to reopen the matched requests

      Returns Promise<unknown>

      Returns object that represents a collection of requests

    • Uncancel requests

      Parameters

      • requestIds: number[]

        An array of the IDs to uncancel the matched requests

      Returns Promise<unknown>

      Returns object that represents a collection of requests

    • Update a request

      Parameters

      • sr_data: Object

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

      Returns Promise<unknown>

      Returns Promise that represents an object describing the updated request

    • Update Map Layer Fields

      Parameters

      • requestId: number

        The service request ID to get the map layer fields for.

      • coordinates: Coordinates

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

      • OptionalproblemsId: number

        Optional. Problem Leaf (template) ID. If provided, the map layer fields will be updated from the service request template (problem leaf) 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 request, including a collection of the updated map layer fields