How to access DNG artifact history using the REST API?
![]()
Hi
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
![]()
Adding parameter "history=true" works for me, I have tested on DNG version 5.0.2 and 6.0 RC1.
Pierre Bentkowski selected this answer as the correct answer
|
3 other answers
![]()
Hi Pierre Bentkowski
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
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.
@Ivan Bravo Should the "history=true" be documented in the wiki? It will make it easier for all to find the references there.
|
![]() 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. |
![]() Has anyone figured this out?
I can't seem to get the data previous version from the API. If i copy and paste that revision link into the browser I can see it, but it returns a 410 Gone from the API view.
|
Comments
I can see the same thing. Probably contact Support to get it investigated.