An engineer automates a campus rollout in Catalyst Center where the area Global/EMEA Campus already exists and a new building called Warehouse B must be added beneath it. Address and coordinates are ready, the script fetches a token from the authentication endpoint first, and confirmation must come from the site query before any devices arrive. Which API sequence creates and verifies the new site in Catalyst Center?
Select an answer to reveal the explanation.
Short Explanation
Sites in Catalyst Center form a family tree, so the new building needs its parent named before anything else. The X-Auth-Token header is your badge: fetch a token and include it on each site call, refreshing it if it expires. Reading the site list by name proves the building exists before any gear shows up.
Full Explanation
Catalyst Center stores sites as a hierarchy, and the create call expresses that relationship with parentName holding the full path down to the parent, so the building payload must name Global/EMEA Campus for Warehouse B to land in the right branch. Authentication follows a two-step pattern: credentials are exchanged for a token, and that token is sent in the X-Auth-Token header on site calls while valid. Because the create operation returns a task identifier, wait for the task to finish before verifying with a GET on the site collection filtered by name; the building can be empty of hardware. A payload carrying the name, address and coordinates but no parent does not place the building under the specified area, sending basic credentials on the site calls skips the token authentication flow, and querying the network device list proves nothing about a site that has no devices yet. Practical check: run the GET with the name filter and confirm the returned site name hierarchy shows the building under Global/EMEA Campus.