A network team is scripting the network hierarchy in Catalyst Center before a branch rollout. The site creation call returns a task reference instead of the site itself, and the script needs each new building's ID before it can add floors beneath it. Which sequence of Site API calls creates each site and then retrieves its ID?
Select an answer to reveal the explanation.
Short Explanation
You can treat site creation in Catalyst Center as a job: the POST response gives you a task reference, not the completed site's ID. Poll the task until it succeeds, then read the site list and match the new site under its parent. That gives you the ID you need before adding floors.
Full Explanation
The correct sequence accounts for the asynchronous behavior: the POST returns a task reference, not the site resource or its ID. Poll the task until it completes, then read the site list and match the site by name within its intended parent to obtain the building ID for creating floors. Using an ID from the successful creation payload relies on the response containing the new site's ID, but here it contains a task reference instead. Waiting a fixed interval before listing and matching sites does not prove the task has finished; a slow operation may still be in progress, while an unnecessarily long delay wastes time. Polling until completion and comparing site counts confirms only that the total count changed, not which site was created or what its ID is, so it cannot target that building's floors. Exam caveat: task completion and resource visibility may be separate conditions in some APIs, so a completed task may not make the site immediately available in the list response. Practical check: confirm the task's terminal success state, then verify that the returned site record has the expected name and parent before using its ID.