There’s GET /v2/connections
in the Snapd REST API (basically the same as snap connections --all
):
$ sudo curl -sS --unix-socket /run/snapd.socket http://localhost/v2/connections\?all \ ✔ 11:30:02
| jq
{
"type": "sync",
"status-code": 200,
"status": "OK",
"result": {
"established": [
{
"slot": {
"snap": "snapd",
"slot": "audio-playback"
},
"plug": {
"snap": "ardour",
"plug": "audio-playback"
},
"interface": "audio-playback"
[...]