If you try it on a more modern version of snapd curl (in 2025), you will get an error:
$ curl -s --unix-socket /run/snapd.socket 'http:/v2/find?name=juju' | jq
{
"type": "error",
"status-code": 404,
"status": "Not Found",
"result": {
"message": "not found"
}
}
To fix this, you need to run this command instead (adding /localhost
in the appropriate place), according to this resource:
curl -s --unix-socket /run/snapd.socket 'http://localhost/v2/find?name=juju' | jq