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

Get Thing Template implemented Thingshapes service

SOLVED
Level 8

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

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Get Thing Template implemented Thingshapes service

// 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 6

Re: Get Thing Template implemented Thingshapes service

// 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 

Re: Get Thing Template implemented Thingshapes service

Hi Mukul,

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

K

 

Re: Get Thing Template implemented Thingshapes service

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 ).

Re: Get Thing Template implemented Thingshapes service

Hi Carles,

thanks for the reply. Basically I am trying to get the service definitions of the services I personally added to a thing template. I don't want those that are inherited. Unfortunately I didn't add a category string when I created them. If I call the service without a category filter I get all the services (including the inherited ones). Is there a quick filter I can use in the category field or will I have to go through each service I wrote and add a category string first?

 

Thanks again,

K

 

Re: Get Thing Template implemented Thingshapes service

Hello K,

 

If it are few services, just go and change the category with the composer, should be a moment. Otherwise you can export ThingTemplate for Source Control and search and remplace category="" to category="yourDesiredCategory" and import back.

 

Regards,

Carles.

Re: Get Thing Template implemented Thingshapes service

Thank you, very helpful.

K