nerdexam
Cisco

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.

Understanding and Using APIs

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

200-901 question #500 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)
  • A
    5% (2)
  • B
    89% (33)
  • C
    3% (1)
  • D
    3% (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.

APOST/discovery/ when there is a slot available and get the response from the POST call with the

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.

BGET/discovery/ when the discovery is finished and get the response from the GET call with theCorrect

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.

CPOST/discovery?discoveryid= when the discovery is created and get the response from the

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.

DPUT/discovery/ when the discovery is created and get the response of the discovery when it is

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

#REST API#Synchronous API#HTTP Methods#API Interaction Patterns

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice