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

    Class ResourceCreate<T>

    Fluent builder for creating a single resource. Provides a chainable API for configuring POST /os/{objectStructure} requests.

    const asset = await client.asset
    .createResource({ assetnum: 'A001', description: 'New Asset' })
    .returnProperties(['assetnum', 'status'])
    .suppressEvents()
    .withTransactionId('unique-tx-id')
    .execute();

    Type Parameters

    • T extends OslcResource

      The resource type that extends OslcResource

    Index

    Methods

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

      Parameters

      • name: string

        The action name

      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 data to create

      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>

    • Executes the create request and returns the created resource

      Returns Promise<T>

      A promise resolving to the created resource

    Constructors