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

Create thingshape and add properties via services

SOLVED
Highlighted
Garnet

Create thingshape and add properties via services

Hi,

 

I am connecting to Thingworx server using java sdk's ConnectedThingsClient. I want to create a thing shape at run time and add properties to it. I am using CreateThingShape service from Resources.EntityServices. But I can not find any out of the box service to add property definitions to this shape. Unlike Things/ThingTempaltes, we do not have any generic services under ThingShapes. 

 

Is there any way we can do this using OOTB services/ other apis from java sdk?

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Create thingshape and add properties via services

Frustrating as heck! PTC does not disappoint its reputation of incomplete documentations - there is not a single completed documentation for TW available on official sites of product / PTC support sites.

 

After wasting a whole day, I finally found the service - AddPropertyDefinition by accident. It uses similar api as the service with same name on Things and Templates etc.But the datashape used is different. The services from Thing,Template use the property names as IsLogged, IsReadOnly, IsRemote. And this on ThingShape needs logged, readOnly, remote etc. Also (for reasons unknown) the similar service AddPropertyDefinitions is not supported by ThingShapes.

 

They might be sharing the complete and informative documentation only with licensed customers. But they need to understand that there are use cases where people want to take/put the data out of/in to ThingWorx and need not necessarily have the licensed instance with them.

Hope that this is not a 'creating a mandatory dependency' thing and that the TW team is just too busy in development to publish the documentation. 

View solution in original post

2 REPLIES 2
Highlighted

Re: Create thingshape and add properties via services

Frustrating as heck! PTC does not disappoint its reputation of incomplete documentations - there is not a single completed documentation for TW available on official sites of product / PTC support sites.

 

After wasting a whole day, I finally found the service - AddPropertyDefinition by accident. It uses similar api as the service with same name on Things and Templates etc.But the datashape used is different. The services from Thing,Template use the property names as IsLogged, IsReadOnly, IsRemote. And this on ThingShape needs logged, readOnly, remote etc. Also (for reasons unknown) the similar service AddPropertyDefinitions is not supported by ThingShapes.

 

They might be sharing the complete and informative documentation only with licensed customers. But they need to understand that there are use cases where people want to take/put the data out of/in to ThingWorx and need not necessarily have the licensed instance with them.

Hope that this is not a 'creating a mandatory dependency' thing and that the TW team is just too busy in development to publish the documentation. 

View solution in original post

Highlighted

Re: Create thingshape and add properties via services

Hi @vaishnavee.

 

We apologize for your frustration.  I am going to move forward to create an internal case for addressing the lack of completed documentation in the scenario you describe.

 

Please be assured we are constantly striving to improve our documentation, and we appreciate your feedback in helping us to achieve that goal.

 

Regards.

 

--Sharon

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!