Developing Applications and Automating Workflows Using Cisco Platforms (DEVASC) — Question 142
What is a difference between a synchronous API and an asynchronous API?
Answer options
- A. Synchronous API calls require an authentication header to be sent while asynchronous calls do not require authentication.
- B. Synchronous API calls are returned immediately while asynchronous calls do not guarantee an immediate response.
- C. An asynchronous API can make offline calls while synchronous APIs do not have this capability.
- D. An asynchronous API can make a larger number of calls in a specified time period than a synchronous API.
Correct answer: B
Explanation
The correct answer is B because synchronous APIs wait for a response before moving on, while asynchronous APIs allow for other processing to occur without waiting. Option A is incorrect as both types can require authentication depending on the API. Option C is misleading since asynchronous APIs typically require a network connection to function. Option D is also not inherently true, as the number of calls is more about the implementation than the API type.