nerdexam
Cisco

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.

Understanding and Using APIs

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)
  • A
    89% (41)
  • B
    4% (2)
  • D
    2% (1)
  • E
    4% (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.

AresourceCorrect

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.

Bparameter

Parameters are optional values that filter or modify a request - a REST call can be valid and complete without them.

CmethodCorrect

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.

Dquery

A query string is an optional component used to pass filtering or sorting criteria and is not required for every REST API call.

Efragment

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

#REST API#HTTP methods#API resources#API structure

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice