How to fitering?

I want to filter only the router policies where the name does not contain "edge-router-" and the edgeRouterRoles has an ID I want (e.g., asdfg).

I tried this

not (name contains "edge-router-") and ("asdfg" in edgeRouterRoles)

Hi @BaS2L,

(not (name contains "edge-router-")) and anyOf(edgeRouterRoles) = "#asdfg"

Some things to note:

  1. Matching against 'asdfg' should fail as edgeRouterRoles must have an '@' or '#' prefex to indicate if they're referencing an identity or a roleAttribute.
  2. If you want to match entities, you'll need to use the id, not the name of the identity to match against.
  3. If you are filtering by a specific entity, there are APIs for that. Ex:
ziti list edge-router edge-router-policies my-edge-router 'not (name contains "edge-router-")' 

That would find edge router policies where the policy name doesn't "edge-router-" for the edge router named "my-edge-router".

Hope that's helpful,
Paul