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

    Class ResourceUpdate<T>

    Fluent builder for updating a single resource. Provides a chainable API for configuring POST /os/{objectStructure}/{id} requests with x-method-override: PATCH.

    const result = await client.asset
    .updateById('12345', { description: 'Updated Description' })
    .useMergePatch()
    .returnProperties(['assetnum', 'status'])
    .suppressEvents()
    .execute();

    Type Parameters

    • T extends OslcResource

      The resource type that extends OslcResource

    Index

    Methods

    • Uses MERGE patch type. Child objects in the request are merged with existing children on the server. Without this, child objects not in the request are deleted.

      Returns this

      This builder instance for chaining

    • Uses UPDATE patch type (default behavior). Child objects not in the request will be deleted from the server.

      Returns this

      This builder instance for chaining

    • Sets the properties to return in the response (properties header)

      Parameters

      • fields: string | string[]

        Field names to include in the response

      Returns this

      This builder instance for chaining

    • Sets the transaction ID for deduplication (transactionid header)

      Parameters

      • transactionId: string

        Unique transaction identifier

      Returns this

      This builder instance for chaining

    • Suppresses business object events (sets x-allow-events to 0)

      Returns this

      This builder instance for chaining

    • Explicitly allows business object events (sets x-allow-events to 1)

      Returns this

      This builder instance for chaining

    • Sets the public URI header (x-public-uri)

      Parameters

      • uri: string

        The public URI base for generated links

      Returns this

      This builder instance for chaining

    • Ignores collection references in the response (ignorecollectionref=1)

      Returns this

      This builder instance for chaining

    • Sets an action to execute during the update

      Parameters

      • name: string

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

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

    • Sets a custom header

      Parameters

      • name: string

        Header name

      • value: string

        Header value

      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

    • Gets the resource ID

      Returns string

    • Gets the data to update

      Returns Partial<T>

    • Internal

      Builds the headers for the request

      Returns Record<string, string>

    • Internal

      Builds the query parameters for the request

      Returns Record<string, string>

    Constructors

    • Creates a new ResourceUpdate builder

      Type Parameters

      • T extends OslcResource

        The resource type that extends OslcResource

      Parameters

      • service: ResourceService<T>

        The ResourceService instance to use for updating

      • id: string

        The unique ID of the resource to update

      • data: Partial<T>

        The data to update

      Returns ResourceUpdate<T>