09-08-2020 05:01 AM
Hi ,
I was trying to add additional fields to return for SM Devices.
But I am finding this error
Solved! Go to Solution.
09-13-2020 02:41 PM
/networks/:networkId/sm/devices?fields[]={{fields}}
I was trying some error and trial and the above worked for me.
09-08-2020 02:14 PM
Have you got it formatted as an array?
09-08-2020 03:17 PM
I've noticed this as well, particularly as a v0 to v1 problem.
The documentation for v0 actually states to use a comma-separated string for fields, which works for v0.
https://developer.cisco.com/meraki/api/#!get-network-sm-devices
This fails in v1. Trying to use an array doesn't work either.
This works (v0):
https://api.meraki.com/api/v0/networks/{{networkId}}/sm/devices?fields=id,name,lastUser,ownerEmail,ownerUsername
These do not (v1):
https://api.meraki.com/api/v1/networks/{{networkId}}/sm/devices?fields=id,name,lastUser,ownerEmail,ownerUsername
https://api.meraki.com/api/v1/networks/{{networkId}}/sm/devices?fields=[id,name,lastUser,ownerEmail,ownerUsername]
https://api.meraki.com/api/v1/networks/{{networkId}}/sm/devices?fields=['id','name','lastUser','ownerEmail','ownerUsername']
09-13-2020 02:41 PM
/networks/:networkId/sm/devices?fields[]={{fields}}
I was trying some error and trial and the above worked for me.
04-12-2021 07:46 PM
The following API call on version 1 should allow this to work for anyone who is curious:
{{baseUrl}}/networks/:networkId/sm/devices?fields[]=id,name
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