List
List information about all machines available to either the current authenticated user or the team, if the user belongs to a team. The list method takes an optional first argument to limit the returned machine objects.
This API supports pagination using limit and skip. The default limit is 1000 items. To retrieve more than 1000 items, set your skip parameter to a multiple of 1000. For example, to retrieve the 3rd page of 1000 items, you would pass { limit: 1000, skip: 2000 }.
Examples
HTTP
Node.js
1
# HTTP request:
2
https://api.paperspace.io
3
GET /machines/getMachines
4
x-api-key: 1ba4f98e7c0...
5
# Returns 200 on success
Copied!
1
paperspace.machines.list(function(err, res) {
2
// handle error or result
3
});
Copied!
Parameters
Name
Type
Attributes
Description
limit
number
<optional>
Number of items to return. Defaults to 1000.
skip
number
<optional>
Number of items in the list to skip.
machineId
string
<optional>
Optional machine id to match on. Note: must be specified as "machineId", not "id".
name
string
<optional>
Optional name to match on
os
string
<optional>
Optional os to match on
ram
string
<optional>
Optional ram value to match on
cpus
number
<optional>
Optional cpu count to match on
gpu
string
<optional>
Optional gpu to match on
storageTotal
string
<optional>
Optional storageTotal value to match on
storageUsed
string
<optional>
Optional storageUsed value to match on
usageRate
string
<optional>
Optional usageRate value to match on
shutdownTimeoutInHours
number
<optional>
Optional shutdownTimeoutInHours value to match on
performAutoSnapshot
boolean
<optional>
Optional performAutoSnapshot value to match on, either true or false
autoSnapshotFrequency
string
<optional>
Optional autoSnapshotFrequency value to match on
autoSnapshotSaveCount
number
<optional>
Optional autoSnapshotSaveCount value to match on
agentType
string
<optional>
Optional agentType value to match on
dtCreated
string
<optional>
Optional datetime created value to match on
state
string
<optional>
Optional state value to match on
updatesPending
boolean
<optional>
Optional updatesPending value to match on
networkId
string
<optional>
Optional networkId to match on
privateIpAddress
string
<optional>
Optional privateIpAddress to match on
publicIpAddress
string
<optional>
Optional publicIpAddress to match on
region
string
<optional>
Optional region to match on
userId
string
<optional>
Optional userId to match on
teamId
string
<optional>
Optional teamId to match on
scriptId
string
<optional>
Optional scriptId to match on
dtLastRun
string
<optional>
Optional script datetime last run value to match on
Returns:
[ machine, ... ] - JSON array of machine objects
Type array
1
//Example return value:
2
[
3
{
4
"id": "ps123abc",
5
"name": "My Machine",
6
"os": "Microsoft Windows Server 2016 Datacenter",
7
"ram": "8589938688",
8
"cpus": 4,
9
"gpu": "GRID K160Q (2GB)",
10
"storageTotal": "53687091200",
11
"storageUsed": "110080",
12
"usageRate": "Air monthly",
13
"shutdownTimeoutInHours": 168,
14
"shutdownTimeoutForces": false,
15
"performAutoSnapshot": false,
16
"autoSnapshotFrequency": null,
17
"autoSnapshotSaveCount": null,
18
"agentType": "WindowsDesktop",
19
"dtCreated": "2016-11-18T05:18:29.533Z",
20
"state": "ready",
21
"updatesPending": false,
22
"networkId": "n789ghi",
23
"privateIpAddress": "10.64.21.47",
24
"publicIpAddress": null,
25
"region": "East Coast (NY2)",
26
"userId": "u123abc",
27
"teamId": "te456def",
28
"scriptId": "sc123abc",
29
"dtLastRun": "2017-06-30T07:22:49.763Z",
30
"dynamicPublicIp": null
31
}
32
]
Copied!
Last modified 8mo ago
Copy link