cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Call SetPropertyValues using REST with infotable

dwightwhe
1-Newbie

Call SetPropertyValues using REST with infotable

Hi,

I'm trying to set a Thing's properties using the SetPropertyValues REST call. It has one argument, values, which is of INFOTABLE type.

I can make this call for my XTest object with property prop:

POST http://192.168.1.105/Thingworx/Things/XTest/Services/SetPropertyValues?appKey=xxx&Accept=application/json&values={"dataShape":{"rows":[{"prop":"Mine"}],"fieldDefinitions":{"prop":{"name":"prop","baseType":"STRING","ordinal":1}}}}

and get a 200 (OK) status code back, no content.

However, there appears no change of the actual value on the server. Why does the change not go through?

EDIT/UPDATE: If I take the infotable result of GetPropertyValues, remove the read-only property values and change the others as desired, it works. There must be something of importance missing in the above call without triggering an error.

This solves it for me I believe. Thanks!

1 REPLY 1

Dwight,

Where you able to set the value of an specific property of and specific row?

I mean, I have this GasLevel property as part of my info table, and I want to update this value for the GasTank1 row.

Top Tags