Skip to main content
1-Visitor
May 4, 2016
Solved

custom URL

  • May 4, 2016
  • 2 replies
  • 6874 views

I created a very simple “weather dashboard” and its working ok when previewing with Composer.

I was wondering how I can set a custom URL to view it as a user?

When I use server.com/ThingWorx/Mashups/mashup it just shows a blank page.  So I suppose by question is two part:

1. How can I access a mashup URL outside of Composer view?

2. Can that URL be customized?

thanks!

Best answer by Aanjan

Paul, to access Mashups outside of Composer, you can do it two different ways - copy the entire URL when you view the Mashup through the Composer and use that which would look similar to this - localhost/Thingworx/Runtime/index.html#mashup=Mashup_name

Or you can make a REST call similar to this - localhost/Thingworx/Mashups/Mashup_name?appKey=Your_appKey&x-thingworx-session=true

In the first scenario, you would get a pop up asking for a username/ password to authenticate. In the second one, with the provided appKey, it would log you straight into the Mashup.

Regarding customizing the URL, we don't have that functionality in ThingWorx. You would need to use an external application or any proxy of sorts.

2 replies

Aanjan5-Regular MemberAnswer
5-Regular Member
May 5, 2016

Paul, to access Mashups outside of Composer, you can do it two different ways - copy the entire URL when you view the Mashup through the Composer and use that which would look similar to this - localhost/Thingworx/Runtime/index.html#mashup=Mashup_name

Or you can make a REST call similar to this - localhost/Thingworx/Mashups/Mashup_name?appKey=Your_appKey&x-thingworx-session=true

In the first scenario, you would get a pop up asking for a username/ password to authenticate. In the second one, with the provided appKey, it would log you straight into the Mashup.

Regarding customizing the URL, we don't have that functionality in ThingWorx. You would need to use an external application or any proxy of sorts.

1-Visitor
March 13, 2018

I followed exactly these steps, however the mashup is not displayed. I am wondering about the app key is there a specific configuration to how to define it?  Is there a visibility permission that need to be done in this case ? 

 

1-Visitor
May 24, 2016

You could provide a customization by passing a parameter along with the mashup and doing some logic based on a passed in mashupParameter, if mashupParameterA = 1 then have functionality based on 1 that turns the screen blue, if 2 then have it turn orange, etc.