Get project app utilisation
curl --request GET \
--url https://api.instacloud.com/projects/{projectId}/utilisation \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.instacloud.com/projects/{projectId}/utilisation"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.instacloud.com/projects/{projectId}/utilisation', 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.instacloud.com/projects/{projectId}/utilisation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.instacloud.com/projects/{projectId}/utilisation"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.instacloud.com/projects/{projectId}/utilisation")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/projects/{projectId}/utilisation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"from": 123,
"to": 123,
"apps": [
{
"app": "insta-myapp-ab12",
"resourceId": "<string>",
"cpu": {
"allocated": 123,
"actual": 123,
"unit": "vCPU·min",
"utilisation": 123,
"suspect": true,
"unmetered": true
},
"ram": {
"allocated": 123,
"actual": 123,
"unit": "vCPU·min",
"utilisation": 123,
"suspect": true,
"unmetered": true
}
}
],
"total": {
"cpu": {
"allocated": 123,
"actual": 123,
"unit": "vCPU·min",
"utilisation": 123,
"suspect": true,
"unmetered": true
},
"ram": {
"allocated": 123,
"actual": 123,
"unit": "vCPU·min",
"utilisation": 123,
"suspect": true,
"unmetered": true
},
"cpuUnmeasuredApps": 123,
"ramUnmeasuredApps": 123,
"cpuSuspectApps": 123,
"ramSuspectApps": 123,
"cpuUnmeteredApps": 123,
"ramUnmeteredApps": 123
}
}{
"error": "<string>"
}Billing
Get project app utilisation
Token scope: account · org · project — read-only tokens allowed.
Per-app actual-vs-allocated compute utilisation over a window (default current cycle)
Quantities, not costs: the actual-consumption meters are collected at $0, so a cost-based ratio would read 0% for every app. utilisation is null when nothing was allocated in the window, which is not the same as 0% — the collector may simply not have run.
GET
/
projects
/
{projectId}
/
utilisation
Get project app utilisation
curl --request GET \
--url https://api.instacloud.com/projects/{projectId}/utilisation \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.instacloud.com/projects/{projectId}/utilisation"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.instacloud.com/projects/{projectId}/utilisation', 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.instacloud.com/projects/{projectId}/utilisation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.instacloud.com/projects/{projectId}/utilisation"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.instacloud.com/projects/{projectId}/utilisation")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/projects/{projectId}/utilisation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"from": 123,
"to": 123,
"apps": [
{
"app": "insta-myapp-ab12",
"resourceId": "<string>",
"cpu": {
"allocated": 123,
"actual": 123,
"unit": "vCPU·min",
"utilisation": 123,
"suspect": true,
"unmetered": true
},
"ram": {
"allocated": 123,
"actual": 123,
"unit": "vCPU·min",
"utilisation": 123,
"suspect": true,
"unmetered": true
}
}
],
"total": {
"cpu": {
"allocated": 123,
"actual": 123,
"unit": "vCPU·min",
"utilisation": 123,
"suspect": true,
"unmetered": true
},
"ram": {
"allocated": 123,
"actual": 123,
"unit": "vCPU·min",
"utilisation": 123,
"suspect": true,
"unmetered": true
},
"cpuUnmeasuredApps": 123,
"ramUnmeasuredApps": 123,
"cpuSuspectApps": 123,
"ramSuspectApps": 123,
"cpuUnmeteredApps": 123,
"ramUnmeteredApps": 123
}
}{
"error": "<string>"
}Authorizations
Session access JWT or an API token (insta_<prefix>_<secret>).
Path Parameters
Query Parameters
unix seconds (default current cycle start)
unix seconds (default current cycle end)