cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
418
Views
2
Helpful
2
Replies

DNAC API - Get Membership issues

thisd00d
Level 1
Level 1

Hi,
I am attempting to retrieve a list from DNAC with devices assigned to specific sites.
The Get Membership API documentation states that the device information should be returned with this call. However, the data retrieved with this call never returns the device information. This is regardless of whether I'm trying to retrieve the data from our own physical DNAC appliance or one of the cloud instances (dcloud, sandbox). Only site information is returned.

DNAC version: 2.3.3.7

2 Replies 2

marce1000
VIP
VIP

 

 - Could you try this  : GET /dna/intent/api/v1/site-membership?siteId=1234567890&includeDeviceInfo=true

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

The fault was in my own code. Your reply helped me look closer.

def get_site_devices(headers, site_id):
    response = requests.get(BASE_URL + MEMBERSHIP_SITE_URL.format(site_id=site_id), headers=headers, verify=False)
    return response.json()['site']['response']

I was returning the response and selecting ['site'] in the json output. By just writing the line as return response.json() shows the device info as expected.

Thank you for your time.

Review Cisco Networking for a $25 gift card