01-14-2022 07:38 AM
One of the more fundamental things you do in DNA Center in every deployment is once the device is discovered and the network settings established in design, you provision the device. To do this in the GUI you check the box next to the device in inventory, then Actions -> Provision -> Provision Device.
I can't find how to do this in the API. I see how to do this in SDA, but that's even more advanced. I also see how to use configuration templates, again, this is more advanced. Can some point me to how to do the basic "Provision Device" explained above. I simply want to kick off this process with an API. Or let me know if it does not exist or I'm looking at this wrong somehow. Thanks!
Solved! Go to Solution.
01-21-2022 07:23 AM
Mike,
Thanks for pointing me in the right direction. I tried that API and it actually did NOT work for me at first. See, I don't have an SDA fabric built yet and it sent me back an error (I forget exactly what it said) that it could not find the location I specified. From an SDA fabric perspective, that made sense since that location exists in DNAC but not in the SDA Fabric tool. So as a workaround, I created the SDA fabric for my location Global/Richfield, used the provisioning API that you mentioned, then removed the fabric. In essence, I used 3 API calls:
POST https://{{DNAC_IP}}/dna/intent/api/v1/business/sda/fabric-site
01-14-2022 09:04 AM
I'll admit I haven't actually tried to do a provision via API, but I looked through the Developer Toolkit and it looks to me like this is the one to try (I found it under the Site Management->Configuration Template menu
https://< dna ip>/dna/intent/api/v1/template-programmer/template/deploy
01-18-2022 09:00 AM
Preston, Thanks for the response. I went through the effort of trying the API you suggested. I had to create templates, that honestly, I don't need. But after going through the excercise, it ONLY deployed the template I created and did not deploy the aaa servers, NTP servers, etc. that I had established under Design... Network Settings. So I guess I'm back to square 1. Thanks for chiming in, though.
01-18-2022 12:29 PM
Can some point me to how to do the basic "Provision Device" explained above. I simply want to kick off this process with an API.
-I think what you are looking for is this: https://developer.cisco.com/docs/dna-center/#!provision-wired-device
Specifically this api: dna/intent/api/v1/business/sda/provision-device
Not sure what version of DNAC you are running, but later 2.2.3 versions support it. Lastly, I have attached an ansible playbook I made that does the job too. Pay attention to the specifics of your payload as there are some items that are required in order to be successful. HTH!
01-21-2022 07:23 AM
Mike,
Thanks for pointing me in the right direction. I tried that API and it actually did NOT work for me at first. See, I don't have an SDA fabric built yet and it sent me back an error (I forget exactly what it said) that it could not find the location I specified. From an SDA fabric perspective, that made sense since that location exists in DNAC but not in the SDA Fabric tool. So as a workaround, I created the SDA fabric for my location Global/Richfield, used the provisioning API that you mentioned, then removed the fabric. In essence, I used 3 API calls:
POST https://{{DNAC_IP}}/dna/intent/api/v1/business/sda/fabric-site
01-21-2022 07:25 AM
for the record, I'm running DNAC 2.2.3.4
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