200-901 · Question #500
Refer to the exhibit. The sequence diagram shows a RESTful API call. Which step and response will represent the behavior of the REST API call to be synchronous?
The correct answer is B. GET/discovery/ when the discovery is finished and get the response from the GET call with the. Synchronous REST API behavior means the client waits and receives the complete result in a single response, not a deferred or polling pattern.
Question
Refer to the exhibit. The sequence diagram shows a RESTful API call. Which step and response will represent the behavior of the REST API call to be synchronous?
Exhibit
Options
- APOST/discovery/ when there is a slot available and get the response from the POST call with the
- BGET/discovery/ when the discovery is finished and get the response from the GET call with the
- CPOST/discovery?discoveryid= when the discovery is created and get the response from the
- DPUT/discovery/ when the discovery is created and get the response of the discovery when it is
How the community answered
(37 responses)- A5% (2)
- B89% (33)
- C3% (1)
- D3% (1)
Why each option
Synchronous REST API behavior means the client waits and receives the complete result in a single response, not a deferred or polling pattern.
A POST that returns immediately when a slot is available provides only a creation acknowledgment, not the finished result - this is the trigger step of an asynchronous flow.
A GET request to /discovery/ that returns only when the discovery operation is fully finished is synchronous because the client blocks until the complete result is available in the response body. This contrasts with asynchronous patterns where the initial call returns immediately with a reference ID and the client must poll separately. The GET verb retrieving a completed resource state is the hallmark of a synchronous interaction.
Receiving a response when the discovery is merely created (not finished) means the client must poll later for the result, which is the definition of asynchronous behavior.
PUT is used to update a resource, not to retrieve a completed discovery result; this does not represent a synchronous retrieval of the final outcome.
Concept tested: Synchronous vs asynchronous REST API patterns
Source: https://developer.cisco.com/docs/dna-center/api/2-3-5/
Topics
Community Discussion
No community discussion yet for this question.
