Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Vesta CLI
  • Search

Documentation about [FORMAT] ? Topic is solved

Questions regarding the Command Line Interface
CLI
Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
Spheerys
Posts: 225
Joined: Tue Dec 29, 2015 12:36 pm

Os: Debian 7x
Web: apache + nginx
Documentation about [FORMAT] ?
  • Quote

Post by Spheerys » Wed Jul 11, 2018 2:39 pm

Hi,

I wonder what the [FORMAT] option on CLI is it for and how to use it.
Where is the doc about this ?

Example :

Code: Select all

Usage: v-list-mail-accounts USER DOMAIN [FORMAT]
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: Documentation about [FORMAT] ?
  • Quote

Post by skamasle » Sun Jul 15, 2018 8:31 pm

Format maybe PLAIN or JSON and not remember if there are third option, but is just for do a format in the output text, you can use plan for cli, but vesta use JSON from php
Top

Spheerys
Posts: 225
Joined: Tue Dec 29, 2015 12:36 pm

Os: Debian 7x
Web: apache + nginx
Re: Documentation about [FORMAT] ?
  • Quote

Post by Spheerys » Mon Jul 16, 2018 8:57 pm

Can you please give an example of valid json format ?
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: Documentation about [FORMAT] ?
  • Quote

Post by skamasle » Wed Aug 29, 2018 4:25 pm

Spheerys wrote: ↑
Mon Jul 16, 2018 8:57 pm
Can you please give an example of valid json format ?

Code: Select all

# /usr/local/vesta/bin/v-list-web-domains admin json
{
    "tests.home": {
        "IP": "200.31.13.63",
        "IP6": "",
        "U_DISK": "0",
        "U_BANDWIDTH": "0",
        "TPL": "default",
        "ALIAS": "www.tests.home",
        "STATS": "",
        "STATS_USER": "",
        "SSL": "no",
        "SSL_HOME": "same",
        "LETSENCRYPT": "no",
        "FTP_USER": "",
        "FTP_PATH": "",
        "AUTH_USER": "",
        "BACKEND": "",
        "PROXY": "default",
        "PROXY_EXT": "jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls,exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav,bmp,rtf,js,mp3,avi,mpeg,flv,html,htm",
        "SUSPENDED": "no",
        "TIME": "09:19:27",
        "DATE": "2018-08-29"
    }
}
Top

Emma32
Posts: 2
Joined: Thu Jul 04, 2019 2:50 pm

Os: Debian 9x
Web: apache
Re: Documentation about [FORMAT] ?
  • Quote

Post by Emma32 » Fri Aug 09, 2019 10:35 am

skamasle wrote: ↑
Wed Aug 29, 2018 4:25 pm
Spheerys wrote: ↑
Mon Jul 16, 2018 8:57 pm
Can you please give an example of valid json format ?

Code: Select all

# /usr/local/vesta/bin/v-list-web-domains admin json
{
    "tests.home": {
        "IP": "200.31.13.63",
        "IP6": "",
        "U_DISK": "0",
        "U_BANDWIDTH": "0",
        "TPL": "default",
        "ALIAS": "www.tests.home",
        "STATS": "",
        "STATS_USER": "",
        "SSL": "no",
        "SSL_HOME": "same",
        "LETSENCRYPT": "no",
        "FTP_USER": "",
        "FTP_PATH": "",
        "AUTH_USER": "",
        "BACKEND": "",
        "PROXY": "default",
        "PROXY_EXT": "jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls,exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav,bmp,rtf,js,mp3,avi,mpeg,flv,html,htm",
        "SUSPENDED": "no",
        "TIME": "09:19:27",
        "DATE": "2018-08-29"
    }
}
Top

fedekrum
Posts: 49
Joined: Mon May 12, 2014 7:45 pm

Os: Ubuntu 15x
Web: apache + nginx
Re: Documentation about [FORMAT] ?
  • Quote

Post by fedekrum » Sat Sep 28, 2019 9:33 am

There are 3 kind of outputs for the listings:
  • shell (default)
  • plain
  • json
If you don't specify any parameter or specify 'shell':

Code: Select all

v-list-mail-accounts user domain.com

ACCOUNT  ALIAS  FWD  DISK  DATE
-------  -----  ---  ----  ----
info     no     no   0     2019-09-28
sales    no     no   0     2019-09-28
news     no     no   0     2019-09-28
with "plain" parameter:

Code: Select all

v-list-mail-accounts user domain.com plain

info				no	unlimited	0	no	06:21:14	2019-09-28
sales				no	unlimited	0	no	06:21:35	2019-09-28
news				no	unlimited	0	no	06:22:06	2019-09-28
with "json" parameter:

Code: Select all

v-list-mail-accounts user domain.com json

{
    "info": {
        "ALIAS": "",
        "FWD": "",
        "FWD_ONLY": "",
        "AUTOREPLY": "no",
        "QUOTA": "unlimited",
        "U_DISK": "0",
        "SUSPENDED": "no",
        "TIME": "06:21:14",
        "DATE": "2019-09-28"
    },
    "sales": {
        "ALIAS": "",
        "FWD": "",
        "FWD_ONLY": "",
        "AUTOREPLY": "no",
        "QUOTA": "unlimited",
        "U_DISK": "0",
        "SUSPENDED": "no",
        "TIME": "06:21:35",
        "DATE": "2019-09-28"
    },
    "news": {
        "ALIAS": "",
        "FWD": "",
        "FWD_ONLY": "",
        "AUTOREPLY": "no",
        "QUOTA": "unlimited",
        "U_DISK": "0",
        "SUSPENDED": "no",
        "TIME": "06:22:06",
        "DATE": "2019-09-28"
    }
}
Hope it helps !
Top


Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “CLI”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password