Add a flag for commands to produce json output #621

Open
opened 2023-08-29 17:58:10 +00:00 by lgcl · 2 comments

For some commands, it would be nice to have the option to get the output as json. The commands I would find the most helpful are the ones displaying detailed information about the buckets, keys and layout, like

  • bucket list, bucket info
  • key list, key info
  • layout show

but others, like status, stats could also be nice.

(For some context, I am trying to write a script that ensures the layout, keys and buckets in garage match the ones I want and json output would be a nice way to retrieve the current state.)

For some commands, it would be nice to have the option to get the output as json. The commands I would find the most helpful are the ones displaying detailed information about the buckets, keys and layout, like - `bucket list`, `bucket info` - `key list`, `key info` - `layout show` but others, like `status`, `stats` could also be nice. (For some context, I am trying to write a script that ensures the layout, keys and buckets in garage match the ones I want and json output would be a nice way to retrieve the current state.)
Owner

In the meantime, you can use the admin api with curl

In the meantime, you can use the admin api with curl
Author

Thanks, that suggestion works very well for my use-case

Thanks, that suggestion works very well for my use-case
lx added the
kind
improvement
label 2023-09-04 12:52:51 +00:00
lx added the
action
for-newcomers
label 2023-10-16 09:37:54 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#621
No description provided.