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.
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)- A87% (45)
- B8% (4)
- C4% (2)
- D2% (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.
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.
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.
REST APIs perform operations on specific resources, not directly on an entire 'platform,' although a platform may host many resources.
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
Community Discussion
No community discussion yet for this question.