REST API Document
Last updated
Last updated
Through this document, users will be able to send their data to the platform via API based on the information provided in the document, and the content in the document is defined according to the OpenAPI standard. Currently, the platform only supports the Post and Get methods.
The following will use the data set defined in the data format page as an example to illustrate.
From the red circle in the upper right corner of the above image, users can find the API key and endpoint, which are required to send data to the platform.
Clicking the "downward arrow" from the purple circle on the right side of the above picture will show how to send data from the data source (in this example, FactoryA) to the platform using Post and the data format structure. You can also try sending data directly to the platform through Curl, as shown in the video below.
Note:
The URL in the API will be "{Endpoint}/{Data Source}".
Key needs to be placed in the header, called "x-api-key".
When data is sent to the platform, the system will record the current time and write it to the database. This time will also be included when exporting the data.
Just like POST, clicking on the "down arrow" as shown in the following image will provide more information on usage.
After clicking on the "Try it out" button, as shown in the figure below, enter a time period and click "Execute" to obtain the data on the platform.
Note: The time format used here is UTC.
Users can use the returned error codes for debugging. The following is a list of error codes:
200
Success
400
Bad request
403
Invalid API key
404
Source not found
413
Request entity too large
429
Too many requests