Skip to content

Instantly share code, notes, and snippets.

@maxiwu
Created December 18, 2018 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxiwu/a78c1819360b2324bd9b08ee67423830 to your computer and use it in GitHub Desktop.
Save maxiwu/a78c1819360b2324bd9b08ee67423830 to your computer and use it in GitHub Desktop.
test .md

Onyxwifi Cloud API GitHub (pre-)release

State 1 for RESTful

Models

  • User Information
  • Device Information
  • Certificate
  • Access Token
  • Firmware Information

Modules

  • B2C adaptor
  • Device Management
  • Certificate Management
  • Firmware Management

Latest Versions

  • 0.1.0
    • head version for this document

API Specification

Device Management

Description

create a device record on cloud during provision

Access Role

Admin, User

Method

POST

URL/Params

Content*

JSON

{
  "id": 0,
  "category": {
    "id": 0,
    "name": "string"
  },
  "name": "doggie",
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}

Response

200

Error Response

Model definition

Device

  • id: long
  • identity: UUID
  • model: String
  • SN: String
  • onboard: timestamp

Certificate

  • id: long
  • issue_date: timestamp
  • is_valid: boolean
  • uri: String
  • issuer: String
  • download_date: timestamp
  • last_verify: timestamp

Access Token

  • id: long
  • issue_date: timestamp
  • batch_id: long
  • value: String (*)
  • is_valid: boolean
  • is_activated: boolean
  • download_date: timestamp
  • last_verify: timestamp

Firmware

  • id: long
  • upload_date: timestamp
  • name: String
  • device_model: String
  • download_count: long
  • is_allow: boolean
  • last_download: timestamp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment