03-01-2022 01:19 PM
I found the following Device onboarding example on DevNet:
Device Onboarding - Cisco DNA Center Platform - Document - Cisco DevNet
It uses the Site Profile API to create a Site(Network) Profile and with an onboarding template.
I want to do something similar but using DayN templates. Unlike other APIs this one doesn't appear to be documented within DNA Center and I can't find any documentation about it elsewhere.
I would like to understand the structure of the Json object I need to pass to the API to create the site profile.
Also if there any other calls I can make, e.g. to update a profile or get details of an existing profile,
We are running version 2.2.3.4
03-21-2023 03:29 AM
Hello,
I know this response is late compared to the original post.
But i ran into the same issue while working on Version 2.3.3.6.
After some time I found this undocumented API Call to find the complete informations about a specific Site(Network) Profile :
https://{{dnac}}/api/v1/siteprofile/{{siteProfileId}}?populated=true
This will produce a payload like this :
{
"response": {
"siteProfileUuid": "{{siteProfileId}}",
"version": 41,
"name": "{{siteProfileName}}",
"namespace": "switching",
"status": "final",
"lastUpdatedBy": "raphcpv",
"lastUpdatedDatetime": 1679393420330,
"profileAttributes": [
{
"key": "site.settings",
"attribs": [
.....
]
},
{
"key": "day0.templates",
"attribs": [
{
"key": "device.family",
"value": "Switches and Hubs",
"attribs": [
{
"key": "device.series",
"attribs": [
{
"key": "device.type",
"attribs": [
{
"key": "template.id",
"value": "{{templateId}}",
"attribs": [
{
"key": "template.name",
"value": "{{templateName}}"
}
]
}
]
}
]
}
]
}
]
},
{
"key": "cli.templates",
"attribs": [
{
"key": "device.family",
"value": "Switches and Hubs",
"attribs": [
{
"key": "device.series",
"attribs": [
{
"key": "device.type",
"attribs": [
{
"key": "template.id",
"value": "{{templateId}}",
"attribs": [
{
"key": "template.name",
"value": "{{templateName}}"
},
{
"key": "template.version",
"value": "1"
}
]
}
]
}
]
}
]
}
]
}
],
"siteCount": 1
},
"version": "1.0"
}
As you can see you have a profile attributes called cli.templates, you can use it to configure you Day-N template, using my payload as an example.
03-21-2024 06:25 PM
Hey there,
Can you help me with understand what I would need to put this together in a python script? I want to create a script for a site, and create a network profile for that site, then assign the DAY-N template to that site, programmatically, so its ready to deploy when I need it. Can you help please? I'm kinda new to this aspect, and I am getting to grips with a lot of it, but creating new ones is a bit of a mystery at this point.
Thanks
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