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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Remote Property Binding Through Rest API

SO_9699370
12-Amethyst

Remote Property Binding Through Rest API

Hi, 

 

I am using TWX 9.1 with manufacturing app and Postgres as persistence provider. I have set up kepserver on another machine. I have done the configuration of remote thing in kepserver. 

I am doing below steps in TWX using postman -

1. I am creating a thing using below URL and body 

http://XX.XX.XX.XX:8080/Thingworx/Resources/EntityServices/Services/CreateThing

body -

{

"name": "testThing",

 "thingTemplateName": "PTC.SCA.SCO.KepserverBasedPhysicalAssetThingTemplate",

"projectName" : "Demo"

}

 

The thing get created I then enable and restart thing using below URL - 

http://XX.XX.XX.XX:8080/Thingworx/Things/testThing/Services/EnableThing

 

http://XX.XX.XX.XX:8080/Thingworx/Things/testThing/Services/RestartThing

 

Now I manually create a property from composer called test1 data type string. I also assign IndustrialThing property with the remote thing thing name (used in kepserver)

 

I then go back to postman and will to bind a tag defined in kepserver to test1 for which I use below URL and body 

http://XX.XX.XX.XX:8080/Thingworx/Things/testThing/Services/SetRemotePropertyBinding

{
"propertyName" : "test1",
"pushType" : "VALUE",
"Aspects" :    { "industrialDataType""String",
    "tagAddress""Channel1.Device2.Downtime_Code",
    "scanRate"1000,
    "tagType""Static"
}
}
 
Once I run this I get 200OK status in postman but in composer I see the property bound to "test1" and not the tag address .
SO_9699370_0-1619107944060.png

The values doesn't get transmitted at all, I verified that datatype is string at both the ends. Now If open up composer and run SetRemotePropertyBinding for the testThing. Manually pass the parameter as input to the service and run it, it works fine (see below screenshot)

SO_9699370_1-1619108290414.pngSO_9699370_2-1619108360325.png

Can some one Please help me on this?

 

Kind Regards

SO

Kind Regards
SO
ACCEPTED SOLUTION

Accepted Solutions

Hi @slangley 

 

The issue is resolved, I was using Capital "A" for aspect in the postman body it should have been small "a" . No its working. I have informed the PTC support guys who was helping me with the case. 

 

Thanks

SO

Kind Regards
SO

View solution in original post

3 REPLIES 3
slangley
23-Emerald II
(To:SO_9699370)

Hi @SO_9699370.

 

I see that you have already opened a case for this issue.  I will track the status and once resolved, post an update here for the community.

 

Regards.

 

--Sharon

Hi @slangley

 

Thanks for the check

 

Kind Regards

SO

Kind Regards
SO

Hi @slangley 

 

The issue is resolved, I was using Capital "A" for aspect in the postman body it should have been small "a" . No its working. I have informed the PTC support guys who was helping me with the case. 

 

Thanks

SO

Kind Regards
SO
Announcements


Top Tags