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

System Manager API Device Scope By Tag

Wperry1
Community Member

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

Accepted Solutions

vicm
Cisco Employee
Cisco Employee

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

vicm
Cisco Employee
Cisco Employee

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!

Wperry1
Community Member

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.