Skip to main content
PUT
/
metric
cURL
curl --request PUT \
  --url http://sandbox.batuenergy.com/api/v1/metric \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "<uuid>",
  "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
id
string<uuid>
required

The id of the metric

Example:

"<uuid>"

processes
string<uuid>[]

The id of the processes associated with the metric

name
string

The name of the metric

variable
string

The variable associated with the metric

units
string

The units associated with the metric

type
enum<string>

The type of data associated with the metric

Available options:
number,
boolean,
string
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