SmartTime Server API (0.0.1)

Download OpenAPI specification:Download

API description for SmartTime device server communication

device

Device related API

Device login request

Device will send this request when it boots up of whenever API key is invalidated

Request Body schema: application/json

Heart Beat from device

dev_id
required
string

Responses

Request samples

Content type
application/json
{
  • "dev_id": "ST-D0000122"
}

Response samples

Content type
application/json
{
  • "status": "ok",
  • "error": 0,
  • "token": "==weeadhsja/AB434324kdhaksjdhkajsdhajksdhjaksdhjasd"
}

Exchange device/server status

This API call sends device status to server as well as get status from the server

Authorizations:
api_key
Request Body schema: application/json

Heart Beat from device

status
required
string
Enum: "ok" "notok"

pet status in the store

error
integer <int32>

Device error codes

timestamp
required
integer

Timestamp from the device

Responses

Request samples

Content type
application/json
{
  • "status": "ok",
  • "error": 0,
  • "timestamp": 1697555433
}

Response samples

Content type
application/json
{
  • "status": "ok",
  • "error": 0,
  • "timestamp": 1697555433,
  • "commands": [
    ]
}