Data can be provided to uSmart via a command line or script using our live data writer functionality. The most popular command line solution, which is being used for uSmart data provision in this manner, is curl. Guidance can be found at https://curl.se/. Other command line options will also work if they comply to standard web protocol and can meet the requirements illustrated below.
Within your command line or script you will need to include your API key and API secret as provided (see how to guide on setting up an API key and secret).
Your command line should include a number of key components and specifically:
User Credentials - your security details (API key, etc)
your target dataset
your data payload
The full command is shown unbroken at the bottom of this page.
An example of the initial connection elements, that defines data provided to uSmart live data writer and the necessary credentials, are illustrated as follows:
For live data writer to be enabled the real-time switch must have been selected when you created the dataset in the first instance. Each dataset in uSmart has an organisation Globally Unique Identifier (GUID) and a dataset GUID. The organisation GUID is shown in the “write URL” illustrated in the following image and is specifically the text after “org/” and before the folder details.
Within the payload you can see key elements including:
the text within the first quotation marks e.g. “Bedrooms” is the column header. If these are the first entry then they will be consumed as is. If they are resultant entries after the first then they must match exactly to enable data ingestion to be successful
the text within the next quotation marks e.g. “3” is the relevant entry for that row
and finally \n to move to the next column entry
to move to the next row, as long as the data is structured correctly, you will publish in the same method as above as the \n will return you to the next row of data and continue
Make sure you end by closing both braces
We understand that the above can be quite technical and if you are looking for any further assistance please contact us directly at the uSmart Service Desk.
Finally here is the full script from the above example: