Can't set external wiki url

Hey,
I was trying to set an external wiki url for my repository via api. Using Swagger the following curl command should edit my repository:

curl -X PATCH "http://localhost:3000/api/v1/repos/gitea/test" -H "accept: application/json" -H "authorization: Basic replace=" -H "Content-Type: application/json" -d "{ \"external_wiki\": { \"external_wiki_url\": \"https://test3.de\" }}"

But nothing changes. When navigating via browser to http://localhost:3000/gitea/test/settings, I’m able to change the external wiki uri manually.

//Edit:
Using gitea api: 1.1.1, gitea version: 1.13.0

Can you give me a hint, how I can change my external wiki url via api?

Thanks,
fi-do

1 Like

I am trying the exact same thing with Gitea version 1.23.8. Can anyone else confirm if this defect still exists? Below is a Power Script that I wrote for testing this. It does return, but it never seems to set the external Wiki. I am trying to do this for an organization repository.

$Owner = “Test-Organization”
$Repo = “test-repo-wiki”
$Token = “<api_key>”
$GiteaUrl = “http://localhost:3000/api/v1
$ExternalWikiUrl = “https://test.com/test

$Body = @{
has_wiki = $false
external_wiki = @{
external_wiki_url = $ExternalWikiUrl
}
} | ConvertTo-Json -Depth 3

Invoke-RestMethod -Uri "$GiteaUrl/repos/$Owner/$Repo"
-Method Patch -Headers @{ Authorization = "token $Token" }
-ContentType “application/json” `
-Body $Body

Are there other settings that I need to make sure are set? What am I missing?