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

    Class ScriptHandlerService

    Service for executing scripts directly via the Maximo Script Handler API This allows executing scripts without needing to go through the AutoScript service

    Hierarchy

    • BaseMaximoService
      • ScriptHandlerService
    Index

    Properties

    apiBase: string

    API base path (e.g., '/maximo/api')

    logger: ILogger
    httpClient: HttpClient

    The HTTP client for making requests

    Methods

    • Overrides the logger used by this service instance.

      Parameters

      Returns this

    • Returns the current logger used by this service instance.

      Returns ILogger

    • Parameters

      • Optionalproperties: string | string[]

      Returns string | undefined

    • Error handler

      Parameters

      • error: any

        the error to process

      Returns never

    • Executes a script by name with the provided parameters and method

      Parameters

      • scriptName: string

        Name of the script to execute

      • options: {
            method?: ScriptHttpMethod;
            queryParams?: Record<string, string>;
            body?: any;
            headers?: Record<string, string>;
        } = {}

        Configuration options for script execution

        • Optionalmethod?: ScriptHttpMethod

          HTTP method to use (default: GET)

        • OptionalqueryParams?: Record<string, string>

          Query parameters to pass to the script

        • Optionalbody?: any

          Request body (for POST/PUT/PATCH requests)

        • Optionalheaders?: Record<string, string>

          HTTP headers to send with the request

      Returns Promise<any>

      Promise resolving to the script execution result

    Common Resource Operations

    • Executes an action on an arbitrary endpoint Useful for service endpoints that don't follow the standard resource/ID pattern Supports both GET and POST methods based on payload presence

      Parameters

      • endpoint: string

        The endpoint to call the action on (e.g., 'service/logging')

      • actionName: string

        The name of the action to execute (e.g., 'wsmethod:streamLog')

      • Optionalpayload: any

        Optional payload data for the action (if provided, uses POST, otherwise GET)

      • OptionalreturnProperties: string | string[]

        Optional properties to return in the response

      Returns Promise<ResourceUpdateResponse<any>>

      A promise resolving to a response object containing success status and optional data

    Constructors