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

    Class FileImportExportService

    Service for working with Maximo File Import and Export operations. Extends the BaseMaximoService to provide FLAT (CSV) and XML import/export capabilities, both synchronously and asynchronously.

    Hierarchy

    • BaseMaximoService
      • FileImportExportService
    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

    • Synchronously imports file data (FLAT or XML) into a Maximo object structure.

      Parameters

      • objectStructure: string

        The target object structure name

      • data: string | Buffer<ArrayBufferLike>

        The file data content as a string or binary buffer

      • options: ImportOptions = {}

        Configuration options for the import

      Returns Promise<ImportResult>

      A promise resolving to the ImportResult details

    • Previews a file import to validate records without saving them to the database.

      Parameters

      • objectStructure: string

        The target object structure name

      • data: string | Buffer<ArrayBufferLike>

        The file data content to preview

      • options: ImportOptions = {}

        Configuration options for the import

      Returns Promise<PreviewResult>

      A promise resolving to the PreviewResult details

    • Initiates an asynchronous file import.

      Parameters

      • objectStructure: string

        The target object structure name

      • data: string | Buffer<ArrayBufferLike>

        The file data content to import

      • options: AsyncImportOptions

        Configuration options containing job name and formatting overrides

      Returns Promise<string>

      A promise resolving to the status polling URL from the Location header

    • Retrieves the status of an asynchronous import job using its polling URL.

      Parameters

      • statusUrl: string

        The polling status URL returned from the initial async import call

      Returns Promise<AsyncImportStatus>

      A promise resolving to the current status of the import job

    • Exports data from an object structure to a CSV-formatted string.

      Parameters

      • objectStructure: string

        The target object structure name

      • options: ExportOptions = {}

        Configuration options for pagination, sorting, and filtering

      Returns Promise<string>

      A promise resolving to the CSV data content as a string

    • Exports data from an object structure to an XML-formatted string.

      Parameters

      • objectStructure: string

        The target object structure name

      • options: ExportOptions = {}

        Configuration options for pagination, sorting, and filtering

      Returns Promise<string>

      A promise resolving to the XML data content as a string

    • Exports data from an object structure to a binary buffer containing CSV or XML.

      Parameters

      • objectStructure: string

        The target object structure name

      • format: "csv" | "xml"

        The output file format ('csv' | 'xml')

      • options: ExportOptions = {}

        Configuration options for pagination, sorting, and filtering

      Returns Promise<Buffer<ArrayBufferLike>>

      A promise resolving to the file contents as a binary Buffer

    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