ExamGecko
Question list
Search
Search

Question 27 - CAD discussion

Report
Export

When configuring a REST Message, the Endpoint is:

A.
The commands to the REST script to stop execution
Answers
A.
The commands to the REST script to stop execution
B.
The URI of the data to be accessed, queried, or modified
Answers
B.
The URI of the data to be accessed, queried, or modified
C.
Information about the format of the returned data
Answers
C.
Information about the format of the returned data
D.
The response from the provider indicating there is no data to send back
Answers
D.
The response from the provider indicating there is no data to send back
Suggested answer: B

Explanation:

When configuring a REST Message, the Endpoint is:

The URI of the data to be accessed, queried, or modified. This is the correct answer because the Endpoint is the part of the REST Message that specifies the location and the resource of the REST provider. The Endpoint is composed of the base URL and the resource path, which can include query parameters or variables. For example, the Endpoint for a REST Message that retrieves the weather information for a city from a web service could be https://api.openweathermap.org/data/2.5/weather?q=London.

The following are not correct definitions of the Endpoint when configuring a REST Message:

The commands to the REST script to stop execution. This is not correct because the commands to the REST script to stop execution are not part of the REST Message, but of the Scripted REST API, which is a feature that allows users to create custom REST endpoints on the ServiceNow platform. The commands to the REST script to stop execution are methods of the RESTAPIResponse object, such as setStatusCode, setError, or complete.

Information about the format of the returned data. This is not correct because the information about the format of the returned data is not part of the Endpoint, but of the HTTP headers or the Accept field of the REST Message. The HTTP headers or the Accept field can be used to specify the content type of the response, such as JSON, XML, or HTML.

The response from the provider indicating there is no data to send back. This is not correct because the response from the provider indicating there is no data to send back is not part of the Endpoint, but of the HTTP status code or the response body of the REST Message. The HTTP status code or the response body can be used to indicate the result of the REST request, such as 200 OK, 404 Not Found, or 500 Internal Server Error.References:REST Messages, Scripted REST APIs

asked 23/09/2024
Jose M Rivera Vega
34 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first