Q:

How to get a branch name of the commit in VSTS Rest API?

I'm trying to summit a build definition based on the branch of the commit. However, I cannot find anywhere related to branch information or reference information from the commit info API.
My request looks like this
https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/be67f8871a4d2c75f13a51c1d3c30ac0d74d4ef4?api-version=1.0

Response is exactly same as reference:
{
"parents": [],
  "treeId": "7fa1a3523ffef51c525ea476bffff7d648b8cb3d",
  "push": {
    "pushedBy": {
      "id": "8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
      "displayName": "Chuck Reinhart",
      "uniqueName": "fabrikamfiber3@hotmail.com",
      "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
      "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
    },
    "pushId": 1,
    "date": "2014-01-29T23:33:15.2434002Z"
  },
  "commitId": "be67f8871a4d2c75f13a51c1d3c30ac0d74d4ef4",
  "author": {
    "name": "Chuck Reinhart",
    "email": "fabrikamfiber3@hotmail.com",
    "date": "2014-01-29T23:32:09Z"
  },
  "committer": {
    "name": "Chuck Reinhart",
    "email": "fabrikamfiber3@hotmail.com",
    "date": "2014-01-29T23:32:09Z"
  },
  "comment": "First cut\n",
  "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/be67f8871a4d2c75f13a51c1d3c30ac0d74d4ef4",
  "remoteUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_git/Fabrikam-Fiber-Git/commit/be67f8871a4d2c75f13a51c1d3c30ac0d74d4ef4",
  "_links": {
    "self": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/be67f8871a4d2c75f13a51c1d3c30ac0d74d4ef4"
    },
    "repository": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249"
    },
    "changes": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/be67f8871a4d2c75f13a51c1d3c30ac0d74d4ef4/changes"
    },
    "web": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_git/Fabrikam-Fiber-Git/commit/be67f8871a4d2c75f13a51c1d3c30ac0d74d4ef4"
    },
    "tree": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/trees/7fa1a3523ffef51c525ea476bffff7d648b8cb3d"
    }
  }
}

How to get a branch name of the commit?
Reference
https://www.visualstudio.com/en-us/docs/integrate/api/git/commits#just-the-commit 

A:

No, there isn’t such REST API to get branch name by a commit. And it’s also unreachable, because a commit can belong more than one branches. Let’s illustrate by below graph:
A---B---E---F master
     \     /
      C---D   dev

This is a branch structure with master and dev branch. And dev branch merge into master with commit F. If you want to get the branch name based on commit D, you will get two branch names. Commit D belongs to two branch: dev (first parent) and master (second parent).
And if you want to get the branch name(s) contain the given commit, you can use git command:
git branch --contains <commit>

