nerdexam
Cisco

200-901 · Question #306

How are operations on REST APIs performed as compared to RPC APIs?

The correct answer is A. In a REST API, operations are performed on an object (node) that is identified by a URL, but RPC. REST APIs operate on named resources identified by URLs, performing standard HTTP methods against them, whereas RPC APIs focus on executing specific functions or procedures.

Understanding and Using APIs

Question

How are operations on REST APIs performed as compared to RPC APIs?

Options

  • AIn a REST API, operations are performed on an object (node) that is identified by a URL, but RPC
  • BIn a REST API, operations are performed on an external resource that is defined on the API, but
  • CIn a REST API, operations are performed on a platform that is identified by the URL, but RPC
  • DIn a REST API, operations are performed on an internal resource that is defined on the API, but

How the community answered

(52 responses)
  • A
    87% (45)
  • B
    8% (4)
  • C
    4% (2)
  • D
    2% (1)

Why each option

REST APIs operate on named resources identified by URLs, performing standard HTTP methods against them, whereas RPC APIs focus on executing specific functions or procedures.

AIn a REST API, operations are performed on an object (node) that is identified by a URL, but RPCCorrect

In a REST API, operations such as retrieving, creating, updating, or deleting data are performed directly on specific resources, which are conceptually objects or nodes identified uniquely by a URL. This resource-centric approach contrasts with RPC APIs, which focus on invoking functions or procedures.

BIn a REST API, operations are performed on an external resource that is defined on the API, but

REST APIs operate on resources, not necessarily 'external' ones, and the term 'defined on the API' is vague regarding the core principle of resource identification by URL.

CIn a REST API, operations are performed on a platform that is identified by the URL, but RPC

REST APIs perform operations on specific resources, not directly on an entire 'platform,' although a platform may host many resources.

DIn a REST API, operations are performed on an internal resource that is defined on the API, but

Similar to choice B, 'internal resource that is defined on the API' is less precise than 'object (node) that is identified by a URL,' which directly reflects the resource-oriented nature of REST.

Concept tested: REST API vs RPC API architecture

Source: https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus9000/sw/7-x/programmability/guide/b_Cisco_Nexus_9000_Series_NX-OS_Programmability_Guide_7x/b_Cisco_Nexus_9000_Series_NX-OS_Programmability_Guide_7x_chapter_010.html#concept_664157F322FC4C9B86641910609D9453

Topics

#REST API#RPC API#API architecture#Resource-oriented

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice