Using the REST API to get the history for a file
Hi,
I am wondering whether your REST API (or even the Java API) is able to expose the history for a file? I've looked at this reports API, but it looks like it only describes the comment and the owner. If there's no API, is lscm compare the way forward?
I spotted another question which was asking exactly the same thing, but it never got an answer. Rather than reviving an old question, I thought I'd try again.
Thanks,
Peter
Accepted answer
There are scm rest calls for this but they aren't considered public API. They're subject to change so you'll have to be on top of new releases and test your rest calls.
For item history:
https://example.com:9443/ccm/service/com.ibm.team.scm.common.internal.rest.IScmRestService/history?workspaceItemId={workspace id}&componentItemId={component id}&oid=com.ibm.team.filesystem.FileItem/{item id}
If you omit the item id, it will retrieve the component history.
For item history:
https://example.com:9443/ccm/service/com.ibm.team.scm.common.internal.rest.IScmRestService/history?workspaceItemId={workspace id}&componentItemId={component id}&oid=com.ibm.team.filesystem.FileItem/{item id}
If you omit the item id, it will retrieve the component history.
Comments
Arkadiusz Kołodziejski
May 15 '13, 11:39 p.m.Krzysztof Kaźmierczyk
May 15 '13, 6:10 a.m.Stephane Leroy
JAZZ DEVELOPER May 15 '13, 11:40 p.m.Peter Weller
May 15 '13, 10:38 a.m.Peter Weller
May 15 '13, 10:38 a.m.