Project url change after repository rename

Rokas Kupstys's Avatar

Rokas Kupstys

15 May, 2019 01:24 PM

At some point i renamed my repository to I also renamed appveyor project, but it is still available under url. Is it possible to make project use url?


  1. Support Staff 1 Posted by Owen McDonnell on 15 May, 2019 03:47 PM

    Owen McDonnell's Avatar

    Yes, you can use this REST API call.
    Here is a sample script.

    $token = '<your_appveyor_api_token>'
    $headers = @{
      "Authorization" = "Bearer $token"
      "Content-type" = "application/json"
    $response = Invoke-RestMethod -Uri '<your_account_name>/<current_project_slug>/settings' -Headers $headers -Method Get
    Invoke-RestMethod -Uri '' -Headers $headers -Method PUT -Body ($response.settings | convertto-json -depth 5)
  2. 2 Posted by Rokas Kupstys on 17 May, 2019 04:05 PM

    Rokas Kupstys's Avatar

    If i try suggested command it errors out about missing project. My project is already named rbfx, only url contains old slug. Screenshot attached.

  3. Support Staff 3 Posted by Owen McDonnell on 17 May, 2019 05:56 PM

    Owen McDonnell's Avatar

    So your version of the script i offered contains,

    '' -Headers $headers -Method Get

    which gives an error?

  4. 4 Posted by Rokas Kupstys on 18 May, 2019 08:04 AM

    Rokas Kupstys's Avatar

    That is right. I copied token from and output i get is:

    Invoke-RestMethod : {"message":"Project not found or access denied."}
    At C:\Users\Administrator\Desktop\rename.ps1:11 char:1
    + Invoke-RestMethod -Uri '' -Header ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
        + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
  5. Support Staff 5 Posted by Owen McDonnell on 18 May, 2019 05:35 PM

    Owen McDonnell's Avatar

    Is it a v1 key (account specific - as in screenshot) or v2 key (all accounts)?

  6. 6 Posted by Rokas Kupstys on 19 May, 2019 07:23 AM

    Rokas Kupstys's Avatar

    I tried both keys which resulted in same error. However i noticed just now that url slug changed and i can now access project through URL. I assume you fixed it somehow, so thank you very much.

  7. Support Staff 7 Posted by Owen McDonnell on 20 May, 2019 03:47 AM

    Owen McDonnell's Avatar

    Nope... i did nothing.

    Perhaps you made the request twice but didn't realize it the first time, so the second time it failed since there was no longer a matching slug?

  8. Ilya Finkelshteyn closed this discussion on 20 Jul, 2019 09:01 PM.

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

Keyboard shortcuts


? 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