01-06-2023 07:47 AM
Hi folks,
I try to move devices from the 'Unassigned Devices' section to the correct site but even though the business-api returns OK the device still remains in the 'Unassigned Devices' section.
First I tried the dnacentersdk 2.3.3.0, then I moved to bare calls via python request library but both report for the task
'message': 'The request has been accepted for execution'
and for the query to 'executionStatusUrl': '/dna/platform/management/business-api/v1/execution-status/.... I get
'bapiName': 'AssignDeviceToSite',
'status': 'SUCCESS',
Has anyone managed to successfully move a newly added device to a site ?
01-14-2023 09:40 AM
Hi @uheil,
You can try disabling and re-enabling the REST bundle. It seems to work for these issues...
https://community.cisco.com/t5/cisco-digital-network-architecture-dna/api-not-working/td-p/3857007
...I think it's worth a shot.
01-16-2023 08:43 AM
thx for your reply!
Under Platform > Manage > Bundles I disabled the REST API for 30 sec. and tried again but unfortunately the device stayed in the Unassigned Devices section. If you think there is anything else I can try or if you might know what kind of service I could monitor from the terminal with magctl service logs ... I'd give it a try. If not I'd open a TAC request.
02-23-2023 07:45 AM
Hi @uheil
I am experiencing the same problem on DNAC 2.2.3.6. Did you manage to solve this issue, if so how?
02-28-2023 05:06 AM
Hi @CoffeOfCup
I did not manage to solve it.
I wanted to open a TAC case but got caught by other tasks.
02-23-2023 10:27 AM
I have Version 2.3.3.6, just tried and it worked for me. - /dna/intent/api/v1/assign-device-to-site/${siteId}/device
02-28-2023 05:09 AM
Hi @yawming
I only tried a specific version with the SDK, how do I specify which version to use when using pure REST requests?
02-28-2023 09:30 AM
Hi I am using REST API not SDK.
Thanks
03-01-2023 12:34 AM
Hi @yawming
jeah, while driving home it occurred that I mixed things up between Versions of the REST APi and the dnacentersdk...
For the record, I'm having the problem wit DNAC v2.2.3.6, tried the dnacentersdk using v 2.3.3.0 and pure REST requests with the URL /dna/intent/api/v1/assign-device-to-site/${siteId}/device.
02-28-2023 05:13 AM
Hi @uheil
Thank you for the response.
I will proceed with upgrading to 2.2.3.6 this weekend, and then see if it solves the issue.
If not i will be opening a TAC case.
03-07-2023 10:56 AM
Is there any issue if assign it via UI ?
03-08-2023 06:27 AM
@yawming sorry for the late reply, assigning devices via UI just works fine. Only via API (REST & SDK) won't do.
03-06-2023 06:43 AM
How do you get a list of all devices that are in "Unassigned Devices" via API call. Because you need the IP address of the device to be used in the json body.
I have tried dna/intent/api/v1/network-device then i get all devices with there status, but not the devices that are under "Unassigned Devices" how can i get a list of "Unassigned Devices"
Regards
T
03-06-2023 10:44 AM
Since I know the IPs of the devices I wnat to assign I can't tell you.
But feel free to open a new thread for a new question, maybe someone will answer there.
regards
03-07-2023 10:41 AM
Very good question, I cannot find an API to list "unassigned device" but there is an ApI can list all the devices under that site.
/dna/intent/api/v1/membership/${siteId}
response sample:
{
"site": {
"response": [
{}
],
"version": "string"
},
"device": [
{
"response": [
{}
],
"version": "string",
"siteId": "string"
}
]
}
Under "device" it will list all devices (with IP and detail)
If you don't have too many sites it's not hard to search all sites and find out if that particular IP is assigned or not.
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