Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How can I get only part of artifact data

Hi,


I need to get all DNG project artifacts.
I use the query:

But as my project include hundreds of modules and hundreds of thousands of artifacts the result is to big.


I would like to get all the artifacts links.

How can I get from each artifact only the <rrm:about> & <rrm:identifier> fields and its links?
I tried to add &linksonly=true but still got huge result.
 
(I need, at least, the GUID of all of the artifacts in the projects in as short as possible result).

The data I get is as below (This is only ONE artifact...)
I would like to filter (see inline in bold):
<ds:artifact attribute:itemId="_093d6388940f4b0cafc0a5dd7225efb3">
<rrm:title attribute:itemId="_KGfOcTZSEeiFD6SH9VyEqA">The use case begins when the JKE website is accessed.</rrm:title>
<rrm:description attribute:itemId="_KHes8TZSEeiFD6SH9VyEqA"/>
<rrm:identifier attribute:itemId="_KGUPUTZSEeiFD6SH9VyEqA">125</rrm:identifier>
<rrm:format attribute:itemId="_KHIHoTZSEeiFD6SH9VyEqA">Text</rrm:format>
<rrm:collaboration>
<rrm:creator attribute:itemId="_KGnxUTZSEeiFD6SH9VyEqA">
<rrm:title>clmadmin</rrm:title>
</rrm:creator>
<rrm:created attribute:itemId="_KHsIUTZSEeiFD6SH9VyEqA">2018-04-02T08:45:53.173+0000</rrm:created>
<rrm:modified attribute:itemId="_KGICETZSEeiFD6SH9VyEqA">2018-04-02T08:45:53.173+0000</rrm:modified>
<rrm:attributes>
<attribute:objectType attribute:itemId="_MJjSYTZSEeiFD6SH9VyEqA" attribute:name="Use Case Requirement" attribute:projectAreaItemId="_J5qTYDZSEeiFD6SH9VyEqA" attribute:projectAreaName="JKE Banking (Requirements Management)">
<attribute:customAttribute attribute:datatype="http://www.w3.org/2001/XMLSchema#int" attribute:isEnumeration="true" attribute:isMultiValued="false" attribute:itemId="_L6bRQTZSEeiFD6SH9VyEqA" attribute:literalId="_LttD4TZSEeiFD6SH9VyEqA#dd84ed1c-9786-469b-85a2-517388d6a09b" attribute:literalName="Approved" attribute:name="Status" attribute:value="2"/>
<attribute:customAttribute attribute:datatype="http://www.w3.org/2001/XMLSchema#int" attribute:isMultiValued="false" attribute:itemId="_KGUPUTZSEeiFD6SH9VyEqA" attribute:name="Identifier" attribute:value="125" attribute:valueTS=""/>
<attribute:customAttribute attribute:datatype="http://www.w3.org/2001/XMLSchema#int" attribute:isEnumeration="true" attribute:isMultiValued="false" attribute:itemId="_L4_G1jZSEeiFD6SH9VyEqA" attribute:literalId="_LunC0TZSEeiFD6SH9VyEqA#ac6775bd-d6c7-4ed5-8358-4dd199a6f9d1" attribute:literalName="Basic Flow" attribute:name="Use Case Property" attribute:value="2"/>
</attribute:objectType>
</rrm:attributes>
<rrm:comments>
</rrm:comments>
<rrm:revisions>
</rrm:revisions>
</rrm:collaboration>
<ds:location>
<ds:project>
<rrm:title>JKE Banking (Requirements Management)</rrm:title>
<rrm:description>The purpose of this project is to specify and manage the requirements of the JKE Business Recovery Matters project.</rrm:description>
</ds:project>
</ds:location>
<ds:moduleContext>
<rrm:contextBinding>
<rrm:identifier>125</rrm:identifier>
<rrm:title>The use case begins when the JKE website is accessed.</rrm:title>
<rrm:moduleDisplayName>2: Open an account (Module Example)</rrm:moduleDisplayName>
<rrm:section>3.0-2</rrm:section>
<rrm:bookOrder>15</rrm:bookOrder>
<rrm:depth>2</rrm:depth>
<rrm:isHeading>false</rrm:isHeading>
</rrm:contextBinding>
</ds:moduleContext>
<ds:traceability>
<ds:links>
<ds:Link type="Link">
<rrm:title>my_link_in</rrm:title>
<ds:isParentLink>false</ds:isParentLink>
<ds:isChildLink>false</ds:isChildLink>
<rrm:identifier>92</rrm:identifier>
<ds:content>
<rrm:title>A registered user will provide their secure profile content to access account information including the login and password.</rrm:title>
<rrm:identifier>92</rrm:identifier>
<rrm:description/>
<rrm:format>Text</rrm:format>
<ds:artifactFormat>Use Case Requirement</ds:artifactFormat>
</ds:content>
</ds:Link>
</ds:links>
</ds:traceability>
</ds:artifact>


Thanks,
Oded

0 votes



One answer

Permanent link

It appears that you are using DNG reportable REST API but "publish" is missing in your sample URL. If it is indeed the case, I am afraid you cannot do field selection (limit the attributes in the output). You'd better use pagination to ease the load on both the client and the server.
https://jazz.net/wiki/bin/view/Main/RRCReportableRestAPI#Pagination

BTW, getting all the artifacts is never a good idea.

1 vote

Comments
Is it possible to use paging in query of the format:




I also need to get all the base artifacts (i.e. all the artifacts with <nav:parent rdf:resource=....>;)
but if I add to the "oslc.select=rdf:about,dcterms:identifier" the selection of "nav:parent", it fails...

You need to be very careful with what API you are using because you can do different things with different APIs. If you want to get artifacts by folders, you need to use the folder query feature. As far as I know, you need to start from the root folder (you can find its URL in the services document). I have never tried pagination or field selection with the folder query though.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019
× 139

Question asked: Apr 04 '18, 3:06 p.m.

Question was seen: 2,232 times

Last updated: Apr 09 '18, 3:06 a.m.

Confirmation Cancel Confirm