Github rest API for downloading gitea release assets missing some assets

I’ve got a small perl script to backup my gitea instance, download the latest release and install it. In the script, I’m trying to get a download link using the github rest API for a “linux-amd64” xz file for the latest release based on the URL

https://api.github.com/repos/go-gitea/gitea/releases/latest

This returns (abbreviated)

url	"https://api.github.com/repos/go-gitea/gitea/releases/48960628"
assets_url	"https://api.github.com/repos/go-gitea/gitea/releases/48960628/assets"
upload_url	"https://uploads.github.com/repos/go-gitea/gitea/releases/48960628/assets{?name,label}"
html_url	"https://github.com/go-gitea/gitea/releases/tag/v1.15.2"
id	48960628

This URL https://api.github.com/repos/go-gitea/gitea/releases/48960628/assets
doesn’t have all the assets that are listed in the URL for users to download files:
https://github.com/go-gitea/gitea/releases/tag/v1.15.2

None of the linux-amd64 assets are listed there.
I’m looking specifically for gitea-1.15.2-linux-amd64.xz which is here:

https://github.com/go-gitea/gitea/releases/download/v1.15.2/gitea-1.15.2-linux-amd64.xz

That URL is not in the assets link.

This has worked for me in the past. Is this a configuration issue in the gitea repo on github?

Likely it’s not being listed for pagination sake, we have a lot more assets.

I recommend instead referring to gitea | Gitea for download assets, it even has a json api. it’s curl -H "Accept: application/json" https://dl.gitea.io/gitea (ignore the latest field in the value though).