Retrieving a specific node of dataSource Schema through OSLC
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
Since you're looking at "printModuleBook.dta", you should use https://server:port/rm/publish/modules?moduleURI=RESOURCEURI. I cannot find in the template the specific "node" that you mentioned though.
Comments
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