RQM Rest API upon extracting javascript disabled error
I am opening the following using Poster / Postman
And getting the following response
<!DOCTYPE html>
<!--
Licensed Materials - Property of IBM
(c) Copyright IBM Corporation 2005, 2015. All Rights Reserved.
Note to U.S. Government Users Restricted Rights:
Use, duplication or disclosure restricted by GSA ADP Schedule
Contract with IBM Corp.
-->
<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="/qm/web/_style/?include=A~&etag=J0LlakD2K84_en_US&_proxyURL=%2Fqm&ss=K1GW7">
<link rel="shortcut icon" href="/qm/web/com.ibm.rqm.planning.web/RQM.ico">
<style type="text/css">
#net-jazz-ajax-NoScriptMessage {
width: 100%;
color: #D0D0D0;
font-size: 2em;
text-align: center;
position: absolute;
top: 1%;
z-index: 999;
}
</style>
</head>
<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>
<script type="text/javascript">
djConfig = {
isDebug: false,
usePlainJson: true,
baseUrl: "/qm/web/dojo/",
locale: "en-us",
localizationComplete: true
};
/null/
net = {jazz: {ajax: {}}};
net.jazz.ajax._contextRoot = "/qm";
net.jazz.ajax._appPath = "/qm/web/console/SIMIS%20(Quality%20Management)";
net.jazz.ajax._webuiPrefix = "/web/";
</script>
<script type="text/javascript" src="/qm/web/_js/?include=A~&etag=J0LlakD2K84_en_US&_proxyURL=%2Fqm&ss=K1GW7&locale=en-us"></script>
<script type="text/javascript">
require("dojo/main").getObject('jazz.core.loader', true)._serverStartup="K1GW7";
require("dojo/main").getObject('jazz.core.loader',true)._loaded=["A"];
</script>
<script type="text/javascript">
/ <![CDATA[ /
dojo.addOnLoad( function() {
net.jazz.ajax.ui.PlatformUI.createAndRunWorkbench("com.ibm.rqm.planning.web.qualityManager");
});
/ ]]> /
</script>
</body>
</html>
Can someone help me to explain how to get javascript enable as i am explicitly getting this error :
<noscript><div id="net-jazz-ajax-NoScriptMessage">Javascript is either disabled or not available in your Browser</div></noscript>
Thanks,
7 answers
You're using the wrong URL format and that is exactly what you will get. Check the API document carefully, and you have to use the "feedURL" with the RQM REST API.
https://jazz.net/wiki/bin/view/Main/RqmApi
You can also take a look at the OSLC workshop where you can learn how to use a browser add-on to make OSLC/REST requests.
https://jazz.net/library/article/635
Hi Donald,
Comments
Chances are you did not set the "Accept" header properly. The JavaScript warning only shows in HTML content, which you should not get by the REST API - you should get XML or JSON content.
Hi Donald,
The test artifacts themselves do not have "sections", so you will not be able to get "sections" using REST API. You just have to know what attributes you want and request them in the API specifically.
Hi Nabeel,
In order to access the Test Plans, Test Cases etc., using OSLC REST Apis, you have to discover your service by traversing the rootservices URL.
Before you do the following steps make sure that you have
- Authenticated into the RQM system using your web client or Authenticated yourself into the RQM system in a separate tab in your Browser.
-
Include "OSLC-Core-Version : 2.0" and "Accept : application/xml" as your header parameter in the REST client.
In Poster web client follow the below steps,
- In your case, Fetch the catalog from https://alm.gosi.ins/qm/rootservices and your catalog URL would be https://alm.gosi.ins/qm/oslc_qm/catalog (search for the tag oslc_qm:qmServiceProviders)
- In the catalog you will find the list of available projects. In the list choose the ServiceProvider of the required project and the URL would be like https://alm.gosi.ins/qm/oslc_qm/contexts/{PROJECT_ID}/services.xml (search for oslc:ServiceProvider)
- Service provider lists all the services of the selected Project Area. The resource like https://alm.gosi.ins/qm/oslc_qm/contexts/{PROJECT_ID}/resources/com.ibm.rqm.planning.VersionedExecutionScript, available under oslc:queryBase under oslc:QueryCapability with title "Default query capability for TestScript" will fetch the list of Test scripts.
- Likewise https://alm.gosi.ins/qm/oslc_qm/oslc_qm/contexts/{PROJECT_ID}/resources/com.ibm.rqm.planning.VersionedTestPlan,available under oslc:queryBase under oslc:QueryCapability with title "Default query capability for TestPlan" will fetch the list of Test Plans.
Similarly you can traverse other services in Services.xml to fetch the necessary details and further you could use Queries to narrow down the results.
Given below is a screenshot of the request and response for list of test cases
And the Response is
Hi Shasi,