catalog

Search for packages

Changed on

Search the catalog(s) under the given criteria for matching packages.

Required Query Parameters:

  • system: The system architecture to search for (e.g., x86_64-linux)

Optional Query Parameters:

  • search_term: The search term to filter packages by
  • catalogs: Comma separated list of catalog names to search; defaults to all catalogs. Note: when searching base catalog, search_term is required.
  • sort: Result order. name-asc and name-desc sort alphabetically by attr_path, overriding relevance ranking. Omit to use the default order (sort_priority ASC, attr_path_length ASC, attr_path ASC).
  • page: Page number for pagination (default: 0)
  • pageSize: Page size for pagination (default: 10) Returns:
  • PackageSearchResult: A list of PackageInfoSearch items and total count
get/api/v1/catalog/search

Request

  • The document declares no server URL.
  • Auth
    • HTTP bearer
    • or HTTP basic

Query parameters

system'aarch64-darwin' | 'aarch64-linux' | 'x86_64-darwin' | 'x86_64-linux' | 'invalid' required
search_termstring nullable
catalogsstring nullable
sort'name-asc' | 'name-desc'

Alphabetical sort direction for search results.

When set, overrides the default relevance ranking with a case-insensitive alphabetical sort on attr_path. When absent, the default ordering (sort_priority ASC, attr_path_length ASC, attr_path ASC) is preserved.

pageinteger
pageSizeinteger

Response

A list of matching packages

total_countinteger required

Example response

{
  "items": [
    {
      "attr_path": "foo.bar.curl",
      "catalog": "nixpkgs",
      "description": "A very nice Item",
      "name": "curl",
      "pkg_path": "foo.bar.curl",
      "pname": "curl",
      "stabilities": [
        "stable",
        "unstable"
      ],
      "system": "x86_64-linux",
      "version": "1.0"
    }
  ],
  "total_count": 1
}

Changes

    • info

      added the new optional query request parameter sort

    • breaking

      the // response's property type changed from object to no type for status

    • breaking

      removed the required property /// from the response with the status

    • warning

      for the query request parameter page, the min was set to 0.00

    • warning

      for the query request parameter pageSize, the min was set to 0.00

    • warning

      removed the optional property /// from the response with the status

    • warning

      removed the optional property /// from the response with the status

    • info

      added to the // response property allOf list for the response status