How to access DNG artifact history using the REST API?
Referring to RRCReportableRestAPI
The generated schema for the base resources REST API contains a reference to history:
=> dataSource/artifact/aggregatedContent/history/changeLog/...
But when we run a query in a browser:
https://<server>:<port>/rm/publish/resources?resourceURI=<artifact_itemId>
there is no tag relative to the history like aggregatedContent
Is there a special query parameter that woudl allow access to the history of an artifact (base/core and module context)?
Regards
Accepted answer
3 other answers
Yes, there is an special query parameter that would allow access to the history of an artifact.
By adding the parameter history=true you will get history information for an artifact.
Example
https://<server>:<port>/rm/publish/resources?resourceURI=<artifact_itemid>&history=true;
Comments
Hello
That partially worked, at least we see there is a history tag.
I have an artifact with changes to the Primary Text. (no reviews or baseline)
I ran the query, with the history flag, as you indicated.
I get this:
....
<ds:aggregatedContent>
<history:history/>
</ds:aggregatedContent>
</ds:artifact>
</ds:dataSource>
The history section is empty.
Any ideas?
Regards
Make sure that you are checking the "base artifact", not the "module artifact", as the "primary text" is really an attribute of the "base artifact" and the "module artifact" is just a "wrapper" of the former.
IBM Support mention the use of the Specialized namespaces revisions.
i ran that query:
https://<server>:9444/rm/publish/revisions?resourceURI=<artifact id>&history=true
When I inspect the returned data, I get the following
<ds:content>
<revision:revision action="MODIFY">
<revision:title>
https://<server>:9444/rm/resources/<artifact id>?revision=<revision id>
</revision:title>
<revision:author>
https://<server>:9444/jts/users/rational
</revision:author>
<revision:id>
urn:uuid:_V_GlBOnJEeS3W-T9ISp6SQ
</revision:id>
<revision:updated>
2015-04-22T16:11:30.360+0000
</revision:updated>
</revision:revision>
if i want to access the actual changes, what should I do?
I looking into the <revision:title>
In the browser it present he associated change.
But when i try to use that data in the REST query format, I had no luck
Base on this:
https://<server>:9444/rm/resources/<artifact id>?revision=<revision id>
I tried many combination like this one
https://<server>:9444/rm/publish/resources?resourceURI=<revision id>
None returned meaningful data.
Any suggestions?
Comments
The revision and history are different but related. In the web GUI, "revision" is just what you see in the "Revisions" tab, while "history" is what you see in the "Audit History" tab. The revision link(s) may appear in the history content retrieved by adding the "history=true" parameter to the REST call.
Comments
Donald Nong
Apr 23 '15, 1:44 a.m.I can see the same thing. Probably contact Support to get it investigated.