Updates an metric with given parameters

Params

Param name Description
metric
required

Map containing details of the metric to be updated


Value: Must be a Hash
pretty
optional

Return a pretty formatted response if true, Default is false


Value: Must be a Boolean
is_oem
optional

Update metric in child account by oem user if is_oem flag is true.


Value: Must be a Boolean
child_organisation_key
optional

Organisation key of child account where oem user wants to update metric. Required field if is_oem is present.


Value: Must be a String

Examples

Request
  curl -X PUT -H "Content-Type:application/json" -H "X-Auth-Token:olezAZXGQn9MutnfNerKDQ"  -d '{"metric":{"unit_of_measure":"kg"}}' https://api.datonis.io/api/v3/metrics/4f9b9764t7

Response (containing details of the metric updated)
{
  "metric": {
    "abbreviation": "capacity",
    "created_at": 1448364456,
    "data_type": 0,
    "description": "Metric for thing template Washing Machine",
    "metric_key": "4f9b9764t7",
    "name": "capacity",
    "unit_of_measure": "kg",
    "updated_at": 1448428909,
    "treatments": [

    ],
    "thing_template_key": "af31ae5fb2"
  }
}