vCenter record

/api/2.0/fo/auth/vcenter/

[POST]

Create, update, list and delete vCenter records for authenticating to ESXi hosts through vCenter. Note - To create a vCenter record using API, you need to first define the vCenter - ESXi mappings using the UI. Currently defining the mappings using API is not supported.

Input Parameters

Parameter

Description

action={action}

(Required) Specify create, update, delete (using POST) or list (using GET or POST). See List Auth Records for type

echo_request={0|1}

(Optional) Specify 1 to view (echo) input parameters in the XML output. By default these are not included.

ids={value}

(Required to update or delete record) Record IDs to update/delete. Specify record IDs and/or ID ranges (for example, 1359-1407). Multiple entries are comma separated.

title={value}

(Required to create record) A title for the record. The title must be unique. Maximum 255 characters (ascii).

comments={value}

(Optional to create or update record) User defined comments. Maximum of 1999 characters.

Login Credentials

 

username={value}

(Required to create record, optional to update record) The user name for a vCenter account. A maximum of 13 characters (ascii) may be specified.

password={value}

(To create record password or login_type=vault is required) The password for a vCenter account. Maximum 100 characters (ascii).

login_type={basic|vault|vcenter}

(To create record password or login_type=vault is required) Set to vault if a third party vault will be used to retrieve password. Vault parameters need to be provided in the record.

Click here for vault parameters

port={value}

(Optional) The service communicates with ESXi web services on port 443 and another port can be configured. When unspecified, port 443 is used.

hosts={value}

(Optional) A list of FQDNs for the hosts that correspond to all ESXi host IP addresses on which a custom SSL certificate signed by a trusted root CA is installed. Multiple hosts are comma separated.

ssl_verify={value}

(Optional) Specify "all" for a complete SSL certificate validation. Specify “skip” if the host SSL certificate is self-signed or uses an SSL certificate signed by a custom root CA. Specify “none” for no SSL verification.

Target Hosts

 

ips={value}

(Required to create record) The IP address(es) the server will log into using the record’s credentials. Multiple entries are comma separated.

(Optional to update record) IPs specified will overwrite existing IPs in the record, and existing IPs will be removed.

This parameter and the add_ips parameter or the remove_ips parameter cannot be specified in the same request.

add_ips={value}

(Optional to update record) Add IPs and/or ranges to the IPs list for this record.  Multiple IPs/ranges are comma separated.

This parameter and the ips parameter cannot be specified in the same request.

remove_ips={value}

(Optional to update record) IPs to be removed from your record. You may enter a combination of IPs and ranges. Multiple entries are comma separated.

This parameter and the ips parameter cannot be specified in the same request.

network_id={value}

(Optional to create or update record, and valid when the networks feature is enabled) The network ID for the record.

 

Sample - Create vCenter record

API request

curl -H "X-Requested-With:curl demo2" -u "user:password" -d "action=create&title=VCenter-Auth-Create API&ips=10.10.10.110&login_type=basic&port=80&username=username&password=password" "https://qualysapi.qualys.com/api/2.0/fo/auth/vcenter/"

XML output

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE BATCH_RETURN SYSTEM "https://qualysapi.qualys.com/api/2.0/batch_return.dtd">

<BATCH_RETURN>

  <RESPONSE>

    <DATETIME>2018-06-28T07:47:47Z</DATETIME>

    <BATCH_LIST>

      <BATCH>

        <TEXT>Successfully Created</TEXT>

        <ID_SET>

          <ID>179973</ID>

        </ID_SET>

      </BATCH>

    </BATCH_LIST>

  </RESPONSE>

</BATCH_RETURN>

DTDs for auth type "vCenter"

<platform API server>/api/2.0/batch_return.dtd

<platform API server>/api/2.0/fo/auth/vcenter/auth_vcenter_list_output.dtd