Search by common id

We need to be able to query snap by common id. Now the common id is available as a snap app attribute, but we still need to be able to find them.

Both KDE Discover and Gnome Software need to be able to open urls such as appstream://org.something.something. I want to be able to offer the snap as an alternative.

Furthermore, in Discover we do have a feature to show the other sources of a package when on an application. I would like to also be able to offer Snaps.

2 Likes

Hi @niemeyer, @pedronis and @noise can we get some eyes on this?

Hello guys,

The lack of this functionality is blocking streamlined integration of snaps in KDE Discover. This can help improve the visibility and the user experience for KDE users querying software through the official frontend.

@niemeyer, @pedronis What would be the best way forward?

Work has actually started in the store about this. @cprov can tell more.

1 Like

@Igor, the Store search API endpoint will soon support filtering snaps by common-id (exact match), this feature will be also exposed in snapd /v2/find API.

It should cover the proposed use-case and once it’s released we can start exploring more options.

1 Like

@Igor, we have just released the new snapstore search API capable of filtering on contains this exact common_id:

$ curl -s "https://api.snapcraft.io/api/v1/snaps/search?common_id=org.kde.kcalc.desktop&fields=common_ids" | jq '._embedded["clickindex:package"]'
[
  {
    "common_ids": [
      "org.kde.kcalc.desktop"
    ],
    "package_name": "kcalc"
  }
] 

Snapd API work will follow, driven by @chipaca

1 Like

Thanks for the update.


fwiw

1 Like

and this followed by @robert.ancell with snapd-glib I suppose

that is my understanding, yes

1 Like

@sergiusens yes, will be implemented in snapd-glib.

#6635 has now landed and search functionality will be in snapd 2.39+.