Developing Applications and Automating Workflows Using Cisco Platforms (DEVASC) — Question 271
What is a characteristic of RPC APIs compared to REST APIs?
Answer options
- A. Authentication is done over provisions for the service caller and vice versa for RPC API, and REST API uses HTTP headers for authentication.
- B. All communications between the client and server must be stateless for RPC API, and REST API is stateful.
- C. The architecture model for RPC API is resource-focused, and REST API is procedure-focused.
- D. The data payload must be in JSON format for RPC API, and REST API allows JSON and XML formats.
Correct answer: A
Explanation
The correct answer is A because RPC APIs typically implement authentication based on the service caller's provisions, while REST APIs leverage HTTP headers for this purpose. Options B and C are incorrect as they misrepresent the statefulness of RPC versus REST, and option D is also wrong because REST APIs can handle multiple data formats, unlike RPC APIs which are often tied to JSON.