Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Dev Section Scripting / API
  • Search

Obtain the list of system domains

Questions regarding the API
Application Programming Interface
Locked
  • Print view
Advanced search
7 posts • Page 1 of 1
www.rinku31
Posts: 21
Joined: Thu Jun 04, 2015 9:22 am

Obtain the list of system domains

Post by www.rinku31 » Wed Mar 09, 2016 2:11 pm

I can see, their are two commands available to display domain:
1. v-list-web-domain
2. v-list-web-domains

i need to pass user name to retrieve domain list.

I want to obtain the list of system domains without detailed information.

As v-list-sys-users retrieve system users without detailed information.

Just similarly, i want to obtain the list of system domains without detailed information.

Please help.
Top

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

Re: Obtain the list of system domains

Post by skamasle » Wed Mar 09, 2016 6:58 pm

Try

Code: Select all

v-list-web-domains admin |cut -d " " -f1
Top

www.rinku31
Posts: 21
Joined: Thu Jun 04, 2015 9:22 am

Re: Obtain the list of system domains

Post by www.rinku31 » Thu Mar 10, 2016 3:47 pm

This will return all domains of only admin.

i want to list all domains without detailed information.
Top

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

Re: Obtain the list of system domains

Post by skamasle » Thu Mar 10, 2016 8:59 pm

Remove admin from comand:

Code: Select all

v-list-web-domains  |cut -d " " -f1
Top

www.rinku31
Posts: 21
Joined: Thu Jun 04, 2015 9:22 am

Re: Obtain the list of system domains

Post by www.rinku31 » Thu Mar 17, 2016 5:59 am

Not working

Code: Select all

root@master:~# v-list-web-domains  |cut -d " " -f1
Error:
Usage:
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: Obtain the list of system domains

Post by tjebbeke » Thu Mar 17, 2016 8:47 am

Try something with this:

Code: Select all

v-list-users | tail -n +3 | awk '{print "v-list-web-domains "$1" | tail -n +3"}' | bash

or

v-list-users | tail -n +3 | awk '{print "v-list-web-domains "$1" | tail -n +3"}' | bash | awk '{ print $1}'
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Obtain the list of system domains

Post by skurudo » Fri Sep 23, 2016 12:47 pm

API documentation and examples:
http://vestacp.com/docs/API.pdf

CLI commands list and descriptions:
http://vestacp.com/docs/CLI.txt
Top


Locked
  • Print view

7 posts • Page 1 of 1

Return to “Scripting / API”



  • 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