nerdexam
Cisco

200-901 · Question #536

How does a synchronous API request differ from an asynchronous API request?

The correct answer is A. clients are able to access the results immediately. Synchronous API requests require the client to wait for a complete response from the server before continuing its operations, making the results immediately accessible upon receipt.

Understanding and Using APIs

Question

How does a synchronous API request differ from an asynchronous API request?

Options

  • Aclients are able to access the results immediately
  • Bclients subscribe to a webhook for operation results
  • Cclients poll for the status of the execution of operations
  • Dclients receive responses with a task ID for further processing

How the community answered

(27 responses)
  • A
    85% (23)
  • B
    7% (2)
  • C
    4% (1)
  • D
    4% (1)

Why each option

Synchronous API requests require the client to wait for a complete response from the server before continuing its operations, making the results immediately accessible upon receipt.

Aclients are able to access the results immediatelyCorrect

In a synchronous API request, the client sends a request and blocks, waiting for the server to process the entire operation and return the final results directly in the response. This means the client receives and can immediately access the results upon the response's arrival.

Bclients subscribe to a webhook for operation results

Clients subscribing to a webhook for operation results is characteristic of an asynchronous API pattern, where the server notifies the client when the task is complete.

Cclients poll for the status of the execution of operations

Clients polling for the status of operation execution is a method used with asynchronous API requests, where the initial response provides a task ID, and the client repeatedly checks the status using that ID.

Dclients receive responses with a task ID for further processing

Clients receiving responses with a task ID for further processing is typical of an asynchronous API, where the task ID is used for subsequent polling or webhook registration to retrieve the final result.

Concept tested: Synchronous vs Asynchronous API

Source: https://restfulapi.net/synchronous-asynchronous-apis/

Topics

#API interaction#Synchronous APIs#Asynchronous APIs#Request-response

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice