Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket REST API parameter "filterText" whole/exact word

Sebastien Ashby
Contributor
June 26, 2023

Hi,

I am using the following Bitbucket REST API:

Specifically:

  • /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/branches

Said API has the following parameter:

  • parameter : filterText
  • value: string
  • description: the text to match on
My problem is that the returned branches are those whose name CONTAINS the value of the "filterText" parameter.
Whereas I seek to get only the branch whose name is EXACTLY the value of the "filterText" parameter.

Please help.

Thanks

S.

1 answer

1 accepted

1 vote
Answer accepted
Sebastien Ashby
Contributor
June 26, 2023

Hi,

Answering my own question.
API has the following parameter:

  • parameter : boostMatches
  • value: boolean
  • description: controls whether exact and prefix matches will be boosted to the top

If an exact match is found, it will be the first element returned.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events