If found that snapd would return channel information when using /v2/find?name=moon-buggy
but not when using /v2/find?q=moon-buggy
. It appears this is due the store returning the channel information on one endpoint (/v1/snaps/details
) and not another (/v1/snaps/find
).
Can /v1/snaps/find
be modified to return the channel information?
$ curl 'https://api.snapcraft.io/api/v1/snaps/details/moon-buggy?fields=channel_maps_list' -H "accept: application/hal+json" -H "X-Ubuntu-Release: 16" -H "X-Ubuntu-Device-Channel: edge" -H "X-Ubuntu-Wire-Protocol: 1" -H "X-Ubuntu-Architecture: amd64"|jq
{
"channel_maps_list": [
{
"architecture": "amd64",
"map": [
{
"binary_filesize": 90112,
"channel": "stable",
"confinement": "strict",
"epoch": "0",
"info": "released",
"revision": 12,
"version": "1.0.51.11"
},
{
"channel": "candidate",
"info": null
},
{
"channel": "beta",
"info": null
},
{
"channel": "edge",
"info": null
}
],
"track": "latest"
}
],
"package_name": "moon-buggy"
}
$ curl 'https://api.snapcraft.io/api/v1/snaps/search?name=moon-buggy&fields=channel_maps_list' -H "accept: application/hal+json" -H "X-Ubuntu-Release: 16" -H "X-Ubuntu-Device-Channel: edge" -H "X-Ubuntu-Wire-Protocol: 1" -H "X-Ubuntu-Architecture: amd64"|jq
{
"_embedded": {
"clickindex:package": [
{
"channel_maps_list": [],
"package_name": "moon-buggy"
}
]
},
"_links": {
"self": {
"href": "http://api.snapcraft.io/api/v1/snaps/search?name=moon-buggy&fields=channel_maps_list"
}
}
}