Skip to content

Metric

Metric.


Fetch

Endpoint

1
POST /metric/fetch

Authorized User Role

1
user

Request Body

Field Type
items array

Response

Paged response.

Field Type Notes
data array An array of metrics each containing an array of metric with the following properties.
next string Paged cursor to use for the next page of items.
prev string Pages cursor to use for the previous page of items.

Metric

An array of Metric items.

Field Type Notes
dimensions array Dimensions for the metric.
metric string Metric name.
namespace string Always set to Embedthis/Device.
owner string The service owning the metric.
period number Metric timespan period.
points array Array of data points.
samples number Number of data points in the period.

Points

An array of Points items.

Field Type Notes
value number Metric value.
timestamp number Last update to the metric value in seconds since Jan 1, 1970.
count number Number of data values contributing to the metric value.

GetMetricList

Endpoint

1
POST /metric/getMetricList

Authorized User Role

1
user

Request Body

Field Type
cloudId string
namespace string
metric string

Response

Field Type Notes
namespaces array Returns the requested namespace. If not provided, returns a list of available namespaces.
metrics array If a namespace is provided, returns a list of available metrics.
dimensions array If a namespace and metric are provided, returns a list of available metric dimensions.

Action

Endpoint

1
POST /metric/action

Authorized User Role

1
public

Request Body

A object.

Query String Options

Field Type
action string
keep string

Visit

Endpoint

1
POST /metric/visit

Authorized User Role

1
public

Request Body

A object.

Query String Options

Field Type
browser string
dimensions string
mode string
dwell string
keep string
metric string
site string
url string
vary string