Returns the energy data in Watt-hours for the requested circuits.

Example Request

$ curl -G \
"https://app.verdigris.co/api/v2/circuits/energy?\
start_time=2016-09-01T00:00:00.000Z&\
end_time=2016-10-01T00:00:00.000Z&\
interval=P15D" \
--data-urlencode "circuit_ids=7738 7756" \
-H "Authorization: Token token=<access_token>"

Examples

# RESPONSE
# result is in the format:
# [
#   [
#     circuit_id0,
#     [
#       [
#         timestamp0,
#         energy0
#       ],
#       [
#         timestamp1,
#         energy1
#       ]
#     ]
#   ],
#   [
#     circuit_id1,
#     [
#       [
#         timestamp0,
#         energy0
#       ],
#       [
#         timestamp1,
#         energy1
#       ]
#     ]
#   ]
# ]
# timestamps are in unix epoch milliseconds, energy in Watt-hours
{
  "jobId": "7821233b-dbb0-4e82-87c3-ef216372d52e",
  "result": [
    [
      7738,
      [
        [
          1472688000000,
          123.456
        ],
        [
          1473984000000,
          234.567
        ]
      ]
    ],
    [
      7756,
      [
        [
          1472688000000,
          345.678
        ],
        [
          1473984000000,
          456.789
        ]
      ]
    ]
  ]
}

Params

Param name Description
start_time
required

start time in ISO 8601 combined date and time format (e.g. 2016-09-01T00:00:00.000Z)


Value:

Must be String

end_time
required

end time in ISO 8601 combined date and time format (e.g. 2016-10-01T00:00:00.000Z)


Value:

Must be String

interval
required

interval in ISO 8601 duration format (e.g. P15D)


Value:

Must be String

circuit_ids
required

space separated circuit ids (e.g. 7738 7756)


Value:

Must be String