OBLYTECH Logo
OBLYTECH Logo

Outbound REST Messages Setup

To set up an outbound REST message in ServiceNow, create the message record, choose its endpoint and authentication, then configure and test an associated method. Review the test response before checking outbound logs. Increase logging detail when needed, and compare the actual request with the settings saved on the method.

Prepare the outbound REST message in ServiceNow

Start with one operation and a clear expected response. Write down the destination environment, the resource you intend to call, the required authentication, and the response fields your integration needs. Use a test record whose contents you can recognize. This gives you something concrete to compare against the returned body.

Separate the connection test from the business outcome. A request can reach its destination while asking for the wrong resource. Likewise, receiving a response does not establish that your integration has the fields it needs. Your acceptance check should describe both the expected response status and the meaning of the returned data.

The steps below use Brazil behavior; check the navigation and available fields on your instance and release. For the wider integration model, see the REST and SOAP integrations guide. Keep this setup focused on sending a request from ServiceNow to another service.

Create the message and inspect its method

Creating a REST message requires the web_service_admin role. Open All > System Web Services > REST Message and select New. Give the record a descriptive Name, enter the Endpoint, and choose the Authentication type and the corresponding profile where needed. The endpoint can contain substitutions written as ${variable}.

Outbound REST supports basic authentication and OAuth 2.0. Authentication on the message is inherited by its associated methods, but a method can supply its own authentication settings. Review that distinction before replacing a profile on the parent record: the effective settings on the method are what you need to investigate.

In the HTTP Headers embedded list, double-click a row to enter the Name and Value required by the receiving service. Select Submit to create the message. A GET method is created with values taken from the message record. Open that method and inspect its endpoint before using it as your initial test.

To define an additional method, the required role is web_service_admin. Navigate to All > System Web Services > Outbound > REST Message, open the message, and select New in the HTTP Methods related list. Choose the method, enter its Endpoint, then right-click the form header and select Save.

Existing methods do not automatically receive subsequent changes made to the parent message. If you change the destination environment on the parent, inspect the endpoint on each method you intend to run. For PUT, POST, and PATCH methods, you can define a message body. Compare that body with the receiving operation’s expected input before testing.

Choose the authentication path deliberately

For an outbound OAuth connection that uses another ServiceNow instance as the authorization server, creating the outbound message requires oauth_admin. Set Authentication type to OAuth 2.0 and select the OAuth profile created for the client server. Use the authorization-server instance as the Endpoint for this configuration.

On the message record, select Get OAuth Token. Authenticate with the instance supplying the token and complete its authorization decision. Depending on the configured sign-in path, this can involve instance credentials, an identity provider, or an MFA code. Treat obtaining authorization and testing the intended resource operation as separate checkpoints.

If the receiving OAuth provider requires private-key JWT client authentication, plan its prerequisites before building the registry record. The required role for configuring Private Key JWT for outbound OAuth is oauth_admin. A JKS certificate must be attached, a JWT signing key configured, and a JWT provider associated with that signing key.

Under All > System OAuth > Application Registry, select New and then Connect to a third-party OAuth provider. Add the Send Credentials and JWT Provider fields to the form if they are absent. Select As Private Key JWT for Send Credentials and choose the JWT Provider. Keep the provider’s token settings distinct from the business resource endpoint.

For script-based profile selection after the record configuration is established, see using setAuthenticationProfile. Record which message and method you tested so a later script review starts with the same configuration.

Test the saved method and read its response

Testing a method requires web_service_admin or admin. Open the message, select the method in HTTP Methods, then select Test under Related Links. If the method contains variables, testing uses each variable’s Test value from the Variable Substitutions related list. Inspect those values before you send the request.

The test displays the response status, complete endpoint, request parameters, and response body. A successful GET can return 200, but inspect the returned content as well. Compare the resolved endpoint and parameters with your intended test record. Then check whether the body contains the data your next integration step expects.

Completed attempts appear in Test Runs. When a request encounters an error, Error Code and Error Message appear. Preserve the details of the failing attempt before changing configuration. Change one relevant setting at a time so the next result tells you whether that change affected the request.

Fields on the Test Runs form are informational. Editing them does not change the REST message or method. To try another endpoint, parameter, or body, change the saved configuration and run a new test. This distinction prevents a misleading investigation in which the visible test record changes while the outgoing request stays the same.

Match the log level to the missing evidence

Open the REST method and use the Set log level related link to choose its logging detail. Start with the question you need to answer. Basic logging includes the method, hostname, path, response status, request and response lengths, and total call time. Those fields help establish which destination was called and what response was recorded.

Elevated logging adds request headers, request query, and response headers. Use that detail when the endpoint appears correct but you need to compare the transmitted parameters or header values. All logging also includes request and response bodies. Choose it when the unresolved question depends on payload contents.

Before collecting bodies, review the test data and who will inspect the logs. Use controlled inputs where possible and limit the investigation to the affected method. Record the previous log level and restore it when the diagnostic run is complete. This keeps a temporary investigation from becoming an unexplained configuration change.

System Web Services > HTTP Log Levels lists outbound requests configured with a specific log level and lets you modify multiple entries. Global outbound logging override properties can increase detail across outbound requests. Reserve that wider change for a limited troubleshooting period and document the prior values.

For help planning this work, see ServiceNow implementation.

Close the investigation with a repeatable check

Compare the method configuration, its latest test, and the corresponding outbound log evidence together. Check the resolved path first, then authentication, transmitted parameters, and payload contents as needed. Avoid changing several layers together: a successful retry is easier to explain when the adjustment is specific.

For requests through a MID Server, check glide.outbound.sslv3.disabled in System Properties [sys_properties]. Its recommended value is true so outbound MID Server connections use TLS. If the property is absent, add the property record. Include this transport check in the integration review rather than treating an authentication change as a cure for a connection problem.

Before handing over the setup, record the message, method, intended environment, variable test values, expected response, and final logging level. Keep one successful test as the comparison point. For a broader fault investigation, use the REST and SOAP troubleshooting guide.

For example, suppose a GET test returns a recognizable record, but the integration expects a different one. Compare the resolved variable values and path before revisiting credentials. If the path is right but the body is unexpected, collect the body detail needed to compare the response with your acceptance check. After correcting the saved method, repeat the same test inputs. This creates a controlled comparison between the failing and successful attempts, rather than a collection of unrelated retries. Include that comparison in the handover so the next person can see which setting changed and why the final result was accepted.

Questions about outbound request diagnostics

Why is a source record identifier unavailable in the log?

Viewing Source record ID requires read access to records in the specified Source table. Check that access when another investigator can see a record reference that you cannot. Increasing the logging level does not replace the required record access.

Can application code choose the logging detail?

RESTMessageV2 provides setLogLevel() for selecting logging detail in a script. When reviewing scripted execution, inspect that setting alongside the record configuration. The RESTMessageV2 and SOAP message scripting APIs guide covers the scripting route.

Can mutual authentication accompany either REST authentication type?

Outbound REST supports mutual authentication with basic authentication. Do not assume an OAuth profile can be combined with the same mutual-authentication configuration. Resolve that compatibility choice before preparing the connection’s credentials.

What evidence helps distinguish two otherwise similar requests?

Outbound logs include context such as Scope, Session, Transaction, User, and MID server at the basic level. Compare those fields when the hostname and path match but you need to determine which execution produced a particular response.