3 Replies Latest reply on Oct 15, 2015 8:46 AM by stefanbe RSS
    stefanbe Explorer

    Setting property values through the REST API


    Is there an example somewhere on how to set property values through the REST API?

    In the workbook, I only saw the method of doing a GET request to the URL http://localhost/Thingworx/Things/<Thing>/Properties/<Property>?method=put&value=<value> but that doesn't seem to work with complex types (tables, location,...), or is there a way for that to work

    In the Wiki (A.1.3) on the other hand, it says to do a PUT request to http://host/Thingworx/Things/thing_name, but it doesn't give any details. 

    When I try to do a PUT request to that URL with the properties JSON object I get from GetPropertyValues as the body, I get the error "JSONObject["thingShape"] not found.". Could you provide an example on how to set a property (or all the properties) of a Thing?