Querying /v2/find with multiple names

Currently there’s two ways to search for snaps:

  1. Using /v2/find?q=query to search with keywords.
  2. Using /v2/find?name=foo to get store information for a particular snap.

Inside GNOME Software we often need to get store metadata for installed snaps. To do this we call /v2/find?name=foo for each snap. This means multiple round-trips to the store.

It would be nice to be able to use find with multiple names, e.g. /v2/find?name=foo,bar,baz and have that return three results. Any reason not to do this? Does the store have an appropriate API?

@natalia - does the store support queries like this?

What is the store metadata you’re needing to get for installed snaps?

Ideally it would be the same as for the other /v2/find queries. The most important data is the screenshots.

At the Ubuntu Rally we discussed that it was likely in the future that /v2/snaps would return information from both the local snap YAML and store information (e.g. screenshots). snapd would then be responsible in caching store information to make this possible. If that change occurs this makes this feature less useful.

This is tangentially related Mechanisms for converging store and snap metadata
but the conversation went around the fact that screenshots and such would be part of the snap’s meta.