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

The PTC Community email address has changed to community-mailer@ptc.com. Learn more.

Enhancement Request to be able to hide Parameters from URL when calling REST API to get mashups

0 Kudos

Enhancement Request to be able to hide Parameters from URL when calling REST API to get mashups

This request is coming from https://thingworx.jira.com/browse/PSPT-68113 As Community is the right place to post Enhancement request, so moving that to here as Idea.

 

Enhancement Request to be able to hide Parameters from URL when calling REST API to get mashups.
Customer using REST API call to get Mashup from other system. They are using html <form> to get the Mashup.
Below is sample html code:

<html>
<head>
<script>
function openPopup(methodType,url){
	var form = document.createElement("form");
	var param = new Array();
	var input = new Array();
	var option = "width=1700px, height=900px, location=no, top=50px,left=100px;";
	
	window.open("","popup",option);
	
	form.target="popup";
	form.action=url;
	form.method=methodType;
	
	param.push(['appKey','8312b405-0097-4112-9aba-3b4cb160a659']);
	param.push(['x-thingworx-session','true']);
	param.push(['MashParam1','dGVzdHNhbTEyMzQ1']);
	
	for(var i =0;i<param.length;i++){
		input[i] = document.createElement("input");
		input[i].setAttribute("type","hidden");
		input[i].setAttribute("name",param[i][0]);
		input[i].setAttribute("value",param[i][1]);
		form.appendChild(input[i]);
	}
	
	document.body.appendChild(form);
	form.submit();
}
</script>
</head>
<body>
	<div>
		URL 1 : http://10.228.132.99:8080/Thingworx/Mashups/test_sam
		<button onclick='openPopup("GET","http://10.228.132.99:8080/Thingworx/Mashups/test_sam2");'>GET Mash</button>
		<button onclick='openPopup("POST","http://10.228.132.99:8080/Thingworx/Mashups/test_sam2");'>POST Mash</button>
	</div>
</body>
</html>

TS has tested that Mashup only accepts GET request, not POST(Will get 405 method not allowed error). Customer is asking whether Thingworx can accept POST request for Mashup in future release so that they can using POST request to hide the parameters sent to mashup.

 

Steps to Reproduce:

1. Login to TWX Composer, navigate to Subsystem > PlatformSubsystem > Configuration screen
2. Uncheck Filter Content Type option, check Allow Application Key as URL Parameter option
3. Open and unzip the attachment to get the GetMash.html file
4. Click on GET Mash button -> Mashup received but since it is a GET so all parameters show in URL
5. Click on POST Mash button -> 405 Method Not Allowed error

2 Comments
olivierlp
Community Manager
Status changed to: Under Consideration

Will consider for future release.

olivierlp
Community Manager
Status changed to: Archived

Hello,

We are archiving your idea as part of a general review. This action is based on the age of your idea and the total number of votes received, as per this announcement.

You can always post a new idea with all the details required in the form.

Thank you for your participation.