

HTTP request method to use default is GET Note: Slack endpoints require an additional function call to add the Slack token to API requests. Name of the pre-configured endpoint (case-sensitive) that the request is targeting. The following table describes the available options: Option The request function accepts a JavaScript object representing its options. The following function returns an HTTP request object that can later be sent using its write() function: http.request(options) The following is a sample request object: HTTP request object and write function This identifier is returned in the response, making it possible to match a request with the results of the script processing.Īn xMatters internal use ID that allows tracking of the request through the system. The unique identifier (UUID) assigned to this request by the integration service when the request is received. If the Content-Type in the header is application/x-www-form-urlencoded, this section also contains the POST body parameters. Note the Content-Type parameter that defines the payload type.Ī JavaScript object featuring key-value pairs for any querystring parameters The HTTP headers of the incoming request. If the body is in a query parameter, you can use request.parameters.If the body contains XML, you can use one of the included XML libraries to manipulate the data.If the body contains JSON, you can use JSON.parse(request.body) in the script to convert it to a JavaScript object.This is the body of the request posted to the integration service URL, and usually contains the JSON or XML payload of an HTTP POST. In outbound integration scripts, the request object is referred to as the callback. The easiest way to examine the content of an incoming request is to send an HTTP request to your integration and then view the details in the Activity panel.

You can use the transformation scripts to access the request headers, parameters, body, etc. The request object is used to describe the HTTP request posted to the integration service URL. which must be compliant with JDK version 8 and ECMAScript 5.1.) Scripting Features (Instantiation is allowed for scripts running on the xMatters Agent. For security reasons, the instantiation of Java classes from within the scripting runtime is explicitly disallowed for all scripts running in the cloud. Transformation scripts are written in JavaScript (JDK version 11) and should be compliant with ECMAScript 6. The Integration Builder includes an editor that allows you to modify the default transformation scripts for your inbound and outbound integrations.įor information on working with scripts in Flow Designer custom steps and HTTP triggers, see Work with scripts in custom steps.
