curl --request GET \
--url https://api.trlyr.com/organisations/{organisationID}/virtual-assets/{virtualAssetID}/state-of-charge \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.trlyr.com/organisations/{organisationID}/virtual-assets/{virtualAssetID}/state-of-charge"
payload = {}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.trlyr.com/organisations/{organisationID}/virtual-assets/{virtualAssetID}/state-of-charge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trlyr.com/organisations/{organisationID}/virtual-assets/{virtualAssetID}/state-of-charge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.trlyr.com/organisations/{organisationID}/virtual-assets/{virtualAssetID}/state-of-charge"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trlyr.com/organisations/{organisationID}/virtual-assets/{virtualAssetID}/state-of-charge")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trlyr.com/organisations/{organisationID}/virtual-assets/{virtualAssetID}/state-of-charge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"stateOfChargeProfile": [
{
"stateOfChargePercentage": 50,
"time": "2023-11-11T14:30:00Z"
}
]
}Get the projected state of charge of a virtual asset.
DEPRECATED: This endpoint is deprecated and will be removed in a future version. To retrieve state of charge values, use the operational endpoint GET /organisations/{organisationID}/virtual-assets/{virtualAssetID}/operational.
Get the projected state of charge of a virtual asset as a timeseries.
Returns a timeseries of the projected state of charge of a virtual asset as JSON. This timeseries is right-aligned relative to the 15-minute power trading windows. e.g. "time": "2023-11-11T14:30:00Z" and "stateOfChargePercentage": 23.5 mean that the virtual asset is projected to reach a state of charge of 23.5% at the end of the 15-minute window starting at 2023-11-11T14:30:00Z, i.e. at 2023-11-11T14:45:00Z.
The timeseries will cover the parsed start and end times. If none are provided, then the timeseries will cover a window of 72 hours, with up to 3 days in the past and 4 days into the future.
Projected values are only guaranteed for up to 48h into the future.
curl --request GET \
--url https://api.trlyr.com/organisations/{organisationID}/virtual-assets/{virtualAssetID}/state-of-charge \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.trlyr.com/organisations/{organisationID}/virtual-assets/{virtualAssetID}/state-of-charge"
payload = {}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.trlyr.com/organisations/{organisationID}/virtual-assets/{virtualAssetID}/state-of-charge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trlyr.com/organisations/{organisationID}/virtual-assets/{virtualAssetID}/state-of-charge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.trlyr.com/organisations/{organisationID}/virtual-assets/{virtualAssetID}/state-of-charge"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trlyr.com/organisations/{organisationID}/virtual-assets/{virtualAssetID}/state-of-charge")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trlyr.com/organisations/{organisationID}/virtual-assets/{virtualAssetID}/state-of-charge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"stateOfChargeProfile": [
{
"stateOfChargePercentage": 50,
"time": "2023-11-11T14:30:00Z"
}
]
}Headers
Access token
Path Parameters
Organisation ID
Virtual Asset ID
Body
The body is of type object.