Details on the various actions that can be performed on the
Application resource, including the expected
parameters and the potential responses.
Add resources to an application via an application template
result = client.application.apply_template(
applicationId: my_application_id,
options: my_options)
puts result
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.Application, all.Organization, all.User, application.*, or application.applyTemplate.
Code |
Type |
Description |
200 |
Application |
Updated application information |
202 |
Job Enqueued API Result |
If a job was enqueued for the resources to be imported into the application |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if application is not found |
Returns success when a job has been enqueued to archive this application's device data for a given day
result = client.application.archive_data(
applicationId: my_application_id,
date: my_date)
puts result
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.Application, all.Organization, all.User, application.*, or application.archiveData.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
date |
string |
Y |
The date to archive data (ms since epoch), it must be within the archive time range older than 31 days and newer than the organizations dataTTL |
|
1518556791829 |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if application was not found |
Returns success when a job has been enqueued to backfill all current data to its archive
result = client.application.backfill_archive_data(applicationId: my_application_id)
puts result
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.Application, all.Organization, all.User, application.*, or application.backfillArchiveData.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
202 |
Job Enqueued API Result |
Enqueued a job to backfill device data to this application archive location |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if application was not found |
Copy an application into a new application
result = client.application.clone(applicationId: my_application_id)
puts result
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.Application, all.Organization, all.User, application.*, or application.clone.
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if application is not found |
422 |
Validation Error |
Error if too many validation errors occurred on other resources |
Deletes an application
result = client.application.delete(applicationId: my_application_id)
puts result
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.Application, all.Organization, all.User, application.*, or application.delete.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Success |
If application was successfully deleted |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if application was not found |
Returns device counts by day for the time range specified for this application
result = client.application.device_counts(applicationId: my_application_id)
puts result
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.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, application.*, or application.deviceCounts.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
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 application was not found |
Export an application and all of its resources
result = client.application.export(
applicationId: my_application_id,
options: my_options)
puts result
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.Application, all.Organization, all.User, application.*, or application.export.
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if application is not found |
Returns success when a job has been enqueued to archive all selected data tables
result = client.application.full_data_tables_archive(applicationId: my_application_id)
puts result
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.Application, all.Organization, all.User, application.*, or application.fullDataTablesArchive.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
202 |
Job Enqueued API Result |
Enqueued a job to archive all selected data tables of this application archive location |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if application was not found |
Returns success when a job has been enqueued to archive all current events
result = client.application.full_events_archive(applicationId: my_application_id)
puts result
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.Application, all.Organization, all.User, application.*, or application.fullEventsArchive.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
202 |
Job Enqueued API Result |
Enqueued a job to archive all events to this application archive location |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if application was not found |
Retrieves information on an application
result = client.application.get(applicationId: my_application_id)
puts result
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.Application, all.Application.cli, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.cli, all.User.read, application.*, or application.get.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
summaryExclude |
string |
N |
Comma-separated list of summary fields to exclude from application summary |
|
payloadCount |
summaryInclude |
string |
N |
Comma-separated list of summary fields to include in application summary |
|
payloadCount |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Application |
Application information |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if application was not found |
Updates an application global at the given key
result = client.application.globals(
applicationId: my_application_id,
globals: my_globals)
puts result
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.Application, all.Application.cli, all.Organization, all.User, all.User.cli, application.*, or application.patch.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
globals |
Application Global Patch |
Y |
Array of objects containing new application global information |
|
Application Global Patch Example |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Application |
Updated application information |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if application was not found |
Add multiple resources to an application via a zip file
result = client.application.import(applicationId: my_application_id)
puts result
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.Application, all.Organization, all.User, application.*, or application.import.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
importBundle |
file |
N |
The zip file containing all of the resources to import into the application |
|
undefined |
email |
string |
N |
Email address to notify the user when the job to import the application resources has completed or errored, defaults to the email address of the user making the request |
|
[email protected] |
options |
Application Import Options |
N |
Additional import options |
|
Application Import Options Example |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Application |
Updated application information |
202 |
Job Enqueued API Result |
If a job was enqueued for the resources to be imported into the application |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if application is not found |
Retrieves information on application import logs
result = client.application.import_logs(applicationId: my_application_id)
puts result
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.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, application.*, or application.importLogs.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
limit |
string |
N |
Max log entries to return (ordered by time descending) |
1 |
10 |
since |
string |
N |
Look for log entries since this time (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 application was not found |
Publishes the given message to the given MQTT topic
result = client.application.mqtt_publish_message(
applicationId: my_application_id,
payload: my_payload)
puts result
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.Application, all.Organization, all.User, application.*, or application.mqttPublishMessage.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
payload |
MQTT Publish Body |
Y |
Object containing topic and message |
|
MQTT Publish Body Example |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Success |
Message successfully published |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if application was not found |
Returns notebook execution usage by day for the time range specified for this application
result = client.application.notebook_minute_counts(applicationId: my_application_id)
puts result
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.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, application.*, or application.notebookMinuteCounts.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
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 application was not found |
Updates information about an application
result = client.application.patch(
applicationId: my_application_id,
application: my_application)
puts result
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.Application, all.Application.cli, all.Organization, all.User, all.User.cli, application.*, or application.patch.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
application |
Application Patch |
Y |
Object containing new application properties |
|
Application Patch Example |
summaryExclude |
string |
N |
Comma-separated list of summary fields to exclude from application summary |
|
payloadCount |
summaryInclude |
string |
N |
Comma-separated list of summary fields to include in application summary |
|
payloadCount |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Application |
Updated application information |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if application was not found |
Returns payload counts for the time range specified for this application
result = client.application.payload_counts(applicationId: my_application_id)
puts result
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.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, application.*, or application.payloadCounts.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
start |
string |
N |
Start of range for payload count query (ms since epoch) |
-2592000000 |
0 |
end |
string |
N |
End of range for payload count query (ms since epoch) |
0 |
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 application was not found |
Returns payload counts per resolution in the time range specified for this application
result = client.application.payload_counts_breakdown(applicationId: my_application_id)
puts result
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.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, application.*, or application.payloadCountsBreakdown.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
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 application was not found |
Get the current application readme information
result = client.application.readme(applicationId: my_application_id)
puts result
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.Application, all.Application.cli, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.cli, all.User.read, application.*, or application.get.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
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 application was not found |
Update the current application readme information
result = client.application.readme_patch(
applicationId: my_application_id,
readme: my_readme)
puts result
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.Application, all.Application.cli, all.Organization, all.User, all.User.cli, application.*, or application.patch.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
readme |
Application Readme Patch |
Y |
Object containing new readme information |
|
Application Readme Patch Example |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if application was not found |
Search across an application's resources by target identifier
result = client.application.search(
applicationId: my_application_id,
filter: my_filter)
puts result
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.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, application.*, or application.search.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID of the associated application |
|
575ec8687ae143cd83dc4a97 |
filter |
string |
Y |
The partial resource name being searched for |
|
my dev |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Application Search Result |
An array of resource ids, names, descriptions, and types matching the search query |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if application is not found |