Creating and Tracking a Metric

We’d like to see how much potion our Heroes have left, we can easily specify a gauge indicator alongside our assets.

Create and Track a Metric

Add Gauge to Hero Asset

PUT api.skyledge.com/controlrooms/{controlRoomId}/asset-types/{assetTypeId}

{  
   "displaySettings":{  
      "MAP":[  
         {  
            "tagName":"slc-gauge",
            "options":{  
               "metric":"remainingPower",
               "unhealthy":"remainingPower <= 10"
            }
         }
      ]
   }
}
curl --location --request POST 'https://api.skyledge.com/asset-types/ASSET_TYPE_ID/assets' \
--header 'X-Authorization: API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{  
   "displaySettings":{  
      "MAP":[  
         {  
            "tagName":"slc-gauge",
            "options":{  
               "metric":"remainingPower",
               "unhealthy":"remainingPower <= 10"
            }
         }
      ]
   }
}'

Notice that remainingPower refers to the metric we specified in Step 5. We can also create rules to indicate when the gauge indicator should enter an “unhealthy” warning state.

Last updated