SenseCAP API Documentation
  • Note:The SenseCAP API document has been addressed differently!
  • HTTP API
    • HTTP API Quickstart
    • HTTP API Access Guide
    • HTTP API Reference
      • Group Management API-V1
      • Device Management API-V1
      • Device Data API-V1
  • Data OpenStream API
    • Data OpenStream API Quickstart
    • Data OpenStream API Reference
  • Appendix
    • List of Sensor Types
    • List of Measurement IDs
Powered by GitBook
On this page
  • HTTP Methods
  • HTTP Request and Response
  • HTTP Basic Authentication
  • API Response

Was this helpful?

  1. HTTP API

HTTP API Access Guide

HTTP Methods

The SenseCAP API utilizes five HTTP methods for accessing resources:

  • GET

    • Make a GET request to retrieve data. GET requests will never cause an update or change to your data because they're safe and idempotent.

  • POST

    • Use a POST request to create new resources. For example, make a POST request to a device group where the body of your request JSON is a new group.

  • PATCH

    • Make a PATCH request to update a resource. With PATCH request, you only need to provide the data you want to change.

  • PUT

    • Use a PUT request to create or update a resource. This is most useful for syncing subscriber data.

  • DELETE

    • Make a DELETE request to remove a resource.

If your ISP doesn't permit HTTP operations other than GET or POST, please use HTTP Method tunneling - make your call with POST, but include the method you intend to use in an X-HTTP-Method-Override header.

HTTP Request and Response

Requests are authenticated with the HTTP Basic Authentication.

HTTP Basic Authentication

API Response

All response fields 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"
}
PreviousHTTP API QuickstartNextHTTP API Reference

Last updated 6 years ago

Was this helpful?

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 . Please refer to to see how to get an access key.

HTTP Basic Authentication
SenseCAP Web Portal
quickstart