product-usage

Uoms Update

POST
Updates a Unit of Measurement.

Request

This endpoint expects an object.
id
stringRequired
The Unit of Measurement (UOM)'s DON.
aggregation_type
enumOptional
Aggregation type to be used while aggregating the metering data for the UOM. 1] Sum - sum of all the values for the meter in a given period Ex. { M1:2, M1:4 } => {M1:6} 2] Minimum - min of all the values for the meter in a given period Ex. { M1:2, M1:4 } => {M1:2} 3] Maximum - max of all the values for the meter in a given period Ex. { M1:2, M1:4 } => {M1:4} 4] Unique Count - Sum of distinct unique dimension observed for the meter in the given period (not considering the data from the previous billing period) Ex. January {M1:{VM:VM0}}, February {M1:{VM:VM1}, M1:{VM:VM2}, M1:{VM:VM1}} => {M1:2} 5] Running Total - Sum of distinct active unique dimension observed for a meter in the given period, taking into consideration the active data from the previous billing cycle Ex. January {M1:{VM:VM0,on}, {M1:{VM:VM1,off} February {M1:{VM:VM2, on}, M1:{VM:VM2, off}, M1:{VM:VM3, on}} => {M1:3} 6] Duration - Sum of distinct active unique dimension duration for a meter in the given period, taking into consideration the active data from the previous month Ex. January15 {M1:{VM:VM0,on, 4}} February15 {M1:{VM:VM0,off}, February18 {M1:{VM:VM1,on,5} => M1-> 30*4*charge_per_day + 10*5*charge_per_day 7] Latest - consider the latest/last meter in the given period 8] Oldest - consider the oldest/first record in the given period.
description
stringOptional
Description of the Unit of Measurement (UOM).
dimensions
objectOptional
is_enabled
booleanOptional
Flag used to enable/disable the Unit of Measurement (UOM). When disabled, any metricsrecords ingested against this UOM will be dropped.
name
stringOptional
Human readable name of the Unit of Measurement (UOM).
part_id
stringOptional
The part ID such as feature or capability for which the Unit of Measurement (UOM) is defined.
product_id
stringOptional
The product ID for which the Unit of Measurement (UOM) is defined.
unit
stringOptional
Unit name of the Unit of Measurement (UOM).

Response

This endpoint returns an object
uom
object
POST
1curl -X POST https://api.devrev.ai/uoms.update \
2 -H "Authorization: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "id": "string"
6}'
200Successful
1{
2 "uom": {
3 "aggregation_details": {
4 "aggregation_type": "duration",
5 "unique_dimension": "string"
6 },
7 "id": "string",
8 "is_enabled": true,
9 "metric_name": "string",
10 "metric_scope": "org",
11 "name": "string",
12 "product": {
13 "type": "capability",
14 "id": "string",
15 "name": "string",
16 "display_id": "string"
17 },
18 "unit": {
19 "name": "string",
20 "type": "boolean"
21 },
22 "created_by": {
23 "type": "dev_user",
24 "id": "string",
25 "display_id": "string",
26 "display_name": "string",
27 "display_picture": {
28 "id": "string",
29 "display_id": "string"
30 },
31 "email": "string",
32 "full_name": "string",
33 "state": "active"
34 },
35 "created_date": "2023-01-01T00:00:00Z",
36 "description": "string",
37 "dimensions": [
38 "string"
39 ],
40 "display_id": "string",
41 "modified_by": {
42 "type": "dev_user",
43 "id": "string",
44 "display_id": "string",
45 "display_name": "string",
46 "display_picture": {
47 "id": "string",
48 "display_id": "string"
49 },
50 "email": "string",
51 "full_name": "string",
52 "state": "active"
53 },
54 "modified_date": "2023-01-01T00:00:00Z",
55 "part": {
56 "type": "capability",
57 "id": "string",
58 "name": "string",
59 "display_id": "string"
60 }
61 }
62}