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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Get Services used in a Mashup

pshashipreetham
17-Peridot

Get Services used in a Mashup

Hi,

Is there a way to get service names that are used in a Mashup? Is there any snippet in Thingworx for this requirement?

 

Thanks,

 

Shashi Preetham,
Email: psp316r@outlook.com,
Mobile: +91 8099838001.
5 REPLIES 5

If you export the mashup to xml you can find them in the xml

You can also pull the definition from the persistence provider, it would then be in JSON

There are no snippets

Hi @PaiChung ,

 

Mashup Data is stored somewhere in DB, that's how it loads all the services and bindings when we edit a mashup in the composer , isn't it?

Or Mashup's are stored in the form XML only in DB ?

 

Thanks,

Shashi Preetham,
Email: psp316r@outlook.com,
Mobile: +91 8099838001.

Hello,

 

There is a table called: mashup_model in the Thingworx platform DB model.

In this table you can find you mashup using the "name" column and you can find the service definitions in the "mashupContent" column as a JSON.

 

For this you would need to know the name of your thing though as the mashupContent JSON contains a bunch of other things as well.

 

There are also some Entities service definition tables as well, however I couldn't find the definitions for my test mashup there but you might have better luck.

I'm not entirely sure that this way would be recommended by PTC though, so do it at your own risk.

 

Regards,

Jens

In DB they are in JSON, but you can export Mashups to either a binary or XML from Composer

There is also service 'ReadEntityDefinitionAsJSON' on 'EntiyServices' (type: "Mashups", name: "mashupname") or 'ReadEntityAsJSON' which one could us in a TWX service to parse the contained mashup content (instead of DB query).

 

Unfotunate that the new RelationshipSubsystem with TWX 9.3 does not have a reverse option to the "GetWhereUsed" service. As it does tell you if the services of your thing are used in a mashup. I would have thought the other way around should work as well - but did not find a service.

Announcements


Top Tags