CloudHealth Asset API results are slow
search cancel

CloudHealth Asset API results are slow

book

Article ID: 375131

calendar_today

Updated On:

Products

CloudHealth

Issue/Introduction

Returning raw asset API data can take much longer than expected due to the large amount of data that that is joined together when creating the response.

Resolution

If possible, select only the fields of interest using a fields parameter.  This can increase performance by orders of magnitude.  Here is an example call with a fields parameter selecting the subset of fields needed.

https://chapi.cloudhealthtech.com/api/search?name=AwsInstance&page=1&api_version=2&query=is_active=1&fields=name,instance_id,ip,state,created_at,launch_date,launched_by,terminated_by,tags

Perspective group membership data is often compute intensive and if not needed should not be included in the API request.

Please see https://apidocs.cloudhealthtech.com/#asset_search-for-assets for additional details.