cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2569
Views
4
Helpful
16
Replies

DNAC REST API: Assign device to site doesn't move device to site

uheil
Level 1
Level 1

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 ?

16 Replies 16

Hi, thanks for your reply. I’ll give it a try. But since the device is not assigned to a site yet will it be visible under any site then?

I trying to list out unassigned device. They are not assigned to any site yet. If you understand me.

Let's say you have 2 sites and you have added 10 devices, 7 assigned 3 not assigned.  

Use /dna/intent/api/v1/network-device you get all 10 devices and use /dna/intent/api/v1/membership/${siteId} to query all sites you get 7 assigned devices.

Then you can find out those 3 assigned devices, of cause some programming logic is needed.