HTTP
NUBISON IoT's standard HTTP protocol.
Basic
Please refer to the Getting Started section for the following communication platform information.
Device key: “Product Code_Device Identifier"
Product Code
Client ID
Client Secret
Login Devices
Log in to The NUBISON IoT system. Access to the cloud is recorded on the timeline.The access token issued by the login authentication procedure must be added to the request body prior to all subsequent operations.
POST /devices/login
Request Content-Type: application/x-www-form-urlencoded
category
key
required
Remarks
header
Authorization
O
Basic ${Base64 encoded value of "Client ID" + ":" + "Client Secret"}
body
deviceKey
O
Device Key
Response Content-Type: application/json
status
message
body
200
OK
{
"AccessToken" : "...."
}
400
Bad Request
{
"code" :"ERROR401",
"message": "authorization header does not exist."
}
{
"code" :"ERROR402",
"message": "deviceKey is missing."
}
{
"code" :"ERROR403",
"message": "client is not valid."
}
405
Not Found
// If the service doesn't exist
415
Invalid content-type
// content-type must be application/json
Logout Devices
Logs out of the NUBISON IoT system. Disconnection from the cloud is recorded on the timeline.
POST /devices/logout
Request Content-Type: application/json
category
key
required
body
accessToken
O
Access token received from server upon login
deviceKey
O
Device Key
Response Content-Type: application/json
status
message
body
200
OK
// Deletes the access token that the server issued upon authentication.
400
Bad Request
{
"code" :"ERROR402",
"message": "deviceKey is missing."
}
{
"code" :"ERROR404",
"message": "accessToken is missing."
}
401
Unauthorized
// accessToken is not valid.
405
Not Found
service is not found. or device is not registered.
415
Invalid content-type
// content-type must be application/json
Register Devices
Registers the device. The history of device registration is recorded on the timeline
The history of device registration is recorded on the timeline
POST /devices
Request Content-Type: application/json
category
key
required
body
accessToken
O
Access token received from server upon login
deviceKey
O
Device Key
deviceName
O
Device name
(Name to display when checking data. Determined by the device.)
modelName
O
Model name (model name registered on the server)
Response Content-Type: application/json
status
message
body
201
Created
400
Bad Request
{
"code" :"ERROR402",
"message": "deviceKey is missing."
}
{
"code" :"ERROR404",
"message": "accessToken is missing."
}
{
"code" :"ERROR406",
"message": "data is missing."
}
401
Unauthorized
// accessToken is not valid.
415
Invalid content-type
// content-type must be application/json
Send Data
Send a request to that URL at the time of event. Event-related history is recorded on the timeline.
POST /devices/data
Request Content-Type: application/json
category
key
required
body
accessToken
O
Access token received from server upon login
deviceKey
O
Device key
data
O
Device data
Response Content-Type: application/json
status
message
body
201
Created
400
Bad Request
{
"code" :"ERROR402",
"message": "deviceKey is missing."
}
{
"code" :"ERROR404",
"message": "accessToken is missing."
}
{
"code" :"ERROR406",
"message": "data is missing."
}
401
Unauthorized
// accessToken is not valid.
415
Invalid content-type
// content-type must be application/json
Last updated