Maximo API Client - v0.9.01
    Preparing search index...

    Class ResourceFetch<T>

    Fluent builder for fetching a single resource by ID. Provides a chainable API for configuring GET /os/{objectStructure}/{id} requests.

    const asset = await client.asset
    .fetch('12345')
    .properties(['assetnum', 'description', 'status'])
    .inlineDoc(true)
    .dropNulls(false)
    .execute();

    Type Parameters

    • T extends OslcResource

      The resource type that extends OslcResource

    Index

    Methods

    • Sets the properties to select (oslc.properties) Specifies a partial view of the resource

      Parameters

      • fields: string | string[]

        Field names to include in the response

      Returns this

      This builder instance for chaining

    • Sets whether to drop null values from the response (_dropnulls) Default is true (nulls are dropped)

      Parameters

      • enabled: boolean

        Whether to drop null values

      Returns this

      This builder instance for chaining

    • Sets whether to include inline documents (inlinedoc) When enabled, attachments are included as base64 encoded strings

      Parameters

      • enabled: boolean

        Whether to include inline documents

      Returns this

      This builder instance for chaining

    • Sets whether to ignore collection references (ignorecollectionref) When enabled, href links for child collections are omitted

      Parameters

      • enabled: boolean

        Whether to ignore collection refs

      Returns this

      This builder instance for chaining

    • Sets an action to execute on the resource

      Parameters

      • name: string

        The action name (e.g., 'wsmethod:approve')

      Returns this

      This builder instance for chaining

    • Removes rowstamps from parent and child objects (ignorers=1)

      Returns this

      This builder instance for chaining

    • Removes ref and localref from parent and child objects (ignorekeyref=1)

      Returns this

      This builder instance for chaining

    • Adds JSON schema to the response (addschema=1)

      Returns this

      This builder instance for chaining

    • Adds internal values to the response (internalvalues=1) For example, adds status_maxvalue alongside status

      Returns this

      This builder instance for chaining

    • Returns relative URIs instead of absolute URIs (relativeuri=1)

      Returns this

      This builder instance for chaining

    • Changes geometry data format in the response (geometryformat=1)

      Returns this

      This builder instance for chaining

    • Enables E-Signature checking (checkesig=1) When set, server responds with BMXAA9766E if an E-Signature enabled attribute is modified. Use withEsigAuth() to provide the E-Signature password when re-submitting.

      Returns this

      This builder instance for chaining

    • Sets a custom query parameter

      Parameters

      • name: string

        Parameter name

      • value: string

        Parameter value

      Returns this

      This builder instance for chaining

    • Sets multiple custom query parameters

      Parameters

      • params: Record<string, string>

        Object containing parameter name-value pairs

      Returns this

      This builder instance for chaining

    • Gets the resource ID

      Returns string

    • Internal

      Builds the query parameters for the request

      Returns Record<string, string>

    • Executes the fetch request and returns the resource

      Returns Promise<T>

      A promise resolving to the fetched resource

    Constructors