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 request:
https://api.paperspace.io
GET /machines/getMachines
x-api-key: 1ba4f98e7c0...
# Returns 200 on success
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
//Example return value:
[
{
"id": "ps123abc",
"name": "My Machine",
"os": "Microsoft Windows Server 2016 Datacenter",
"ram": "8589938688",
"cpus": 4,
"gpu": "GRID K160Q (2GB)",
"storageTotal": "53687091200",
"storageUsed": "110080",
"usageRate": "Air monthly",
"shutdownTimeoutInHours": 168,
"shutdownTimeoutForces": false,
"performAutoSnapshot": false,
"autoSnapshotFrequency": null,
"autoSnapshotSaveCount": null,
"agentType": "WindowsDesktop",
"dtCreated": "2016-11-18T05:18:29.533Z",
"state": "ready",
"updatesPending": false,
"networkId": "n789ghi",
"privateIpAddress": "10.64.21.47",
"publicIpAddress": null,
"region": "East Coast (NY2)",
"userId": "u123abc",
"teamId": "te456def",
"scriptId": "sc123abc",
"dtLastRun": "2017-06-30T07:22:49.763Z",
"dynamicPublicIp": null
}
]
Last updated
Was this helpful?