To send a REST API request to a web service endpoint from ServiceNow, you must create a REST Message record.
- From Filter Navigator, open System Web Services > Outbound > REST Message, then click New.
-
Set the following REST Message fields:
- Name: Enter a descriptive name for the REST message.
- Description: Enter a description of the REST message.
- Endpoint: Enter the endpoint to which this REST message is sent. The endpoint value might include variables using the format ${variable}. To create a REST Message for Ops Center Automator integration, enter the following:
http(s)://automation-software-server-address:port_number/Automation/${path}
Note: The specified IP address or host name must match the CN or SAN attribute of the certificate. - Set the following on the Authentication tab:
- Authentication type: Select Basic.
- Basic auth profile: Click the magnifier and select an existing Basic Auth Configuration profile or create a new one.
- Click Submit.
- Open the new REST Message and set the HTTP Methods:
- Click New in the HTTP Methods area.
- Set the following items:
- Name: Enter the same name as the HTTP method.
- HTTP method: GET, POST, PUT, or DELETE (GET and POST are required)
- Endpoint: http(s)://automation-software-server-address:port_number/Automation/${path}
- Click the HTTP Request tab and in the Use MID Server field, select the MID Server to which the request is sent.
- (Optional) To test the HTTP method you created, click Test under Related Links. Repeat steps a. through d. for each HTTP method to be used.