Skip to main content
1-Visitor
September 29, 2020
Solved

Setting thing shape with rest api

  • September 29, 2020
  • 1 reply
  • 2100 views

Hi,

Is there a way to set thing shape with rest api as we set thing template? I tired with "thingShapeName" in the Request body of create thing rest api but its not working.

 

Best answer by nmilleson

There is a service under Resources/EntityServices called AddShapeToThing that takes two parameters.  If you're calling it via the rest api, you'll likely need to ensure the Thing has been created (and usually re-started using the RestartThing() service if you're creating it via the api) before calling the above service.

1 reply

nmilleson17-PeridotAnswer
17-Peridot
September 29, 2020

There is a service under Resources/EntityServices called AddShapeToThing that takes two parameters.  If you're calling it via the rest api, you'll likely need to ensure the Thing has been created (and usually re-started using the RestartThing() service if you're creating it via the api) before calling the above service.

1-Visitor
September 29, 2020

yeah I got it! Will try and get back to you.

 

Thanks!

17-Peridot
September 29, 2020

@MM_9628870 ,

 

Try this link:

 

<yourTWxServer>/Thingworx/Resources/EntityServices/ServiceDefinitions/

 

There you should see AddShapeToThing()