List
List information about all templates 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 template objects.
Examples
HTTP
Node.js
1
# HTTP request:
2
https://api.paperspace.io
3
GET /templates/getTemplates
4
x-api-key: 1ba4f98e7c0...
5
# Returns 200 on success
Copied!
1
paperspace.templates.list(function(err, res) {
2
// handle error or result
3
});
Copied!
Parameters
Name
Type
Attributes
Description
id
string
<optional>
Optional template id to match on
name
string
<optional>
Optional name to match on
label
string
<optional>
Optional label to match on
os
string
<optional>
Optional os to match on
dtCreated
string
<optional>
Optional datetime created value to match on
teamId
string
<optional>
Optional teamId to match on
userId
string
<optional>
Optional userId to match on
region
string
<optional>
Optional region to match on
Returns
[ template, ... ] - JSON array of template objects
Type array
1
// Example return value:
2
[
3
// A public template:
4
{
5
"id": "t123abc",
6
"name": "paperspace/t123abc",
7
"label": "Windows 10",
8
"os": "Windows 10 (Server 2016)",
9
"dtCreated": "2017-01-03T23:41:06.801Z"
10
},
11
// A team-owned template:
12
{
13
"id": "t456def",
14
"name": "t456def",
15
"label": "New Template 1",
16
"os": "Ubuntu 14.04.5 LTS; uname: 4.2.0-27-generic; distro: ubuntu; major: 14; minor: 04",
17
"teamId": "te456def",
18
"userId": null,
19
"region": "East Coast (NY2)",
20
"dtCreated": "2017-02-06T18:46:44.882Z"
21
}
22
]
Copied!
Last modified 9mo ago
Copy link