Metrics API

Metrics allow you to add and visualize time series data for your performance testing.

Get a list of available metrics

GET nsim.iotify.io/api/datastore/:workspaceId/metric/list

Path Parameters

NameTypeDescription

workspaceId*

string

WorkspaceID for the workspace whose metrics list needs to be fetched

Headers

NameTypeDescription

Accept*

String

application/json

key*

String

API token for the account

domain*

String

The domain under which your account exists

Content-Type*

String

application/json

[{
    "key": "Metric_0"
}, {
    "key": "Metric_1"
}, {
    "key": "Metric_2"
}, {
    "key": "Metric_3"
}, {
    "key": "Metric_4"
}]
// Example curl command

curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "key:$KEY" -H "domain:nsim.iotify.io" nsim.iotify.io/api/datastore/$WORKSPACEID/metric/list

Get the data for a metric

POST nsim.iotify.io/api/datastore/:workspaceId/metric/list/:metricKey

Path Parameters

NameTypeDescription

metricKey*

String

The key for the metric

workspaceId*

String

WorkspaceID for the workspace where the metric exists

Headers

NameTypeDescription

Accept

String

application/json

key

String

API token for the account

domain

String

The domain under which your account exists

Content-Type

String

application/json

Request Body

NameTypeDescription

timeInterval*

Number

Metrics aggregated over time interval

aggregateBy*

String

The aggregation function to be used

timeUnit*

String

The unit of time for the time interval

entityId

String

The ID for the simulation job (If you want metrics only for a fixed job)

[
    [1671190292000, 77],
    [1671190302000, 77],
    [1671190312000, 78],
    [1671190322000, 70],
    [1671190332000, 72],
    [1671190342000, 70],
    [1671190352000, 68],
    [1671190362000, 68],
    [1671190372000, 66],
    [1671190382000, 67],
    [1671190392000, 69],
    [1671190402000, 68]
]
// Example curl command

curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "key:$KEY" -H "domain:nsim.iotify.io" -d '{"timeInterval":"1","timeUnit":"s","aggregateBy":"AVG","entityId":"fbe7933c-b27e-4397-8214-21a82e2e011b"}' nsim.iotify.io/api/datastore/$WORKSPACEID/metric/$METRICKEY

Last updated