LogoLogo
HomeSign UpGithub
  • Home
  • Release Notes
  • Getting Started
    • Create your first Test
    • Create Run Settings
    • Analyze the results
      • Job Summary
      • Logs
      • State
      • Payload
    • Look deeper with Metrics
  • Concepts
    • Workspaces
      • Role Based Access Control (RBAC)
      • Invitation Management
      • GitHub Integration
      • Deletion of Workspaces
      • System Status
    • Understanding Tests
      • Stages Management
        • Init Stage
        • Running Stage(s)
        • Finished State
      • Generating Messages
        • Scripting Environment
        • State Object
      • Response Handler
      • Preview Tests
      • Exporting/Importing Tests
        • Import OpenAPI JSON/YAML
      • Locking/Unlocking a test
    • Stateful Simulation
      • Mapping the IoT device lifecycle
    • Protocol Settings
      • MQTT
      • HTTP
      • Using other protocols
    • Run Settings
      • Network Simulation
      • Execution Strategies
      • Client Distribution
    • Scenarios
    • Glob Storage
    • Metrics
    • Mailbox
    • Licensing and Limits
    • Deployment Models
  • Additional Helpers
    • External Libraries
    • Inbuilt Libraries
    • IoTIFY Helper Functions
      • Job Functions
      • Messaging Functions
      • Glob Functions
      • Metrics Functions
      • Mailbox Functions
      • Data Generation Functions
  • platform integrations
    • AWS IoT Connector
  • Guides
    • Smart City
    • Smart Home
    • Load Testing Kafka
  • IoT Testing
    • Overview
      • Feed offline sensor data from Google Sheets to your IoT platform
    • Functional Testing
      • Basic functional test
      • Geofencing Validation
    • Performance Testing
      • MQTT end to end latency Measurement
    • Security Testing
    • Load Testing
    • Test Automation & CI/CD integration
  • API
    • Simulation API
    • Glob APIs
    • Metrics API
  • Glossary
  • Create Account
  • TEMP
    • Getting Started
      • Beginner
      • Developer
      • Tester
    • Walkthrough
    • Protocol Settings
      • CoAP
      • Raw (TCP/UDP/TLS/DTLS)
      • LWM2M
      • NONE
    • Under the hood
    • Google Sheets API
    • Azure IoT
    • Losant IoT
      • Losant Connector
      • Parking Space Management
      • Waste Management
      • Connected Truck
      • Delivery Van
    • Google Cloud IoT Core
    • IBM Cloud
      • Simple Messaging
      • IBM Bluemix: Monitoring Energy Consumption
    • Dweet.io
    • JMeter and why it fails at IoT
Powered by GitBook
On this page
  • Get a list of available metrics
  • Get the data for a metric

Was this helpful?

  1. API

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

Name
Type
Description

workspaceId*

string

WorkspaceID for the workspace whose metrics list needs to be fetched

Headers

Name
Type
Description

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

Name
Type
Description

metricKey*

String

The key for the metric

workspaceId*

String

WorkspaceID for the workspace where the metric exists

Headers

Name
Type
Description

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

Name
Type
Description

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
PreviousGlob APIsNextGlossary

Last updated 2 years ago

Was this helpful?