REST Message legacy workflow activity
Summarize
Summary of REST Message legacy workflow activity
The REST Message legacy workflow activity in ServiceNow allows administrators to execute REST API calls (POST, PUT, GET, DELETE) by overriding REST endpoints or supplying variables from the REST Message module. This activity is deprecated as of the Yokohama release and is no longer available for new workflow creation. Existing workflows using this activity will continue to function, but new workflows should use the Orchestration REST Activity templates instead.
Show less
If you need to edit this activity in an existing workflow, you must re-activate it first.
Key Features
- REST Message: Select the REST Message record that defines the API message to run.
- REST Message Function: Choose the specific HTTP method (put, post, get, delete) associated with the REST Message.
- REST Endpoint: Optionally override the endpoint URL defined in the REST Message Function. Leave blank to use the default.
- REST Message Variables: Define variable substitutions for the REST call in the format
name=value. Supports escape characters for commas and equals signs. - Use MID Server: Optionally enable sending the REST message through a MID Server, which is useful for reaching endpoints behind firewalls or subnetworks not accessible from the instance.
- MID Server Name: Specify which MID Server to use when the Use MID Server option is enabled. If not specified, the workflow attempts to auto-select a suitable MID Server.
- Script Sensor Script: Execute a script after receiving the REST response. The full response body is accessible via the
activity.outputvariable.
Important Notes for ServiceNow Customers
- This activity is deprecated and should not be used for new workflows; adopt Orchestration REST Activity templates instead for new development.
- Existing workflows using this legacy activity will continue to work without modification.
- Using a MID Server is critical when calling REST endpoints that are not directly reachable from the ServiceNow instance.
- The ability to override endpoints and provide variable substitution offers flexibility in configuring REST calls dynamically within workflows.
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. |