Topic: 350-901 topic 1 question 375

Refer to the exhibit. A devops engineer activates an intent-based policy in the Cisco DNA Center using the asynchronous API, which returns an HTTP 202 status code. How does the engineer validate that the policy has eventually succeeded or failed?

A.
Query the Cisco DNA Center using a REST GET API with the returned URL.
B.
Query the Cisco DNA Center using a REST GET API with the returned taskId.
C.
Send a REST POST API to the Cisco DNA Center with the returned URL.
D.
Send a REST GET API to the Cisco DNA Center with the returned taskId.

Re: 350-901 topic 1 question 375

To validate whether the intent-based policy has eventually succeeded or failed after receiving an HTTP 202 status code from the asynchronous API call in Cisco DNA Center, the engineer should use option B: Query the Cisco DNA Center using a REST GET API with the returned taskId.

Here's why:

When an asynchronous API call returns an HTTP 202 status code, it typically means that the request has been accepted for processing, but the processing is not yet complete.
The taskId returned in the response is a unique identifier for the task created by the intent-based policy activation.
By querying the Cisco DNA Center using a REST GET API with the taskId, the engineer can retrieve the status of the task, including whether it has succeeded, failed, or is still in progress.
This approach allows the engineer to monitor the progress and outcome of the intent-based policy activation.
Therefore, option B is the correct choice for validating the success or failure of the policy activation.

Re: 350-901 topic 1 question 375

B is the correct option.
URL : https://blogs.cisco.com/developer/network-automation-cisco-dna-center-sdk-2

Re: 350-901 topic 1 question 375

A and B are both an option.
{url} is the same as /dna/intent/api/v1/task/{taskId}
I vote A thought since it is easier and less likely to have an error.

Re: 350-901 topic 1 question 375

B. Query the Cisco DNA Center using a REST GET API with the returned taskId.

When an asynchronous API operation is called in Cisco DNA Center, a taskId is typically returned in the response. This taskId can be used to poll the status of the operation by sending a REST GET request to the Cisco DNA Center. The response of this GET request will contain the status of the task and hence can be used to determine whether the policy activation has succeeded or failed.

Re: 350-901 topic 1 question 375

/dna/intent/api/v1/task/{taskId}