caprover / caprover-cli

Command Line Interface for https://github.com/caprover/caprover
72 stars 40 forks source link

Return valid JSON for API commands #80

Closed thepandaguitar closed 3 years ago

thepandaguitar commented 3 years ago

Hi @githubsaturn,

I want to update the Container HTTP Port using API. I noticed that you need to send the whole app definition in order to do that. However, getting the app definition using caprover api returns text which is not convenient for using the data in subsequent calls.

Screen Shot 2021-01-29 at 15 22 18

Thank you @githubsaturn!

githubsaturn commented 3 years ago

You can specify the output to be a file:

CAPROVER_CONFIG_FILE='./config.json' caprover api -o output.json

If you do this, you only get the json response in the file

thepandaguitar commented 3 years ago

@githubsaturn Fantastic! Thank you so much for your help 💯