Get Data using API
After having your API Token, refer to this doc to read the data that you need.
Sql Query API
Method: POST
Path:
https://[client].datainsider.co/api/query/sql
Parameter | Type | Description |
---|---|---|
api_key | string | API key that has database permission |
sql | string | sql query to data warehouse |
Sample request:
Sample response:
Update Data API
Method: PUT
Path:
https://[client].datainsider.co/api/databases/<db_name>/tables/<tbl_name>/rows
Parameter | Type | Description |
---|---|---|
db_name | string | name of the database that contains the table |
tbl_name | string | name of the table |
api_key | string | API key that has database permission |
updated_rows | json string array | list of rows that need to be updated |
Note:
To perform the update correctly, it is necessary to set the primary keys of the specified table in the
Schema Management
section to determine the correct row to update. Primary keys can be one or more columns.By default, when retrieving data (from the api or displayed on a chart), the value of the last update will be displayed. To view full historical information of updated rows, it is necessary to enable
Historical Data
mode in the Chart Setting of each chart to view full history.
Sample request:
Note: Schema of the orders table in this example: order_id (primary_key) | item_name | updated_time | status
Sample response:
Last updated