Official repositories web interface: Difference between revisions

From ArchWiki
m (Fix zh-hans link since the page was moved + order translations alphabetically)
m (Fixing URLs and routes to better match proper usage)
 
(5 intermediate revisions by 2 users not shown)
Line 3: Line 3:
[[ja:公式リポジトリウェブインターフェイス]]
[[ja:公式リポジトリウェブインターフェイス]]
[[zh-hans:Official repositories web interface]]
[[zh-hans:Official repositories web interface]]
[[pt:Official repositories web interface]]
{{Expansion|This API does not have any other documentation: if you have knowledge of Django, please help adding any missing functionalities by looking at the [https://github.com/archlinux/archweb/tree/master/packages/views/search.py source code].}}
{{Expansion|This API does not have any other documentation: if you have knowledge of Django, please help adding any missing functionalities by looking at the [https://github.com/archlinux/archweb/tree/master/packages/views/search.py source code].}}
{{Related articles start}}
{{Related articles start}}
{{Related|Aurweb RPC interface}}
{{Related|Aurweb RPC interface}}
{{Related articles end}}
{{Related articles end}}
This article provides documentation for the web interface through which it is possible to query the official repositories and obtain results in JSON format.
This article provides documentation for the web interface through which it is possible to query the official repositories and obtain results in JSON format.


== Package information ==
== Package information ==


Base URL: {{ic|<nowiki>https://www.archlinux.org/packages/</nowiki>}}
Base URL: {{ic|<nowiki>https://archlinux.org/packages/</nowiki>}}


=== Details ===
=== Details ===


Syntax: {{ic|/''repository''/''architecture''/''package''/json}}
Syntax: {{ic|/''repository''/''architecture''/''package''/json/}}


Example: https://archlinux.org/packages/core/x86_64/coreutils/json/
Example: https://archlinux.org/packages/core/x86_64/coreutils/json/
Line 23: Line 22:
=== Files ===
=== Files ===


Syntax: {{ic|/''repository''/''architecture''/''package''/files/json}}
Syntax: {{ic|/''repository''/''architecture''/''package''/files/json/}}


Example: https://archlinux.org/packages/core/x86_64/coreutils/files/json/
Example: https://archlinux.org/packages/core/x86_64/coreutils/files/json/
Line 31: Line 30:
The interface supports the same query parameters as the [https://archlinux.org/packages/ HTML search form], except for {{ic|sort}}.
The interface supports the same query parameters as the [https://archlinux.org/packages/ HTML search form], except for {{ic|sort}}.


Base URL: {{ic|<nowiki>https://www.archlinux.org/packages/search/json</nowiki>}}
Base URL: {{ic|<nowiki>https://www.archlinux.org/packages/search/json/</nowiki>}}


=== Name or description ===
=== Name or description ===
Line 57: Line 56:
Parameter: {{ic|repo}}
Parameter: {{ic|repo}}


Values: {{ic|Core}}, {{ic|Extra}}, {{ic|Testing}}, {{ic|Multilib}}, {{ic|Multilib-Testing}}, {{ic|Community}}, {{ic|Community-Testing}}
Values: {{ic|Core}}, {{ic|Core-Testing}}, {{ic|Extra}}, {{ic|Extra-Testing}}, {{ic|Multilib}}, {{ic|Multilib-Testing}}.


Example: https://archlinux.org/packages/search/json/?q=cursor&repo=Community&repo=Extra
Example: https://archlinux.org/packages/search/json/?q=cursor&repo=Core&repo=Extra


=== Architecture ===
=== Architecture ===
Line 67: Line 66:
Parameter: {{ic|arch}}
Parameter: {{ic|arch}}


Values: {{ic|any}}, {{ic|i686}}, {{ic|x86_64}}
Values: {{ic|any}}, {{ic|x86_64}}


Example: https://archlinux.org/packages/search/json/?q=cursor&arch=any&arch=x86_64
Example: https://archlinux.org/packages/search/json/?q=cursor&arch=any&arch=x86_64
Line 75: Line 74:
Parameter: {{ic|maintainer}}
Parameter: {{ic|maintainer}}


Example: https://archlinux.org/packages/search/json/?repo=Community&maintainer=orphan
Example: https://archlinux.org/packages/search/json/?repo=Extra&maintainer=orphan


=== Packager ===
=== Packager ===

Latest revision as of 22:01, 27 January 2024

This article or section needs expansion.

Reason: This API does not have any other documentation: if you have knowledge of Django, please help adding any missing functionalities by looking at the source code. (Discuss in Talk:Official repositories web interface)

This article provides documentation for the web interface through which it is possible to query the official repositories and obtain results in JSON format.

Package information

Base URL: https://archlinux.org/packages/

Details

Syntax: /repository/architecture/package/json/

Example: https://archlinux.org/packages/core/x86_64/coreutils/json/

Files

Syntax: /repository/architecture/package/files/json/

Example: https://archlinux.org/packages/core/x86_64/coreutils/files/json/

Package search

The interface supports the same query parameters as the HTML search form, except for sort.

Base URL: https://www.archlinux.org/packages/search/json/

Name or description

Parameter: q

Example: https://archlinux.org/packages/search/json/?q=pacman

Exact name

Parameter: name

Example: https://archlinux.org/packages/search/json/?name=coreutils

Description

Parameter: desc

Example: https://archlinux.org/packages/search/json/?desc=pacman

Repository

It is possible to use this parameter more than once in order to search in more than one repository (but note that omitting it altogether will search in all repositories).

Parameter: repo

Values: Core, Core-Testing, Extra, Extra-Testing, Multilib, Multilib-Testing.

Example: https://archlinux.org/packages/search/json/?q=cursor&repo=Core&repo=Extra

Architecture

It is possible to use this parameter more than once in order to search for more than one architecture (but note that omitting it altogether will search for all architectures).

Parameter: arch

Values: any, x86_64

Example: https://archlinux.org/packages/search/json/?q=cursor&arch=any&arch=x86_64

Maintainer

Parameter: maintainer

Example: https://archlinux.org/packages/search/json/?repo=Extra&maintainer=orphan

Packager

Parameter: packager

Flagged

Parameter: flagged

Values: Flagged, Not+Flagged

Example: https://archlinux.org/packages/search/json/?arch=x86_64&flagged=Flagged

See also