Skip to main content

getViaRest

A Workflow Engine function that receives a JSON payload or results from a REST endpoint and sets the results under workflowContext.values.<endpointName>.

This function is available as a feature of the Add-ons v2.3 download and later.

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

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function getViaRest takes the following arguments:

Name

Required

Type

Description

endpointName

yes

string

The name of the REST endpoint from integrations page (use the Get protocol).

paramMapName

yes

string

Payload maps name from integrations page, to be mapped to request params to REST endpoint.

Example

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

The getViaRest function downloads the results under workflowContext.values.<endpointName>. You can use subsequent actions such as:

  • copyFromContext to copy results from workflowContext.values.<endpointName> to cevent.custom_info.<KEY>.

  • mergeList to condense results from different endpoints under single field either workflowContext or custom_info, for example:

    from workflowContext.values.RESTEndpoints1, workflowContext.values.RESTEndpoints2 to workflowContext.values.mergedList

    or,

    from custom_info.enrichment.RESTEndpoints1, custom_info.enrichment.RESTEndpoints2 to custom_info.enrichment.rest

  • reduceObjectsList to reduce a list of similar objects to single object. You can apply this function to either workflowContext or custom_info fields, such as custom_info.enrichment.RESTEndpoints1 or workflowContext.values.RESTEndpoint1.