curl --request GET \
--url https://api.ionworks.com/projects/{project_id}/lab/utilization-historyimport requests
url = "https://api.ionworks.com/projects/{project_id}/lab/utilization-history"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.ionworks.com/projects/{project_id}/lab/utilization-history', 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/projects/{project_id}/lab/utilization-history",
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/projects/{project_id}/lab/utilization-history"
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/projects/{project_id}/lab/utilization-history")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/projects/{project_id}/lab/utilization-history")
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{
"project_id": "<string>",
"granularity": "day",
"start": "2023-11-07T05:31:56Z",
"generated_at": "2023-11-07T05:31:56Z",
"trimmed_to_first_channel": false,
"points": [
{
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"occupied_hours": 123,
"stale_hours": 123,
"free_hours": 123,
"out_of_service_hours": 123,
"available_hours": 123,
"utilization_percent": 123,
"utilization_of_available_percent": 123,
"partial": false
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Get a project's channel-hours by state per calendar period
Return channel-hours by state for each calendar period from start to now.
Each point splits the period’s channel-hours into occupied, stale, free, and
out of service, with the Lab wall’s precedence, so it describes the whole
period rather than one instant. The last point is the period in progress,
computed up to now and flagged partial. At most 400 points.
curl --request GET \
--url https://api.ionworks.com/projects/{project_id}/lab/utilization-historyimport requests
url = "https://api.ionworks.com/projects/{project_id}/lab/utilization-history"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.ionworks.com/projects/{project_id}/lab/utilization-history', 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/projects/{project_id}/lab/utilization-history",
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/projects/{project_id}/lab/utilization-history"
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/projects/{project_id}/lab/utilization-history")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/projects/{project_id}/lab/utilization-history")
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{
"project_id": "<string>",
"granularity": "day",
"start": "2023-11-07T05:31:56Z",
"generated_at": "2023-11-07T05:31:56Z",
"trimmed_to_first_channel": false,
"points": [
{
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"occupied_hours": 123,
"stale_hours": 123,
"free_hours": 123,
"out_of_service_hours": 123,
"available_hours": 123,
"utilization_percent": 123,
"utilization_of_available_percent": 123,
"partial": false
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Query Parameters
Start of the range, ISO 8601 (a date is read as UTC midnight). Snapped back to its period's boundary; at most 3660 days ago.
Calendar period each point covers, in UTC
day, week, month, quarter, year Response
Successful Response
Utilization per calendar period, oldest first, ending with the current one.
Project the history covers
Calendar period each point covers
day, week, month, quarter, year Start of the first point: the requested start snapped back to its period's boundary, or later if no channel existed yet
When the history was computed
Whether periods before the project's first channel were dropped, so the series starts later than requested
One point per period, oldest first
Show child attributes
Show child attributes
Was this page helpful?