REST Message legacy workflow activity
Summarize
Summary of REST Message legacy workflow activity
The REST Message legacy workflow activity in ServiceNow allows administrators to override REST endpoints or supply variables configured in the REST Message module to execute REST functions (POST, PUT, GET, DELETE). This activity is deprecated as of the Zurich release and is no longer available for new workflows. Instead, ServiceNow recommends using the Orchestration REST Activity templates for new workflow development. Existing workflows using this activity will continue to function but require re-activation to edit.
Show less
Key Features
- REST Message Reference: Allows selection of a REST Message from the
sysrestmessagetable. - Function Selection: Choose the HTTP method function (PUT, POST, GET, DELETE) from the REST Message Function reference.
- Endpoint Override: Optionally specify a REST endpoint different from the REST Message Function’s default endpoint.
- Variable Substitution: Supports passing variables for outbound REST messages using a name=value format, with escaping for commas or equal signs.
- MID Server Usage: Option to use a MID Server to send REST messages, useful for accessing endpoints behind firewalls or within private networks. The workflow can auto-select a MID Server based on IP range and REST capability if none is specified.
- Script Sensor: Allows execution of a script after receiving the REST response, with access to the full response body via
activity.output.
Practical Considerations for ServiceNow Customers
- Because this activity is deprecated, customers should plan migrations of workflows using this activity to the newer Orchestration REST Activity templates for future-proofing and ongoing support.
- Existing workflows using this legacy activity will continue to operate, but editing requires re-activation of the activity.
- Using the MID Server option is critical when REST endpoints are inaccessible directly from the ServiceNow instance due to network segmentation or firewall constraints.
- Variable substitution enables dynamic and flexible REST calls within workflows, enhancing integration capabilities.
- The script sensor feature permits custom processing or validation of REST responses within the workflow.
The legacy REST Message activity enables an administrator to override the REST endpoint or supply the variables configured in the REST Message module.
Existing workflows using it will continue to work as designed. To edit this activity in an existing workflow, you must re-activate the activity.
The REST Message activity executes a dead link REST function (POST, PUT, GET, or DELETE) on an endpoint using values defined in the function record.
Input variables
| Field | Description |
|---|---|
| Rest Message | |
| REST Message | Name of the Create a REST message to run. This is a reference field to the REST Message [sys_rest_message] table (). |
| REST Message Function | Function to call that is defined in a REST message function. This is a
reference field to the HTTP Method [sys_rest_message_fn] table (). Available functions are put, post, get, or delete. You can edit functions in the HTTP Methods related list in each REST Message record. |
| REST Endpoint | REST endpoint to use instead of the Endpoint defined in the HTTP Method record. Leave this field blank to use the defined endpoint in the REST Message Function record. |
| Rest Message Variables | |
| Variables | Values to use for Variable substitution in outbound REST messages defined in the HTTP Method record. Use the following format
for the string: For
example, use name=${nameValue}, id=${idValue} where
name and id are function variables. If
either the variable name or value contains a comma or equal sign, escape those
characters with a backslash. |
| Rest Message MID Server | |
| Use MID Server | Check this box if you want to use a MID Server to send the REST message. A MID Server might be necessary to reach an endpoint within a firewall or a subnetwork that is not visible from the instance. If this check box is selected, but no MID Server is defined in the MID Server field, the workflow automatically attempts to find a MID Server based on IP range and the REST capability. |
| MID Server | Name of the MID Server to use. This field is available when Use MID Server is selected. The workflow ignores this parameter if the use_midserver parameter is disabled. |
| Rest Message Script | |
| Sensor Script | The script to execute after the request has been made and a response has been received. You can access the full response body from the activity.output variable. |