Skip to main content
Jan 30, 2019 12:03 PM UTC
Solved

Get Thing Template implemented Thingshapes service

Hi,

is there a service that will return a list of thingshapes implemented by a thing template (or thing derived from the thing template). Thought there would be as they are displayed in the composer, but can't find it.

 

Also looking for a service similar to GetServiceDefinitions() that will return the 'Category' parameter. That way I can filter the results so that I don't get all the services inherited from the base templates.

 

Thanks in advance.

K

 

mnarangAnswer
Jan 30, 2019 1:51 PM UTC

// result: INFOTABLE dataShape: "EntityList"
var result = me.GetImplementedShapes();

 

GetImplementedShapes will give you the list of implemented shapes on entity .

 

There is one more for getting the implemented ThingTemplate 

 

var result = me.GetThingTemplate(); 

 

Thanks ,

Mukul Narang 

6 replies

mnarangAnswer
Jan 30, 2019 1:51 PM UTC

// result: INFOTABLE dataShape: "EntityList"
var result = me.GetImplementedShapes();

 

GetImplementedShapes will give you the list of implemented shapes on entity .

 

There is one more for getting the implemented ThingTemplate 

 

var result = me.GetThingTemplate(); 

 

Thanks ,

Mukul Narang 

khayes1Author
Jan 30, 2019 2:12 PM UTC

Hi Mukul,

thanks for that, it is what I was looking for.

K

 

Jan 30, 2019 6:26 PM UTC

For the GetServiceDefinitions question it doesn't returns the Category, but you can filter by Category listing only the ones of the given Category ( if you know it in advance ).