Details on the various actions that can be performed on the
Org resource, including the expected
parameters and the potential responses.
Deletes an organization
var params = {
orgId: myOrgId
};
// with callbacks
client.org.delete(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.org.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.Organization, all.User, org.*, or org.delete.
Name |
Type |
Required |
Description |
Default |
Example |
orgId |
string |
Y |
ID associated with the organization |
|
575ed6e87ae143cd83dc4aa8 |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Success |
If organization was successfully deleted |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if organization was not found |
Returns device counts by day for the time range specified for this organization
var params = {
orgId: myOrgId
};
// with callbacks
client.org.deviceCounts(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.org.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.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.deviceCounts.
Name |
Type |
Required |
Description |
Default |
Example |
orgId |
string |
Y |
ID associated with the organization |
|
575ed6e87ae143cd83dc4aa8 |
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 |
404 |
Error |
Error if organization was not found |
Retrieves information on an organization
var params = {
orgId: myOrgId
};
// with callbacks
client.org.get(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.org.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.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.get.
Name |
Type |
Required |
Description |
Default |
Example |
orgId |
string |
Y |
ID associated with the organization |
|
575ed6e87ae143cd83dc4aa8 |
summaryExclude |
string |
N |
Comma-separated list of summary fields to exclude from org summary |
|
payloadCount |
summaryInclude |
string |
N |
Comma-separated list of summary fields to include in org summary |
|
payloadCount |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Organization |
Organization information |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if organization not found |
Invites a person to an organization
var params = {
orgId: myOrgId,
invite: myInvite
};
// with callbacks
client.org.inviteMember(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.org.inviteMember(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.Organization, all.User, org.*, or org.inviteMember.
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if organization not found |
Modifies a current org member's role
var params = {
orgId: myOrgId,
member: myMember
};
// with callbacks
client.org.modifyMember(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.org.modifyMember(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.Organization, all.User, org.*, or org.modifyMember.
Name |
Type |
Required |
Description |
Default |
Example |
orgId |
string |
Y |
ID associated with the organization |
|
575ed6e87ae143cd83dc4aa8 |
member |
Organization Member Patch |
Y |
Object containing new member pair |
|
Organization Member Patch Example |
summaryExclude |
string |
N |
Comma-separated list of summary fields to exclude from org summary |
|
payloadCount |
summaryInclude |
string |
N |
Comma-separated list of summary fields to include in org summary |
|
payloadCount |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Organization |
Updated organization information |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if organization not found |
Returns notebook execution usage by day for the time range specified for this organization
var params = {
orgId: myOrgId
};
// with callbacks
client.org.notebookMinuteCounts(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.org.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.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.notebookMinuteCounts.
Name |
Type |
Required |
Description |
Default |
Example |
orgId |
string |
Y |
ID associated with the organization |
|
575ed6e87ae143cd83dc4aa8 |
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 |
404 |
Error |
Error if organization was not found |
Updates information about an organization
var params = {
orgId: myOrgId,
organization: myOrganization
};
// with callbacks
client.org.patch(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.org.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.Organization, all.User, org.*, or org.patch.
Name |
Type |
Required |
Description |
Default |
Example |
orgId |
string |
Y |
ID associated with the organization |
|
575ed6e87ae143cd83dc4aa8 |
organization |
Organization Patch |
Y |
Object containing new organization properties |
|
Organization Patch Example |
summaryExclude |
string |
N |
Comma-separated list of summary fields to exclude from org summary |
|
payloadCount |
summaryInclude |
string |
N |
Comma-separated list of summary fields to include in org summary |
|
payloadCount |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Organization |
Updated organization information |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if organization was not found |
Returns payload counts for the time range specified for all applications this organization owns
var params = {
orgId: myOrgId
};
// with callbacks
client.org.payloadCounts(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.org.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.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.payloadCounts.
Name |
Type |
Required |
Description |
Default |
Example |
orgId |
string |
Y |
ID associated with the organization |
|
575ed6e87ae143cd83dc4aa8 |
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 |
404 |
Error |
Error if organization was not found |
Returns payload counts per resolution in the time range specified for all application this organization owns
var params = {
orgId: myOrgId
};
// with callbacks
client.org.payloadCountsBreakdown(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.org.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.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.payloadCountsBreakdown.
Name |
Type |
Required |
Description |
Default |
Example |
orgId |
string |
Y |
ID associated with the organization |
|
575ed6e87ae143cd83dc4aa8 |
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 |
404 |
Error |
Error if organization was not found |
Gets the current pending invites
var params = {
orgId: myOrgId
};
// with callbacks
client.org.pendingInvites(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.org.pendingInvites(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.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.pendingInvites.
Name |
Type |
Required |
Description |
Default |
Example |
orgId |
string |
Y |
ID associated with the organization |
|
575ed6e87ae143cd83dc4aa8 |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if organization not found |
Removes a member from the org
var params = {
orgId: myOrgId,
userId: myUserId
};
// with callbacks
client.org.removeMember(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.org.removeMember(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.Organization, all.User, org.*, or org.removeMember.
Name |
Type |
Required |
Description |
Default |
Example |
orgId |
string |
Y |
ID associated with the organization |
|
575ed6e87ae143cd83dc4aa8 |
userId |
string |
Y |
Id of user to remove |
|
575ed70c7ae143cd83dc4aa9 |
summaryExclude |
string |
N |
Comma-separated list of summary fields to exclude from org summary |
|
payloadCount |
summaryInclude |
string |
N |
Comma-separated list of summary fields to include in org summary |
|
payloadCount |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Organization |
Updated organization information |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if organization not found |
Revokes an existing invite
var params = {
orgId: myOrgId,
inviteId: myInviteId
};
// with callbacks
client.org.revokeInvite(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.org.revokeInvite(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.Organization, all.User, org.*, or org.revokeInvite.
Name |
Type |
Required |
Description |
Default |
Example |
orgId |
string |
Y |
ID associated with the organization |
|
575ed6e87ae143cd83dc4aa8 |
inviteId |
string |
Y |
Id of invite to revoke |
|
575ed71e7ae143cd83dc4aaa |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if organization not found |
Moves resources to a new owner
var params = {
orgId: myOrgId,
transfer: myTransfer
};
// with callbacks
client.org.transferResources(params, function (err, result) {
if (err) { return console.error(err); }
console.log(result);
});
// with promises
client.org.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.Organization, all.User, org.*, or org.transferResources.
Name |
Type |
Required |
Description |
Default |
Example |
orgId |
string |
Y |
ID associated with the organization |
|
575ed6e87ae143cd83dc4aa8 |
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 |
404 |
Error |
Error if organization was not found |