Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
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
Solved! Go to Solution.
Fixed using custom authentication.
The following documents are referenced:
https://www.ptc.com/ko/support/article?n=CS244163
https://gist.github.com/johnymachine/812d4c21e822f32fb953b4d5086c01c0
https://community.ptc.com/t5/ThingWorx-Developers/Custom-Authenticator-Example/m-p/522456
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
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.
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.
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 ¶meterName=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.
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
Fixed using custom authentication.
The following documents are referenced:
https://www.ptc.com/ko/support/article?n=CS244163
https://gist.github.com/johnymachine/812d4c21e822f32fb953b4d5086c01c0
https://community.ptc.com/t5/ThingWorx-Developers/Custom-Authenticator-Example/m-p/522456