Dimension API

This article provides sample API calls to manipulate Dimensions.

PREREQUISITES:

1. Fetch Dimension Information

Retrieve key data about specific Dimension.

  1. Item: dimension
  2. Method: GET
  3. ID: Specify ID of the dimension you need to get more information about
  4. Run request

1.1. Create Dimension

Create Dimension
  1. Item: dimension
  2. Method: POST
  3. ID:  Find an existing Dimension that you wish to use as a foundation for new Alert. To see the list of all Dimensions created in the system, select GET method, keep this field empty and Run request
  4. Define parameters of the new dimension
  5. Run Request

2. Fetch Dimension Value Information

Retrieve key data about specific Dimension.

  1. Item: dimension_value
  2. Method: GET
  3. ID: Specify ID of the Dimension Value you need to get more information about
  4. Run request

2.1. Create Dimension Value

  1. Item: dimension_value
  2. Method: POST
  3. ID:  Find an existing Dimension Value that you wish to use as a foundation for new Alert. To see the list of all Dimension Values created in the system, select GET method, keep this field empty and Run request
  4. dimension: Specify ID of the Dimension where you need to create a new Value
  5. name / key_value_varchar: Define a descriptive name of a new Dimension value
  6. visible_in_dashboard: yes / no
  7. Run Request

2.2. Create Compound Dimension Value

API:

https://yourinstance.metricinsights.com/api/dimension_value

Header:

Accept:application/json
Token:UClCUUKxUlkdbhE1cHLz3kyjbIZYVh9eB34A5Q21Y3FPqKGSJs

POST body payload:

{
"dimension": "17",
"primary_dimension_value": "16345",
"secondary_dimension_value": "13560",
"visible_in_dashboard": "Yes"
}

Response:

{"dimension_value":{"dimension":"17","primary_dimension_value":"16345","secondary_dimension_value":"13560","visible_in_dashboard":"Yes"}}

3. Get all Dimension information (for Metric / Multi-metric / Report)

This API call can be used to get metric data along with all data related to all Dimension Value.

NOTE: Dimension Values are returned as dimension IDs.

  1. Item: metric_data / multimetric_data / report_data
  2. Method: GET
  3. element: (numeric value)  Specify the ID of an you wish to get information about. Metric ID can be determined in the web browser URL of the Metric Viewer (Multi-Metric Viewer or Report Viewer). For example:
https://demo.metricinsights.com/chart/index/index/element/29
  1. all_dimension_values: "true". This parameter retrieves all data related to a specific dimension value
  2. API:
Dimensioned Metric - https://demo.metricinsights.com/api/metric_data?element=<metric_id>&all_dimension_value=true
Dimensioned Report -  https://demo.metricinsights.com/api/report_data?element=<report_id>&all_dimension_value=true
Dimensioned Multi-metric - https://demo.metricinsights.com/api/multimetric_data?element=<multimetric_id>&all_dimension_value=true

6.    Run request

4. Delete Dimension value

  1. Item: dimension_value
  2. Method: DELETE
  3. ID: Specify the Dimension Value you need to delete
  4. Run request

0 Comments

Add your comment

E-Mail me when someone replies to this comment