It's all about the answers!

Ask a question

Can't get git commit details using RTC REST API


Emmet Clifford (111) | asked Aug 06 '20, 2:21 p.m.

I am trying to get git commit details as described here https://jazz.net/wiki/bin/view/Main/RTCGitApiForRetrievingCommitDetails, but not having success. 

When I use the RTC REST API to get the details of a workitem with a link to git commits the result includes something like:
"rtc_cm:com.ibm.team.git.workitem.linktype.gitCommit.gitcommit":[
{"oslc_cm:label":"The label",
"rdf:resource":"https:\/\/myjazzserver.ibm.com:9443\/jazz\/com.ibm.team.git.internal.resources.IGitResourceRestService\/commit?value=LongString300plusChars"}
]
I then try to get the details of the  commit by doing a GET of this 
but I get nothing back. What is the correct syntax/url to get the git commit details from RTC? 
Thanks.
 

One answer



permanent link
Alex Garcia (11) | answered Jan 30, 4:47 p.m.

Maybe I'm a bit late to the party, but here is what I've been able to figure out; the long string is a json > gzip > base64... to get it back you need to decode the base64 and decompress it... Guess I'm going the same path you did, but letting any other wondering soul find a solution to this.

Your answer


Register or to post your answer.