Devices Actions
https://api.losant.com/applications/APPLICATION_ID
/devices
Below are the various requests that can be performed against the Devices resource, as well as the expected parameters and the potential responses.
Attribute Names
Gets the attribute names that match the given query. Maximum 1K returned.
Method And Url
GET https://api.losant.com/applications/APPLICATION_ID
/devices/attributeNames
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
, devices.*
, or devices.attributeNames
.
Request Path Components
Path Component | Description | Example |
---|---|---|
APPLICATION_ID | ID associated with the application | 575ec8687ae143cd83dc4a97 |
Request Query Parameters
Name | Required | Description | Default | Example |
---|---|---|---|---|
query | N | Device filter JSON object. See Advanced Device Query for more details. | query={"$or":[{"name":{"$ne":"myValue"}},{"parentId":"575ec8687ae143cd83dc4a97"}]} | |
dataType | N | Filter the devices by the given attribute data type or types. See Device Attribute Data Type Filter for more details. | dataType[0]=number&dataType[1]=blob | |
startsWith | N | Filter attributes down to those that have names starting with the given string. Case insensitive. | startsWith=temper |
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/devices/attributeNames
Successful Responses
Code | Type | Description |
---|---|---|
200 | Attribute Names Response | The matching attribute names |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if application was not found |
Delete
Delete devices
Method And Url
POST https://api.losant.com/applications/APPLICATION_ID
/devices/delete
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
, devices.*
, or devices.delete
.
Request Path Components
Path Component | Description | Example |
---|---|---|
APPLICATION_ID | ID associated with the 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 Devices Delete Or Restore Post schema. For example, the following would be a valid body for this request:
{
"query": {
"name": {
"$ne": "My Device"
}
},
"email": "email@example.com"
}
Curl Example
curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X POST \
-d '{"query":{"name":{"$ne":"My Device"}},"email":"email@example.com"}' \
https://api.losant.com/applications/APPLICATION_ID/devices/delete
Successful Responses
Code | Type | Description |
---|---|---|
200 | Bulk Deletion Response | Object indicating number of devices deleted or failed |
202 | Job Enqueued API Result | If a job was enqueued for the devices to be deleted |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if application was not found |
Device Names
Gets the device names that match the given query. Maximum 1K returned.
Method And Url
GET https://api.losant.com/applications/APPLICATION_ID
/devices/deviceNames
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
, devices.*
, or devices.deviceNames
.
Request Path Components
Path Component | Description | Example |
---|---|---|
APPLICATION_ID | ID associated with the application | 575ec8687ae143cd83dc4a97 |
Request Query Parameters
Name | Required | Description | Default | Example |
---|---|---|---|---|
query | N | Device filter JSON object. See Advanced Device Query for more details. | query={"$or":[{"name":{"$ne":"myValue"}},{"parentId":"575ec8687ae143cd83dc4a97"}]} | |
startsWith | N | Filter devices down to those that have names starting with the given string. Case insensitive. | startsWith=temper |
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/devices/deviceNames
Successful Responses
Code | Type | Description |
---|---|---|
200 | Device Names Response | The matching device names |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if application was not found |
Export
Creates an export of all device metadata
Method And Url
POST https://api.losant.com/applications/APPLICATION_ID
/devices/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.Application.read
, all.Organization
, all.Organization.read
, all.User
, all.User.read
, devices.*
, or devices.export
.
Request Path Components
Path Component | Description | Example |
---|---|---|
APPLICATION_ID | ID associated with the application | 575ec8687ae143cd83dc4a97 |
Request Query Parameters
Name | Required | Description | Default | Example |
---|---|---|---|---|
N | Email address to send export to. Defaults to current user's email. | email=email@example.com | ||
callbackUrl | N | Callback URL to call with export result | callbackUrl=https://example.com/cburl |
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 Devices Metadata Export Post schema. For example, the following would be a valid body for this request:
{
"query": {
"name": {
"$ne": "My Device"
}
},
"email": "email@example.com"
}
Curl Example
curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X POST \
https://api.losant.com/applications/APPLICATION_ID/devices/export
Successful Responses
Code | Type | Description |
---|---|---|
202 | Job Enqueued API Result | If generation of export was successfully started |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if application was not found |
Get
Returns the devices for an application
Method And Url
GET https://api.losant.com/applications/APPLICATION_ID
/devices
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.Device
, all.Device.read
, all.Organization
, all.Organization.read
, all.User
, all.User.read
, devices.*
, or devices.get
.
Request Path Components
Path Component | Description | Example |
---|---|---|
APPLICATION_ID | ID associated with the application | 575ec8687ae143cd83dc4a97 |
Request Query Parameters
Name | Required | Description | Default | Example |
---|---|---|---|---|
sortField | N | Field to sort the results by. Accepted values are: name, id, creationDate, lastUpdated, connectionStatus, deletedAt | name | sortField=name |
sortDirection | N | Direction to sort the results by. Accepted values are: asc, desc | asc | sortDirection=asc |
page | N | Which page of results to return | 0 | page=0 |
perPage | N | How many items to return per page | 100 | perPage=10 |
filterField | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name | filterField=name | |
filter | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | filter=my * device | |
deviceClass | N | Filter the devices by the given device class or classes. See Device Class Filter for more details. | deviceClass[0]=standalone&deviceClass[1]=edgeCompute | |
tagFilter | N | Array of tag pairs to filter by. See Device Tag Filter for more details. | tagFilter[0][key]=Floor&tagFilter[0][value]=2&tagFilter[1][key]=Serial | |
excludeConnectionInfo | N | If set, do not return connection info | excludeConnectionInfo=true | |
parentId | N | Filter devices as children of a given system id | parentId=575ecf887ae143cd83dc4aa2 | |
query | N | Device filter JSON object which overrides the filterField, filter, deviceClass, tagFilter, and parentId parameters. See Advanced Device Query for more details. | query={"$or":[{"name":{"$ne":"myValue"}},{"parentId":"575ec8687ae143cd83dc4a97"}]} | |
tagsAsObject | N | Return tags as an object map instead of an array | tagsAsObject=true | |
attributesAsObject | N | Return attributes as an object map instead of an array | attributesAsObject=false | |
queryDeleted | N | If true, endpoint will return recently deleted devices instead | queryDeleted=false |
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/devices
Successful Responses
Code | Type | Description |
---|---|---|
200 | Devices | Collection of devices |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if application was not found |
Get Composite State
Retrieve the composite last complete state of the matching devices
Method And Url
GET https://api.losant.com/applications/APPLICATION_ID
/devices/compositeState
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.Device
, all.Device.read
, all.Organization
, all.Organization.read
, all.User
, all.User.read
, devices.*
, or devices.getCompositeState
.
Request Path Components
Path Component | Description | Example |
---|---|---|
APPLICATION_ID | ID associated with the application | 575ec8687ae143cd83dc4a97 |
Request Query Parameters
Name | Required | Description | Default | Example |
---|---|---|---|---|
start | N | Start of time range to look at to build composite state | 1 | start=1465790400000 |
end | N | End of time range to look at to build composite state | 0 | end=1465790400000 |
attributes | N | Comma-separated list of attributes to include. When not provided, returns all attributes. | attributes=myAttr1,myAttr2 | |
sortField | N | Field to sort the results by. Accepted values are: name, id, creationDate, lastUpdated, connectionStatus | name | sortField=name |
sortDirection | N | Direction to sort the results by. Accepted values are: asc, desc | asc | sortDirection=asc |
page | N | Which page of results to return | 0 | page=0 |
perPage | N | How many items to return per page | 100 | perPage=10 |
query | N | Device advanced query JSON object. See Advanced Device Query for more details. | query={"$or":[{"name":{"$ne":"myValue"}},{"parentId":"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/devices/compositeState
Successful Responses
Code | Type | Description |
---|---|---|
200 | Devices Composite State | Collection of composite last state of the devices |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if application was not found |
Patch
Update the fields of one or more devices
Method And Url
PATCH https://api.losant.com/applications/APPLICATION_ID
/devices
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
, devices.*
, or devices.patch
.
Request Path Components
Path Component | Description | Example |
---|---|---|
APPLICATION_ID | ID associated with the 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 Devices Patch schema. For example, the following would be a valid body for this request:
{
"updateFields": {
"name": "My Updated Device",
"description": "Description of my updated device",
"tags": [
{
"key": "TagKey",
"value": "TagValue"
}
],
"attributes": [
{
"name": "voltage",
"dataType": "number"
}
],
"deviceClass": "standalone"
},
"deviceIds": [
"575ecec57ae143cd83dc4a9f",
"575ecec57ae143cd83dc4a9e",
"575ecec57ae143cd83dc4a9a"
]
}
Curl Example
curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X PATCH \
-d '{"updateFields":{"name":"My Updated Device","description":"Description of my updated device","tags":[{"key":"TagKey","value":"TagValue"}],"attributes":[{"name":"voltage","dataType":"number"}],"deviceClass":"standalone"},"deviceIds":["575ecec57ae143cd83dc4a9f","575ecec57ae143cd83dc4a9e","575ecec57ae143cd83dc4a9a"]}' \
https://api.losant.com/applications/APPLICATION_ID/devices
Successful Responses
Code | Type | Description |
---|---|---|
200 | Devices Updated | Object including an update log link and the number of devices updated, failed, and skipped |
202 | Job Enqueued API Result | Successfully queued bulk update job |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if application was not found |
Payload Counts
Creates an export of payload count information for the matching devices
Method And Url
POST https://api.losant.com/applications/APPLICATION_ID
/devices/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
, devices.*
, or devices.payloadCounts
.
Request Path Components
Path Component | Description | Example |
---|---|---|
APPLICATION_ID | ID associated with the 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 Devices Payload Count Export Post schema. For example, the following would be a valid body for this request:
{
"query": {
"name": {
"$ne": "My Device"
}
},
"email": "email@example.com"
}
Curl Example
curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X POST \
https://api.losant.com/applications/APPLICATION_ID/devices/payloadCounts
Successful Responses
Code | Type | Description |
---|---|---|
202 | Job Enqueued API Result | If generation of export was successfully started |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if application was not found |
Post
Create a new device for an application
Method And Url
POST https://api.losant.com/applications/APPLICATION_ID
/devices
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
, devices.*
, or devices.post
.
Request Path Components
Path Component | Description | Example |
---|---|---|
APPLICATION_ID | ID associated with the application | 575ec8687ae143cd83dc4a97 |
Request Query Parameters
Name | Required | Description | Default | Example |
---|---|---|---|---|
tagsAsObject | N | Return tags as an object map instead of an array | tagsAsObject=true | |
attributesAsObject | N | Return attributes as an object map instead of an array | attributesAsObject=false |
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 Device Post schema. For example, the following would be a valid body for this request:
{
"name": "My New Device",
"description": "Description of my new device",
"tags": [
{
"key": "TagKey",
"value": "TagValue"
}
],
"attributes": [
{
"name": "voltage",
"dataType": "number"
}
],
"deviceClass": "standalone"
}
Curl Example
curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X POST \
-d '{"name":"My New Device","description":"Description of my new device","tags":[{"key":"TagKey","value":"TagValue"}],"attributes":[{"name":"voltage","dataType":"number"}],"deviceClass":"standalone"}' \
https://api.losant.com/applications/APPLICATION_ID/devices
Successful Responses
Code | Type | Description |
---|---|---|
201 | Device | Successfully created device |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if application was not found |
Remove Data
Removes all device data for the specified time range. Defaults to all data.
Method And Url
POST https://api.losant.com/applications/APPLICATION_ID
/devices/removeData
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
, devices.*
, or devices.removeData
.
Request Path Components
Path Component | Description | Example |
---|---|---|
APPLICATION_ID | ID associated with the 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 Devices Remove Data Post schema. For example, the following would be a valid body for this request:
{
"query": {
"name": {
"$ne": "My Device"
}
},
"start": 1,
"end": 0,
"attributes": [
"deleteMyData",
"mineToo"
]
}
Curl Example
curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X POST \
-d '{"query":{"name":{"$ne":"My Device"}},"start":1,"end":0,"attributes":["deleteMyData","mineToo"]}' \
https://api.losant.com/applications/APPLICATION_ID/devices/removeData
Successful Responses
Code | Type | Description |
---|---|---|
202 | Job Enqueued API Result | If a job was enqueued for device data to be removed |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if application was not found |
Restore
Restore deleted devices
Method And Url
POST https://api.losant.com/applications/APPLICATION_ID
/devices/restore
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
, devices.*
, or devices.restore
.
Request Path Components
Path Component | Description | Example |
---|---|---|
APPLICATION_ID | ID associated with the 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 Devices Delete Or Restore Post schema. For example, the following would be a valid body for this request:
{
"query": {
"name": {
"$ne": "My Device"
}
},
"email": "email@example.com"
}
Curl Example
curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X POST \
-d '{"query":{"name":{"$ne":"My Device"}},"email":"email@example.com"}' \
https://api.losant.com/applications/APPLICATION_ID/devices/restore
Successful Responses
Code | Type | Description |
---|---|---|
200 | Bulk Restoration Response | Object indicating number of devices restored or failed |
202 | Job Enqueued API Result | If a job was enqueued for the devices to be restored |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if application was not found |
Send Command
Send a command to multiple devices
Method And Url
POST https://api.losant.com/applications/APPLICATION_ID
/devices/command
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.Device
, all.Organization
, all.User
, devices.*
, or devices.sendCommand
.
Request Path Components
Path Component | Description | Example |
---|---|---|
APPLICATION_ID | ID associated with the 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 Multi Device Command schema. For example, the following would be a valid body for this request:
{
"time": "2016-06-13T04:00:00.000Z",
"name": "myCommand",
"payload": [
1,
1,
2,
3,
5
],
"deviceTags": [
{
"key": "floor",
"value": "8"
}
]
}
Curl Example
curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X POST \
-d '{"time":"2016-06-13T04:00:00.000Z","name":"myCommand","payload":[1,1,2,3,5],"deviceTags":[{"key":"floor","value":"8"}]}' \
https://api.losant.com/applications/APPLICATION_ID/devices/command
Successful Responses
Code | Type | Description |
---|---|---|
200 | Success | If command was successfully sent |
202 | Job Enqueued API Result | If command was queued to be sent |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if application was not found |
Tag Keys
Gets the unique tag keys for devices that match the given query. Maximum 1K returned.
Method And Url
GET https://api.losant.com/applications/APPLICATION_ID
/devices/tagKeys
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
, devices.*
, or devices.tagKeys
.
Request Path Components
Path Component | Description | Example |
---|---|---|
APPLICATION_ID | ID associated with the application | 575ec8687ae143cd83dc4a97 |
Request Query Parameters
Name | Required | Description | Default | Example |
---|---|---|---|---|
query | N | Device filter JSON object. See Advanced Device Query for more details. | query={"$or":[{"name":{"$ne":"myValue"}},{"parentId":"575ec8687ae143cd83dc4a97"}]} | |
startsWith | N | Filter keys down to those that start with the given string. Case insensitive. | startsWith=temper |
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/devices/tagKeys
Successful Responses
Code | Type | Description |
---|---|---|
200 | Tag Keys Response | The matching tag keys |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if application was not found |
Tag Values
Gets the unique tag values for the given key for devices that match the given query. Maximum 1K returned.
Method And Url
GET https://api.losant.com/applications/APPLICATION_ID
/devices/tagValues
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
, devices.*
, or devices.tagValues
.
Request Path Components
Path Component | Description | Example |
---|---|---|
APPLICATION_ID | ID associated with the application | 575ec8687ae143cd83dc4a97 |
Request Query Parameters
Name | Required | Description | Default | Example |
---|---|---|---|---|
query | N | Device filter JSON object. See Advanced Device Query for more details. | query={"$or":[{"name":{"$ne":"myValue"}},{"parentId":"575ec8687ae143cd83dc4a97"}]} | |
key | Y | The tag key to get the values for | key=myKey | |
startsWith | N | Filter values down to those that start with the given string. Case insensitive. | startsWith=temper |
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/devices/tagValues?key=myKey
Successful Responses
Code | Type | Description |
---|---|---|
200 | Tag Values Response | The matching tag values |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if application was not found |
Schemas
Advanced Device Query
Schema for advanced device queries
Advanced Device Query Schema
- ▶{} 4 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 19 keys
- ▶{} 3 keys
- ▶{} 3 keys
- ▶{} 3 keys
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- false
Advanced Device Query Example
- ▶{} 1 key
- ▶[] 2 items
Attribute Names Response
Schema for a list of attribute names
Attribute Names Response Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 1 key
- ▶{} 3 keys
Attribute Names Response Example
- ▶{} 1 key
- ▶[] 3 items
Bulk Deletion Response
Schema for the response to a bulk deletion
Bulk Deletion Response Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 2 keys
- ▶{} 1 key
- ▶{} 1 key
Bulk Deletion Response Example
- ▶{} 1 key
- 3
Bulk Restoration Response
Schema for the response to a bulk restore request
Bulk Restoration Response Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 2 keys
- ▶{} 1 key
- ▶{} 1 key
Bulk Restoration Response Example
- ▶{} 1 key
- 3
Devices Composite State
Schema for a collection of Composite Device State
Devices Composite State Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 9 keys
- ▶{} 2 keys
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 1 key
Devices Composite State Example
- ▶{} 8 keys
- ▶[] 1 item
- 1
- 4
- 1
- 0
- "name"
- "asc"
- "575ec8687ae143cd83dc4a97"
Device
Schema for a single Device
Device Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 18 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 3 keys
- ▶{} 2 keys
- ▶{} 3 keys
- ▶{} 3 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 1 key
- ▶{} 3 keys
- ▶{} 3 keys
- ▶{} 1 key
Device Example
- ▶{} 12 keys
- "575ecf887ae143cd83dc4aa2"
- "575ecf887ae143cd83dc4aa2"
- "575ec8687ae143cd83dc4a97"
- "2016-06-13T04:00:00.000Z"
- "2016-06-13T04:00:00.000Z"
- "My Device"
- "A device description"
- ▶[] 2 items
- ▶[] 1 item
- "5d8a0da7ce2f3d37c205d0c5"
- "standalone"
- ▶{} 2 keys
Device Attribute Data Type Filter
Select one or multiple device attribute data types
Device Attribute Data Type Filter Schema
- ▶{} 2 keys
- "http://json-schema.org/draft-07/schema#"
- ▶[] 2 items
Device Attribute Data Type Filter Example
- ▶[] 2 items
- "number"
- "blob"
Device Class Filter
Select one or multiple device classes
Device Class Filter Schema
- ▶{} 2 keys
- "http://json-schema.org/draft-07/schema#"
- ▶[] 2 items
Device Class Filter Example
- ▶[] 2 items
- "standalone"
- "edgeCompute"
Device Names Response
Schema for a list of device names
Device Names Response Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 1 key
- ▶{} 3 keys
Device Names Response Example
- ▶{} 1 key
- ▶[] 1 item
Device Post
Schema for the body of a Device creation request
Device Post Schema
- ▶{} 5 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 9 keys
- ▶{} 3 keys
- ▶{} 2 keys
- ▶{} 3 keys
- ▶{} 3 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 1 key
- ▶{} 3 keys
- ▶{} 1 key
- false
- ▶[] 1 item
Device Post Example
- ▶{} 5 keys
- "My New Device"
- "Description of my new device"
- ▶[] 1 item
- ▶[] 1 item
- "standalone"
Device Tag Filter
Array of Tags for filtering devices. Tag keys and tag values are optional.
Device Tag Filter Schema
- ▶{} 4 keys
- "http://json-schema.org/draft-07/schema#"
- "array"
- ▶{} 3 keys
- 100
Device Tag Filter Example
- ▶[] 2 items
- ▶{} 2 keys
- ▶{} 1 key
Devices
Schema for a collection of Devices
Devices Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 14 keys
- ▶{} 2 keys
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 5 keys
- ▶{} 1 key
- ▶{} 1 key
Devices Example
- ▶{} 8 keys
- ▶[] 1 item
- 1
- 4
- 1
- 0
- "name"
- "asc"
- "575ec8687ae143cd83dc4a97"
Devices Delete Or Restore Post
Schema for the body of a bulk device deletion or restoration request
Devices Delete Or Restore Post Schema
- ▶{} 5 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 4 keys
- ▶{} 3 keys
- ▶{} 5 keys
- ▶{} 3 keys
- ▶{} 2 keys
- false
- ▶[] 1 item
Devices Delete Or Restore Post Example
- ▶{} 2 keys
- ▶{} 1 key
- "email@example.com"
Devices Payload Count Export Post
Schema for the body of a device payload count export request
Devices Payload Count Export Post Schema
- ▶{} 4 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 5 keys
- ▶{} 3 keys
- ▶{} 3 keys
- ▶{} 5 keys
- ▶{} 1 key
- ▶{} 1 key
- false
Devices Payload Count Export Post Example
- ▶{} 2 keys
- ▶{} 1 key
- "email@example.com"
Devices Metadata Export Post
Schema for the body of a device metadata export request
Devices Metadata Export Post Schema
- ▶{} 4 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 4 keys
- ▶{} 3 keys
- ▶{} 3 keys
- ▶{} 5 keys
- ▶{} 3 keys
- false
Devices Metadata Export Post Example
- ▶{} 2 keys
- ▶{} 1 key
- "email@example.com"
Devices Patch
Schema for the body of a Devices modification request
Devices Patch Schema
- ▶{} 5 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 6 keys
- ▶{} 5 keys
- ▶{} 3 keys
- ▶{} 5 keys
- ▶{} 3 keys
- ▶{} 3 keys
- ▶{} 3 keys
- false
- [] 0 items
Devices Patch Example
- ▶{} 2 keys
- ▶{} 5 keys
- ▶[] 3 items
Devices Remove Data Post
Schema for the body of a bulk data removal request
Devices Remove Data Post Schema
- ▶{} 5 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 8 keys
- ▶{} 5 keys
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 3 keys
- ▶{} 3 keys
- false
- ▶[] 1 item
Devices Remove Data Post Example
- ▶{} 4 keys
- ▶{} 1 key
- 1
- 0
- ▶[] 2 items
Devices Updated
Schema for response of devices updated if under 100 devices queried
Devices Updated Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 4 keys
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
- ▶{} 1 key
Devices Updated Example
- ▶{} 4 keys
- 3
- 0
- 2
- "https://example.com/log-link"
Error
Schema for errors returned by the API
Error Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 2 keys
- ▶{} 1 key
- ▶{} 1 key
Error Example
- ▶{} 2 keys
- "NotFound"
- "Application was not found"
Job Enqueued API Result
Schema for the result of a job being queued
Job Enqueued API Result Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 3 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
Job Enqueued API Result Example
- ▶{} 3 keys
- true
- "clnHvJbyVkOWAZwYAwLP4"
- true
Multi Device Command
Schema for the body of a request to send a command to multiple Devices
Multi Device Command Schema
- ▶{} 5 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 6 keys
- ▶{} 1 key
- ▶{} 3 keys
- {} 0 keys
- ▶{} 3 keys
- ▶{} 3 keys
- ▶{} 5 keys
- ▶[] 1 item
- false
Multi Device Command Example
- ▶{} 4 keys
- "2016-06-13T04:00:00.000Z"
- "myCommand"
- ▶[] 5 items
- ▶[] 1 item
Success
Schema for reporting a successful operation
Success Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 1 key
- ▶{} 2 keys
Success Example
- ▶{} 1 key
- true
Tag Keys Response
Schema for a list of tag keys
Tag Keys Response Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 1 key
- ▶{} 3 keys
Tag Keys Response Example
- ▶{} 1 key
- ▶[] 3 items
Tag Values Response
Schema for a list of tag values for a key
Tag Values Response Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 3 keys
Tag Values Response Example
- ▶{} 2 keys
- "key1"
- ▶[] 3 items
Was this page helpful?
Still looking for help? You can also search the Losant Forums or submit your question there.