Reputation: 5
How do replicate the outcome of the CLI command : ibmcloud resource search 'service_name:logdnaat
via an API? I have figured the https://resource-controller.cloud.ibm.com/v2/resource_instances, but i don't understand the way I can apply the filter like in CLI to filter by service_name.
Any help ?
Upvotes: 0
Views: 60
Reputation: 17118
Yes, that is possible. All CLI commands are based on the (documented) IBM Cloud APIs. You can use IBMCLOUD_TRACE=true
to even trace your CLI command.
IBMCLOUD_TRACE=true ibmcloud resource search 'service_name:logdnaat
would print out how the actual search is performed. It boils down to the Global Search and Tagging API and its search function.
Upvotes: 1