Skip to main content

exportViaRest

A Workflow Engine function that exports the payload from a createPayload to an external REST endpoint.

To use this function, you must first configure the following:

  • A REST Endpoints integration, which configures the endpoints for this function to use.

  • A createPayload function which precedes this function, in order to generate the payloads this function exports.

  • For best practice, create a new engine to handle the data export process. This is to prevent potential blockages during the export process under load.

    If you want to export both alerts and Situations, you must create a separate engine for each workflow. A separate engine has the following Moolet characteristics:

    standalone_moolet: true
    threads: 1
    event_handlers: [<if required>]
    process_output_of: <place in the moolet chain>

    Moogsoft recommends this Moolet is single threaded to ensure Moogsoft Enterprise works at the same rate as the receiving API. However, you can modify the thread count if necessary, for example if the endpoint has inherent rate or load mechanics, or ordering. No other Moolet should rely on or process the output of this one.

This function is available as a feature of the Workflow Engine v1.2 download and later.

This function is available for alert, enrichment, and Situation workflows.

The workflow sweep up filter applies to this function. If you use the sweep up filter within the workflow, createPayload applies to all the objects in the workflow. Consequently, exportViaRest exports the payload created using all objects within the workflow.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function exportViaRest takes the following arguments:

Name

Required

Type

Description

endpointName

Yes

String

Name of the endpoint defined in the REST Endpoints Reference integration.

Example

The following example demonstrates typical use of Workflow Engine function exportViaRest.

Set the following:

  • endpointName: AlertExport

The UI translates your settings to the following JSON:

{"endpointName":"AlertExport"}

The function returns true if it was able to locate and successfully complete the export. If it could not find the endpoint configuration, or the export was unsuccessful, the function returns false.