Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assets API - Filter by tag #197

Open
BrianFanning opened this issue Mar 3, 2022 · 0 comments
Open

Assets API - Filter by tag #197

BrianFanning opened this issue Mar 3, 2022 · 0 comments

Comments

@BrianFanning
Copy link

BrianFanning commented Mar 3, 2022

In the CloudHealth Assets console, it's very easy to use the Smart Filters to only show resources that have a particular tag key (and optionally a specific value). I haven't been able to emulate the same filtering with the Assets API. There is a tags field for most AWS resources but the docs aren't clear on whether you can filter down by a specific tag. I can filter all S3 buckets down to the ones that have no tags whatsoever with this query:

curl -H 'Authorization: Bearer my-token' "https://chapi.cloudhealthtech.com/api/search?&name=AwsS3Bucket&api_version=2&query=tags=''"

But how would I get all S3 buckets that have an Environment tag, for example? Or show all buckets that do not have a particular tag?

@BrianFanning BrianFanning changed the title Assets API - Query by tag Assets API - Filter by tag Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant