new Asset(api_keyopt)
Parameters:
Name |
Type |
Attributes |
Description |
api_key |
string
|
<optional>
|
|
- Source:
Methods
fields_for(asset_type, cb)
gets an object containing field names, the name of the asset, and an array
of relation fields
Parameters:
Name |
Type |
Description |
asset_type |
string
|
the asset type to list fields for |
cb |
arrayCallback
|
called with an array of objects detailing the fields |
- Source:
list_types(cb)
gets an array of names of object types that can be searched for
Parameters:
Name |
Type |
Description |
cb |
arrayCallback
|
called with an array of types (as strings) |
- Source:
query(match, cb)
Queries the list of assets of a given type for those matching specified fields
Parameters:
Name |
Type |
Description |
match |
object
|
an object where the keys are field names and the
values are the values to match for that field (leave null to get all
assets of the given type)
Properties
Name |
Type |
Description |
asset_type |
string
|
the type of asset to search for |
|
cb |
arrayCallback
|
called with an array of asset objects |
- Source:
set_api_key(api_key)
sets the api key to use when making calls to CloudHealth's API
Parameters:
Name |
Type |
Description |
api_key |
string
|
|
- Source: