System Manager API Device Scope By Tag

SOLVED
wperry1
Here to help

System Manager API Device Scope By Tag

Based on the documentation here, you can query devices by tag scopes but either it doesn't specify or I am misreading how to specify the scope.

 

The field description says

 

Specify a scope (one of all, none, withAny, withAll, withoutAny, or withoutAll) and a set of tags as comma separated values.

 

so it should be something like scope=withAny, but then what? Where do you list the tags to query?

 

Thank you in advance for any help on this.

WP

1 ACCEPTED SOLUTION
VictorM
Meraki Alumni (Retired)
Meraki Alumni (Retired)

Hey WP

 

You can include the tags after the scope descriptor, separated by a comma.

 

So, for example, if you wanted to return all devices with any of the tags "engineering" and "hq", you'd do:

 

scope=withAny,engineering,hq

 

For any devices without any of the tags "compromised", you would do:

 

scope=withoutAny,compromised

 

etc.

 

Hope this helps!

View solution in original post

2 REPLIES 2
VictorM
Meraki Alumni (Retired)
Meraki Alumni (Retired)

Hey WP

 

You can include the tags after the scope descriptor, separated by a comma.

 

So, for example, if you wanted to return all devices with any of the tags "engineering" and "hq", you'd do:

 

scope=withAny,engineering,hq

 

For any devices without any of the tags "compromised", you would do:

 

scope=withoutAny,compromised

 

etc.

 

Hope this helps!

I'm a little embarrassed I didn't think of that. I tried a colon, semicolon, and space (%20). It didn't occur to me to use a comma.

 

Thanks for your help.

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.
Labels