Skip to main content
POST
/
organizations
/
{orgId}
/
notifications
/
evaluate
Evaluate Calculation
curl --request POST \
  --url https://api.m3ter.com/organizations/{orgId}/notifications/evaluate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "eventId": "<string>",
  "eventName": "<string>",
  "calculation": "<string>"
}
'
{
  "success": true,
  "errorMessage": "<string>"
}

Authorizations

Authorization
string
header
required

m3ter supports machine to machine authentication using the clientCredentials OAuth2 flow.

The authorizationCode flow controls access for human users via the m3ter Console application.

Path Parameters

orgId
string
required

The unique identifier (UUID) of your Organization. The Organization represents your company as a direct customer of our service.

Body

application/json

Request for evaluating a calculation against an existing Event or Event name.

eventId
string

The unique identifier (UUID) of the existing Event you want to evaluate the calculation for.

eventName
string

The name of the Event type to evaluate the calculation for.

calculation
string

The calculation expression to be evaluated. This should be structured in the same way as the calculation you'll use for a Notification based on an Event of the same type.

The calculation for a Notification is a logical expression that evaluates to a Boolean. Calculations are used to define the precise conditions for a Notification that is based on an Event of a specifc Type to be triggered. If an Event of that type occurs and the calculation used in a Notification based on that Event type evaluates as True, a Notification for the Event is triggered and sent to the configured Notification destination. Calculations can reference numeric, string, and boolean Event fields.

See Creating Calculations in the m3ter documentation for more information.

Response

Returns the calculation result

Response containing the results of a calculation evaluation.

success
boolean
required

Indicates whether the calculation evaluated to True against the specified Event.

errorMessage
string

Optional message providing details about any errors that occurred during the evaluation. If no errors occurred, this is null.