Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant