RM API for RDNG
Hello!
Is it possible to get acquainted with RM API in detail when developing custom extensions for Rational DOORS Next Generation? I can find in samples of extensions various predefined attributes:
RM.Data.Attributes.NAME,
RM.Data.Attributes.IDENTIFIER,
RM.Data.Attributes.IS_HEADING,
RM.Data.Attributes.SECTION_NUMBER,
RM.Data.Attributes.DEPTH,
But is it possible to get full list of such attributes and may be something else in a way as most of API descriptions can inform? For example, I would like to use such data of a single artifact as itemId, about, etc. Is it possible to see some API where I could find all required info without need to learn scattered samples?
Thank you!
Accepted answer
Hello Dimitry,
Most APIs for Jazz-based products follow the OSLC specification. Usually, you start at an application's root context to get the top-level services (APIs) for an application like DNG. Identify the service you need, then request further services using that URL. It's common to drill down on a number of services to get the specific one you might need.
For example, if you're looking for what role a team member is assigned to, you'd get the top-level service for project collections, and use that to get the service for a specific project. In that service you can get the team member collection service, and from that get the service for a specific team member. In that service, you can get the role service which will provide a list of roles for that specific user.
You can find these services to looking at the wiki pages accessible from the API landing page I sent you. Or you can manually query for the services you need by drilling down on them using a tool like Postman.
The OSLC Workshop makes this pattern clearer and provides steps for accessing OSLC services as described above.
3 other answers
Hello, have you reviewed this document? It provides some info about RM classes.
Comments
Yes, thank you! I'm using this article developing extensions. For example, I can find description of some classes and methods here, like "RM.Data.getAttributes" class and others. But the problem is that I would like to find description (or at least sources, where these classes are realized) for "RM.Data.Attributes" (and other classes) to quickly develop really powerful extensions.
For example, I need currently to find itemId of a selected artifact in a module. I don't know, whether such attribute is defined in "RM.Data.getAttributes", or I can only get this value with HTTP request with Reportable API based on ID of this data. The second way is much more difficult. But there's a hope that I could get it faster if I would get acquanted with description of RM API (or with sources with realized classes of RM API).
Thank you!
To expand a bit on Jim's answer above, the full set of available DNG public API's are:
- RRC Reportable API - creating custom reports to be run from DNG or RPE, read only.
- OSLC RM V2 API - the open standard way to programmatically integrate with DOORS Next Generation, there is an elaborate workshop to get you started here OSLC Workshop article. These programs can be from any language that support HTTP REST calls, e.g. Java, C# etc. Hence these are more flexible to run and can read and update DNG data, as part of a web server, or standalone, but have some limitations set by the current OSLC standard, for example module support. In release 6.0.5 extension have been added for modules.
- DNG Server API - starting with version 6.x, various public RM server API's have been added, also REST API's, for configuration management, task tracker, modules, ReqIF, and type import.
- TRS 2.0 - the OSLC Tracked Resource Set open standard REST API to hook into the stream of low level changes done to resources in the DNG application (and other Jazz apps as well); read only.
- and there is what you have been looking at, the client extension capability, these are Javascript extension that are added as widgets you can run from the dashboard, and can be used to view and edit DNG data. It's more tailored to DNG, so has better module support, but is limited to run in a browser/javascript environment.
You can also check out the CLM API landing page, which is a good starting point for the different resources that describes the APIs.
Comments
Imagine please that, for example, I need to get known about all functionality realized for "RM.Data.getAttributes" - find all fields, methods, constants, etc? May be even if it'not described in any article. May be I could take some plugin from RM application in Jazz, extract its content and investigate. Of course, a document with description of RM API (or for separate class) could be perfect. I mean something like next:
But learning of a source can significantly help too.
Thank you!
Comments
Dmitry A. Lesin
Nov 15 '18, 12:29 p.m.I found this library: