Get Drive Cycle
curl --request GET \
--url https://api.ionworks.com/drive-cycles/{drive_cycle_id}import requests
url = "https://api.ionworks.com/drive-cycles/{drive_cycle_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.ionworks.com/drive-cycles/{drive_cycle_id}', 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.ionworks.com/drive-cycles/{drive_cycle_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ionworks.com/drive-cycles/{drive_cycle_id}"
req, _ := http.NewRequest("GET", url, nil)
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.ionworks.com/drive-cycles/{drive_cycle_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/drive-cycles/{drive_cycle_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"name": "<string>",
"data": [
[
123
]
],
"organization_id": "<string>",
"id": "<string>",
"content_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"measurement_id": "<string>",
"created_by": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Get Drive Cycle
Fetch a single drive cycle including its data array.
Parameters
drive_cycle_id : str Drive cycle UUID.
Returns
DriveCycle Full drive cycle record with data.
Raises
NotFoundError If the drive cycle does not exist or is not accessible.
Get Drive Cycle
curl --request GET \
--url https://api.ionworks.com/drive-cycles/{drive_cycle_id}import requests
url = "https://api.ionworks.com/drive-cycles/{drive_cycle_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.ionworks.com/drive-cycles/{drive_cycle_id}', 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.ionworks.com/drive-cycles/{drive_cycle_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ionworks.com/drive-cycles/{drive_cycle_id}"
req, _ := http.NewRequest("GET", url, nil)
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.ionworks.com/drive-cycles/{drive_cycle_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/drive-cycles/{drive_cycle_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"name": "<string>",
"data": [
[
123
]
],
"organization_id": "<string>",
"id": "<string>",
"content_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"measurement_id": "<string>",
"created_by": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Response
Successful Response
Pydantic model for the drive_cycles table.
Drive cycle filename (e.g. WLTP_5Ah_10%%_1800s.txt)
Two-column array [[time, current], ...]
Owning organization
Unique identifier
SHA-256 hash of name + canonical data for deduplication
Creation timestamp
Source measurement ID when drive cycle was extracted from measurement data
User ID of the uploader. Drive cycles are deduplicated by content hash, so this is whoever uploaded the content first.
Was this page helpful?