How to find value "Branched from" with Crucible REST API?

319 Views Asked by At

Is a way to get the same value which is shown in Crucible "details" page of a review as "Branched from" value? It's branch from which was cloned branch of the review (Git). How to find it with REST API? I see only these docs and this and can't find needed API call. I suspected it can be "rest-service-fe/revisionData-v1/revisionInfo/" call, but it returns 404 all the time... And I'm not sure that it is needed call even, because no any "branches" in its response actually.

1

There are 1 best solutions below

0
On

it's the API was never marked as public one therefore it's not listed on the pages you've pointed, however it has never changed and I don't think it ever will.

You can get list of tracked branches for a review by using this URL: FISHEYE_URL/rest/branchreview/latest/trackedbranch/$REVIEW_ID You'll get a JSON list of tracked branches and the fields you're after are:

  • reviewedBranch
  • baseBranch

It's branch from which was cloned branch of the review (Git)

Note that branches in Git are not clones one of another. Those are basically pointers to a commit. Fisheye&Crucible will show you the diff between reviewedBranch (and being more specific lastChangesetId) the and baseBranch.