API get Instance details

Whilst
GET /1.0/instances?recursion=2
delivers very detailed information including recursion 2 of networks/snapshots/backups… which leads to a quite large output (depends on number instances in a project), a single instance query
GET /1.0/instances/containerx?recursion=2 is a little bit sparse.

When you need that depth of information for a single container, need to go through global output and fetch one single instance or do the below:

GET /1.0/instances/containerx?recursion=2
GET /1.0/instances/containerx/state?recursion=2
GET /1.0/instances/containerx/snapshotss?recursion=2
GET /1.0/instances/containerx/backups?recursion=2

It would be helpful, when GET /1.0/instances/containerx?recursion=2 would rather output similar to /1.0/instances?recursion=2 for one instance only.

Yes that would seem to make sense to me too, for consistency.

Please can you log an issue at https://github.com/lxc/lxd/issues

Thanks

1 Like