QUERIES¶
It will be a function used to retrieve data only. It consists of:
BillingAccountProfile¶
To query Billing Account information (information related to calculation of service volume and charges), each ID has the following details:
BillingAccountProfile ( billingaccountid ):
Arguments
billingaccountid
: String is the Billing Account ID (required).
Query Variables
Authorization
: User Token
Response Type : BillingAccountProfile
The response is an Object Type BillingAccountProfile consisting of:
billingaccountid
: String is the Billing Account ID
name
: String is the Billing Account Name
mode
: String is the Billing Account Mode
allow_apicall
: Boolean is indicator whetherAPI Call
are permitted (true
for allowed,false
for not allowed).
allow_connection
: Boolean is indicator whether Connecting a device to the platform are permitted (true
for allowed,false
for not allowed).
allow_datasource
: Boolean is indicator whetherDatasource
are permitted (true
for allowed,false
for not allowed).
allow_message
: Boolean is indicator whetherReal Time Message
are permitted (true
for allowed,false
for not allowed).
allow_shadowops
: Boolean is indicator whetherShadow Read/Write
(true
for allowed,false
for not allowed).
allow_store
: Boolean is indicator whetherTime Series Data Store
are permitted (true
for allowed,false
for not allowed).
allow_trigger
: Boolean is indicator whetherTrigger & Action
are permitted (true
for allowed,false
for not allowed).
An example is shown in the following figure:

BillingAccountProjectInfo¶
To query the Project list data under that Billing Account ID, the details are as follows:
BillingAccountProjectInfo ( billingaccountid ):
Arguments
billingaccountid
: String is the Billing Account ID (required).
Query Variables
Authorization
: User Token
Response Type : [ProjectID]
The response is an Array of Object Type ProjectID containing:
projectid
: String is the Project ID.
An example is shown in the following figure:

BillingAccountResourceUsageProfile¶
To query the usage limit information and current usage volume of each Billing Account ID, details are as follows:
BillingAccountResourceUsageProfile ( billingaccountid ):
Arguments
billingaccountid
: String is the Billing Account ID (required).
Query Variables
Authorization
: User Token
Response Type : BillingAccountResourceUsageProfile
The response is an Object Type BillingAccountResourceUsageProfile consisting of:
billingaccountid
: String is the Billing Account ID.
max_device_per_billing
: Int is the maximum number of devices that can be created in each Billing Account.
max_member_per_project
: Int is the maximum number of members that can be invited in each project.
max_project_per_billing
: Int is the maximum number of Projects that can be created in each Billing Account.
use_device
: Int is the number of devices created in each Billing Account.
use_project
: Int is the number of projects created in each Billing Account.
detail
: JSON is a usage detail separated by project.
An example is shown in the following figure:

BillingAccountSubscriptionProfile¶
To query the current Subscription Package information of each Billing Account ID, details are as follows:
BillingAccountSubscriptionProfile ( billingaccountid ):
Arguments
billingaccountid
: String is the Billing Account ID (required).
Query Variables
Authorization
: User Token
Response Type : BillingAccountSubscriptionProfile
ตอบกลับเป็น Object Type BillingAccountSubscriptionProfile ประกอบด้วย
billingaccountid
: String is the Billing Account ID.
subscriptionname
: String is the name of the Subscription.
billtype
: String is the type of billing (PREPAID
orPOSTPAID
)
status
: String is the activation state (ENABLED
orDISABLED
)
packageid
: String is the ID of the package to use.
packagename
: String is the name of the package to use.
total_cycle
: Int is the total number of cycles that can be used.
current_cycle
: Int is the number of cycles used so far.
subscription_start_at
: String is the date and time the subscription was started.
current_cycle_start_at
: String is the start date of the current cycle.
current_cycle_end_at
: String is the end date of the current cycle.
max_apicall
: Float is the maximum accumulated quota for using API Call in the current billing cycle (unit is Operation).
max_connection
: Float is the maximum accumulated time that the Device can be online in the current billing cycle (in seconds).
max_datasource
: Float is the maximum accumulated quota for Datasource usage in the current billing cycle (in Bytes).
max_message
: Float is the maximum accumulated quota for using Real Time Messages in the current billing cycle (in messages).
max_shadowops
: Float is the maximum accumulated quota for Shadow Read/Write usage in the current billing cycle (in Operations).
max_store
: Float is the maximum accumulated quota for using Time Series Data Store for the current billing cycle (in Point-Day).
max_trigger
: Float is the maximum accumulated quota for using Trigger & Action of the current billing cycle (unit is Operation).
max_device_per_billing
: Int is the maximum number of devices that can be created in each Billing Account.
max_member_per_project
: Int is the maximum number of members that can be invited in each project.
max_project_per_billing
: Int is the maximum number of Projects that can be created in each Billing Account.
note
: String is a note.
An example is shown in the following figure:

BillingLog¶
To query various Log data items from the system in each Billing Account ID, the details are as follows:
BillingLog ( billingaccountid, begintime, endtime, filter, limit, offset, direction ):
Arguments
billingaccountid
: String is the Billing Account ID (required).
begintime
: String is the start date of the data generation (required).
endtime
: String is the end date of the data generation (required).
filter
: BillingLogFilterKey is an Object Type of filter that is used to further specify the search. It consists of:
event
: [String] is the name of the event that caused the Log to be generated. Multiple names can be specified.
level
: [LogLevel] is the Log notification level. Multiple levels can be specified.
projectid
: String is the ID of the project that generated the log.
limit
: Int is the limit on the number of data to be extracted.
offset
: Int is the sequence of data items to start fetching.
direction
: SortDirection is the order of data (ASC
lowest to highest,DESC
highest to lowest).
Query Variables
Authorization
: User Token
Response Type : [BillingLog]
The response is an Array of Object Type BillingLog containing:
time
: Timestamp is the date and time the Log was generated.
billingaccountid
: String is the Billing Account ID.
type
: String is a Log type.
level
: String is the Log notification level.
event
: String is the name of the event that generated the Log.
projects
: [String] is an Array of Project ID.
data
: JSON is the Log data details.
annotation
: String is a description of the Log.
note
: String is a note.
An example is shown in the following figure:

BillingMetricUsageProfile¶
To query usage information of various services in the current billing cycle of each Billing Account ID, details are as follows:
BillingMetricUsageProfile ( billingaccountid ):
Arguments
billingaccountid
: String is the Billing Account ID (required).
Query Variables
Authorization
: User Token
Response Type : BillingMetricUsageProfile
The response is an Object Type BillingMetricUsageProfile consisting of:
billingaccountid
: String is the Billing Account ID.
name
: String is the name of the Billing Account.
mode
: String is the Billing Account mode.
max_apicall
: Float is the maximum accumulated quota for using API Call in the current billing cycle (unit is Operation).
max_connection
: Float is the maximum accumulated time that the Device can be online in the current billing cycle (in seconds).
max_datasource
: Float is the maximum accumulated quota for Datasource usage in the current billing cycle (in Bytes).
max_message
: Float is the maximum accumulated quota for using Real Time Messages in the current billing cycle (in messages).
max_shadowops
: Float is the maximum accumulated quota for Shadow Read/Write usage in the current billing cycle (in Operations).
max_store
: Float is the maximum accumulated quota for using Time Series Data Store for the current billing cycle (in Point-Day).
max_trigger
: Float is the maximum accumulated quota for using Trigger & Action of the current billing cycle (unit is Operation).
use_apicall
: Float is the amount of quota used in the API Call section of the current billing cycle (in units of Operation).
use_connection
: Float is the amount of time the Device has been online in the current billing cycle (in seconds).
use_datasource
: Float is the amount of quota used in the Datasource section of the current billing cycle (in Bytes).
use_message
: Float is the amount of quota used in the Real Time Message section of the current billing cycle (in messages).
use_shadowops
: Float is the amount of quota used in the Shadow Read/Write section of the current billing cycle (in units of Operation).
use_store
: Float is the amount of quota used in the Time Series Data Store section of the current billing cycle (in Point-Days).
use_trigger
: Float is the amount of quota used in the Trigger & Action section of the current billing cycle (unit is Operation).
usage_begin_at
: String is the date and time when the billing cycle starts counting usage.
usage_update_at
: String is the date and time the data was last updated.
An example is shown in the following figure:

Device¶
To query each Device's information with ID, details are as follows:
device ( deviceid ):
Arguments
deviceid
: String is the Device ID (required)
Query Variables
Authorization
: User Token
Response Type : Device
The response is Object Type Device consisting of:
alias
: String is the name of the Device.
createdtime
: Timestamp is the date and time the Device was created.
description
: String is a Device description.
deviceid
: String คือ is the Device ID.
devicetoken
: [String] is a list of all tokens of the Device.
devicesecret
: String is the secret code of the Device.
groupid
: String is the ID of the Group that the Device is under.
groupname
: String is the name of the Group that the Device is under.
projectid
: String is the Project ID that the Device is under.
status
: Int is Device’s connection status to the platform (0 = offline, 1 = online)
hashtag
: [String] is a multi-valued Device tag.
tags
: JSON is a Device tag in Key Value format.
enabled
: Boolean is the Device activation status (true
enabled [default],false
disabled).
banned
: Boolean is the status of being suspended from the system (true
suspended,false
not suspended [default]).
credential
: Credential is data for verifying identity. Object Type credential consists of:
secret
: String is the secret code of the Device.
An example is shown in the following figure:

DeviceList¶
To query the Device data list by various filter types, details are as follows:
deviceList ( fliter, orderBy, direction, limit, offset ):
Arguments
fliter
: DeviceFilterKey is the Object Type of the filter used to specify the search. It consists of:
projectid
: String is the Project ID that the Device is under (required)
groupid
: String is the ID of the Group that the Device is under.
alias
: String is the name of the Device.
hashtag
: [String] is a multi-valued Device tag.
tags
: JSON is a Device tag in Key Value format.
status
: Boolean is Device’s connection status to the platform (true
online,false
offline)
orderBy
: [DeviceSortKey] is a selection of fields that are specified to be sorted by data. It includes:
createdtime
Sort by Device Creation Date.
alias
Sort by Device Name
deviceid
Sort by Device ID
status
Sort by Device’s connection status to the platform
direction
: OrderDirection is an option for the sorting style. It consists of:
ASC
Order from least to most
DESC
Order from most to least
limit
: Int is the limit on the number of data to be extracted.
offset
: Int is the sequence of data items to start fetching.
Query Variables
Authorization
: User Token
Response Type : [Device]
The response is an Array of Object Type Device, consisting of:
alias
: String is the name of the Device.
createdtime
: Timestamp is the date and time the Device was created.
description
: String is a Device description.
deviceid
: String is the Device ID.
devicesecret
: String is the secret code of the Device.
groupid
: String is the ID of the Group that the Device is under.
groupname
: String is the name of the Group that the Device is under.
projectid
: String is the Project ID that the Device is under.
status
: Int is Device’s connection status to the platform (0
offline,1
online)
hashtag
: [String] is a multi-valued Device tag.
tags
: JSON is a Device tag in Key Value format.
enabled
: Boolean is the Device activation status (true
enabled [default],false
disabled).
banned
: Boolean is the status of being suspended from the system (true
suspended,false
not suspended [default]).
credential
: Credential is data for verifying identity. Object Type credential consists of:
secret
: String is the secret code of the Device.
An example is shown in the following figure:

DeviceToken¶
To query the Device Token information, details are as follows:
deviceToken ( deviceid ):
Arguments
deviceid
: String is the Device ID (required)
Query Variables
Authorization
: User Token
Response Type : DeviceToken
ตอบกลับเป็น Object Type DeviceToken ประกอบด้วย
deviceid
: String is the Device ID.
tokencode
: String is the Token code.
iat
: String is the date and time the token was issued (issued at).
nbf
: String is the date when the token will be active (not before).
exp
: String is the expiration time of the Token.
expireIn
: String is the age of the Token.
An example is shown in the following figure:

Feed¶
To query the data fields of the Device that are set to store data in the Time Series Data Store (historical data storage), the details are as follows:
feed ( feedid ):
Arguments
feedid
: String is the Feed ID which has the same value as deviceid (required).
Query Variables
Authorization
: User Token
Response Type : Feed
The response is Object Type Feed consisting of:
feedid
: String is the Feed ID.
attributes
: JSON is a data field list.
An example is shown in the following figure:

FeedData¶
To query each field of data in the Device Time Series Data Store, the details are as follows:
feedData ( feedid, attributes, starttime, endtime, aggregator, sampling, pointlimit, format ):
Arguments
feedid
: String is the Feed ID which has the same value as deviceid (required).
attributes
: [String] is the name of the field for which data is to be retrieved (if not specified, all fields will be retrieved).
starttime
: Timestamp is the initial time period for which data is required.
endtime
: Timestamp is the end time for which data is required.
aggregator
: String is a setting that combines or processes data in various forms before returning data points.
sampling
: String is the condition for extracting the sample data set.
pointlimit
: Int is the limit of the number of data points.
format
: DataFormat is the data format to return (JSON
(Default),TABLE
,CSV
).
Query Variables
Authorization
: User Token
Response Type : FeedData
The response is Object Type FeedData consisting of:
feedid
: String is the Feed ID.
data
: JSON is data in each field according to the selected format.
An example is shown in the following figure:

Group¶
To query Group information, each Group has the following ID details:
group ( groupid ):
Arguments
groupid
: String is the Group ID (required).
Query Variables
Authorization
: User Token
Response Type : Group
The response is an Object Type Group consisting of:
groupid
: String is the ID of the Group.
groupname
: String is the name of the Group.
projectid
: String is the Project ID that the Group is under.
createdtime
: Timestamp is the date and time the Group was created.
description
: String is a description of the Group.
devicecount
: Int is the number of devices under the group.
hashtag
: [String] is a multi-valued Group tag.
tags
: Json is a Group tag in Key Value format.
An example is shown in the following figure:

GroupList¶
To query the Group data list by various filter types, details are as follows:
groupList ( fliter, orderBy, direction, limit, offset ):
Arguments
fliter
: GroupFilterKey is the Object Type of the filter used to specify the search. It consists of:
projectid
: String is the Project ID that the Group is under (required)
groupname
: String is the name of the Group.
hashtag
: [String] is a multi-valued Group tag.
tags
: TagsInput is the Group tag in Key Value format.
orderBy
: [GroupSortKey] is a selection of fields that are specified to be sorted by data. It includes:
groupname
Sort by Group name
groupid
Sort by Group ID
createdtime
Sort by Device Creation Date
direction
: OrderDirection is an option for the sorting style. It consists of:
ASC
(Order from least to most)
DESC
(Order from most to least)
limit
: Int is the limit on the number of data to be extracted.
offset
: Int is the sequence of data items to start fetching.
Query Variables
Authorization
: User Token
Response Type : [Group]
The response is an Array of Object Type Group consisting of:
groupid
: String is the ID of the Group.
groupname
: String is the name of the Group.
projectid
: String is the Project ID that the Group is under.
createdtime
: Timestamp is the date and time the Group was created.
description
: String is a description of the Group.
devicecount
: Int is the number of devices under the group.
hashtag
: [String] is a multi-valued Group tag.
tags
: Json is a Group tag in Key Value format.
An example is shown in the following figure:

Hook¶
To query the Event Hook data list that has been created according to the specified filters, the details are as follows:
hook ( projectid, hookid ):
Arguments
projectid
: String is the Project ID that the Hook is under (required).
hookid
: String is the ID of Hook.
Query Variables
Authorization
: User Token
Response Type : [Hook]
The response is an Array of Object Type Hook consisting of:
projectid
: String is the Project ID that the Group is under.
name
: String is the name of the Hook.
hookid
: String is the ID of Hook.
description
: String is a description of Hook.
type
: String is a type of Hook (currently there is only one type, WEBHOOK, so users do not have to choose).
enabled
: Boolean is the Hook activation state (true
enabled [default],false
disabled).
param
: Json is a variable that is used to set values to be sent to the destination website.
An example is shown in the following figure:

Membership¶
To query member data that has the right to access data in each Project according to the level of permissions received, details as follows:
membership ( projectid ):
Arguments
projectid
: String is the Project ID (required)
Query Variables
Authorization
: User Token
Response Type : [Membership]
The response is an Array of Object Type Membership consisting of:
createdtime
: Timestamp is the date and time the Membership was created.
level
: String is the membership privilege level. There are 5 levels in total (see privilege details at Member)
5
(Owner)
4
(Master)
3
(Editor)
2
(Viewer)
1
(Guest)
projectid
: String is the ID of the authorized project.
userid
: String is the user ID that is authorized.
username
: String is the username of the authorized user.
An example is shown in the following figure:

MyBillingAccount¶
To query all Billing Account information of the user who owns the User Token, details are as follows:
MyBillingAccount ():
Arguments
No. The system will check which user it is from the User Token.
Query Variables
Authorization
: User Token
Response Type : [BillingMembershipProfile]
The response is an Array of Object Type BillingMembershipProfile containing:
billingaccountid
: String is the Billing Account ID.
name
: String is the name of the Billing Account.
mode
: String is the Billing Account mode.
status
: String is the activation state (ENABLED
orDISABLED
).
level
: Int is the level of access to data. There are 3 levels as follows:
3
(Owner)
2
(Master)
1
(Viewer)
An example is shown in the following figure:

Project¶
To query Project data with the following ID details:
project ( projectid ):
Arguments (one or more required)
projectid
: String is the Project ID (required)
Query Variables
Authorization
: User Token
Response Type : Project
The response is Object Type Project consisting of:
projectname
: String is the name of the Project.
projectid
: String is the Project ID.
createdtime
: Timestamp is the date and time the project was created.
description
: String is a project description.
tags
: JSON is a project tag in Key Value format.
hashtag
: [String] is a multi-valued Project tag.
numberdevice
: Int is the number of devices under the project.
numbergroup
: Int is the number of Groups under the Project.
numberdeviceonline
: Int is the number of devices currently connected to the Platform under the Project.
numberdeviceoffline
: Int Number of Devices currently not connected to the Platform under the Project.
quota
: Quota is the status of each service with available quota, which includes:
apicall
: Boolean is a REST API service (true
available quota,false
unavailable or no quota)
connection
: Boolean คือ บริการเชื่อมต่อ Platform ของ Device (true
available quota,false
unavailable or no quota).
message
: Boolean is a Real Time Message service via MQTT Protocol (true
available quota,false
unavailable or no quota).
shadowops
: Boolean is a Shadow read/write service (true
available quota,false
unavailable or no quota)
store
: Boolean is a service that stores data in Time Series Data (true
available quota,false
unavailable or no quota)
trigger
: Boolean is Trigger & Action (Notification) service (true
available quota,false
unavailable or no quota)
datasource
: Boolean is the sum of the Byte size of the data that has been used by theapicall
service (true
available quota,false
unavailable or no quota)
An example is shown in the following figure:

ProjectBillingAccountInfo¶
To query the Billing Account information of each Project, details are as follows:
ProjectBillingAccountInfo ( projectid ):
Arguments
projectid
: String is the Project ID (required)
Query Variables
Authorization
: User Token
Response Type : BillingAccountProfile
The response is an Object Type BillingAccountProfile consisting of:
billingaccountid
: String is the Billing Account ID.
name
: String is the name of the Billing Account.
mode
: String is the Billing Account mode.
allow_apicall
: Boolean is indicator whetherAPI Call
are permitted (true
for allowed,false
for not allowed).
allow_connection
: Boolean is indicator whether Connecting a device to the platform are permitted (true
for allowed,false
for not allowed).
allow_datasource
: Boolean is indicator whetherDatasource
are permitted (true
for allowed,false
for not allowed).
allow_message
: Boolean is indicator whetherReal Time Message
are permitted (true
for allowed,false
for not allowed).
allow_shadowops
: Boolean is indicator whetherShadow Read/Write
(true
for allowed,false
for not allowed).
allow_store
: Boolean is indicator whetherTime Series Data Store
are permitted (true
for allowed,false
for not allowed).
allow_trigger
: Boolean is indicator whetherTrigger & Action
are permitted (true
for allowed,false
for not allowed).
An example is shown in the following figure:

ProjectBillingAccountSubscriptionProfile¶
To access the current Subscription Package information for each Project, details are as follows:
- ProjectBillingAccountSubscriptionProfile ( projectid ):
Arguments
projectid
: String is the Project ID (required)
Query Variables
Authorization
: User Token
Response Type : BillingAccountSubscriptionProfile
The response is an Object Type BillingAccountSubscriptionProfile consisting of:
billingaccountid
: String is the Billing Account ID.
subscriptionname
: String is the name of the Subscription.
billtype
: String is the type of billing (PREPAID
orPOSTPAID
).
status
: String is the activation state (ENABLED
orDISABLED
).
packageid
: String is the code of the package to use.
packagename
: String is the name of the package to use.
total_cycle
: Int is the total number of cycles that can be used.
current_cycle
: Int is the number of cycles used so far.
subscription_start_at
: String is the date and time the subscription was started.
current_cycle_start_at
: String is the start date of the current cycle.
current_cycle_end_at
: String is the end date of the current cycle.
max_apicall
: Float is the maximum accumulated quota for using API Call in the current billing cycle (unit is Operation).
max_connection
: Float is the maximum accumulated time that the Device can be online in the current billing cycle (in seconds).
max_datasource
: Float is the maximum accumulated quota for Datasource usage in the current billing cycle (in Bytes).
max_message
: Float is the maximum accumulated quota for using Real Time Messages in the current billing cycle (in messages).
max_shadowops
: Float is the maximum accumulated quota for Shadow Read/Write usage in the current billing cycle (in Operations).
max_store
: Float is the maximum accumulated quota for using Time Series Data Store for the current billing cycle (in Point-Day).
max_trigger
: Float is the maximum accumulated quota for using Trigger & Action of the current billing cycle (unit is Operation).
max_device_per_billing
: Int is the maximum number of devices that can be created in each Billing Account.
max_member_per_project
: Int is the maximum number of members that can be invited in each project.
max_project_per_billing
: Int is the maximum number of Projects that can be created in each Billing Account.
note
: String is a note.
An example is shown in the following figure:

ProjectBillingMetricUsageProfile¶
To query usage information of various services in the current billing cycle of each project, details are as follows:
ProjectBillingMetricUsageProfile ( projectid ):
Arguments
projectid
: String is the Project ID (required)
Query Variables
Authorization
: User Token
Response Type : BillingMetricUsageProfile
ตอบกลับเป็น Object Type BillingMetricUsageProfile ประกอบด้วย
billingaccountid
: String is the Billing Account ID.
name
: String is the name of the Billing Account.
mode
: String is the Billing Account mode.
max_apicall
: Float is the maximum accumulated quota for using API Call in the current billing cycle (unit is Operation).
max_connection
: Float is the maximum accumulated time that the Device can be online in the current billing cycle (in seconds).
max_datasource
: Float is the maximum accumulated quota for Datasource usage in the current billing cycle (in Bytes).
max_message
: Float is the maximum accumulated quota for using Real Time Messages in the current billing cycle (in messages).
max_shadowops
: Float is the maximum accumulated quota for Shadow Read/Write usage in the current billing cycle (in Operations).
max_store
: Float is the maximum accumulated quota for using Time Series Data Store for the current billing cycle (in Point-Day).
max_trigger
: Float is the maximum accumulated quota for using Trigger & Action of the current billing cycle (unit is Operation).
use_apicall
: Float is the amount of quota used in the API Call section of the current billing cycle (in units of Operation).
use_connection
: Float is the amount of time the Device has been online in the current billing cycle (in seconds).
use_datasource
: Float is the amount of quota used in the Datasource section of the current billing cycle (in Bytes).
use_message
: Float is the amount of quota used in the Real Time Message section of the current billing cycle (in messages).
use_shadowops
: Float is the amount of quota used in the Shadow Read/Write section of the current billing cycle (in units of Operation).
use_store
: Float is the amount of quota used in the Time Series Data Store section of the current billing cycle (in Point-Days).
use_trigger
: Float is the amount of quota used in the Trigger & Action section of the current billing cycle (unit is Operation).
usage_begin_at
: String is the date and time when the billing cycle starts counting usage.
usage_update_at
: String is the date and time the data was last updated.
An example is shown in the following figure:

ProjectList¶
To query Project data with the following ID details:
projectList ( fliter, orderBy, direction, limit, offset ):
Arguments
fliter
: ProjectPFilterKey is the Object Type of the filter used to specify the search. It consists of:
projectname
: String is the name of the Project.
hashtag
: [String] is a multi-valued Project tag.
tags
: JSON is a project tag in Key Value format.
orderBy
: [ProjectSortKey] is a selection of fields that specify the sorting key, including:
projectid
(Sort by Project ID)
projectname
(Sort by Project name)
createdtime
(Sort by project creation date)
direction
: OrderDirection is an option for the sorting style. It consists of:
ASC
(Order from least to most)
DESC
(Order from most to least)
limit
: Int is the limit on the number of data to be extracted.
offset
: Int is the sequence of data items to start fetching.
Query Variables
Authorization
: User Token
Response Type : [Project]
The response is an Array of Object Type Project consisting of:
projectname
: String is the name of the Project.
projectid
: String is the Project ID.
description
: String is a project description.
userlevel
: String is the Project data access level.
createdtime
: Timestamp is the date and time the project was created.
tags
: Json is a project tag in Key Value format.
hashtag
: [String] is a multi-valued Project tag.
numberdevice
: Int is the number of devices under the project.
numbergroup
: Int is the number of Groups under the Project.
numberdeviceonline
: Int is the number of devices currently connected to the Platform under the Project.
numberdeviceoffline
: Int is the number of Devices currently not connected to the Platform under the Project.
quota
: Quota is the status of each service with available quota, which includes:
apicall
: Boolean is a REST API service (true
available quota,false
unavailable or no quota)
connection
: Boolean คือ บริการเชื่อมต่อ Platform ของ Device (true
available quota,false
unavailable or no quota).
message
: Boolean is a Real Time Message service via MQTT Protocol (true
available quota,false
unavailable or no quota).
shadowops
: Boolean is a Shadow read/write service (true
available quota,false
unavailable or no quota)
store
: Boolean is a service that stores data in Time Series Data (true
available quota,false
unavailable or no quota)
trigger
: Boolean is Trigger & Action (Notification) service (true
available quota,false
unavailable or no quota)
datasource
: Boolean is the sum of the Byte size of the data that has been used by theapicall
service (true
available quota,false
unavailable or no quota)
An example is shown in the following figure:

Schema¶
To query the Device Shadow Schema information, details are as follows:
schema ( deviceid ):
Arguments
deviceid
: String is the Device ID (required)
Query Variables
Authorization
: User Token
Response Type : Schema
The response is an Object Type Schema consisting of:
deviceid
: String is the Device ID.
value
: JSON is a defined Shadow Schema, which is in JSON format.
An example is shown in the following figure:

Shadow¶
To query the Device Shadow data, the details are as follows:
shadow ( deviceid ):
Arguments
deviceid
: String is the Device ID (required)
command
: Command is an Object Type Command that consists of the following:
value
: String is the Shadow structure that you want to query the value (in case you want some data in the Shadow).
Query Variables
Authorization
: User Token
Response Type : Shadow
The response is Object Type Shadow consisting of:
deviceid
: String is the Device ID.
data
: JSON is the defined Shadow, which will be in JSON format.
rev
: Int is the Revision number.
modified
: Timestamp is the date and time the data was last modified.
An example is shown in the following figure:

Trigger¶
To query Device Trigger information, details are as follows:
trigger ( deviceid, triggerid, type ):
Arguments
deviceid
: String is the Device ID (required)
triggerid
: String is the Trigger ID.
type
: String คือ is of Trigger type (DEVICE
,SHADOW
)
Query Variables
Authorization
: User Token
Response Type : Trigger
The response is an Object Type Trigger consisting of:
triggerid
: String is the Trigger ID.
triggername
: String is the name of the Trigger.
type
: String is of Trigger type (DEVICE
,SHADOW
)
event
: String is the event that triggers (STATUSCHANGED
paired with Trigger typeDEVICE
,UPDATED
paired with Trigger typeSHADOW
).
condition
: String is the trigger condition.
action
: String is an Event Hook that will be processed when the Trigger occurs.
context
: [ActionVarType] is a Key-Value variable that will send values for use in the Event Hook.
enabled
: Boolean is the activation state (true
enabled,false
disabled).
An example is shown in the following figure:

UserByUserID¶
To query User data with ID details as follows:
:userByUserID ( userid ):
Arguments
userid
: String is the User ID (required)
Query Variables
Authorization
: User Token
Response Type : Trigger
The response is an Object Type Trigger consisting of:
username
: String is the username.
enail
: String is the user email.
profile
: Profile is an Object Type Profile consisting of:
fullname
: String is the first and last name.
phonenumber
: String is a phone number.
organization
: String is the name of the department/organization/company that belongs to.
created
: String is the date and time of registration.
userid
: String is the User ID.
option
: Option is User type (oneid
ID from OneID system)
An example is shown in the following figure:
