How get link types from RDNG
Hello!
I need to get information about available link types in a project area. Using next link:
I can find that next REST API request is legal:
But server response to this link is:
Error 400: Bad Request
If I try use something like next:
Then returned empty XML document:
<ds:dataSource xmlns:ds="http://jazz.net/xmlns/alm/rm/datasource/v0.1" xmlns:rm="http://www.ibm.com/xmlns/rdm/rdf/" xmlns:rrm="http://www.ibm.com/xmlns/rrm/1.0/" appId="RRC" vMajor="60" vMinor="06"/>
So the question is, how can be loaded information about available link types for a project area with either REST or OSLC API?
Thank you!
2 answers
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; min-height: 14.0px} p.p3 {margin: 0.0px 0.0px 2.0px 0.0px; font: 14.0px 'Helvetica Neue'} span.s1 {color: #dca10d} span.s2 {text-decoration: underline ; color: #dca10d}
</style>
Hi Dmitry
As mentioned in Reportable API Wiki https://jazz.net/wiki/bin/view/Main/DNGReportableRestAPI, REST API request https://serverName:Port/rm/publish/linktypes is used by ETL, that means that it will provide link types only for "opt out" (configuration management disabled) project areas.
If there is no "opt out" project areas in the server, then it is expected an empty XML document, same is expected when using parameter "projectURI" and the project area provided has configuration management enabled.
Unfortunately I don't know any other way to get project link types.
Comments
In a CM enabled environment I was able to do the following:
GET the services.xml file using this URL:
https://<hostname>:<port>/rm/oslc_rm/<PROJECT_AREA_UUID>/services.xml?oslc_config.context=https://<hostname>:<port>/rm/cm/stream/<STREAM_UUID>
Headers:
Accept = application/rdf+xml
OSLC-Core-Version = 2.0
Accept = application/rdf+xml
OSLC-Core-Version = 2.0
In the response from the GET request was the URLs for the types.
I then took this URL and did the following GET:
Headers:
Accept = application/rdf+xml
OSLC-Core-Version = 2.0
URL: https://<hostname>:<port>/rm/types/OT_xvyTcYuLEe2Bk9tMZMvU5Q?oslc_config.context=https://<hostname>:<port>/rm/cm/stream/<STREAM_UUID>
Accept = application/rdf+xml
OSLC-Core-Version = 2.0
URL: https://<hostname>:<port>/rm/types/OT_xvyTcYuLEe2Bk9tMZMvU5Q?oslc_config.context=https://<hostname>:<port>/rm/cm/stream/<STREAM_UUID>