Doors next generation 7.0.3: Pull all attribute values for an artifact
![](http://jazz.net/_images/myphoto/4084d7c0c28d175c20262e1c5f773803.jpg)
I discovered this API for pulling data for an artifact: https://jazz.net/wiki/bin/view/Main/DNGReportableRestAPI . I tested it and it doesn't appear that it returns all the attribute values (values for all the columns) for the artifact. For example, the artifact has a "Contents" column which displays the text content for the artifact that represents the requirement's details. However, the value for this column was not returned by the API as it was not in the <rrm:attributes> XML element returned by the API, only the value for the ID was in the <rrm:attributes> XML element. How do I retrieve all the attribute values for an artifact using the API?
Accepted answer
![](http://jazz.net/_images/myphoto/4084d7c0c28d175c20262e1c5f773803.jpg)
There are the available API's: https://jazz.net/wiki/bin/view/Deployment/ELMProductAPILanding
My blogs do not directly cover DNG, but OSLC and other APIs. The Authentication Wiki Entry Davyd mentions, is hopeless, I think. I spent some time creating https://rsjazz.wordpress.com/2021/10/15/elm-authentication/ which should be able to get you where you need be. https://rsjazz.wordpress.com/2021/09/29/using-the-ewm-rest-and-oslc-apis/ shows how the EWM REST APIs can be used. The principles apply to the DNG APIs as well and the article series should be able to help you getting started with DNG.
Comments
![](http://jazz.net/_images/myphoto/e5e63d5878217b64611c1df9401b7cd3.jpg)
Please note, in the case of OSLC, unless an attribute is a simple type such as String or integer etc, that has a standard representation, the attribute value will be a URL that would allow you to get the information needed. This could be the case for other APIs too. So, I am not aware of an API that would provide all data in one go.
One other answer
![](http://jazz.net/_images/myphoto/4084d7c0c28d175c20262e1c5f773803.jpg)
Comments
![](http://jazz.net/_images/myphoto/4084d7c0c28d175c20262e1c5f773803.jpg)
Sorry I forgot to specify the end point I was calling. I was calling the resources end point. I'll try calling the text endpoint, thanks. Also, for parameters such as resourceURI and moduleURI which are used in many of the API calls at https://jazz.net/wiki/bin/view/Main/DNGReportableRestAPI, what is the maximum amount of URIs that can be passed into those parameters? Asking because want to know what the limit is before have to make a separate API call.
![](http://jazz.net/_images/myphoto/155c3d4adb1050c9fad99139dab14b77.jpg)
![](http://jazz.net/_images/myphoto/4084d7c0c28d175c20262e1c5f773803.jpg)
Thanks for your responses. I have a few more questions.
- How do I programmatically get resourceURIs and moduleURIs given that I have the artifact ID? Right now I only know how to get these manually.
- How do I programmatically get the desired configuration URL for the oslc_config.context parameter given I know the global configuration stream name?
- Are there any examples of how to programmatically call API's? For example, values needed for header, any sort of values/cookies/tokens needed to provide to the API for authentication, etc? Right now I've just been calling these APIs manually by copying the URL into the browser.
![](http://jazz.net/_images/myphoto/155c3d4adb1050c9fad99139dab14b77.jpg)
![](http://jazz.net/_images/myphoto/4084d7c0c28d175c20262e1c5f773803.jpg)
When I call the text endpoint (For example: https://server//rm/publish/text?resourceURI=resourceURI1,resourceURI2&oslc_config.context=configContext) it returns raw, unstructured text instead of XML which is unfavorable for processing. However if I call the schema for the text endpoint, https://server/rm/publish/text?metadata=schema, the schema it returns is structured XML so I'm confused as to why the text endpoint is returning raw text
![](http://jazz.net/_images/myphoto/155c3d4adb1050c9fad99139dab14b77.jpg)
1 vote
![](http://jazz.net/_images/myphoto/4084d7c0c28d175c20262e1c5f773803.jpg)
I got it to work now using Postman and I get back XML; I forgot to specify XML in the header. Thanks for all your responses. You mentioned that "the default page size is 100 and that can change this number as part of the call but there's a hard limit set on the server so anything larger will be ignored"
- How do I change the default page size when calling the API? I don't see anywhere on https://jazz.net/wiki/bin/view/Main/DNGReportableRestAPI where it is specified how to specify the page size in the API call.
- How do I determine how many remaining pages there are for results returned by an API, as well as how to grab the next change? Also didn't see this specified in the documentation.
- What is the hard limit set on the page size for Doors Next Generation 7.0.3 server?
![](http://jazz.net/_images/myphoto/155c3d4adb1050c9fad99139dab14b77.jpg)
1 vote
![](http://jazz.net/_images/myphoto/4084d7c0c28d175c20262e1c5f773803.jpg)
"If you're not using GCM or Local CM, you can leave off the context for many of the calls. IF you are then that's a new discussion."
![](http://jazz.net/_images/myphoto/155c3d4adb1050c9fad99139dab14b77.jpg)
![](http://jazz.net/_images/myphoto/4084d7c0c28d175c20262e1c5f773803.jpg)
I appreciate all your help. Building a dashboard widget that can go on the mini dashboard in the RM application or on a project area dashboard. The goal is to create a dashboard widget that will allow users to compare all the artifacts in a specific module in one stream with all the artifacts of that same module in another stream and then see the differences. That's why I asked the above questions regarding how to get all details for all artifacts that are in a specific module via API calls via the "resource" DNG Reportable API and "text" DNG Reportable API. I know that you can compare streams within DNG, but we want to implement our own "comparison widget" due to the desire for additional functionality that is not in DNG's stream comparison functionality.
![](http://jazz.net/_images/myphoto/155c3d4adb1050c9fad99139dab14b77.jpg)
![](http://jazz.net/_images/myphoto/155c3d4adb1050c9fad99139dab14b77.jpg)
1 vote
![](http://jazz.net/_images/myphoto/4084d7c0c28d175c20262e1c5f773803.jpg)
We are aware of Softacus' widget. We are actually trying to emulate that. Unfortunately we can't use Softacus' widget due to security reasons, which is why we are trying to create our own.
![](http://jazz.net/_images/myphoto/4084d7c0c28d175c20262e1c5f773803.jpg)
Your mention of the client extension API made me realize that I can probably use https://jazz.net/wiki/bin/view/Main/RMExtensionsAPI703#GetContentsAttributes or https://jazz.net/wiki/bin/view/Main/RMExtensionsAPI703##GetContentsStructure for getting all artifact information within the selected module for the current configuration and then use the Reportable REST API to get the information for the configuration that will be comparing to. Do you know if using the client API to get all artifact information within the selected module in the current configuration would be faster than using the Reportable REST API ?
![](http://jazz.net/_images/myphoto/4084d7c0c28d175c20262e1c5f773803.jpg)
Also, I'm assuming that there's no way for me to test using the client API on my local machine since that requires the library for the client extension that is passed into widgets via DNG's OpenSocial framework?
![](http://jazz.net/_images/myphoto/155c3d4adb1050c9fad99139dab14b77.jpg)
1 vote
![](http://jazz.net/_images/myphoto/4084d7c0c28d175c20262e1c5f773803.jpg)
Thanks for all your help. There was some prior analysis done beforehand that concluded that we can't use the Softacus widget, and that we have to create the widget ourselves.
![](http://jazz.net/_images/myphoto/155c3d4adb1050c9fad99139dab14b77.jpg)
You are using Javascript in the browser, which is single threaded, so you have no choice there. You also have to fetch the next page with the URL supplied in the previous call because there's a transaction for the fetches kept on the server in order to keep track of where you're up to
![](http://jazz.net/_images/myphoto/4084d7c0c28d175c20262e1c5f773803.jpg)
After testing calling the reportable API for getting artifact data that is within a specified module, looks like the maximum page size for our server is set to 1000. Since I now know what the maximum page size is, was going to use multiple threads to request pages simultaneously in the backend logic since based on that I could technically construct API requests to get different pages. When a request returns 0 results then that would indicate that there is no data for that page. The caveat with this approach is that if the maximum page size ever changes to another value other than 1000, then it would be very error prone so I see why you mentioned just using the URL supplied in the previous call. The problem is that our modules have thousands of artifacts, so doing it that way sequentially takes a few minutes. Do you know if the "maximum page size" for API call could potentially change in the future, or is it a safe assumption to assume that the maximum page size will remain the same? Is that a configuration setting that we can configure to never change?
![](http://jazz.net/_images/myphoto/155c3d4adb1050c9fad99139dab14b77.jpg)
1 vote
![](http://jazz.net/_images/myphoto/4084d7c0c28d175c20262e1c5f773803.jpg)
- Discovered that using the Reportable Rest API, specifically the text endpoint, for pulling all artifact data inside of a module via a call like https://server/rm/publish/text?moduleURI=module&oslc_config.context=config&size=1000&pos=0 takes a long time if there are a lot of artifacts in the module. For example, we have a module that has 1660 artifacts and the API call above for pulling the first 1000 takes about 1 min 40s, and the total time to get data for all 1660 artifacts is about 2 minutes and 20s. Is there a faster/more efficient way to pull artifact data? Is there a different API for pulling this data that is better regarding performance? We just need to retrieve the attributes' values and primary text.
- I didn't see any mention on Reportable Rest API, but I'm assuming there's no way to include a parameter in the calls to specify if only want to retrieve specific attribute values?