From d294c75eedfe10a30af138aab1aca5e8841b4914 Mon Sep 17 00:00:00 2001 From: mlunoe Date: Wed, 3 Apr 2019 16:30:52 +0200 Subject: [PATCH] feat(resourceDelegation): update docs with endpoint descriptions --- docs/index.html | 24 +- docs/jobs.html | 4 +- docs/jobs_artifactsDestroy.js.html | 4 +- docs/jobs_artifactsGet.js.html | 4 +- docs/jobs_artifactsList.js.html | 4 +- docs/jobs_clone.js.html | 4 +- docs/jobs_create.js.html | 4 +- docs/jobs_destroy.js.html | 4 +- docs/jobs_index.js.html | 4 +- docs/jobs_list.js.html | 4 +- docs/jobs_logs.js.html | 4 +- docs/jobs_machineTypes.js.html | 4 +- docs/jobs_show.js.html | 4 +- docs/jobs_stop.js.html | 4 +- docs/jobs_waitfor.js.html | 4 +- docs/login.html | 6 +- docs/login_index.js.html | 4 +- docs/login_user.js.html | 12 +- docs/logout.html | 4 +- docs/logout_index.js.html | 4 +- docs/logout_user.js.html | 4 +- docs/machines.html | 4 +- docs/machines_availability.js.html | 4 +- docs/machines_create.js.html | 4 +- docs/machines_destroy.js.html | 4 +- docs/machines_index.js.html | 4 +- docs/machines_list.js.html | 4 +- docs/machines_restart.js.html | 4 +- docs/machines_show.js.html | 4 +- docs/machines_start.js.html | 4 +- docs/machines_stop.js.html | 4 +- docs/machines_update.js.html | 4 +- docs/machines_utilization.js.html | 4 +- docs/machines_waitfor.js.html | 4 +- docs/networks.html | 4 +- docs/networks_index.js.html | 4 +- docs/networks_list.js.html | 4 +- docs/project.html | 4 +- docs/project_clear.js.html | 4 +- docs/project_index.js.html | 4 +- docs/project_init.js.html | 4 +- docs/project_show.js.html | 4 +- docs/resourceDelegations.html | 510 ++++++++++++++++++++++++ docs/resourceDelegations_create.js.html | 134 +++++++ docs/resourceDelegations_index.js.html | 67 ++++ docs/scripts.html | 4 +- docs/scripts_create.js.html | 4 +- docs/scripts_destroy.js.html | 4 +- docs/scripts_index.js.html | 4 +- docs/scripts_list.js.html | 4 +- docs/scripts_show.js.html | 4 +- docs/scripts_text.js.html | 4 +- docs/templates.html | 4 +- docs/templates_index.js.html | 4 +- docs/templates_list.js.html | 4 +- docs/users.html | 4 +- docs/users_index.js.html | 4 +- docs/users_list.js.html | 4 +- 58 files changed, 839 insertions(+), 122 deletions(-) create mode 100644 docs/resourceDelegations.html create mode 100644 docs/resourceDelegations_create.js.html create mode 100644 docs/resourceDelegations_index.js.html diff --git a/docs/index.html b/docs/index.html index d0b4c6c..15f31e8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -22,7 +22,7 @@
@@ -58,16 +58,11 @@

Home

Namespaces

-

Release Notes

+

Release Notes

Getting started

Installation

Option 1: Download the pre-built 'paperspace' binary for your plaftorm

-

Pre-built 'paperspace' binaries are available for:

- +

Head over to the releases section to download the latest version of the paperspace CLI for Linux, Mac, and Windows.

After downloading, make sure the 'paperspace' binary is permitted to run on your system by marking its permissions appropriately. Also, add the directory containing the 'paperspace' binary to your path using a method appropriate for your platform.

Option 2: Install the paperspace-node package from npm

@@ -87,8 +82,11 @@

Option 1: Obtain an API k

If you already have one or more API keys in your account, the API key associated with the first API token listed in your account is downloaded. If you want to use a particular API key you can specify the associated API token name using the '--apiToken' option.

Note: your API key is cached in a file in your home directory: ~/.papersapce/config.json. For security, please make sure access to the file is protected so only you can access it.

You can clear your locally cached API key at any time by executing:

-
$ paperspace logout

Option 2: Obtain an API key via your Paperspace Console

-

Alternatively you can create an API key from withn your Paperspace console under the API section. Login to your Paperspace console, scroll to the API section in the left navigation bar, and click CREATE AN API KEY. Follow the instructions there.

+
$ paperspace logout
+

Note: Currently only email login is supported in the CLI - if you're using AD, SAML or GitHub to login to Paperspace, you will need t obtain an API key to log in with the CLI.

+
+

Option 2: Obtain an API key via your Paperspace Console

+

Alternatively you can create an API key from within your Paperspace console under the API section. Login to your Paperspace console, scroll to the API section in the left navigation bar, and click CREATE AN API KEY. Follow the instructions there.

You will need to pick and API token name for your API key, and also provide a description. You can copy actual the API key value associated with the API token name only at the time of initial creation. If you need to access your API key in the future, you can instead access it by API token name using the 'paperspace login' command.

image

You'll use the API keys generate here to authenticate your requests.

@@ -96,7 +94,7 @@

Usage

You can interact with Paperspace's API in three ways: from the command line using the Paperspace CLI, programatically (from within a Javascript Nodejs application), or by using an HTTP client of your choice and the Paperspace API HTTP enpoints documented here.

Authentication

For authenticated requests, the Paperspace CLI and Paperspace-Node module will look in three places for an api key:

-

1) Locally in the file ~/.papersapce/config.json, which can be created via the Paperspace CLI by executing:

+

1) Locally in the file ~/.paperspace/config.json, which can be created via the Paperspace CLI by executing:

$ paperspace login

See the previous section on Obtaining an API key for more information.

2) An environment variable: PAPERSPACE_API_KEY. Example:

$ export PAPERSPACE_API_KEY=1ba4f98e7c0...
@@ -144,7 +142,7 @@ 

Bugs / Support / Troubleshooting

For bugs with the API client, command-line utility, or the HTTP API, please file tickets using GitHub Issues on this repo. We'll do our best to respond as quickly as we can. Keep in mind that Paperspace is a small team and you may need to allow up to a week for a response.

Other issues, such as those related to your Paperspace account, your team or team members, billing, or technical issues with your Paperspace machines should be directed to support@paperspace.com.

Security

-

Think you've discovered a security flaw or exploit? We offer bug bounties for responsible vulnerability disclosures that match our criteria. Please contact us directly at support@paperspace.com and we will respond as quickly as we can.

+

Think you've discovered a security flaw or exploit? Please contact us directly at support@paperspace.com and we will respond as quickly as we can.

Disclaimer

Use the Paperspace API with care. This tool is provided as-is (please see our LICENSE). Know that many actions provided via our public API can result in billing charges for Paperspace services. Please be aware of Paperspace's billing policies before performing any of these actions; you'll see charges reflected in your invoice at the end of the month. Some actions, such as deactivating machines, are irreversible, resulting in permanent loss of data. Paperspace cannot recover lost data such as mistakenly deleted account information, and may only be able to give limited assistance if an action is performed mistakenly. API access will be disabled for accounts not in good standing. Keeping your account credentials secret is your responsibility. You may only use Paperspace's API to store, retrieve, query, serve, and execute content that is owned, licensed or lawfully obtained by you.

License

@@ -163,7 +161,7 @@
- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/jobs.html b/docs/jobs.html index 4f1898d..406fca4 100644 --- a/docs/jobs.html +++ b/docs/jobs.html @@ -22,7 +22,7 @@
@@ -4964,7 +4964,7 @@
Returns:

- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/jobs_artifactsDestroy.js.html b/docs/jobs_artifactsDestroy.js.html index de5e893..1946353 100644 --- a/docs/jobs_artifactsDestroy.js.html +++ b/docs/jobs_artifactsDestroy.js.html @@ -22,7 +22,7 @@
@@ -102,7 +102,7 @@

jobs/artifactsDestroy.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/jobs_artifactsGet.js.html b/docs/jobs_artifactsGet.js.html index 0b8a30e..73a8623 100644 --- a/docs/jobs_artifactsGet.js.html +++ b/docs/jobs_artifactsGet.js.html @@ -22,7 +22,7 @@
@@ -280,7 +280,7 @@

jobs/artifactsGet.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/jobs_artifactsList.js.html b/docs/jobs_artifactsList.js.html index 68aaf8f..291d08e 100644 --- a/docs/jobs_artifactsList.js.html +++ b/docs/jobs_artifactsList.js.html @@ -22,7 +22,7 @@
@@ -133,7 +133,7 @@

jobs/artifactsList.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/jobs_clone.js.html b/docs/jobs_clone.js.html index deda1af..3786c2e 100644 --- a/docs/jobs_clone.js.html +++ b/docs/jobs_clone.js.html @@ -22,7 +22,7 @@
@@ -130,7 +130,7 @@

jobs/clone.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/jobs_create.js.html b/docs/jobs_create.js.html index 92b6eb3..c1fb802 100644 --- a/docs/jobs_create.js.html +++ b/docs/jobs_create.js.html @@ -22,7 +22,7 @@
@@ -580,7 +580,7 @@

jobs/create.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/jobs_destroy.js.html b/docs/jobs_destroy.js.html index 8fa7ebd..080ee18 100644 --- a/docs/jobs_destroy.js.html +++ b/docs/jobs_destroy.js.html @@ -22,7 +22,7 @@
@@ -103,7 +103,7 @@

jobs/destroy.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/jobs_index.js.html b/docs/jobs_index.js.html index 4629211..c7e8b7d 100644 --- a/docs/jobs_index.js.html +++ b/docs/jobs_index.js.html @@ -22,7 +22,7 @@
@@ -69,7 +69,7 @@

jobs/index.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/jobs_list.js.html b/docs/jobs_list.js.html index 7defb53..34f2544 100644 --- a/docs/jobs_list.js.html +++ b/docs/jobs_list.js.html @@ -22,7 +22,7 @@
@@ -207,7 +207,7 @@

jobs/list.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/jobs_logs.js.html b/docs/jobs_logs.js.html index 8ed6d7d..0417934 100644 --- a/docs/jobs_logs.js.html +++ b/docs/jobs_logs.js.html @@ -22,7 +22,7 @@
@@ -196,7 +196,7 @@

jobs/logs.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/jobs_machineTypes.js.html b/docs/jobs_machineTypes.js.html index 0f8df8d..767b847 100644 --- a/docs/jobs_machineTypes.js.html +++ b/docs/jobs_machineTypes.js.html @@ -22,7 +22,7 @@
@@ -128,7 +128,7 @@

jobs/machineTypes.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/jobs_show.js.html b/docs/jobs_show.js.html index 3f46800..1460b94 100644 --- a/docs/jobs_show.js.html +++ b/docs/jobs_show.js.html @@ -22,7 +22,7 @@
@@ -128,7 +128,7 @@

jobs/show.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/jobs_stop.js.html b/docs/jobs_stop.js.html index f373bdb..b129b94 100644 --- a/docs/jobs_stop.js.html +++ b/docs/jobs_stop.js.html @@ -22,7 +22,7 @@
@@ -97,7 +97,7 @@

jobs/stop.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/jobs_waitfor.js.html b/docs/jobs_waitfor.js.html index 8b9fa8b..102de3e 100644 --- a/docs/jobs_waitfor.js.html +++ b/docs/jobs_waitfor.js.html @@ -22,7 +22,7 @@
@@ -180,7 +180,7 @@

jobs/waitfor.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/login.html b/docs/login.html index caea009..71944d3 100644 --- a/docs/login.html +++ b/docs/login.html @@ -22,7 +22,7 @@
@@ -132,7 +132,7 @@

(static) userSource:
@@ -433,7 +433,7 @@
Properties

- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/login_index.js.html b/docs/login_index.js.html index de6cc33..5c5d6c1 100644 --- a/docs/login_index.js.html +++ b/docs/login_index.js.html @@ -22,7 +22,7 @@
@@ -58,7 +58,7 @@

login/index.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/login_user.js.html b/docs/login_user.js.html index 85edaba..74c7678 100644 --- a/docs/login_user.js.html +++ b/docs/login_user.js.html @@ -22,7 +22,7 @@
@@ -43,6 +43,10 @@

login/user.js

var assign = require('lodash.assign'); var userConfig = require('./../userConfig'); +const UNAUTHORIZED_EXTENDED_INFO = "\n\nNote: Please keep in mind that currently you can login only with the email and password " + + "from your Paperspace account. If you're using AD, SAML or GitHub credentials, please log into the Paperspace Console " + + "and create an API key for use with the CLI client. For more information, please refer to the CLI client documentation."; + /** * @memberof login * @method user @@ -83,6 +87,10 @@

login/user.js

} return method(user, params, function _cb(err, res) { if (err) { + if (err.status === 401) { + err.response.body.error.message += UNAUTHORIZED_EXTENDED_INFO; + } + if (global.paperspace_cli) { return cb(err, 'nojson'); } @@ -115,7 +123,7 @@

login/user.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/logout.html b/docs/logout.html index 978df73..a0b0995 100644 --- a/docs/logout.html +++ b/docs/logout.html @@ -22,7 +22,7 @@
@@ -278,7 +278,7 @@
Parameters:

- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/logout_index.js.html b/docs/logout_index.js.html index bf3cb60..31dc3c7 100644 --- a/docs/logout_index.js.html +++ b/docs/logout_index.js.html @@ -22,7 +22,7 @@
@@ -58,7 +58,7 @@

logout/index.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/logout_user.js.html b/docs/logout_user.js.html index b6a1b54..21aee8e 100644 --- a/docs/logout_user.js.html +++ b/docs/logout_user.js.html @@ -22,7 +22,7 @@
@@ -75,7 +75,7 @@

logout/user.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/machines.html b/docs/machines.html index ed9fc52..9dedf6b 100644 --- a/docs/machines.html +++ b/docs/machines.html @@ -22,7 +22,7 @@
@@ -4688,7 +4688,7 @@
Returns:

- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/machines_availability.js.html b/docs/machines_availability.js.html index 2f46300..9f7cb98 100644 --- a/docs/machines_availability.js.html +++ b/docs/machines_availability.js.html @@ -22,7 +22,7 @@
@@ -105,7 +105,7 @@

machines/availability.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/machines_create.js.html b/docs/machines_create.js.html index adaa276..723c001 100644 --- a/docs/machines_create.js.html +++ b/docs/machines_create.js.html @@ -22,7 +22,7 @@
@@ -192,7 +192,7 @@

machines/create.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/machines_destroy.js.html b/docs/machines_destroy.js.html index 098ac1b..9818fb5 100644 --- a/docs/machines_destroy.js.html +++ b/docs/machines_destroy.js.html @@ -22,7 +22,7 @@
@@ -100,7 +100,7 @@

machines/destroy.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/machines_index.js.html b/docs/machines_index.js.html index 9978d60..e8e03e1 100644 --- a/docs/machines_index.js.html +++ b/docs/machines_index.js.html @@ -22,7 +22,7 @@
@@ -68,7 +68,7 @@

machines/index.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/machines_list.js.html b/docs/machines_list.js.html index d4a3c24..420db9e 100644 --- a/docs/machines_list.js.html +++ b/docs/machines_list.js.html @@ -22,7 +22,7 @@
@@ -150,7 +150,7 @@

machines/list.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/machines_restart.js.html b/docs/machines_restart.js.html index 6c9d118..b46e63c 100644 --- a/docs/machines_restart.js.html +++ b/docs/machines_restart.js.html @@ -22,7 +22,7 @@
@@ -96,7 +96,7 @@

machines/restart.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/machines_show.js.html b/docs/machines_show.js.html index 27fd044..24086a9 100644 --- a/docs/machines_show.js.html +++ b/docs/machines_show.js.html @@ -22,7 +22,7 @@
@@ -173,7 +173,7 @@

machines/show.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/machines_start.js.html b/docs/machines_start.js.html index 9f18a76..c05241d 100644 --- a/docs/machines_start.js.html +++ b/docs/machines_start.js.html @@ -22,7 +22,7 @@
@@ -96,7 +96,7 @@

machines/start.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/machines_stop.js.html b/docs/machines_stop.js.html index 8cfe4ba..21adb74 100644 --- a/docs/machines_stop.js.html +++ b/docs/machines_stop.js.html @@ -22,7 +22,7 @@
@@ -97,7 +97,7 @@

machines/stop.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/machines_update.js.html b/docs/machines_update.js.html index 307aecb..ac6b993 100644 --- a/docs/machines_update.js.html +++ b/docs/machines_update.js.html @@ -22,7 +22,7 @@
@@ -114,7 +114,7 @@

machines/update.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/machines_utilization.js.html b/docs/machines_utilization.js.html index 4eac699..067cf75 100644 --- a/docs/machines_utilization.js.html +++ b/docs/machines_utilization.js.html @@ -22,7 +22,7 @@
@@ -117,7 +117,7 @@

machines/utilization.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/machines_waitfor.js.html b/docs/machines_waitfor.js.html index a2f17df..d01bc03 100644 --- a/docs/machines_waitfor.js.html +++ b/docs/machines_waitfor.js.html @@ -22,7 +22,7 @@
@@ -163,7 +163,7 @@

machines/waitfor.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/networks.html b/docs/networks.html index 99b2549..65517a8 100644 --- a/docs/networks.html +++ b/docs/networks.html @@ -22,7 +22,7 @@
@@ -620,7 +620,7 @@
Returns:

- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/networks_index.js.html b/docs/networks_index.js.html index 1ab2651..a6a1f6b 100644 --- a/docs/networks_index.js.html +++ b/docs/networks_index.js.html @@ -22,7 +22,7 @@
@@ -58,7 +58,7 @@

networks/index.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/networks_list.js.html b/docs/networks_list.js.html index c266d86..e40dedf 100644 --- a/docs/networks_list.js.html +++ b/docs/networks_list.js.html @@ -22,7 +22,7 @@
@@ -112,7 +112,7 @@

networks/list.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/project.html b/docs/project.html index 12e3aa2..7906e52 100644 --- a/docs/project.html +++ b/docs/project.html @@ -22,7 +22,7 @@
@@ -693,7 +693,7 @@
Returns:

- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/project_clear.js.html b/docs/project_clear.js.html index b7fac0d..2b8a43b 100644 --- a/docs/project_clear.js.html +++ b/docs/project_clear.js.html @@ -22,7 +22,7 @@
@@ -81,7 +81,7 @@

project/clear.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/project_index.js.html b/docs/project_index.js.html index 50f3948..7b91166 100644 --- a/docs/project_index.js.html +++ b/docs/project_index.js.html @@ -22,7 +22,7 @@
@@ -60,7 +60,7 @@

project/index.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/project_init.js.html b/docs/project_init.js.html index a6207ec..c782c97 100644 --- a/docs/project_init.js.html +++ b/docs/project_init.js.html @@ -22,7 +22,7 @@
@@ -120,7 +120,7 @@

project/init.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/project_show.js.html b/docs/project_show.js.html index fc0787f..1bc2841 100644 --- a/docs/project_show.js.html +++ b/docs/project_show.js.html @@ -22,7 +22,7 @@
@@ -81,7 +81,7 @@

project/show.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/resourceDelegations.html b/docs/resourceDelegations.html new file mode 100644 index 0000000..ca7a607 --- /dev/null +++ b/docs/resourceDelegations.html @@ -0,0 +1,510 @@ + + + + + resourceDelegations - Documentation + + + + + + + + + + + + + + + + +
+ +

resourceDelegations

+ + + + + + + +
+ +
+ +

+ resourceDelegations +

+ + +
+ +
+
+ + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + +

Methods

+ + + + + + +

(static) create(delegationopt, cb) → {object}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+

Create resourceDelegation with limited access, e.g. for users who needs to stream a machine you created. +The create method takes a delegation object as the only argument with resource name as key and an object with ids to list resource ids to give access to.

+
+ + + + + + + + + +
Examples
+ +
var delegation = {
+  machine: {
+    ids: ['m123abc', 'm456def']
+  }
+};
+paperspace.resourceDelegations.create(delegation, function(err, res) {
+  // handle error or result
+});
+ +
$ paperspace resourceDelegations create
+ +
# HTTP request:
+https://api.paperspace.io
+POST /resourceDelegations/create
+x-api-key: 1ba4f98e7c0...
+{
+  "machine": {
+    "ids": ["m123abc", "m456def"]
+  }
+}
+# Returns 200 on success
+ +
// Example return value:
+[
+  {
+    "delegation": {
+      "machine": {
+        "ids": [
+          "m123abc",
+          "m456def"
+        ]
+      }
+    },
+    "isEnabled": true,
+    "accessTokenId": "resource-delegation-token-123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc",
+    "dtCreated": "2019-04-03T12:31:40.061Z",
+    "id": 123
+  }
+]
+ + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
delegation + + +object + + + + + + <optional>
+ + + + + +

A delegation object to grant access to reources

+
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
machine + + +object + + + + + + <optional>
+ + + + + +

Optional resource 'machine' to grant access to.

+
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
ids + + +array + + + + + + <optional>
+ + + + + +

Optional list of machine ids to grant access to.

+ +
+ +
cb + + +function + + + + + + + + + +

Node-style error-first callback function

+ + + + + + + + + + + + + + +
Returns:
+ + +
+

{ + delegation: { machine: ['m123abc', 'm456def', ... ] }, + accessToken: 'resource-delegation-token-123abc...', + ... + } - JSON object with provided delegation and newly generated resourceDelegation accessToken

+
+ + + +
+
+ Type +
+
+ +object + + +
+
+ + + + + + + + + + +
+ +
+ + + + +
+ +
+ +
+ Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme. +
+ + + + + \ No newline at end of file diff --git a/docs/resourceDelegations_create.js.html b/docs/resourceDelegations_create.js.html new file mode 100644 index 0000000..22f1b50 --- /dev/null +++ b/docs/resourceDelegations_create.js.html @@ -0,0 +1,134 @@ + + + + + resourceDelegations/create.js - Documentation + + + + + + + + + + + + + + + + +
+ +

resourceDelegations/create.js

+ + + + + + + +
+
+
'use strict';
+
+var method = require('./../method');
+var assign = require('lodash.assign');
+
+/**
+ * @memberof resourceDelegations
+ * @method create
+ * @description Create resourceDelegation with limited access, e.g. for users who needs to stream a machine you created.
+ * The create method takes a delegation object as the only argument with resource name as key and an object with ids to list resource ids to give access to.
+ * @param {object} [delegation] - A delegation object to grant access to reources
+ * @param {object} [delegation.machine] - Optional resource 'machine' to grant access to.
+ * @param {array} [delegation.machine.ids] - Optional list of machine ids to grant access to.
+ * @param {function} cb - Node-style error-first callback function
+ * @returns {object} {
+ *     delegation: { machine: ['m123abc', 'm456def', ... ] },
+ *     accessToken: 'resource-delegation-token-123abc...',
+ *     ...
+ *   } - JSON object with provided delegation and newly generated resourceDelegation accessToken
+ * @example
+ * var delegation = {
+ *   machine: {
+ *     ids: ['m123abc', 'm456def']
+ *   }
+ * };
+ * paperspace.resourceDelegations.create(delegation, function(err, res) {
+ *   // handle error or result
+ * });
+ * @example
+ * $ paperspace resourceDelegations create
+ * @example
+ * # HTTP request:
+ * https://api.paperspace.io
+ * POST /resourceDelegations/create
+ * x-api-key: 1ba4f98e7c0...
+ * {
+  "machine": {
+    "ids": ["m123abc", "m456def"]
+  }
+}
+ * # Returns 200 on success
+ * @example
+ * // Example return value:
+ * [
+ *   {
+ *     "delegation": {
+ *       "machine": {
+ *         "ids": [
+ *           "m123abc",
+ *           "m456def"
+ *         ]
+ *       }
+ *     },
+ *     "isEnabled": true,
+ *     "accessTokenId": "resource-delegation-token-123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc",
+ *     "dtCreated": "2019-04-03T12:31:40.061Z",
+ *     "id": 123
+ *   }
+ * ]
+ */
+
+function create(params, cb) {
+  return method(create, params, cb);
+}
+
+assign(create, {
+  auth: true,
+  group: 'resourceDelegations',
+  name: 'create',
+  method: 'post',
+  route: '/resourceDelegations/create',
+  requires: {},
+  returns: {},
+});
+
+module.exports = create;
+
+
+
+ + + + +
+ +
+ +
+ Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme. +
+ + + + + diff --git a/docs/resourceDelegations_index.js.html b/docs/resourceDelegations_index.js.html new file mode 100644 index 0000000..c6b2fea --- /dev/null +++ b/docs/resourceDelegations_index.js.html @@ -0,0 +1,67 @@ + + + + + resourceDelegations/index.js - Documentation + + + + + + + + + + + + + + + + +
+ +

resourceDelegations/index.js

+ + + + + + + +
+
+
'use strict';
+
+/**
+ * @namespace resourceDelegations
+ */
+
+module.exports = {
+  create: require('./create'),
+};
+
+
+
+ + + + +
+ +
+ +
+ Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme. +
+ + + + + diff --git a/docs/scripts.html b/docs/scripts.html index 4230a29..eed809e 100644 --- a/docs/scripts.html +++ b/docs/scripts.html @@ -22,7 +22,7 @@
@@ -1872,7 +1872,7 @@
Returns:

- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/scripts_create.js.html b/docs/scripts_create.js.html index bdbd789..c9173d1 100644 --- a/docs/scripts_create.js.html +++ b/docs/scripts_create.js.html @@ -22,7 +22,7 @@
@@ -131,7 +131,7 @@

scripts/create.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/scripts_destroy.js.html b/docs/scripts_destroy.js.html index a2bdfe9..6df41dc 100644 --- a/docs/scripts_destroy.js.html +++ b/docs/scripts_destroy.js.html @@ -22,7 +22,7 @@
@@ -95,7 +95,7 @@

scripts/destroy.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/scripts_index.js.html b/docs/scripts_index.js.html index 0b3356d..e943f4b 100644 --- a/docs/scripts_index.js.html +++ b/docs/scripts_index.js.html @@ -22,7 +22,7 @@
@@ -63,7 +63,7 @@

scripts/index.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/scripts_list.js.html b/docs/scripts_list.js.html index 8e8cf6d..d5e93ec 100644 --- a/docs/scripts_list.js.html +++ b/docs/scripts_list.js.html @@ -22,7 +22,7 @@
@@ -114,7 +114,7 @@

scripts/list.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/scripts_show.js.html b/docs/scripts_show.js.html index 01765ad..11dc90d 100644 --- a/docs/scripts_show.js.html +++ b/docs/scripts_show.js.html @@ -22,7 +22,7 @@
@@ -119,7 +119,7 @@

scripts/show.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/scripts_text.js.html b/docs/scripts_text.js.html index 94bc767..a8de4ee 100644 --- a/docs/scripts_text.js.html +++ b/docs/scripts_text.js.html @@ -22,7 +22,7 @@
@@ -99,7 +99,7 @@

scripts/text.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/templates.html b/docs/templates.html index 83ae3a5..1b212e5 100644 --- a/docs/templates.html +++ b/docs/templates.html @@ -22,7 +22,7 @@
@@ -663,7 +663,7 @@
Returns:

- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/templates_index.js.html b/docs/templates_index.js.html index e0dbc1d..4bd8b15 100644 --- a/docs/templates_index.js.html +++ b/docs/templates_index.js.html @@ -22,7 +22,7 @@
@@ -58,7 +58,7 @@

templates/index.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/templates_list.js.html b/docs/templates_list.js.html index 3a34bf4..a4c0a5a 100644 --- a/docs/templates_list.js.html +++ b/docs/templates_list.js.html @@ -22,7 +22,7 @@
@@ -123,7 +123,7 @@

templates/list.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/users.html b/docs/users.html index f0c3e7e..70fecef 100644 --- a/docs/users.html +++ b/docs/users.html @@ -22,7 +22,7 @@
@@ -594,7 +594,7 @@
Returns:

- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/users_index.js.html b/docs/users_index.js.html index 85492ca..7dbb628 100644 --- a/docs/users_index.js.html +++ b/docs/users_index.js.html @@ -22,7 +22,7 @@
@@ -58,7 +58,7 @@

users/index.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.
diff --git a/docs/users_list.js.html b/docs/users_list.js.html index ade36fc..e0a460b 100644 --- a/docs/users_list.js.html +++ b/docs/users_list.js.html @@ -22,7 +22,7 @@
@@ -118,7 +118,7 @@

users/list.js


- Documentation generated by JSDoc 3.5.5 on Mon Feb 11 2019 13:09:54 GMT-0500 (EST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Apr 03 2019 16:29:22 GMT+0200 (CEST) using the docdash theme.