archweb icon indicating copy to clipboard operation
archweb copied to clipboard

Create a real REST API for accessing package data

Open jelly opened this issue 6 years ago • 4 comments

Currently we have no real official REST API or consistent JSON API. We need to figure out what data we want to have easily query'able for users.

Current "API":

  • http://www.archlinux.org/packages/search/json/?q=$search term
  • https://www.archlinux.org/packages/$repo/$arch/$pkgname/json/
  • https://www.archlinux.org/packages/$repo/$arch/$pkgname/files/json/
  • https://www.archlinux.org/todo/$todoname/json
  • https://www.archlinux.org/packages/signoffs/json/
  • https://www.archlinux.org/mirrors/status/json/
  • https://www.archlinux.org/mirrors/status/tier/1/json/
  • https://www.archlinux.org/mirrors/locations/json/
  • https://www.archlinux.org/master-keys/json/
  • https://www.archlinux.org/releng/releases/json/

What's missing

  • A generic way to create a token and for example mark signoffs securely. arch-signoff now relies on doing http basic auth
  • Todo list overview endpoint https://www.archlinux.org/todo/json
  • Documentation
  • Performance

jelly avatar Feb 21 '19 17:02 jelly

may i help you with Django restframework? and maybe a little more detail about what you want?

behzadmehrabi avatar May 11 '20 10:05 behzadmehrabi

From task 57137, it would be nice to be able to query the last version of a bunch of packages, AUR provides such interface:

https://aur.archlinux.org/rpc/?v=5&type=info&arg[]=spotify&arg[]=pacaur

Right now the query has to be done per-package, which is extremely inefficient.

Other APIs provide similar queries, where you can get a specific attribute for a bunch of IDs, some limit the number, like 20.

For example:

http://www.archlinux.org/packages?ids=spotify,pacaur&attributes=version

felipec avatar Jan 24 '22 19:01 felipec

it's been a long time..., but I'm still willing to do it because I love the arch community :)

behzadmehrabi avatar Jan 24 '22 21:01 behzadmehrabi

I am willing to help as well. I've been writing REST APIs lately.

felipec avatar Jan 24 '22 22:01 felipec