Details on the various actions that can be performed on the
Me resource, including the expected
parameters and the potential responses.
Adds an item to a recent item list
var params = {
data: myData
};
// with callbacks
client.me.addRecentItem(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.addRecentItem(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, me.*, or me.addRecentItem.
Name |
Type |
Required |
Description |
Default |
Example |
data |
Recent Item |
Y |
Object containing recent item info |
|
Recent Item Example |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Changes the current user's password and optionally logs out all other sessions
var params = {
data: myData
};
// with callbacks
client.me.changePassword(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.changePassword(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, me.*, or me.changePassword.
Name |
Type |
Required |
Description |
Default |
Example |
data |
Change Password |
Y |
Object containing the password change info |
|
Change Password Example |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Authenticated User |
A new, valid, auth token (potentially all previous tokens are now invalid) |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Deletes the current user
var params = {
credentials: myCredentials
};
// with callbacks
client.me.delete(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.delete(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, me.*, or me.delete.
Name |
Type |
Required |
Description |
Default |
Example |
credentials |
User Credentials |
Y |
User authentication credentials |
|
User Credentials Example |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Success |
If the user was successfully deleted |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Returns device counts by day for the time range specified for all applications the current user owns
var params = {}; // all params are optional
// with callbacks
client.me.deviceCounts(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.deviceCounts(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, all.User.read, me.*, or me.deviceCounts.
Name |
Type |
Required |
Description |
Default |
Example |
start |
string |
N |
Start of range for device count query (ms since epoch) |
|
0 |
end |
string |
N |
End of range for device count query (ms since epoch) |
|
1465790400000 |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Disables multi-factor authentication for the current user
var params = {
data: myData
};
// with callbacks
client.me.disableTwoFactorAuth(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.disableTwoFactorAuth(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, me.*, or me.disableTwoFactorAuth.
Code |
Type |
Description |
200 |
Me |
Updated user information |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Disconnects the user from Github
var params = {}; // all params are optional
// with callbacks
client.me.disconnectGithub(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.disconnectGithub(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, me.*, or me.disconnectGithub.
Name |
Type |
Required |
Description |
Default |
Example |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Me |
Updated user information |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Enables multi-factor authentication for the current user
var params = {
data: myData
};
// with callbacks
client.me.enableTwoFactorAuth(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.enableTwoFactorAuth(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, me.*, or me.enableTwoFactorAuth.
Code |
Type |
Description |
200 |
Me |
Updated user information |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Gets a recent item list
var params = {
itemType: myItemType
};
// with callbacks
client.me.fetchRecentItems(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.fetchRecentItems(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, all.User.read, me.*, or me.fetchRecentItems.
Name |
Type |
Required |
Description |
Default |
Example |
parentId |
string |
N |
Parent id of the recent list |
|
575ec8687ae143cd83dc4a97 |
itemType |
undefined |
Y |
Item type to get the recent list of. Accepted values are: application, device, flow, dashboard, organization |
|
application |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Returns the multi-factor authentication key for the current user
var params = {}; // all params are optional
// with callbacks
client.me.generateTwoFactorAuth(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.generateTwoFactorAuth(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, me.*, or me.generateTwoFactorAuth.
Name |
Type |
Required |
Description |
Default |
Example |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Retrieves information on the current user
var params = {}; // all params are optional
// with callbacks
client.me.get(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.get(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, all.User.read, me.*, or me.get.
Name |
Type |
Required |
Description |
Default |
Example |
includeRecent |
undefined |
N |
Should the user include recent app/dashboard info |
|
true |
summaryExclude |
string |
N |
Comma-separated list of summary fields to exclude from user summary |
|
payloadCount |
summaryInclude |
string |
N |
Comma-separated list of summary fields to include in user summary |
|
payloadCount |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Me |
Current user information |
Retrieves information for an invitation to an organization
var params = {
inviteId: myInviteId
};
// with callbacks
client.me.invite(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.invite(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, all.User.read, me.*, or me.invite.
Name |
Type |
Required |
Description |
Default |
Example |
inviteId |
string |
Y |
ID associated with the invitation |
|
575ec8687ae143cd83dc4a97 |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if invite not found |
Retrieves pending organization invitations for a user
var params = {}; // all params are optional
// with callbacks
client.me.invites(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.invites(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, all.User.read, me.*, or me.invites.
Name |
Type |
Required |
Description |
Default |
Example |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Returns notebook execution usage by day for the time range specified for all applications the current user owns
var params = {}; // all params are optional
// with callbacks
client.me.notebookMinuteCounts(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.notebookMinuteCounts(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, all.User.read, me.*, or me.notebookMinuteCounts.
Name |
Type |
Required |
Description |
Default |
Example |
start |
string |
N |
Start of range for notebook execution query (ms since epoch) |
|
0 |
end |
string |
N |
End of range for notebook execution query (ms since epoch) |
|
1465790400000 |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Updates information about the current user
var params = {
user: myUser
};
// with callbacks
client.me.patch(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.patch(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, me.*, or me.patch.
Name |
Type |
Required |
Description |
Default |
Example |
user |
Me Patch |
Y |
Object containing new user properties |
|
Me Patch Example |
summaryExclude |
string |
N |
Comma-separated list of summary fields to exclude from user summary |
|
payloadCount |
summaryInclude |
string |
N |
Comma-separated list of summary fields to include in user summary |
|
payloadCount |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Me |
Updated user information |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Returns payload counts for the time range specified for all applications the current user owns
var params = {}; // all params are optional
// with callbacks
client.me.payloadCounts(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.payloadCounts(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, all.User.read, me.*, or me.payloadCounts.
Name |
Type |
Required |
Description |
Default |
Example |
start |
string |
N |
Start of range for payload count query (ms since epoch) |
|
0 |
end |
string |
N |
End of range for payload count query (ms since epoch) |
|
1465790400000 |
asBytes |
string |
N |
If the resulting stats should be returned as bytes |
false |
true |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Payload Stats |
Payload counts, by type and source |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Returns payload counts per resolution in the time range specified for all applications the current user owns
var params = {}; // all params are optional
// with callbacks
client.me.payloadCountsBreakdown(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.payloadCountsBreakdown(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, all.User.read, me.*, or me.payloadCountsBreakdown.
Name |
Type |
Required |
Description |
Default |
Example |
start |
string |
N |
Start of range for payload count query (ms since epoch) |
|
0 |
end |
string |
N |
End of range for payload count query (ms since epoch) |
|
1465790400000 |
resolution |
string |
N |
Resolution in milliseconds. Accepted values are: 86400000, 3600000 |
86400000 |
86400000 |
asBytes |
string |
N |
If the resulting stats should be returned as bytes |
false |
true |
includeNonBillable |
string |
N |
If non-billable payloads should be included in the result |
false |
true |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Returns a new auth token based on the current auth token
var params = {}; // all params are optional
// with callbacks
client.me.refreshToken(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.refreshToken(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, or me.*.
Name |
Type |
Required |
Description |
Default |
Example |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
401 |
Error |
Unauthorized error if authentication fails |
Accepts or rejects an invitation to an organization
var params = {
inviteId: myInviteId,
response: myResponse
};
// with callbacks
client.me.respondToInvite(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.respondToInvite(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, me.*, or me.respondToInvite.
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if invitation not found |
410 |
Error |
Error if invitation has expired |
Moves resources to a new owner
var params = {
transfer: myTransfer
};
// with callbacks
client.me.transferResources(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.transferResources(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, me.*, or me.transferResources.
Name |
Type |
Required |
Description |
Default |
Example |
transfer |
Resource Transfer |
Y |
Object containing properties of the transfer |
|
Resource Transfer Example |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Success |
If resource transfer was successful |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Sends an email verification to the user
var params = {}; // all params are optional
// with callbacks
client.me.verifyEmail(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.me.verifyEmail(params)
.then(console.log)
.catch(console.error);
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.User, me.*, or me.verifyEmail.
Name |
Type |
Required |
Description |
Default |
Example |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Success |
If email verification was successfully sent |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |