Skip to main content
POST
/
job
cURL
curl --request POST \
  --url http://sandbox.batuenergy.com/api/v1/job \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metric": "<string>",
  "startTs": 123,
  "endTs": 123,
  "granularity": "5m",
  "shift": "1m",
  "metadata": "<string>"
}
'
{
  "status": "success",
  "data": {
    "execution": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "job": {
      "id": "<uuid>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "process": "prc_<uuid>",
      "description": "<string>",
      "startTs": 123,
      "endTs": 123,
      "granularity": "5m",
      "shift": "1m",
      "status": "IN QUEUE",
      "metadata": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
metric
string
required

The id of the metric associated with the job

startTs
integer
required

The start of the interval for retrieving the data associated with the metric, expressed as unix timestamp

endTs
integer
required

The end of the interval for retrieving the data associated with the metric, expressed as unix timestamp

granularity
string
required

The granularity of the job, expressed as a time interval

Example:

"5m"

shift
string
required

The time shift of the job, expressed as a time interval

Example:

"1m"

metadata
string | null

The metadata associated with the job

Response

Job response

status
string
required

Indicates the request was successful

Example:

"success"

data
object
required

The data associated with the response