Details on the various actions that can be performed on the
Instance resource, including the expected
parameters and the potential responses.
Returns device counts by day for the time range specified for this instance
result = client.instance.device_counts(instanceId=my_instance_id)
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.Instance, all.Instance.read, all.User, all.User.read, instance.*, or instance.deviceCounts.
Name |
Type |
Required |
Description |
Default |
Example |
instanceId |
string |
Y |
ID associated with the instance |
|
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 instance was not found |
Generates a CSV report on instance stats
result = client.instance.generate_report(instanceId=my_instance_id)
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.Instance, all.Instance.read, all.User, all.User.read, instance.*, or instance.generateReport.
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Returns an instance
result = client.instance.get(instanceId=my_instance_id)
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.Instance, all.Instance.read, all.User, all.User.read, instance.*, or instance.get.
Name |
Type |
Required |
Description |
Default |
Example |
instanceId |
string |
Y |
ID associated with the instance |
|
575ec8687ae143cd83dc4a97 |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Instance |
A single instance |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
404 |
Error |
Error if instance was not found |
Return historical summary entries for an instance
result = client.instance.historical_summaries(instanceId=my_instance_id)
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.Instance, all.Instance.read, all.User, all.User.read, instance.*, or instance.historicalSummaries.
Name |
Type |
Required |
Description |
Default |
Example |
instanceId |
string |
Y |
ID associated with the instance |
|
575ec8687ae143cd83dc4a97 |
month |
string |
N |
Timestamp within the month to report a summary for. |
now |
1609459204518 |
sortField |
string |
N |
Field to sort the results by. Accepted values are: resourceId, currentPeriodStart |
currentPeriodStart |
resourceId |
sortDirection |
string |
N |
Direction to sort the results in. Accepted values are: asc, desc |
asc |
asc |
page |
string |
N |
Which page of results to return |
0 |
0 |
perPage |
string |
N |
How many items to return per page |
100 |
10 |
filterField |
string |
N |
Field to filter the results by. Blank or not provided means no filtering. Accepted values are: resourceType, resourceId, ownerId, ownerType |
|
resourceType |
filter |
string |
N |
Filter to apply against the filtered field. Blank or not provided means no filtering. |
|
organization |
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 this instance
result = client.instance.notebook_minute_counts(instanceId=my_instance_id)
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.Instance, all.Instance.read, all.User, all.User.read, instance.*, or instance.notebookMinuteCounts.
Name |
Type |
Required |
Description |
Default |
Example |
instanceId |
string |
Y |
ID associated with the instance |
|
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 instance was not found |
Updates information about an instance
result = client.instance.patch(
instanceId=my_instance_id,
instance=my_instance)
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.Instance, all.User, instance.*, or instance.patch.
Name |
Type |
Required |
Description |
Default |
Example |
instanceId |
string |
Y |
ID associated with the instance |
|
575ec8687ae143cd83dc4a97 |
instance |
Instance Patch |
Y |
Updated instance information |
|
Instance Patch Example |
losantdomain |
string |
N |
Domain scope of request (rarely needed) |
|
example.com |
Code |
Type |
Description |
200 |
Instance |
The updated instance object |
Code |
Type |
Description |
400 |
Error |
Error if malformed request |
Returns payload counts for the time range specified for this instance
result = client.instance.payload_counts(instanceId=my_instance_id)
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.Instance, all.Instance.read, all.User, all.User.read, instance.*, or instance.payloadCounts.
Name |
Type |
Required |
Description |
Default |
Example |
instanceId |
string |
Y |
ID associated with the instance |
|
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 |
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 instance was not found |
Returns payload counts per resolution in the time range specified for this instance
result = client.instance.payload_counts_breakdown(instanceId=my_instance_id)
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.Instance, all.Instance.read, all.User, all.User.read, instance.*, or instance.payloadCountsBreakdown.
Name |
Type |
Required |
Description |
Default |
Example |
instanceId |
string |
Y |
ID associated with the instance |
|
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 instance was not found |