How To Use Filters
Filters are a powerful tool you can use to access the data you need
Most CMP APIs (*.list
operations) support the filter
parameter to make it easier to find the information you need. While filters are powerful, there are few caveats to remember:
Different keys in the same filter will do “AND”
Example: Using platform:google-cloud|status:archived
as a filter will filter the list of objects that are both for google-cloud
AND have archived
Same key multiple times in the same filter will do “OR”
Example: platform:google-cloud|platform:amazon-web-services
will return Known Issues that are from google-cloud
OR amazon-web-services
Having multiple keys multiple times is not supported
Example: In platform:google-cloud|platform:amazon-web-services|status:archived|status:active
, there are two “platform” and two “status” filters, and this is not supported in the CMP API. Using such a filter will result in an error.
The correct use of the filter in this case would be platform:google-cloud|platform:amazon-web-services|status:archived
Updated over 1 year ago