Skip to main content
GET
/
metric
/
records
/
{id}
cURL
curl --request GET \
  --url http://sandbox.batuenergy.com/api/v1/metric/records/{id} \
  --header 'Authorization: Bearer <token>'
{
  "status": "success",
  "data": {
    "execution": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "records": [
      {
        "ts": 1727220785,
        "value": "1000"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

The metric for which the records are to be returned

Query Parameters

startTs
integer
required

the start of the date range, expressed in unix timestamp, for which the records are to be returned

Example:

1725000000

endTs
integer
required

the end of the date range, expressed in unix timestamp, for which the records are to be returned

Example:

1727220000

granularity
string
required

The granularity of the metric records to be retrieved, as a time interval

shift
string

The time shift of the metric records to be retrieved, as a time interval

Response

Get records response

status
string
required

Indicates the request was successful

Example:

"success"

data
object
required

The data associated with the response