S
S
Sanes2018-09-08 10:43:03
linux
Sanes, 2018-09-08 10:43:03

Similar to lxc list --format=json in LXD API?

How can I get a list of containers with more detailed information through the API.
Known variant

curl -s -k --cert ~/.config/lxc/client.crt --key ~/.config/lxc/client.key https://127.0.0.1:8443/1.0/containers | jq .
{
  "type": "sync",
  "status": "Success",
  "status_code": 200,
  "operation": "",
  "error_code": 0,
  "error": "",
  "metadata": [
    "/1.0/containers/c1",
    "/1.0/containers/c2"
  ]
}

Need an analogue
lxc list --format=json

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sanes, 2018-10-06
@Sanes

/1.0/containers?recursion=1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question