How can I find based on a switch serial if it is assigned to a switch profile

RaresPauna
Getting noticed

How can I find based on a switch serial if it is assigned to a switch profile

Hello guys, i tried a workaround today with this call

RaresPauna_0-1711706218239.png

this call should return that profile parameter which shows the id of the switch profile. The problem is that running this call in postman/ script , with the latest api, is not returning that profile attribute, even if the switch is 100% assigned to a switch profile. Am I doing something wrong ? Is there other way to list the association between switches and switch profiles ? Thanks

3 Replies 3
LearningIsFun
Getting noticed

I’m pretty sure the profile you are looking at there is the security profile for the port, not the switch.  

I take that back. Think I’m wrong there. 

rhbirkelund
Kind of a big deal

If you use the Get Device Endpoint, does it return the switchProfileId?

RHB@wopr ~ % curl -L --request GET \
--url https://api.meraki.com/api/v1/devices/<serial> \
--header 'Authorization: Bearer xxx' \
--header 'Accept: application/json'
{"lat":nn,"lng":nn,"address":"","serial":"","mac":"34:56:fe","lanIp":"192.168.128.4","url":"","networkId":"","tags":[],"name":"Home-MS120-8LP","details":[],"model":"MS120-8LP","switchProfileId":null,"firmware":"switch-16-7-1","floorPlanId":""}
LinkedIn ::: https://blog.rhbirkelund.dk/

Like what you see? - Give a Kudo ## Did it answer your question? - Mark it as a Solution 🙂

All code examples are provided as is. Responsibility for Code execution lies solely your own.
Get notified when there are additional replies to this discussion.