Metric API

This article provides sample API calls to manipulate Metrics.

PREREQUISITES:

Get all Metrics

Filter out all Metrics currently existing in the system, followed by the key information per each of them (such as measure, name description, category, data source, dimension, etc.)

  1. Item: metric
  2. Method: GET
  3. Request URL (generated automatically): https://yourcompany.metricinsights.com/api/metric
  4. Run request

Return Information about a specific Metric

You can obtain all the information about a specific Metric (such as measure, name, description, category, data source, dimension, etc.)

  1. Item: metric
  2. Method: GET
  3. ID: Specify the ID of the Metric you wish to get information about. Metric ID can be determined in the web browser URL of the Metric Editor. For example:
https://demo.metricinsights.com/chart/index/index/element/1
  1. Request URL (generated automatically): https://yourcompany.metricinsights.com/api/metric/<id>
  2. Run request

Get :last_measurement_time

You can obtain all the information about  (such as measure, name description, category, data source, dimension, etc.)

  1. Item: element_info
  2. Method: GET
  3. Define the following parameters:
    • element (numeric value) - element id
    • dimension_value (numeric value) - dimension value id (for dimensioned elements)

These parameters can be determined in the web browser URL of the Metric Viewer. For example:

https://demo.metricinsights.com/chart/index/index/element/4066/name/Fiscal+Yearly+FY+Monthly+Tickets/from/editor/segment/7644
  1. Run request

Delete measurements for a certain Time Range

You can obtain all the information about  (such as measure, name description, category, data source, dimension, etc.)

  1. Item: metric
  2. Method: PUT
  3. ID: Specify the ID of a Metric you wish to get information about. Metric ID can be determined in the web browser URL of the Metric Viewer. For example:
https://demo.metricinsights.com/chart/index/index/element/240
  1. Actions: Choose to Delete Data. Your choice will automatically define a value in the call field below
  2. Define values for the following parameters:
    • delete_measurements_from: (measurement time should be in one of the following formats: yyyy-mm-dd or yyyy-mm-dd 00:00:00) - date from which measurements will be deleted
    • delete_measurements_through: (measurement time should be in one of the following formats: yyyy-mm-dd or yyyy-mm-dd 00:00:00) - date through which measurements will be deleted
  3. Run request

0 Comments

Add your comment

E-Mail me when someone replies to this comment