11-24-2020 09:47 AM
Hi all,
I see from the API docs for DNAC how you would create a global IP pool.
But how do you create/reserve a 'child' IP pool lower down in the hierarchy?
I need to create about 50-100 IP pools. Not a huge number but I would prefer to read a file and POST the new IP pool via API rather than create them manually.
Anybody know how to achieve this?
Thank you in advance,
Matt.
Solved! Go to Solution.
12-17-2020 10:26 PM
Hi Matt,
I do not write the whole code, so I could not provide you the whole python code. But here is what you will need to provide through API:-
POST https://{DNAC-IP}/api/v2/ippool/group
Body should be as follows (I just copied mine for you as a sample):-
{
"groupName": "POOL_NAME",
"groupOwner": "DNAC",
"type": "generic",
"siteId": "d4e85192-8f75-4aa4-a2eb-a48c5d102349",
"ipPools": [
{
"parentUuid": "fbc94e31-3a4b-438f-823e-b73fa1df7cf",
"dhcpServerIps": [
"192.168.1.1"
],
"dnsServerIps": [
"8.8.8.8"
],
"ipPoolOwner": "DNAC",
"shared": true,
"gateways": [
"172.16.100.1"
],
"ipPoolCidr": "172.16.100.0/24"
}
]
}
01-11-2021 12:45 PM
Unfortunately, I could not find it on the documentation. I captured it using Postman. I run Postman Interceptor chrome extension.
12-17-2020 10:26 PM
Hi Matt,
I do not write the whole code, so I could not provide you the whole python code. But here is what you will need to provide through API:-
POST https://{DNAC-IP}/api/v2/ippool/group
Body should be as follows (I just copied mine for you as a sample):-
{
"groupName": "POOL_NAME",
"groupOwner": "DNAC",
"type": "generic",
"siteId": "d4e85192-8f75-4aa4-a2eb-a48c5d102349",
"ipPools": [
{
"parentUuid": "fbc94e31-3a4b-438f-823e-b73fa1df7cf",
"dhcpServerIps": [
"192.168.1.1"
],
"dnsServerIps": [
"8.8.8.8"
],
"ipPoolOwner": "DNAC",
"shared": true,
"gateways": [
"172.16.100.1"
],
"ipPoolCidr": "172.16.100.0/24"
}
]
}
01-07-2021 02:59 AM
hey .. how did you get this endpoint - https://{DNAC-IP}/api/v2/ippool/group
its not documented for i cant find it .. can you please share a link to docs.
Thanks
01-11-2021 12:45 PM
01-11-2021 11:37 PM
That is AWESOME! Thank you so much for your initial reply (sorry for not replying sooner - I was also trying to find the docs and how you knew to use that API endpoint).
And thank you for showing how you found it using Postman Interceptor. I've literally just added a new IP Pool in the DNAC UI with interceptor running and all the info is there in glorious detail!!
Thank you so much!!
Matt.
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