Forum Discussion
ASM iRest filter not working
Using the following iREST call, the filter does not seem to have any effect. No errors returned. ALL signatures returned even if 'performStaging' is not 'true'. This is f5 ASM v11.5.0
curl -k -u admin:admin -X GET /signatures?$filter=performStaging%20eq%20true
- christopherlloy
Altostratus
MD5 HASH got removed from URL above. Meant to send:
curl -k -u admin:admin -X GET **HASH==/signatures?$filter=performStaging%20eq%20true
- suttonsc
Employee
Try adding an escape for the "$" in the curl command.
However the following is tested this on 11.5.4+:
curl -sk -u admin:admin -X GET https://10.3.155.111/mgmt/tm/asm/policies/H7xqtWU5TfZJpeXDcC3xAA/signatures?\$filter=performStaging%20eq%20true\&\$select=name,id,performStaging | jq . { "selfLink": "https://localhost/mgmt/tm/asm/policies/H7xqtWU5TfZJpeXDcC3xAA/signatures?$select=name%2Cid%2CperformStaging&$filter=performStaging%20eq%20true", "kind": "tm:asm:policies:signatures:signaturecollectionstate", "previousLink": "https://localhost/mgmt/tm/asm/policies/H7xqtWU5TfZJpeXDcC3xAA/signatures?$skip=0&$select=name%2Cid%2CperformStaging&$filter=performStaging%20eq%20true", "totalItems": 4513, "nextLink": "https://localhost/mgmt/tm/asm/policies/H7xqtWU5TfZJpeXDcC3xAA/signatures?$skip=0&$select=name%2Cid%2CperformStaging&$filter=performStaging%20eq%20true", "items": [ { "selfLink": "https://localhost/mgmt/tm/asm/policies/H7xqtWU5TfZJpeXDcC3xAA/signatures/1p7RmgJSYdJTivPK7b2b6A", "kind": "tm:asm:policies:signatures:signaturestate", "performStaging": true, "id": "1p7RmgJSYdJTivPK7b2b6A" }, { "selfLink": "https://localhost/mgmt/tm/asm/policies/H7xqtWU5TfZJpeXDcC3xAA/signatures/7TlZ3m1ho4uFZKhO10RVlQ", "kind": "tm:asm:policies:signatures:signaturestate", "performStaging": true, "id": "7TlZ3m1ho4uFZKhO10RVlQ" } ...
Filtering for "false", then "true" and again without escaping the "$":
curl -sk -u admin:admin -X GET https://10.3.155.111/mgmt/tm/asm/policies/H7xqtWU5TfZJpeXDcC3xAA/signatures?\$filter=performStaging%20eq%20false | jq .items[].performStaging | wc -l 0 curl -sk -u admin:admin -X GET https://10.3.155.111/mgmt/tm/asm/policies/H7xqtWU5TfZJpeXDcC3xAA/signatures?\$filter=performStaging%20eq%20true | jq .items[].performStaging | wc -l 4513 curl -sk -u admin:admin -X GET https://10.3.155.111/mgmt/tm/asm/policies/H7xqtWU5TfZJpeXDcC3xAA/signatures?$filter=performStaging%20eq%20false | jq .items[].performStaging | wc -l 4513
Reference questions which cover similar issues:
<this linked content has been deleted>
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com