I am trying to create 48 Numbers of properties for a Thing Template in Thingworx using RestAPI. While creating each property I receive 200 Ok response. (Used AddPropertyDefination service)
Error: some of those properties are not visible in Composer.
However, GetInstanceMetadataAsJSON gives all 48 properties in response.
Note: Problem is similar to article: https://www.ptc.com/en/support/article/CS314694
but this is for thing template.
Since it is a template you obviously can't do the restart. Maybe in composer you can at least try an Edit / Cancel Edit to see if it refreshes with the proper definition. I wouldn't recommend Edit / Save because it may transfer the improper in memory model to the persistence layer.
If you create a Thing from it, do all your properties appear?
Not sure if you are doing a bulk create or not, but potentially our persisted and in memory model are out of synch due to the way the properties are being created.
If none of these steps make a difference then restart Thingworx see if all properties show up. If that is the case then you will probably have to create your properties 'slower'
Or just thinking loud, you can query all implementing Things, and restart them one by one.
Restarting Thing does not seem to work.
After restarting all implementing Things show the same list of properties as Thing Template.
Thanks for your response.
1. Edit/Cancel Edit -> Does not work
2. Thing Creation from the thing template -> Only properties are visible in Implemented Thing same as Thing Template
3. Bulk create or not: We use AddPropertyDefinition for individual property to create. However, for a single thing template, we make a parallel call to AddPropertyDefinition to faster the process.
4. Restarting Thingworx and Apache does not seem to work.
You probably should not do parallel calls to do AddPropertyDefinition - very likely there is a locking going on as it updates the model so you may be running into that with this approach.
Have you found a solution for your issue? If so, please provide those details for the benefit of others with the same issue and mark your post as the Accepted Solution.
If you are still searching for a solution, please provide a sample of the content of your REST call so we can validate it's not missing something.