# Data source type
View 2.0 supports multiple data source types.
To add a data source, select OneNET
;
Log in to the OneNET Developer Center and find the product APIKey on OneNET. OneNET View 2.0 will automatically pull the device and data stream under the product according to the APIKey;
With the device and data stream selected, a OneNET data source is created.
To add a data source, selectstatic data
;
Enter the data in correct format JSON
in the data column and save it.
You can use the API interface of any platform as access to a data source in View 2.0.
The API access of View 2.0 is similar to the interface debugging tool postman
.
First, you need to know the API request address, authentication method, and the required parameters and respective values of such parameters. You can ask the developer who provided you with the API for such information.
Currently, we support request for the third-party API by means of GET
and POST
.
Enter the URL in the interface path. When it is detected that the URL you entered contains the query parameters, the system will automatically resolve them to the query list.
The meaning represented here is similar to the parameter name=sx\&pass=111 in address http://aaa.com/user?name=sx\&pass=111.
The configuration in the Header list will be assembled into a custom header for HTTP requests. Usually, we can enter the authentication information in the Header.
When we switch the request mode to POST, the Body tab will appear. Currently, the request for Body is supported only in the form of key-value pairs.