It's all about the answers!

Ask a question

Retrieving a specific node of dataSource Schema through OSLC


Stephen Valliere (231418) | asked May 07 '14, 11:22 a.m.
 I am looking at the Out of the Box RPE template called "printModuleBook.dta" (found in reports/templates/rrdg/). The views datasource is already configured in this template and there is a specific node I am interested in querying for through OSLC. "artifact/fields/field/value/div/_value" shows the contents that are actually rendered in the web interface.

Question:
Given a specific artifact/resource URI is there an OSLC request that will return this "div" value? When I select the resource with https://server:port/rm/publish/text?resourceURI=RESOURCEURI I get the div information, however this only works on text artifacts. Replacing "text" in the above URL with "resources" does not return this div information. What type do I use for normal embeded images?

I don't see a relevant type on this page: https://jazz.net/wiki/bin/view/Main/RRCReportableRestAPI

Any help is much appreciated.

2 answers



permanent link
Edgar Ignacio Velazquez Mar (7225) | answered May 08 '14, 10:28 a.m.
JAZZ DEVELOPER
 Hi Stephen,
 Module print uses an specific service designed for internal use since it's based on views.
 https://server:port/rm/publish/text?resourceURI=RESOURCEURI will return information about text based artifacts only including the main text.
 https://server:port/rm/publish/uiScketches?resourceURI=RESOURCEURI will return information about Scketches and it's content
and so on for the rest of the supported types. See https://jazz.net/wiki/bin/view/Main/RRCReportableRestAPI#Supported_artifact_formats

What you want is probably a hybrid for modules that works in a similar way to the printArtifact.dta and use as a data source configuration  https://server:port/rm/publish/resources?moduleURI=RESOURCEURI this will return all the elements within an specific module. From there you can modify and grab information from each of the elements just like the printArtifact.dta is doing

For querying via REST calls you will want to analyze how the printArtifact.dta works, that template got a GET to the  https://server:port/rm/publish/resources?resourceURI=RESOURCEURI to get generic information and then, depending the type of artifact it does a second call to the specific type service, for exmple in the case of a text based element it will do a call to  https://server:port/rm/publish/text?resourceURI=RESOURCEURI to get the content, if the artifact if of type Storyboard it will call  https://server:port/rm/publish/storyboards?resourceURI=RESOURCEURI and will retrieve the information from a different node.
All of this you can see it on the printArtifact.dta

Comments
Stephen Valliere commented May 08 '14, 10:37 a.m.

That is what I would like to do, however I don't see a type listed for "files". Artifacts that are just file attachments or pictures. How do I retrieve the file to be displayed in my report? It isn't a UI Sketch or a Storyboard.


permanent link
Donald Nong (14.5k414) | answered May 08 '14, 1:53 a.m.

Comments
Stephen Valliere commented May 08 '14, 10:40 a.m.

I have tried using the URI you mention, however that only returns a small amount of information about the artifacts that are in the module. I could use this to then query on each specific one, which would be fine, if I knew what type to use to get information about pictures and files. These artifacts are not listed on the https://jazz.net/wiki/bin/view/Main/RRCReportableRestAPI#Supported_artifact_formats

Which is why I am wondering how the dta template is able to retrieve that information.


Donald Nong commented May 09 '14, 1:52 a.m.

When you say "pictures and files", do you mean attachments? In this case, I don't think you can get them using the reportable REST API. Have you found a case in RRC where you can print out the attached pictures and files? The images in the sample project that can be printed out are sketches.
You can find out the "format" of an artifact by checking its "Format" attribute, literally.


Stephen Valliere commented May 12 '14, 8:10 a.m.

 Yes, using the built in RPE template for printing to PDF I have generated a document that includes the attached pictures. I have also modified this template to include our custom headers/footers and styles, and it still prints out the attached pictures. However through OSLC I am not able to get this information.

Your answer


Register or 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.