MySQL Record

For API version information, refer to the API Version History Section.

v2.0 | V3.0

V 2.0

GET POST/api/2.0/fo/auth/mysql/

Create, update, list and delete MySQL records for authenticated scans of MySQL Server instances. Vulnerability and compliance scans are supported (using VM, PC).

Requirement - You must configure authentication credentials on target hosts.

Download Qualys User Guide - MySQL Authentication (.zip)

Input ParametersInput Parameters

Parameter

Required/Optional

Data Type

Description

action={action}

Required String 

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

echo_request={0|1}

Optional Integer 

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 Integer 

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 String 

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

comments={value}

Optional to create or update record String 

User defined comments. Maximum of 1999 characters.

ssl_verify={0|1}

Optional to create or update record, and valid for server that supports SSL Integer 

Specify 1 for a complete SSL certificate validation.

- If unspecified (or ssl_verify=0), Qualys scanners authenticate with MySQL Servers that don't use SSL or MySQL servers that use SSL. However, in the SSL case, the server SSL certificate verification will be skipped.

- If ssl_verify=1, the Qualys scanners will only send a login request after verifying that a connection the MySQL server uses SSL, the server SSL certificate is valid and matches the scanned host.

hosts={value}

Optional to create or update record Integer 

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

database={value}

Required to create, optional to update record String 

The database name to authenticate. Specify a valid MySQL database name.

port={value}

Required to create, optional to update record Integer 

The port the database name is running on.

windows_config_file={value}

Optional to create or update record Path 

The path to the Windows MySQL config file. Access to this config file is required to run certain checks on Windows hosts.

unix_config_file={value}

Optional to create or update record Path 

The path to the Unix MySQL config file. Access to this config file is required to run certain checks on Unix hosts.

client_cert={value}

Optional to create or update record String 

PEM-encoded X.509 certificate. Specify if certificate authentication is required by your server to establish an SSL connection.

client_key={value}

Optional to create or update record Integer 

PEM-encoded RSA private key. Specify if certificate authentication is required by your server to establish an SSL connection.

Login Credentials

login_type={basic|vault} Optional Boolean  The login type is basic by default. Specify login_type=vault to use an authentication vault.

username={value}

Required to create record, optional to update record, when login_type=basic String 

The username of the account to be used for authentication. If password is specified this is the username of a MySQL account. If login_type=vault is specified, this is the username of a vault account.

password={value}

Required to create record, optional to update record, when login_type=basic String 

The password to be used for authentication to MySQL server. Maximum 100 characters (ascii).

Vault

vault_id={value}

Required only when action=create and login_type= vault Integer 

The ID of the vault you want to use.

vault_type={value}

Required only when action=create and login_type= vault Boolean 

The vault to be used for authentication. For MySQL authentication, valid values are: BeyondTrust PBPS, CyberArk AIM, CyberArk PIM Suite, Quest Vault, Thycotic Secret Server

{vault parameters}

Required only when action=create and login_type=vault Integer 

Vault specific parameters required depend on the vault type you've selected. See Vault Parameters

Target Hosts

ips={value}

Required to create record Integer 

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.

add_ips={value}

Optional to update record Integer 

Add IPs to the IPs list for this record. Multiple IPs/ranges are comma separated.

remove_ips={value}

Optional to update record Integer 

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 or member_domain 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 Integer 

The network ID for the record.

Sample - Create MySQL New RecordSample - Create MySQL New Record

API Request

curl -u "USERNAME:PASSWORD" -H "X-Requested-With: Curl" 
-X "POST" 
- d "action=create&title=NewMySQLRecord&username=USERNAME&password=<PA
SSWORD>&ips=10.10.31.84&echo_request=1&windows_config_file=c:\mysq
l\my.ini&port=22&database=mysql" 
"https://<qualys_base_url>/api/2.0/fo/auth/mysql/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BATCH_RETURN SYSTEM 
"https://<qualys_base_url>/api/2.0/batch_return.dtd">
<BATCH_RETURN>
 <RESPONSE>
 <DATETIME>2018-07-27T17:02:23Z</DATETIME>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BATCH_RETURN SYSTEM 
"https://<qualys_base_url>/api/2.0/batch_return.dtd">
<BATCH_RETURN>
 <RESPONSE>
 <DATETIME>2018-07-27T17:02:23Z</DATETIME>

Sample - Create MySQL Record Using VaultSample - Create MySQL Record Using Vault

API Request

curl -u "USERNAME:PASSWORD" -H "X-Requested-With: curl" -d "action=create&ips=10.10.10.181&username=USERNAME&title=NewMySQLRecord&ssl_verify=1&hosts=www.test.com&login_type=vault&vault_type=Thycotic Secret Server&vault_id=166638&secret_name=secret&comments=test comments&port=22&database=mysql&windows_config_file=c:\mysql\myu.ini" "https://<qualys_base_url>/api/2.0/fo/auth/mysql/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BATCH_RETURN SYSTEM "https://<qualys_base_url>/api/2.0/batch_return.dtd">
<BATCH_RETURN>
  <RESPONSE>
    <DATETIME>2018-07-17T21:14:05Z</DATETIME>
    <BATCH_LIST>
      <BATCH>
        <TEXT>Successfully Created</TEXT>
        <ID_SET>
          <ID>272380</ID>
        </ID_SET>
      </BATCH>
    </BATCH_LIST>
  </RESPONSE>
</BATCH_RETURN>

Sample - Update MySQL RecordSample - Update MySQL Record

API Request

curl -u "USERNAME:PASSWORD" -H "X-Requested-With: Curl" -X "POST" -d "action=update&ids=137296922&password=NEWPASSWORD""https://<qualys_base_url>/api/2.0/fo/auth/mysql/"

XML Output

<BATCH_RETURN>
    <RESPONSE>
        <DATETIME>2018-01-23T17:14:28Z</DATETIME>
        <BATCH_LIST>
            <BATCH>
                <TEXT>Successfully Updated</TEXT>
                <ID_SET>
                    <ID>137296922</ID>
                </ID_SET>
            </BATCH>
        </BATCH_LIST>
    </RESPONSE>
</BATCH_RETURN>

Sample - List MySQL RecordSample - List MySQL Record

API Request

curl -u "USERNAME:PASSWORD" -H "X-Requested-With: curl" -d "action=list&ids=284212" "https://<qualys_base_url>/api/2.0/fo/auth/mysql/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE AUTH_MYSQL_LIST_OUTPUT SYSTEM "https://<qualys_base_url>/api/2.0/fo/auth/mysql/auth_mysql_list_output.dtd">
<AUTH_MYSQL_LIST_OUTPUT>
  <RESPONSE>
    <DATETIME>2018-07-17T17:09:18Z</DATETIME>
    <AUTH_MYSQL_LIST>
      <AUTH_MYSQL>
        <ID>284212</ID>
        <TITLE><![CDATA[api-Thycotic Secret Server_tss]]></TITLE>
        <USERNAME><![CDATA[test_tss]]></USERNAME>
        <DATABASE><![CDATA[mysql]]></DATABASE>
        <PORT>22</PORT>
        <HOSTS>
          <HOST><![CDATA[www.test.com]]></HOST>
        </HOSTS>
        <IP_SET>
          <IP>10.10.10.181</IP>
        </IP_SET>
        <LOGIN_TYPE><![CDATA[vault]]></LOGIN_TYPE>
        <DIGITAL_VAULT>
          <DIGITAL_VAULT_ID><![CDATA[166638]]></DIGITAL_VAULT_ID>
          <DIGITAL_VAULT_TYPE><![CDATA[Thycotic Secret Server]]></DIGITAL_VAULT_TYPE>
          <DIGITAL_VAULT_TITLE><![CDATA[3_Secret Server]]></DIGITAL_VAULT_TITLE>
          <VAULT_SECRET_NAME><![CDATA[secret]]></VAULT_SECRET_NAME>
        </DIGITAL_VAULT>
        <SSL_VERIFY>true</SSL_VERIFY>
        <WINDOWS_CONF_FILE><![CDATA[c:\mysql\myu.ini]]></WINDOWS_CONF_FILE>
        <UNIX_CONF_FILE><![CDATA[]]></UNIX_CONF_FILE>
        <NETWORK_ID>0</NETWORK_ID>
        <CREATED>
          <DATETIME>2018-07-16T21:53:55Z</DATETIME>
          <BY>seenu_yn</BY>
        </CREATED>
        <LAST_MODIFIED>
          <DATETIME>2018-07-16T21:55:05Z</DATETIME>
        </LAST_MODIFIED>
        <COMMENTS><![CDATA[test comments]]></COMMENTS>
      </AUTH_MYSQL>
    </AUTH_MYSQL_LIST>
  </RESPONSE>
</AUTH_MYSQL_LIST_OUTPUT>

Sample - Update Vault Details in MySQL RecordSample - Update Vault Details in MySQL Record

API Request

curl -u "USERNAME:PASSWORD" -H "X-Requested-With: curl" -d "action=update&ids=272380&ips=10.10.10.19&username=USERNAME&title=NewMySQLRecord&ssl_verify=0&login_type=vault&vault_type=CyberArk PIM Suite&vault_id=248308&folder=folder&file=file&hosts=www.qualys.com&comments=test comments updated" "https://<qualys_base_url>/api/2.0/fo/auth/mysql/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BATCH_RETURN SYSTEM 
"<qualys_base_url>/api/2.0/batch_return.dtd">
<BATCH_RETURN>
 <RESPONSE>
 <DATETIME>2018-07-27T21:53:55Z</DATETIME>
 <BATCH_LIST>
 <BATCH>
 <TEXT>Successfully Created</TEXT>
 <ID_SET>
 <ID>284212</ID>
 </ID_SET>
</BATCH>
 </BATCH_LIST>
 </RESPONSE>
</BATCH_RETURN>

DTDs for Authentication Type "mysql"

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

<platform API server>/api/2.0/fo/auth/mysql/auth_mysql_list_output.dtd

 

V 3.0

GET POST/api/3.0/fo/auth/mysql/

Create, update, and list  MySQL system records for authenticated scans of MySQL Server instances running on Unix. Vulnerability and compliance scans are supported (using VM, PC).

Requirement - You must configure authentication credentials on target hosts.

System created authentication records supported - You can allow the system to create MySQL authentication records for auto discovered instances and scan them. This is supported for Unix installations only. To enable this feature, you must first create MySQL System Record Templates using the is_template input parameter and specifying login credentials. 

How it works - During scanning, Qualys authenticates to one or more instances on a single host using all MySQL records in your account. For compliance scans, you can scan multiple MySQL instances on a single host and port combination.

Download Qualys User Guide - MySQL Authentication (.zip)

Input ParametersInput Parameters

Parameter

Required/Optional

Data Type

Description

action={action}

Required String 

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

echo_request={0|1}

Optional Integer 

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 Integer 

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 String 

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

comments={value}

Optional to create or update record String 

User defined comments. Maximum of 1999 characters.

ssl_verify={0|1}

Optional to create or update record, and valid for server that supports SSL Integer 

Specify 1 for a complete SSL certificate validation.

- If unspecified (or ssl_verify=0), Qualys scanners authenticate with MySQL Servers that don't use SSL or MySQL servers that use SSL. However, in the SSL case, the server SSL certificate verification will be skipped.

- If ssl_verify=1, the Qualys scanners will only send a login request after verifying that a connection the MySQL server uses SSL, the server SSL certificate is valid and matches the scanned host.

hosts={value}

Optional to create or update record Integer 

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

database={value}

Required to create, optional to update record String 

The database name to authenticate. Specify a valid MySQL database name.

port={value}

Required to create, optional to update record Integer 

The port the database name is running on.

windows_config_file={value}

Optional to create or update record Path 

The path to the Windows MySQL config file. Access to this config file is required to run certain checks on Windows hosts.

unix_config_file={value}

Optional to create or update record Path 

The path to the Unix MySQL config file. Access to this config file is required to run certain checks on Unix hosts.

client_cert={value}

Optional to create or update record String 

PEM-encoded X.509 certificate. Specify if certificate authentication is required by your server to establish an SSL connection.

client_key={value}

Optional to create or update record Integer 

PEM-encoded RSA private key. Specify if certificate authentication is required by your server to establish an SSL connection.

is_template={0|1} Optional for create request, not valid for update request Boolean Specify to 1 to create a MySQL system record template. You must also specify login credentials.
save_as_user_auth={0|1} Optional for update request, not valid for create request Boolean Specify 1 to update a system created record and save it as a user created record. If another MySQL record already exists with the same IP address and target configuration, then,  an error is returned. (This parameter applies only to system created MySQL records. It cannot be specified for user created MySQL records and it cannot be specified for MySQL system record templates.)
is_system_created{0|1} Optional Boolean By default, user created records and system created auth records are listed. Set to 0 to list only user created records, or set to 1 to list only system created records. 
template_auth_id={value} Optional Integer Specify the template ID for MySQL system record template to only show MySQL records associated with the specified template.
template_auth_name={value} Optional String Specify the template name for MySQL system record template to only show MySQL records associated with the specified template.
status={0|1} Optional Boolean By default, active and inactive auth records are listed. Set to 0 to list only inactive records or set to 1 to list only active records.

Login Credentials

login_type={basic|vault} Optional Boolean  The login type is basic by default. Specify login_type=vault to use an authentication vault.

username={value}

Required to create record, optional to update record, when login_type=basic String 

The username of the account to be used for authentication. If password is specified this is the username of a MySQL account. If login_type=vault is specified, this is the username of a vault account.

password={value}

Required to create record, optional to update record, when login_type=basic String 

The password to be used for authentication to MySQL server. Maximum 100 characters (ascii).

Vault

vault_id={value}

Required only when action=create and login_type= vault Integer 

The ID of the vault you want to use.

vault_type={value}

Required only when action=create and login_type= vault Boolean 

The vault to be used for authentication. For MySQL authentication, valid values are: BeyondTrust PBPS, CyberArk AIM, CyberArk PIM Suite, Quest Vault, Thycotic Secret Server

{vault parameters}

Required only when action=create and login_type=vault Integer 

Vault specific parameters required depend on the vault type you've selected. See Vault Parameters

Target Hosts

ips={value}

Required to create record Integer 

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.

add_ips={value}

Optional to update record Integer 

Add IPs to the IPs list for this record. Multiple IPs/ranges are comma separated.

remove_ips={value}

Optional to update record Integer 

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 or member_domain 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 Integer 

The network ID for the record.

System Created MySQL Authentication RecordsSystem Created MySQL Authentication Records

When we auto discover MySQL instances, we discover the target configuration for each instance. A new configuration called MySQL System Record Template is introduced that you can use to provide MySQL login credentials for system created records. You can create the system record template and then select it in the option profile used for discovery scans. The template is linked automatically to the system created records created as a result of the scan.

Benefits

How it works

Here’s the basic flow for MySQL instance discovery and auto record creation.

Note - We support auto discovery and system record creation for MySQL DB instances running on Unix platforms. Make sure you have Unix authentication records in your account for hosts running MySQL DB.

1) Create an MySQL system record template and enter the login credentials you want to use for system created records.

2) Select the MySQL system record template in the compliance option profile you want to use for discovery scans.

3) Launch your discovery scan. Your scan results will list the auto discovered instances.

4) List your MySQL authentication records. For each system created record, you can see the template associated with the record.

Sample - Create MySQL Record TemplateSample - Create MySQL Record Template

API Request

curl -s -S -H 'X-Requested-With:curl demo2' -u "Username:Password" -d "action=create&is_template=1&title=Mysql_template_api1&username=MysqlUser&password=Password" "https://<qualys_base_url>/api/3.0/fo/auth/mysql/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BATCH_RETURN SYSTEM https://
<qualys_base_url>/api/3.0/batch_return.dtd>
    <BATCH_RETURN>
        <RESPONSE>
            <DATETIME>2024-07-17T05:40:21Z</DATETIME>
            <BATCH_LIST>
                <BATCH>
                    <TEXT>Successfully Created</TEXT>
                    <ID_SET>
                        <ID>5158332</ID>
                    </ID_SET>
                </BATCH>
            </BATCH_LIST>
        </RESPONSE>
    </BATCH_RETURN>

Sample - Create MySQL Record Template using VaultSample - Create MySQL Record Template using Vault

API Request

curl -s -S -H 'X-Requested-With:curl demo2' -u "Username:Password" -d "action=create&is_template=1&title=Mysql_template_api_vault&username=MysqlUser&login_type=vault&vault_type=Thycotic Secret Server&vault_id=1247724&secret_name=secert" "https://<qualys_base_url>/api/3.0/fo/auth/mysql/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BATCH_RETURN SYSTEM 
<qualys_base_url>/api/3.0/batch_return.dtd>
    <BATCH_RETURN>
        <RESPONSE>
            <DATETIME>2024-07-17T05:57:49Z</DATETIME>
            <BATCH_LIST>
                <BATCH>
                    <TEXT>Successfully Created</TEXT>
                    <ID_SET>
                        <ID>5158333</ID>
                    </ID_SET>
                </BATCH>
            </BATCH_LIST>
        </RESPONSE>
    </BATCH_RETURN>
           

Sample - Update MySQL Record TemplateSample - Update MySQL Record Template

API Request

curl -s -S -H 'X-Requested-With:curl demo2' -u "Username:Password" -d "action=update&title=Mysql_template_apiupdate&username=MysqlUserupdate&password=Passwordupdate&ids=5158332" "https://<qualys_base_url>/api/3.0/fo/auth/mysql/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BATCH_RETURN SYSTEM https://
<qualys_base_url>/api/3.0/batch_return.dtd>
    <BATCH_RETURN>
        <RESPONSE>
            <DATETIME>2024-07-17T05:47:07Z</DATETIME>
            <BATCH_LIST>
                <BATCH>
                    <TEXT>Successfully Updated</TEXT>
                    <ID_SET>
                        <ID>5158332</ID>
                    </ID_SET>
                </BATCH>
            </BATCH_LIST>
        </RESPONSE>
    </BATCH_RETURN>

Sample - Update MySQL Record Template using VaultSample - Update MySQL Record Template using Vault

API Request

curl -s -S -H 'X-Requested-With:curl demo2' -u "Username:Password" -d "action=create&is_template=1&title=Mysql_template_api_vault&username=MysqlUser&login_type=vault&vault_type=Thycotic Secret Server&vault_id=1247724&secret_name=secert" "https://<qualys_base_url>/api/3.0/fo/auth/mysql/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BATCH_RETURN SYSTEM https://
<qualys_base_url>/api/3.0/batch_return.dtd>
    <BATCH_RETURN>
        <RESPONSE>
            <DATETIME>2024-07-17T06:00:23Z</DATETIME>
            <BATCH_LIST>
                <BATCH>
                    <TEXT>Successfully Updated</TEXT>
                    <ID_SET>
                        <ID>5158333</ID>
                    </ID_SET>
                </BATCH>
            </BATCH_LIST>
        </RESPONSE>
    </BATCH_RETURN>                

Sample - List MySQL Record TemplateSample - List MySQL Record Template

API Request

curl -s -S -H 'X-Requested-With:curl demo2' -u "Username:Password" -d "action=list&ids=5158332" "https://<qualys_base_url>/api/3.0/fo/auth/mysql/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE AUTH_MYSQL_LIST_OUTPUT SYSTEM https://
<qualys_base_url>/api/3.0/fo/auth/mysql/auth_mysql_list_output.dtd>
    <AUTH_MYSQL_LIST_OUTPUT>
        <RESPONSE>
            <DATETIME>2024-07-17T05:50:20Z</DATETIME>
            <AUTH_MYSQL_LIST>
                <AUTH_MYSQL>
                    <ID>5158332</ID>
                    <TITLE>
                        <![CDATA[Mysql_template_apiupdate]]>
                    </TITLE>
                    <USERNAME>
                        <![CDATA[MysqlUserupdate]]>
                    </USERNAME>
                    <LOGIN_TYPE>
                        <![CDATA[basic]]>
                    </LOGIN_TYPE>
                    <CREATED>
                        <DATETIME>2024-07-17T05:40:21Z</DATETIME>
                        <BY>quay_sm</BY>
                    </CREATED>
                    <LAST_MODIFIED>
                        <DATETIME>2024-07-17T05:47:07Z</DATETIME>
                    </LAST_MODIFIED>
                    <IS_SYSTEM_CREATED>0</IS_SYSTEM_CREATED>
                    <IS_ACTIVE>1</IS_ACTIVE>
                    <IS_TEMPLATE>1</IS_TEMPLATE>
                </AUTH_MYSQL>
            </AUTH_MYSQL_LIST>
        </RESPONSE>
    </AUTH_MYSQL_LIST_OUTPUT>

Sample - List MySQL Record Template using VaultSample - List MySQL Record Template using Vault

API Request

curl -s -S -H 'X-Requested-With:curl demo2' -u "Username:Password" -d "action=list&ids=5158333" "https://<qualys_base_url>/api/3.0/fo/auth/mysql/" 

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE AUTH_MYSQL_LIST_OUTPUT SYSTEM https://
<qualys_base_url>/api/3.0/fo/auth/mysql/auth_mysql_list_output.dtd>
    <AUTH_MYSQL_LIST_OUTPUT>
        <RESPONSE>
            <DATETIME>2024-07-17T06:02:11Z</DATETIME>
            <AUTH_MYSQL_LIST>
                <AUTH_MYSQL>
                    <ID>5158333</ID>
                    <TITLE>
                        <![CDATA[Mysql_template_api_vaultupdate]]>
                    </TITLE>
                    <USERNAME>
                        <![CDATA[MysqlUserupdate]]>
                    </USERNAME>
                    <LOGIN_TYPE>
                        <![CDATA[vault]]>
                    </LOGIN_TYPE>
                    <DIGITAL_VAULT>
                        <DIGITAL_VAULT_ID>
                            <![CDATA[1247724]]>
                        </DIGITAL_VAULT_ID>
                        <DIGITAL_VAULT_TYPE>
                            <![CDATA[Thycotic Secret Server]]>
                        </DIGITAL_VAULT_TYPE>
                        <DIGITAL_VAULT_TITLE>
                            <![CDATA[Thycotic Secret Server Vault]]>
                        </DIGITAL_VAULT_TITLE>
                        <VAULT_SECRET_NAME>
                            <![CDATA[secertpdate]]>
                        </VAULT_SECRET_NAME>
                    </DIGITAL_VAULT>
                    <CREATED>
                        <DATETIME>2024-07-17T05:57:49Z</DATETIME>
                        <BY>quay_sm</BY>
                    </CREATED>
                    <LAST_MODIFIED>
                        <DATETIME>2024-07-17T06:00:23Z</DATETIME>
                    </LAST_MODIFIED>
                    <IS_SYSTEM_CREATED>0</IS_SYSTEM_CREATED>
                    <IS_ACTIVE>1</IS_ACTIVE>
                    <IS_TEMPLATE>1</IS_TEMPLATE>
                </AUTH_MYSQL>
            </AUTH_MYSQL_LIST>
        </RESPONSE>
    </AUTH_MYSQL_LIST_OUTPUT>

Sample - List MySQL All templateSample - List MySQL All template

API Request

curl -s -S -H 'X-Requested-With:curl demo2' -u "Username:Password" -d "action=list&is_template=1" "https://<qualys_base_url>/api/3.0/fo/auth/mysql/" 

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE AUTH_MYSQL_LIST_OUTPUT SYSTEM https://
<qualys_base_url>/api/3.0/fo/auth/mysql/auth_mysql_list_output.dtd>
    <AUTH_MYSQL_LIST_OUTPUT>
        <RESPONSE>
            <DATETIME>2024-07-16T05:37:03Z</DATETIME>
            <AUTH_MYSQL_LIST>
                <AUTH_MYSQL>
                    <ID>5129495</ID>
                    <TITLE>
                        <![CDATA[Mysql template]]>
                    </TITLE>
                    <USERNAME>
                        <![CDATA[qualys_scan]]>
                    </USERNAME>
                    <LOGIN_TYPE>
                        <![CDATA[basic]]>
                    </LOGIN_TYPE>
                    <CREATED>
                        <DATETIME>2024-07-09T10:34:25Z</DATETIME>
                        <BY>quay_sm</BY>
                    </CREATED>
                    <LAST_MODIFIED>
                        <DATETIME>2024-07-15T11:51:31Z</DATETIME>
                    </LAST_MODIFIED>
                    <IS_SYSTEM_CREATED>0</IS_SYSTEM_CREATED>
                    <IS_ACTIVE>1</IS_ACTIVE>
                    <IS_TEMPLATE>1</IS_TEMPLATE>
                </AUTH_MYSQL>
                <AUTH_MYSQL>
                    <ID>5131010</ID>
                    <TITLE>
                        <![CDATA[mysql vaultcccc]]>
                    </TITLE>
                    <USERNAME>
                        <![CDATA[recccccccccccccc]]>
                    </USERNAME>
                    <LOGIN_TYPE>
                        <![CDATA[vault]]>
                    </LOGIN_TYPE>
                    <DIGITAL_VAULT>
                        <DIGITAL_VAULT_ID>
                            <![CDATA[1248749]]>
                        </DIGITAL_VAULT_ID>
                        <DIGITAL_VAULT_TYPE>
                            <![CDATA[HashiCorp]]>
                        </DIGITAL_VAULT_TYPE>
                        <DIGITAL_VAULT_TITLE>
                            <![CDATA[HashiCorp Vault]]>
                        </DIGITAL_VAULT_TITLE>
                        <VAULT_SECRET_KV_PATH>
                            <![CDATA[path]]>
                        </VAULT_SECRET_KV_PATH>
                        <VAULT_SECRET_KV_NAME>
                            <![CDATA[name]]>
                        </VAULT_SECRET_KV_NAME>
                        <VAULT_SECRET_KV_KEY>
                            <![CDATA[key]]>
                        </VAULT_SECRET_KV_KEY>
                    </DIGITAL_VAULT>
                    <CREATED>
                        <DATETIME>2024-07-10T06:55:53Z</DATETIME>
                        <BY>quay_sm</BY>
                    </CREATED>
                    <LAST_MODIFIED>
                        <DATETIME>2024-07-12T09:48:02Z</DATETIME>
                    </LAST_MODIFIED>
                    <IS_SYSTEM_CREATED>0</IS_SYSTEM_CREATED>
                    <IS_ACTIVE>1</IS_ACTIVE>
                    <IS_TEMPLATE>1</IS_TEMPLATE>
                </AUTH_MYSQL>
                <AUTH_MYSQL>
                    <ID>5144731</ID>
                    <TITLE>
                        <![CDATA[Mysql_template_api]]>
                    </TITLE>
                    <USERNAME>
                        <![CDATA[MysqlUser]]>
                    </USERNAME>
                    <LOGIN_TYPE>
                        <![CDATA[basic]]>
                    </LOGIN_TYPE>
                    <CREATED>
                        <DATETIME>2024-07-15T05:53:48Z</DATETIME>
                        <BY>quay_sm</BY>
                    </CREATED>
                    <LAST_MODIFIED>
                        <DATETIME>2024-07-15T05:53:48Z</DATETIME>
                    </LAST_MODIFIED>
                    <IS_SYSTEM_CREATED>0</IS_SYSTEM_CREATED>
                    <IS_ACTIVE>1</IS_ACTIVE>
                    <IS_TEMPLATE>1</IS_TEMPLATE>
                </AUTH_MYSQL>
                <AUTH_MYSQL>
                    <ID>5144751</ID>
                    <TITLE>
                        <![CDATA[M1_api]]>
                    </TITLE>
                    <USERNAME>
                        <![CDATA[MysqlUser]]>
                    </USERNAME>
                    <LOGIN_TYPE>
                        <![CDATA[basic]]>
                    </LOGIN_TYPE>
                    <CREATED>
                        <DATETIME>2024-07-15T05:58:51Z</DATETIME>
                        <BY>quay_sm</BY>
                    </CREATED>
                    <LAST_MODIFIED>
                        <DATETIME>2024-07-15T05:58:51Z</DATETIME>
                    </LAST_MODIFIED>
                    <IS_SYSTEM_CREATED>0</IS_SYSTEM_CREATED>
                    <IS_ACTIVE>1</IS_ACTIVE>
                    <IS_TEMPLATE>1</IS_TEMPLATE>
                </AUTH_MYSQL>
                <AUTH_MYSQL>
                    <ID>5144986</ID>
                    <TITLE>
                        <![CDATA[test reader MYSQL sys record]]>
                    </TITLE>
                    <USERNAME>
                        <![CDATA[aef_at]]>
                    </USERNAME>
                    <LOGIN_TYPE>
                        <![CDATA[basic]]>
                    </LOGIN_TYPE>
                    <CREATED>
                        <DATETIME>2024-07-15T08:23:33Z</DATETIME>
                        <BY>quay_sm</BY>
                    </CREATED>
                    <LAST_MODIFIED>
                        <DATETIME>2024-07-15T08:23:33Z</DATETIME>
                    </LAST_MODIFIED>
                    <IS_SYSTEM_CREATED>0</IS_SYSTEM_CREATED>
                    <IS_ACTIVE>1</IS_ACTIVE>
                    <IS_TEMPLATE>1</IS_TEMPLATE>
                </AUTH_MYSQL>
            </AUTH_MYSQL_LIST>
        </RESPONSE>
    </AUTH_MYSQL_LIST_OUTPUT>

Sample - Update MySQL system authentication record to save as user recordSample - Update MySQL system authentication record to save as user record

API Request

curl -s -S -H 'X-Requested-With:curl demo2' -u "Username:Password" -d "action=update&title=MySQLapi_edit_as_user&username=abc&password=123&database=dbaa&port=6766&ids=5140898&save_as_user_auth=1" "https://<qualys_base_url>/api/3.0/fo/auth/mysql/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BATCH_RETURN SYSTEM https://
<qualys_base_url>/api/3.0/batch_return.dtd>
    <BATCH_RETURN>
        <RESPONSE>
            <DATETIME>2024-07-15T09:57:18Z</DATETIME>
            <BATCH_LIST>
                <BATCH>
                    <TEXT>Successfully Updated</TEXT>
                    <ID_SET>
                        <ID>5140898</ID>
                    </ID_SET>
                </BATCH>
            </BATCH_LIST>
        </RESPONSE>
    </BATCH_RETURN>          

Sample - List system created MySQL recordSample - List system created MySQL record

API Request

curl -s -S -H 'X-Requested-With:curl demo2' -u "Username:Password" -d "action=list&ids=5145491" "https://<qualys_base_url>/api/3.0/fo/auth/mysql/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE AUTH_MYSQL_LIST_OUTPUT SYSTEM https://
<qualys_base_url>/api/3.0/fo/auth/mysql/auth_mysql_list_output.dtd>
    <AUTH_MYSQL_LIST_OUTPUT>
        <RESPONSE>
            <DATETIME>2024-07-17T06:29:13Z</DATETIME>
            <AUTH_MYSQL_LIST>
                <AUTH_MYSQL>
                    <ID>5145491</ID>
                    <TITLE>
                        <![CDATA[MySQL [System Created] - 317088]]>
                    </TITLE>
                    <USERNAME>
                        <![CDATA[qualys_scan]]>
                    </USERNAME>
                    <DATABASE>
                        <![CDATA[mysql]]>
                    </DATABASE>
                    <PORT>3306</PORT>
                    <IP_SET>
                        <IP>10.14.71.53</IP>
                    </IP_SET>
                    <LOGIN_TYPE>
                        <![CDATA[basic]]>
                    </LOGIN_TYPE>
                    <SSL_VERIFY>false</SSL_VERIFY>
                    <WINDOWS_CONF_FILE>
                        <![CDATA[]]>
                    </WINDOWS_CONF_FILE>
                    <UNIX_CONF_FILE>
                        <![CDATA[/etc/my.cnf]]>
                    </UNIX_CONF_FILE>
                    <NETWORK_ID>0</NETWORK_ID>
                    <CREATED>
                        <DATETIME>2024-07-15T12:23:15Z</DATETIME>
                    </CREATED>
                    <LAST_MODIFIED>
                        <DATETIME>2024-07-15T12:23:15Z</DATETIME>
                    </LAST_MODIFIED>
                    <IS_SYSTEM_CREATED>1</IS_SYSTEM_CREATED>
                    <IS_ACTIVE>1</IS_ACTIVE>
                    <IS_TEMPLATE>0</IS_TEMPLATE>
                    <TEMPLATE>
                        <ID>5129495</ID>
                        <TITLE>Mysql template</TITLE>
                    </TEMPLATE>
                    <COMMENTS>
                        <![CDATA[System created MySQL auth record using scan data with history ID 2197119.]]>
                    </COMMENTS>
                </AUTH_MYSQL>
            </AUTH_MYSQL_LIST>
        </RESPONSE>
    </AUTH_MYSQL_LIST_OUTPUT>                 

DTDs for Authentication Type "mysql"

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

<platform API server>/api/3.0/fo/auth/mysql/auth_mysql_list_output.dtd

API Version History

The following table depicts the information about the different versions of this API along with the status:

API Version API Status Release Date
/api/2.0/fo/auth/mysql/ To be deprecated February 2025
/api/3.0/fo/auth/mysql/ Active

July 2024