How can I retrieve branch information for a specific commit using its commit ID?

In Bitbucket Server version, I’m trying to use the “get branch” API to retrieve branches containing a specific commitId. When querying the commitId merged into the default branch, it seems to only retrieve the default branch and not feature branches. Is there a way to address this issue and retrieve information about the feature branches as well?