Utilization
Get machine utilization data for the machine with the given id. Machine upgrades are not represented in utilization data.
Examples
HTTPS
Node.js
1
# HTTP request:
2
https://api.paperspace.io
3
GET /machines/getUtilization?machineId=ps123abc&billingMonth=2017-08
4
x-api-key: 1ba4f98e7c0...
5
# Returns 200 on success
Copied!
1
paperspace.machines.utilization({
2
machineId: 'ps123abc',
3
billingMonth: '2017-08',
4
}, function(err, res) {
5
// handle error or result
6
});
Copied!
Parameters
Name
Type
Description
machineId
string
Id of the machine to get utilization data for
billingMonth
string
Billing period to query in YYYY-MM format
Returns
utilization - The utilization JSON object
Type object
1
//Example return value:
2
{
3
"machineId": "ps123abc",
4
"utilization": {
5
"machineId": "ps123abc",
6
"secondsUsed": 37351.08562622,
7
"hourlyRate": "0.40",
8
"billingMonth": "2017-08",
9
},
10
"storageUtilization": {
11
"machineId": "ps123abc",
12
"secondsUsed": 678400,
13
"monthlyRate": "7.00",
14
"billingMonth": "2017-08",
15
}
16
}
Copied!
Last modified 9mo ago
Copy link