How to get with API a branch name containing slashes

I am trying to get a single branch in Postman using info from:

When the branch name is single word like ‘master’ the GET operation returns correctly the branch info.
For example something like “” works fine.
But when the name of branch contains slashes like ‘my/test/master’:
the response is:
“error”: “404 Not Found”
How should I write the name of the branch in order to get the proper response?

I think you should do “percent encoding” to the branch name.
Every programming language has something like “URL encoder/decoder”, e.g. Python3 has urllib.parse.quote_plus()

generically, refer to RFC 3986

I tried with “” but the response was:
400 Bad Request

If your branch name is my/branch,
Put it into url encoding lib, and it will become: my%2Fbranch

Whatever language you are using to interact with gitlab API, if it has http client, it has a url encoding ability.

You can try this online:

I tried “” and it worked ok -in Powershell and in Postman also.
Thanks a lot for your help!