How get link types from RDNG
Hello!
<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"/>
2 answers
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
Hi Ivan,
<oslc:resourceShape rdf:resource="https://win2012:9443/rm/types/__8blrr9zEempFLODRb8LwA"/>
Accept = application/rdf+xml
OSLC-Core-Version = 2.0
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>
Comments
Clients should never hard code or make assumptions about URI patterns. If you want to know the URI of an OSLC service provider, use OSLC discovery.
Looking at the OSLC service provider of a CM enabled project area, I see OSLC query capabilities for RDF types http://jazz.net/ns/rm/dng/view#View, http://jazz.net/ns/rm/dng/reqif#ReqIFDefinition, http://jazz.net/ns/rm/navigation#folder, [http://open-services.net/ns/rm#RequirementCollection,http://open-services.net/ns/rm#Requirement], but nothing for type definition artifacts such as link types.
The ELM API landing page is at https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding.I see nothing there that describes how to query for resources. So, it looks like the API endpoint that Brian mentioned should be treated as private, undocumented, and unsupported. Use of private APIs is discouraged because such APIs are subject to change without notice, making for potentially fragile implementations, and are unsupported.
In each shape the link types can be identified as the tags that contain a tag:
GCM has similar tags in properties its shapes to denote link types - although it also has the benefit of a (OSLC) QueryCapability for link types :-)
I agree with David about it being not a good approach to hardcode URL patterns, instead to use discovery. In this case for DN the link types can be discovered from the shapes, all accessible using OSLC-Core-Version: 2.0 and with no indication that this is a private API.