01-14-2025 11:00 AM
I am trying to write an API call to get the image name (essentially the file) being used for a specific device. I can get the device details and find the version number - but there are several images that have the same version number (different image types) so I cannot match it specifically using version number.
In the Catalyst Center UI, you can see the image name for a given device but there does not seem to be a way to get that same info using the API. Since it is viewable via the API for a specific device, there has to be some way to match this up.
Any assistance is appreciated. Thanks in advance
01-21-2025 08:00 AM
Here is an example of how I can see it in the UI when viewing device details from the 360 page.
01-21-2025 08:18 AM
Just a guess GET /dna/intent/api/v1/image/importation
API endpoint to retrieve a list of all available images in the Catalyst Center. I am guessing this might provide details such as image name, version, platform compatibility, and file size. https://developer.cisco.com/docs/dna-center/get-software-image-details/
01-21-2025 08:49 AM - edited 01-21-2025 08:49 AM
Hi @bigevilbeard and thanks. I can get a list of images without issue, but my issue is trying to match the image to a device that is imaged with that image file. I can only seem to get image version (ex: 01.0.03) from the device details (not name) - but to match that up with an image file, there can be image_abc.01.02.03.bin, image_xyz.01.02.03.bin, etc. (note the same version number but different image types). It is difficult to match which image has been applied to a specific device (at least I have not found clear way using the API. I am still investigating and testing). I hope my end goal makes sense. I appreciate your input, though.
01-21-2025 09:08 AM
Hmm... when you load the UI, in Chrome Developer tools, look in the console when you open this page in the UI and see if there is an API call in there, it might show one, which you can use. I see your issue and thats a pickle, to match these when one API call omits the details.
01-21-2025 09:23 AM
Thanks - yes, I have been doing so. but with no luck so far. It appears the pages are generated via a script, but I cannot determine what API calls may be involved in its execution. I will keep trying. Thanks again
01-21-2025 10:05 AM
What’s the UI link you use, if I can get on the sandbox one, I’ll take a look. Stuff like this intrigues me.
01-21-2025 11:39 AM - edited 01-21-2025 11:39 AM
https://your.dna.domain/dna/provision/devices/inventory/device-details?deviceId=your_device_id_I_used_a_switch
Then on the left choose System \/ dropdown
Then Hardware and Software
There you can see the associated image file on the page.
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