Live Demo - Upload Data and View Data as a Chart
In this demo we start by assigning a new 'Client Id' for this session. This value is used for the 'group' attribute, along with a set of 'date' values and some random 'sales' and 'returns' values to compose a test dataset for upload.
As all clients will be sharing the same target table in this demo, the 'ClientId' is used subsequently as a query filter so that only the values for the specific session are returned.
The test dataset is uploaded via POST: https://api.hostmy.io/v2/tables?org=Rundaz&env=Global&scp=Apex&dta=Jam&ver=Q1
No authorisation is required for this API call as the target table has been configured with a default key that includes the 'POST' privilege.
Following the upload of the test dataset, we call GET https://api.hostmy.io/v2/tables?org=Rundaz&env=Global&scp=Apex&dta=Jam&ver=Q1&condition-field=group&condition-operator=EQ&condition-value={Client Id}
using a header X-API-KEY: K-e285dd27-8f77-44f3-a583-0d8bbeb425e9
Where {Client Id} is substituted with the unique value for this session
The query parameters 'condition-field', 'condition-operator' and 'condition-value' are standard parameters available for use on all tables. This example can be read as filter by 'group=Client Id'.
This call returns the matching sub-set of records from the shared table.
The app then uses the returned values from this record to render the UI view.
The UI provides the opportunity to play with the 'Client Id', say, for example, steeling one from another session loaded in a new window. The key used for the read may be changed to see the effect of providing an invalid value.
The chart can be redrawn in a different type by selecting the menu item 'Line/Bar/Area Chart'.