A valid api access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Application, all.Organization, all.User, application.*, or application.applyTemplate.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Request Body
The body of the request should be serialized JSON that validates against
the Application Apply Template Patch Schema schema. For example, the following would be a
valid body for this request:
Returns success when a job has been enqueued to archive this application’s device data for a given day
Method And Url
GET https://api.losant.com/applications/APPLICATION_ID/archiveData
Authentication
A valid api access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Application, all.Organization, all.User, application.*, or application.archiveData.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Query Parameters
Name
Required
Description
Default
Example
date
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
date=1518556791829
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X GET \
https://api.losant.com/applications/APPLICATION_ID/archiveData?date=1518556791829
Returns success when a job has been enqueued to backfill all current data to its archive
Method And Url
GET https://api.losant.com/applications/APPLICATION_ID/backfillArchiveData
Authentication
A valid api access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Application, all.Organization, all.User, application.*, or application.backfillArchiveData.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X GET \
https://api.losant.com/applications/APPLICATION_ID/backfillArchiveData
POST https://api.losant.com/applications/APPLICATION_ID/clone
Authentication
A valid api access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Application, all.Organization, all.User, application.*, or application.clone.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Request Body
The body of the request should be serialized JSON that validates against
the Application Clone Post Schema schema. For example, the following would be a
valid body for this request:
A valid api access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Application, all.Organization, all.User, application.*, or application.delete.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Returns device counts by day for the time range specified for this application
Method And Url
GET https://api.losant.com/applications/APPLICATION_ID/deviceCounts
Authentication
A valid api access token is required to access this endpoint. 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.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Query Parameters
Name
Required
Description
Default
Example
start
N
Start of range for device count query (ms since epoch)
start=0
end
N
End of range for device count query (ms since epoch)
end=1465790400000
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X GET \
https://api.losant.com/applications/APPLICATION_ID/deviceCounts
POST https://api.losant.com/applications/APPLICATION_ID/export
Authentication
A valid api access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Application, all.Organization, all.User, application.*, or application.export.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Request Body
The body of the request should be serialized JSON that validates against
the Application Export Post Schema schema. For example, the following would be a
valid body for this request:
Returns success when a job has been enqueued to archive all selected data tables
Method And Url
GET https://api.losant.com/applications/APPLICATION_ID/fullDataTablesArchive
Authentication
A valid api access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Application, all.Organization, all.User, application.*, or application.fullDataTablesArchive.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X GET \
https://api.losant.com/applications/APPLICATION_ID/fullDataTablesArchive
Returns success when a job has been enqueued to archive all current events
Method And Url
GET https://api.losant.com/applications/APPLICATION_ID/fullEventsArchive
Authentication
A valid api access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Application, all.Organization, all.User, application.*, or application.fullEventsArchive.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X GET \
https://api.losant.com/applications/APPLICATION_ID/fullEventsArchive
GET https://api.losant.com/applications/APPLICATION_ID
Authentication
A valid api access token is required to access this endpoint. 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.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Query Parameters
Name
Required
Description
Default
Example
summaryExclude
N
Comma-separated list of summary fields to exclude from application summary
summaryExclude=payloadCount
summaryInclude
N
Comma-separated list of summary fields to include in application summary
summaryInclude=payloadCount
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X GET \
https://api.losant.com/applications/APPLICATION_ID
A valid api access token is required to access this endpoint. 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.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Request Body
The body of the request should be serialized JSON that validates against
the Application Global Patch schema. For example, the following would be a
valid body for this request:
[{"key":"keyHere","description":"Description of my application global","json":"\"my json data here\"","cloudOnly":true},{"key":"anotherKey","json":"\"more json\"","cloudOnly":false}]
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X PATCH \-d'[{"key":"keyHere","description":"Description of my application global","json":"\"my json data here\"","cloudOnly":true},{"key":"anotherKey","json":"\"more json\"","cloudOnly":false}]'\
https://api.losant.com/applications/APPLICATION_ID/globals
Add multiple resources to an application via a zip file
Method And Url
POST https://api.losant.com/applications/APPLICATION_ID/import
Authentication
A valid api access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Application, all.Organization, all.User, application.*, or application.import.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Request Body
The body of the request should be a multipart form data post containing the following:
Name
Required
Description
Default
Example
importBundle
N
The zip file containing all of the resources to import into the application
email
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
GET https://api.losant.com/applications/APPLICATION_ID/importLogs
Authentication
A valid api access token is required to access this endpoint. 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.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Query Parameters
Name
Required
Description
Default
Example
limit
N
Max log entries to return (ordered by time descending)
1
limit=10
since
N
Look for log entries since this time (ms since epoch)
since=1465790400000
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X GET \
https://api.losant.com/applications/APPLICATION_ID/importLogs
Publishes the given message to the given MQTT topic
Method And Url
POST https://api.losant.com/applications/APPLICATION_ID/mqttPublishMessage
Authentication
A valid api access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Application, all.Organization, all.User, application.*, or application.mqttPublishMessage.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Request Body
The body of the request should be serialized JSON that validates against
the MQTT Publish Body schema. For example, the following would be a
valid body for this request:
Attach to a real time stream of state messages for the given MQTT topic using Server Sent Events (SSE)
Method And Url
GET https://api.losant.com/applications/APPLICATION_ID/mqttSubscriptionStream
Authentication
A valid api access token is required to access this endpoint. 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.mqttSubscriptionStream.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Query Parameters
Name
Required
Description
Default
Example
keepAliveInterval
N
Number of seconds between keepalive messages
2
keepAliveInterval=2
topic
Y
The MQTT topic to subscribe to
topic=my/topic
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X GET \
https://api.losant.com/applications/APPLICATION_ID/mqttSubscriptionStream?topic=my%2Ftopic
SSE Stream for a Successful Response
SSE stream of mqtt messages for the requested topic
Returns notebook execution usage by day for the time range specified for this application
Method And Url
GET https://api.losant.com/applications/APPLICATION_ID/notebookMinuteCounts
Authentication
A valid api access token is required to access this endpoint. 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.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Query Parameters
Name
Required
Description
Default
Example
start
N
Start of range for notebook execution query (ms since epoch)
start=0
end
N
End of range for notebook execution query (ms since epoch)
end=1465790400000
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X GET \
https://api.losant.com/applications/APPLICATION_ID/notebookMinuteCounts
A valid api access token is required to access this endpoint. 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.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Query Parameters
Name
Required
Description
Default
Example
summaryExclude
N
Comma-separated list of summary fields to exclude from application summary
summaryExclude=payloadCount
summaryInclude
N
Comma-separated list of summary fields to include in application summary
summaryInclude=payloadCount
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Request Body
The body of the request should be serialized JSON that validates against
the Application Patch schema. For example, the following would be a
valid body for this request:
{"name":"My Updated Application","description":"Description of my updated application"}
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X PATCH \-d'{"name":"My Updated Application","description":"Description of my updated application"}'\
https://api.losant.com/applications/APPLICATION_ID
Returns payload counts for the time range specified for this application
Method And Url
GET https://api.losant.com/applications/APPLICATION_ID/payloadCounts
Authentication
A valid api access token is required to access this endpoint. 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.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Query Parameters
Name
Required
Description
Default
Example
start
N
Start of range for payload count query (ms since epoch)
-2592000000
start=0
end
N
End of range for payload count query (ms since epoch)
0
end=1465790400000
asBytes
N
If the resulting stats should be returned as bytes
false
asBytes=true
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X GET \
https://api.losant.com/applications/APPLICATION_ID/payloadCounts
Returns payload counts per resolution in the time range specified for this application
Method And Url
GET https://api.losant.com/applications/APPLICATION_ID/payloadCountsBreakdown
Authentication
A valid api access token is required to access this endpoint. 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.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Query Parameters
Name
Required
Description
Default
Example
start
N
Start of range for payload count query (ms since epoch)
start=0
end
N
End of range for payload count query (ms since epoch)
end=1465790400000
resolution
N
Resolution in milliseconds. Accepted values are: 86400000, 3600000
86400000
resolution=86400000
asBytes
N
If the resulting stats should be returned as bytes
false
asBytes=true
includeNonBillable
N
If non-billable payloads should be included in the result
false
includeNonBillable=true
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X GET \
https://api.losant.com/applications/APPLICATION_ID/payloadCountsBreakdown
GET https://api.losant.com/applications/APPLICATION_ID/readme
Authentication
A valid api access token is required to access this endpoint. 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.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X GET \
https://api.losant.com/applications/APPLICATION_ID/readme
A valid api access token is required to access this endpoint. 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.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Request Body
The body of the request should be serialized JSON that validates against
the Application Readme Patch schema. For example, the following would be a
valid body for this request:
Search across an application’s resources by target identifier
Method And Url
GET https://api.losant.com/applications/APPLICATION_ID/search
Authentication
A valid api access token is required to access this endpoint. 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.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID of the associated application
575ec8687ae143cd83dc4a97
Request Query Parameters
Name
Required
Description
Default
Example
filter
Y
The partial resource name being searched for
filter=my dev
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X GET \
https://api.losant.com/applications/APPLICATION_ID/search?filter=my%20dev