200-901 · Question #96
Which two parts are required for a RESTful API call? (Choose two.)
The correct answer is A. resource C. method. Every RESTful API call must include a resource identifying what is being acted on and an HTTP method defining what action to perform.
Question
Which two parts are required for a RESTful API call? (Choose two.)
Options
- Aresource
- Bparameter
- Cmethod
- Dquery
- Efragment
How the community answered
(46 responses)- A89% (41)
- B4% (2)
- D2% (1)
- E4% (2)
Why each option
Every RESTful API call must include a resource identifying what is being acted on and an HTTP method defining what action to perform.
The resource is the URI that identifies the specific object or collection being targeted, such as /api/v1/devices, and is mandatory in every REST request.
Parameters are optional values that filter or modify a request - a REST call can be valid and complete without them.
The HTTP method (GET, POST, PUT, DELETE, PATCH) defines the operation to perform on the resource and is required to form a valid and meaningful REST request.
A query string is an optional component used to pass filtering or sorting criteria and is not required for every REST API call.
A URL fragment (the # section) is a client-side browser construct used for page anchoring and is not transmitted to or processed by REST API servers.
Concept tested: Required components of a RESTful API call
Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
Topics
Community Discussion
No community discussion yet for this question.