10-09-2020 06:09 AM
I want to retrieve an overview of all fabric sites using DNA-C API. But where I can get an overview of all sites using a get request on https://{controller_ip}/dna/intent/api/v1/site, I can't get an overview of all fabrics using https://{controller_ip}/dna/intent/api/v1/business/sda/fabric. It looks like a siteNameHierarchy is required. But how do I retrieve that siteNameHierarchy if there is no top level request? Or am I totally searching into the wrong direction?
Best regards,
Chris Donkelaar
Solved! Go to Solution.
10-09-2020 07:38 AM
I don't see a direct API to get all fabric sites. So, what you can potentially do is find all sites using the 'https://<DNAC_IP_address>/dna/intent/api/v1/site' API, retrieve the relevant site hierarchies from here and then feed each site hierarchy combination into the fabric site API 'https://<DNAC_IP_address>/dna/intent/api/v1/business/sda/fabric' to determine if it is a fabric site or not.
10-09-2020 07:38 AM
I don't see a direct API to get all fabric sites. So, what you can potentially do is find all sites using the 'https://<DNAC_IP_address>/dna/intent/api/v1/site' API, retrieve the relevant site hierarchies from here and then feed each site hierarchy combination into the fabric site API 'https://<DNAC_IP_address>/dna/intent/api/v1/business/sda/fabric' to determine if it is a fabric site or not.
10-09-2020 08:17 AM
Thank you @Aninda Chatterjee, this does indeed verify if sites are also fabric sites, and it does respond with a fabricName item. But when you still have empty fabrics, you're basically screwed? Do you know if any API call is in development to escape reverse engineering this way?
10-11-2020 08:18 PM
I don't think there's an API in development specifically for this, but I can check. What is your end goal here? Is it just to determine which sites are fabric sites?
Cheers,
Aninda
10-12-2020 05:58 AM - edited 10-12-2020 06:21 AM
Automated fabric creation, so build it all (fabric, site, VNs, devices, etc) from one or a couple of scripts with some input file. And also to get info from DNA-C, such as fabric, and then select the fabric as new input to get all the fabric-sites related, etc.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide