SAP IQ record

/api/2.0/fo/auth/sapiq/

[POST]

The SAP IQ API lets you list, create, update and delete SAP IQ authentication records for compliance scans (using PC). User permissions for this API are the same as other authentication record APIs.

Create/Update SAP IQ Authentication Records

Use these parameters to create or update SAP IQ authentication records.

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.

SAP IQ

 

database={value}

(Required to create orecord) The database name to authenticate to.

port={value}

(Required to create record) The port the database is running on.

installation_dir={value}

(Required for create request when this record will be used for scanning Unix hosts) The database installation directory for scanning Unix hosts.

Login Credentials

 

username={value}

(Required for create request) The username of the account to be used for authentication. If password is specified this is the username of a SAP IQ account. If login_type=vault is specified, this is the username of a vault account. Maximum 255 characters (ascii).

password={value}

(For create request, password or login_type=vault is required) The password of the SAP IQ account to be used for authentication. Maximum 100 characters (ascii).

password_encryption={0|1}

(Optional to create or update record) Enable this option when your database instance requires an encrypted password for successful login. If password encryption is required and you do not enable this option then authentication will fail. When set to 1, password encryption is enabled in the record. When set to 0 (the default), password encryption is not enabled.

Vault

 

login_type={basic|vault}

(For create request, password or login_type=vault is required) Login type can be basic (default) or vault. Set to vault if a third party vault will be used to retrieve the password. Vault parameters need to be provided in the record. See “Vault Definition” in the API user guide.

vault_id={value}

(Required if login_type=vault) The ID of the vault to be used to retrieve the password for login.

vault_type={value}

(Required if login_type=vault) The third party vault to be used to retrieve the password for login. Certain vaults support this capability. See “Vault Support Matrix” in the API user guide.

{vault parameters}

(Required only when action=create and login_type=vault) Vault specific parameters required depend on the vault type you've selected. See Vault Parameters

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 SAP IQ Record

API request

curl -u "USERNAME:PASSWORD" -H 'X-Requested-With: curl' -d "action=create&title=sapiq&username=root&password=root&database=sapDb&port=123&&ips=11.11.11.11" "https://qualysapi.qualys.com/api/2.0/fo/auth/sapiq/"

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>2020-12-05T12:04:32Z</DATETIME>

        <BATCH_LIST>

            <BATCH>

                <TEXT>Successfully Created</TEXT>

                <ID_SET>

                    <ID>96171</ID>

                </ID_SET>

            </BATCH>

        </BATCH_LIST>

    </RESPONSE>

</BATCH_RETURN>

Sample - Update SAP IQ Record

API request

curl -u "USERNAME:PASSWORD" -H 'X-Requested-With: curl' -d "action=update&ids=4423386&installation_dir=/opt/sybase&comments=update_inst_dir" "https://qualysapi.qualys.com/api/2.0/fo/auth/sapiq/"

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>2020-12-11T12:09:25Z</DATETIME>

        <BATCH_LIST>

            <BATCH>

                <TEXT>Successfully Updated</TEXT>

                <ID_SET>

                    <ID>4423386</ID>

                </ID_SET>

            </BATCH>

        </BATCH_LIST>

    </RESPONSE>

</BATCH_RETURN>

List SAP IQ records

Use these parameters to list SAP IQ authentication records.

Parameter

Description

action={action}

(Required) Specify list (using GET or POST) to list records.

details={value}

(Optional) Default value is Basic. You can choose from None, Basic, and All.

ids={value}

(Optional) SAP IQ auth record IDs to list. Specify record IDs and/or ID ranges (for example, 1359-1407). Multiple entries are comma separated.

Sample - List SAP IQ Records with All Details

API request

curl -u "USERNAME:PASSWORD" -H 'X-Requested-With: curl' -d "action=list&details=All"

"https://qualysapi.qualys.com/api/2.0/fo/auth/sapiq/"

XML output

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

<!DOCTYPE AUTH_SAPIQ_LIST_OUTPUT SYSTEM "https://qualysapi.qualys.com/api/2.0/fo/auth/sapiq/auth_sapiq_list_output.dtd">

<AUTH_SAPIQ_LIST_OUTPUT>

  <RESPONSE>

    <DATETIME>2020-12-11T18:02:56Z</DATETIME>

    <AUTH_SAPIQ_LIST>

      <AUTH_SAP_IQ>

        <ID>4423387</ID>

        <TITLE><![CDATA[sap_iq_api_2]]></TITLE>

        <USERNAME><![CDATA[dba]]></USERNAME>

        <IP_SET>

          <IP>10.11.70.54</IP>

        </IP_SET>

        <DATABASE><![CDATA[iqdemo]]></DATABASE>

        <PORT>2638</PORT>

        <LOGIN_TYPE><![CDATA[basic]]></LOGIN_TYPE>

        <NETWORK_ID>0</NETWORK_ID>

        <CREATED>

          <DATETIME>2020-12-11T06:24:15Z</DATETIME>

          <BY>joe_user</BY>

        </CREATED>

        <LAST_MODIFIED>

          <DATETIME>2020-12-11T06:24:15Z</DATETIME>

        </LAST_MODIFIED>

      </AUTH_SAP_IQ>

      <AUTH_SAP_IQ>

        <ID>4423518</ID>

        <TITLE><![CDATA[sap_iq_api_3]]></TITLE>

        <USERNAME><![CDATA[dba]]></USERNAME>

        <IP_SET>

          <IP>10.11.70.52</IP>

        </IP_SET>

        <DATABASE><![CDATA[iqdemo]]></DATABASE>

        <PORT>2638</PORT>

        <INSTALLATION_DIR><![CDATA[test]]></INSTALLATION_DIR>

        <PASSWORD_ENCRYPTION><![CDATA[1]]></PASSWORD_ENCRYPTION>

        <LOGIN_TYPE><![CDATA[basic]]></LOGIN_TYPE>

        <NETWORK_ID>0</NETWORK_ID>

        <CREATED>

          <DATETIME>2020-12-11T12:35:12Z</DATETIME>

          <BY>joe_user</BY>

      </CREATED>

        <LAST_MODIFIED>

          <DATETIME>2020-12-11T12:35:12Z</DATETIME>

        </LAST_MODIFIED>

      </AUTH_SAP_IQ>

    </AUTH_SAPIQ_LIST>

    <GLOSSARY>

      <USER_LIST>

        <USER>

          <USER_LOGIN>joe_user</USER_LOGIN>

          <FIRST_NAME>Joe</FIRST_NAME>

          <LAST_NAME>User</LAST_NAME>

        </USER>

      </USER_LIST>

    </GLOSSARY>

  </RESPONSE>

</AUTH_SAPIQ_LIST_OUTPUT>

Delete SAP IQ records

Use the following parameter to delete one or more SAP IQ authentication records.

Parameter

Description

ids={value}

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

Sample - Delete SAP IQ Records

API request

curl -u "USERNAME:PASSWORD" -H 'X-Requested-With: curl' -d "action=delete&ids=4423386" "https://qualysapi.qualys.com/api/2.0/fo/auth/sapiq/"

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>2020-12-11T12:09:25Z</DATETIME>

        <BATCH_LIST>

            <BATCH>

                <TEXT>Successfully Deleted</TEXT>

                <ID_SET>

                    <ID>4423386</ID>

                </ID_SET>

            </BATCH>

        </BATCH_LIST>

    </RESPONSE>

</BATCH_RETURN>

 

DTDs for auth type "sap iq"

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

<platform API server>/api/2.0/fo/auth/sapiq/auth_sapiq_list_output.dtd