Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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).

Example

Your command line should include a number of key components and specifically:

...

The full command is shown unbroken at the bottom of this page.

User Credentials

An example of the initial connection elements, that defines data provided to uSmart live data writer and the necessary credentials, are illustrated as follows:

curl -X POST https://livedatawriter.usmart.io/liveData:write -H "Content-Type: application/json" -H "Accept: application/json" -H "api-key-id:c5zz5965-4374-4b94-b444-06544b9eba8e" -H "api-key-secret:05901843c371273b12c732280d91ce0e39392786017c8ddfe435ac6b3a25cba8" -d "

Defining the dataset

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 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.

...

{"organisationGUID":"69210836-6c2b-4a26-a0a0-b903bde0dc46","datasetGUID":"fcd44037-4ba7-406f-8227-251bab530a99",

Adding the data

You will notice that the data payload code is within one open brace { already. Data is then added in the following manner:

...

curl -X POST https://livedatawriter.usmart.io/liveData:write -H "Content-Type: application/json" -H "Accept: application/json" -H "api-key-id:cc5zz5965-4374-4b94-b444-06544b9eba8e" -H "api-key-secret:05901843c371273b12c732280d91ce0e39392786017c8ddfe435ac6b3a25cba8" -d "{"organisationGUID":"69210836-6c2b-4a26-a0a0-b903bde0dc46","datasetGUID":"fcd44037-4ba7-406f-8227-251bab530a99","data": {"Bedrooms": "3", "Date_survey": "2020-09-08", "Elec_currentuse": "1200", "Existing_Cooking": "1", "Existing_Fires": "0", "Floor_Height": "2.6", "Floor_Type": "Suspended", "Gas_currentuse": "10200", "Glazed_Type": "Double", "Habitable_Rooms": "4", "Heat_Primary_Source": "Gas Boiler - Combi", "Heat_Secondary_Source": "None", "Heated_rooms": "4", "House_Age": "1722", "House_Env": "Urban", "House_Form": "Semi-Detached", "House_ID": "1", "House_SAP": "50", "House_Type": "House", "Main_Fuel": "Gas", "Mains_Gas_Flag": "Yes", "Multi_Glaze_Proportion": "80-100%", "Name_Survey": "urbantide", "No_Adults": "2", "No_Child": "0", "No_Occupants": "4", "No_Storeys": "2", "No_Underfloor": "0", "Outside_Access": "No", "Outside_Space": "No", "Postcode_1": "ZW12", "Roof_Type": "Pitched", "TS_Existing": "None", "TS_Existing_Size": "", "Total_Floor_Area": "80.34", "Wall_Type": "Cavity_Insulated"}}""

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@a9e
sortmodified
showSpacefalse
reversetrue
typepage
cqllabel = "publishers" and type = "page" and space = "US"
labelspublishers

...