How to get content of RTC service url via Powershell CLI
I am using below command on Window PowerShell CLI to fetch the response from the REST service URI (RTC service uri)
(Invoke-WebRequest -H @{'authUser'='userName'; 'authPass'='Password'} "https://abc.com/ccm/service/com.abc.server.YZGenerator.XYZGeneratorService?scmObjectNameorUUID=abc&scmObjectType=rws").Content
But I am fail to get right response, getting below message as response
<!DOCTYPE html>
<html >
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=10">
<title></title>
<link type="text/css" rel="stylesheet" href="/ccm/web/_style/?include=A~&etag=HmtX">
<link rel="shortcut icon" href="/ccm/web/net.jazz.ajax/jazz.ico">
<body class="claro">
<noscript><div id="net-jazz-ajax-NoScriptMessage">Javascript is either disabled or not available in your Browser</div></noscript>
<div id="net-jazz-ajax-InitialLoadMessage">Loading...</div>
<div id="net-jazz-ajax-WorkbenchRoot"></div>
..............
..........
</html>
One answer
The data you show is usually returned if you are not authenticated. The more important information would have been the result of the call e.g. 200.
Comments
See https://rsjazz.wordpress.com/2019/05/13/using-a-rest-client-to-authenticate-to-elm-clm-applications/ for how to authenticate.