Skip to main content
1-Visitor
April 22, 2021
Solved

Remote Property Binding Through Rest API

  • April 22, 2021
  • 1 reply
  • 2069 views

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

Best answer by SO_9699370

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

1 reply

Community Manager
April 22, 2021

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

1-Visitor
April 23, 2021

Hi @slangley

 

Thanks for the check

 

Kind Regards

SO

SO_96993701-VisitorAuthorAnswer
1-Visitor
April 30, 2021

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