users

users

Methods

(static) list(filteropt, cb) → {array}

Source:

List information about all users 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 user objects.

Examples
paperspace.users.list(function(err, res) {
  // handle error or result
});
$ paperspace users list
# HTTP request:
https://api.paperspace.io
GET /users/getUsers
x-api-key: 1ba4f98e7c0...
# Returns 200 on success
//Example return value:
[
  {
    "id": "u123abc",
    "email": "jon@example.com",
    "firstname": "Jon",
    "lastname": "Snow",
    "dtCreated": "2017-04-15T16:20:59.609Z",
    "teamId": "te456def"
  },
  {
    "id": "u789ghi",
    "email": "jeff@example.com",
    "firstname": "Jeff",
    "lastname": "Green",
    "dtCreated": "2016-12-07T15:59:09.769Z",
    "teamId": "te456def"
  }
]
Parameters:
Name Type Attributes Description
filter object <optional>

An optional filter object to limit the returned user objects

Properties
Name Type Attributes Description
id string <optional>

Optional user id to match on

email string <optional>

Optional email to match on

firstname string <optional>

Optional firstname to match on

lastname string <optional>

Optional lastname to match on

dtCreated string <optional>

Optional datetime created value to match on

teamId string <optional>

Optional teamId to match on

cb function

Node-style error-first callback function

Returns:

[ user, ... ] - JSON array of user objects

Type
array