How can I use a branch name which contains a forward slash in a Get request

weerayuth_r's Avatar

weerayuth_r

31 Oct, 2020 02:05 AM

My branch name has a forward slash e.g. test/homepage-feature

I want to use the following GET request to get the last branch build. When I use that, I'm getting 404 error "message": "Build not found or access denied."

GET /api/projects/{accountName}/{projectSlug}/branch/{buildBranch}

Could you please let me know if the GET request supports a branch which contains a forward slash?

Reference https://www.appveyor.com/docs/api/projects-builds/#get-project-last-branch-build ,

  1. Support Staff 1 Posted by Feodor Fitsner on 31 Oct, 2020 02:22 AM

    Feodor Fitsner's Avatar

    Have you tried test%2Fhomepage-feature?

  2. 2 Posted by weerayuth_r on 31 Oct, 2020 02:50 AM

    weerayuth_r's Avatar

    Yes, I have. It doesn't solve.

    {
        "message": "Build not found or access denied."
    }

  3. Support Staff 3 Posted by Feodor Fitsner on 31 Oct, 2020 02:55 AM

    Feodor Fitsner's Avatar

    OK, it works without an encode. Try this in your browser:

    https://ci.appveyor.com/api/projects/FeodorFitsner/simple-console/branch/feature/test-101
    
  4. 4 Posted by weerayuth_r on 31 Oct, 2020 04:30 AM

    weerayuth_r's Avatar

    Thanks Feodor.

    I have double-checked. It works for me now. The reason why it didn't work when I tried first time is because I cancelled the build of my branch after it's stuck in the queue.

    After I re-ran the build, the GET request is working with my branch.

  5. weerayuth_r closed this discussion on 31 Oct, 2020 04:30 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

18 Oct, 2021 12:38 PM
16 Oct, 2021 04:34 PM
15 Oct, 2021 08:29 PM
15 Oct, 2021 06:34 PM
13 Oct, 2021 03:47 PM

 

13 Oct, 2021 06:27 AM
13 Oct, 2021 05:54 AM
12 Oct, 2021 06:48 PM
12 Oct, 2021 06:47 PM
12 Oct, 2021 12:36 PM
11 Oct, 2021 10:05 AM