Skip to main content
PUT
/
meters
/
{meterId}
Update Meter
curl --request PUT \
  --url https://connect.withvayu.com/meters/{meterId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "eventName": "<string>"
}
'
{
  "meter": {
    "name": "<string>",
    "eventName": "<string>",
    "aggregationMethod": {
      "operator": "Count",
      "field": "<string>",
      "instanceKey": "<string>"
    },
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "filter": {
      "conditions": [
        {
          "criterions": [
            {
              "field": "<string>",
              "operator": "Equals",
              "value": "<string>"
            }
          ]
        }
      ]
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

meterId
string
required
Pattern: ^[0-9a-fA-F]{24}$

Body

application/json
name
string

The name of the meter

Minimum string length: 1
eventName
string

The name of the event that the meter is tracking.

Minimum string length: 1
aggregationMethod
object

The aggregation method defines how the events should be summed to represent a usage value.

filter
object

The filter to apply to the events to be included in the meter. The filter object contains an array of Conditions, each condition represents a logical OR statement. Each condition contains an array of Criteria (criterions), each criterion represents a logical AND statement.

Response

RequestSuccess

meter
object
required