Skip to main content
18-Opal
April 13, 2018
Solved

How to request a mashup url?

  • April 13, 2018
  • 6 replies
  • 6977 views

Hello

 

How do I request a url for a mashup?
I showed mashups using an iframe in html.


This seems unstable.

Can I request url via parameters?


How do I do this?

thank

6 replies

10-Marble
April 13, 2018

The URL for any mashup should be easy to know if you already know the mashup name.  It just uses this pattern:

 

/Thingworx/Runtime/index.html#mashup=<mashup_name>

 

Fior me, this is a mashup on a server:

http://localhost:8080/Thingworx/Runtime/index.html#mashup=3DPrinter

 

If you want to get a list of all Mashup names, you can do that by REST services (you must authenticate) by simply doing a GET on:

http://localhost:8080/Thingworx/Mashups

5-Regular Member
April 13, 2018

Hi @CHASEONHO could you please elaborate a bit on what you meant by requesting the URL. And what's unstable about using that in the iframe.

CHASEONHO18-OpalAuthor
18-Opal
April 15, 2018

Hi,  @supandey

The way I need the url I mentioned is to hide the parameter and request the url to display the mashup in the iframe.
Typically, to display a mashup without a login, you would use the following format:
<ServerName>: <ServerPort> / Thingworx / mashups / <mashupName> & <appkey>
I am wondering how to access the mashup by passing it as a parameter rather than displaying it.
If you have a way to pass Thingworx Session, AppKey without displaying it in url, please let me know.

Thank you.

 

22-Sapphire I
April 13, 2018

If you need to pass in parameters it gets a little more interesting because you would probably need to accomplish a few things

1. establish a session

2. have the right url

3. pass in parameters

to establish the session you would have to set x-thingworx-session to true

you also need to probably pass in an appkey

and then the parameters.

The link provided can be used to also pass in parameters with &parameterName=parameterValue BUT you can't establish session.

When establishing session you can't pass in the parameter names.

I don't remember if there is a solution for that or not.

Best way is to first establish session and then call a mashup with the parameters.

CHASEONHO18-OpalAuthor
18-Opal
April 16, 2018

@PaiChung

Can I request a mashup without displaying the ack in url?
Attempt to put the requested url into an iframe.
Is this possible?

thank you