Details on the various actions that can be performed on the
Data resource, including the expected
parameters and the potential responses.
Creates a csv file from a query of devices and attributes over a time range.
result = client.data.export(
applicationId=my_application_id,
query=my_query)
print(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.Device, all.Device.read, all.Organization, all.Organization.read, all.User, all.User.read, data.*, or data.export.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID associated with the application |
|
575ec8687ae143cd83dc4a97 |
query |
Data Export |
Y |
The query parameters |
|
Data Export 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 |
Returns the last known data for the given attribute
result = client.data.last_value_query(
applicationId=my_application_id,
query=my_query)
print(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.Device, all.Device.read, all.Organization, all.Organization.read, all.User, all.User.read, data.*, or data.lastValueQuery.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID associated with the application |
|
575ec8687ae143cd83dc4a97 |
query |
Last Value Query |
Y |
The query parameters |
|
Last Value Query Example |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Last Value Data |
Last known data for the requested attribute |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if application was not found |
Returns the data for the given query
result = client.data.time_series_query(
applicationId=my_application_id,
query=my_query)
print(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.Device, all.Device.read, all.Organization, all.Organization.read, all.User, all.User.read, data.*, or data.timeSeriesQuery.
Name |
Type |
Required |
Description |
Default |
Example |
applicationId |
string |
Y |
ID associated with the application |
|
575ec8687ae143cd83dc4a97 |
query |
Time Series Query |
Y |
The query parameters |
|
Time Series Query 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 |