CADCertified Application Developer

Lessons › Domain 5: Working with External Data (10%) › Lesson 18

Integrating with REST

About 16 minutes · Last checked against the CAD blueprint (January 2026): 4 December 2026

Step 1 · Learn

Talking to other systems over HTTP

Outbound REST messages

A REST message describes an external endpoint the platform calls. It holds the base endpoint, the authentication, such as basic or OAuth, and one or more HTTP methods, such as GET or POST. Methods can use variables like ${id} that a script fills in.

Calling it from a script

Use Preview Script Usage on an HTTP method to generate starter code. A typical call:

  • var r = new sn_ws.RESTMessageV2('Equipment API', 'get');
  • r.setStringParameterNoEscape('id', current.asset_tag);
  • var response = r.execute();
  • var status = response.getStatusCode(); and var body = JSON.parse(response.getBody());

Use executeAsync() for calls that should not hold up the user, or call the REST message from an async business rule or a flow. A MID Server is needed when the endpoint is inside a private network.

Testing and debugging

  • Use the Test related link on an HTTP method to send a request and see the status code and response.
  • Check the status code first: 200 range is success, 401 or 403 is an authentication or permission problem, 404 means the endpoint or resource was not found.
  • Review the Outbound HTTP Requests log to see what was sent and received.

Inbound REST

Other systems reach the platform through REST APIs such as the Table API, or through scripted REST APIs you build. The REST API Explorer lets you try these APIs and generates sample requests.

Exam tip: test before scriptingUse the Test link and the status code to prove the connection works before writing the script around it.

Step 2 · Do

Connect to the asset system

When a loan is approved, look up the equipment's warranty in Acme's asset system over REST. This is a practice environment of our own design, not the ServiceNow product. Complete the tasks in the task list.

rest-message

Step 3 · Check

Exam-style questions

Select an answer and check it. Every answer includes an explanation.