Skip to main content
POST
/
metric
cURL
curl --request POST \
  --url http://sandbox.batuenergy.com/api/v1/metric \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "processes": [
    "prc_<uuid>"
  ],
  "name": "<string>",
  "variable": "<string>",
  "units": "<string>",
  "type": "number",
  "metadata": "<string>"
}
'
{
  "status": "success",
  "data": {
    "execution": "exe_<uuid>",
    "metric": {
      "id": "<uuid>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "processId": "<uuid>",
      "name": "<string>",
      "variable": "<string>",
      "units": "<string>",
      "granularity": "<string>",
      "type": "number",
      "metadata": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string
required

The name of the metric

variable
string
required

The variable associated with the metric

units
string
required

The units associated with the metric

type
enum<string>
required

The type of data associated with the metric

Available options:
number,
boolean,
string
processes
string<uuid>[]

The id of the processes associated with the metric

metadata
string | null

The metadata associated with the metric

Response

Metric response

status
string
required

Indicates the request was successful

Example:

"success"

data
object
required

The data associated with the response