HTTP Request and Response

Requests are authenticated with the HTTP Basic Authentication.

HTTP HOST

  • China Station: https://sensecap.seeed.cn/openapi
  • Global Station: https://sensecap.seeed.cc/openapi

HTTP HEADER

Request

key description
API-VERSION api version

Response

key description
api-gateway-excute-second Time in seconds to execute the api
api-gateway-mpuo-consume The quota consumed by executing the api

HTTP Basic Authentication

HTTP Basic Authentication is one of the most common ways for RESTfull API authentication. We use Access ID as username and Access Key as password. Every HTTP client library should have its built-in support for Basic Authentication, in this documentation we use curl, which uses the –user option to specify Basic Authentication credential.

you can create access keys via SenseCAP Portal. Please refer to quickstart to see how to get an access key.

API Response

All response key follow the lowercase and underscore convention.

Successful Response with String

   {
       "code":"0",
       "data":"
           // string
       "
   }

Successful Response with Object

   {
       "code":"0",
       "data":{
           // object
       }
   }

Successful response with Array

   {
       "code":"0",
       "data":[
           // Array
       ]
   }

Error Response

   {
       "code":"1001",
       "msg":"error message"
   }