1.1. Overview
Sensors Data has a rich API system for various products. Sensors Data OpenAPI provides rich product capability extensions through standardized product APIs. With OpenAPI, users can easily customize and automate processes. The following will introduce some basic concepts and usage of Sensors Data OpenAPI.
1.2. Basic Concepts
1.2.1. Version
The base path in OpenAPI carries two types of version information: API major version and interface version, such as ""/api/v3/portal/v2". Among them, "v3" represents the API version, which is unlikely to change unless the entire API framework is upgraded. "v2" represents the interface version of a product. The interface version may be updated with product upgrades. The interfaces within the same version remain compatible. There is no necessary relationship between interface versions and product versions, and multiple versions of a product can use the same interface version, which means that the interface remains the same in these product versions.
1.2.2. OpenAPI Style
Sensors Data OpenAPI is similar to RESTful in terms of style. The difference is that in order to reduce the complexity of parameter forms, there are no path parameters in OpenAPI requests. The request parameters only appear in the http query and body. Requests with complex structures are placed in the body. For specific information, please refer to the parameter description of each API.
1.3. Usage
1.3.1. OpenAPI Manual
The OpenAPI Manual contains a list of OpenAPIs provided by various products and detailed information for each API. This manual is updated with every product version release and serves as the main reference for developers to use OpenAPI.
1.3.2. Access Address
The access address of OpenAPI is determined by the entry address of the cluster, usually the load balancing address or domain name of the cluster request. When accessing an API, you need to replace the hostname part of the URL shown in the OpenAPI Manual with "${sensors_data_url}", such as "http://${sensors_data_url}/api/v3/portal/v2/management/behavior/list".
1.3.3. HTTP and HTTPS
Whether the API uses HTTP or HTTPS depends on the load balancing configuration at the cluster entrance.
1.3.4. Authentication Method
All apis need to be authenticated before being invoked. For specific authentication methods, refer to:OpenAPI Authentication mode