Class: Report

cox-chapi.Report

new Report(api_keyopt)

Parameters:
Name Type Attributes Description
api_key string <optional>
Source:

Methods

dimensions(flagsopt, base, cb)

lists the possible dimensions for generating a report under a base
Parameters:
Name Type Attributes Description
flags object <optional>
an object containing flags
Properties
Name Type Attributes Description
short boolean <optional>
specifies to yield only the name and label of dimensions and measures
base string the category/sub-category for the report to show in the form "category/sub-category" (ie. "usage/instance" or "cost/history")
cb objectCallback yields an object containing dimensions (used for x-axis or category) and measures (used for y-axis)
Source:

generate(base, x, y, category, intervalopt, cb)

returns data for a custom report built from the parameters you specify
Parameters:
Name Type Attributes Description
base string the category/sub-category for the report to show in the form "category/sub-category" (ie. "usage/instance" or "cost/history")
x string the id of the dimension to use for the x-axis
y string the id of the measure to use for the y-axis
category string the id of the dimension to use for categorizing the report's data
interval stirng <optional>
the time interval by which to break up the data (only use if either the x or category dimensions are "time")
cb objectCallback yields an object containing data for the report as well as data about the report (including dimensions, filters, interval, measures, report name, status, and the last time the report was updated)
Source:

get(id, cb)

gets data for the report with the given id
Parameters:
Name Type Description
id string the id of the report
cb objectCallback yields the report data
Source:

list(flagsopt, topicopt, cb)

gets a list of topics (or reports for a topic if a topic id is specified)
Parameters:
Name Type Attributes Description
flags object <optional>
an optional object specifying the following options
Properties
Name Type Attributes Description
nest boolean <optional>
if true, each topic will have a "reports" field containing the result of calling this function for that topic
all boolean <optional>
same as nest
topic string <optional>
the topic to list subtopics for
cb arrayCallback called with an array of objects, each containing a name and id field for a topic
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: