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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Thing property is not updating using rest api in postman

asingla
1-Visitor

Thing property is not updating using rest api in postman

Hi ,

I am trying to update thingworx property using rest api call in postman.

But it's not updating.

Action: PUT

URL: http://localhost:9090/Thingworx/Things/t1/Properties?appKey=8c2e7be1-1129-41cc-ba02-f5de40c6cec1&x-thingworx-session=tru…

Header: Content-Type:application/json

Body: { "myproperty":"hi" }

Thingworx version: 7.2

Please help me.

if you need more information please let me know.

Thanks,

Anuj Singla

3 REPLIES 3

HI,

Your URL might be incorrect.

Find below URL

Action: PUT

URL: http://localhost:9090/Thingworx/Things/t1/Properties/*

Header: Content-Type:application/json

Body: { "myproperty":"hi" }

Instead of adding appKey in URL , add it to the header(same as Content-Type:application/json)

If application requires authentication then add it from postman Authorization tab.

After adding the authentication , you can see the Authorization row in Headers window.

Thanks,

Sachin Dhawane.

sharmon
13-Aquamarine
(To:asingla)

Here's a screen shot of a PUT request I use to update properties via POSTMan. Like Sachin says, try moving the appKey into the header, as shown. Emulate the format of the request below, and let us know if you have success.

The items in double curly brackets are POSTMan environment variables, but should be self-explanatory. Just substitute values appropriate to your situation.

sharmon
13-Aquamarine
(To:sharmon)

Here's the body of the request:

Announcements


Top Tags