Update Connector

[GET] /qps/rest/2.0/update/am/assetdataconnector

[GET] /qps/rest/2.0/update/am/assetdataconnector/<id>

Updates writable fields and collections. Only the name and tags can be modified.

Using the NOT EQUALS operator for updating connectors could result in accidental update of unknown connectors without any warning. To prevent accidental updates of unknown connectors, we do not support NOT EQUALS operator for update actions.



Permissions required - Managers with Full Scope.

Sample 1 - Change asset data connector nameSample 1 - Change asset data connector name

Change the name of the asset data connector with ID 12345 and add a tag with the ID of 1 to the defaultTags collection

API request

curl -u "USERNAME:PASSWORD" "<qualys_base_url>/qps/rest/2.0/update/assetdataconnector/12345" < file.xml
 
Request POST data (file.xml):
<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
    <data>
        <AssetDataConnector>
            <name>Updated Name</name>
            <defaultTags>
                <add>
                    <TagSimple>
                        <id>11751040</id>
                    </TagSimple>
                </add>
            </defaultTags>
        </AssetDataConnector>
    </data>
</ServiceRequest>      
    

Response

<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse
    xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance"
xsi:noNamespaceSchemaLocation="<qualys_base_url>/qps/xs
d/2.0/am/asset_data_connector.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>1</count>
    <hasMoreRecords>false</hasMoreRecords>
    <data>
        <AssetDataConnector>
            <id>12345</id>
            <name>External VPC</name>
            <lastSync>2014-11-26T08:44:05Z</lastSync>
            <lastError />
            <connectorState>SUCCESS</connectorState>
            <type>AWS</type>
            <defaultTags>
                <list>
                    <TagSimple>
                        <id>11751040</id>
                        <name>EC2</name>
                    </TagSimple>
                </list>
            </defaultTags>
            <activation>
                <ActivationModule>VM</ActivationModule>
            </activation>
        </AssetDataConnector>
    </data>
</ServiceResponse>      
    

Sample 2 - Add a tag to connectorsSample 2 - Add a tag to connectors

Add a tag to all asset data connectors who's names contain External

API request

curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --data-binary @- "<qualys_base_url>/qps/rest/2.0/update/assetdataconnector/12345< file.xml
Request POST data (file.xml):
<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
    <filters>
        <Criteria field="name" operator="CONTAINS">External</Criteria>
        <filters>
            <data>
                <Asset>
                    <tags>
                        <add>
                            <TagSimple>
                                <id>2</id>
                            </TagSimple>
                            <add>
                            </tags>
                        </Asset>
                    </data>
                </ServiceRequest>      
    

XML output

<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="<qualys_base_url>/qps/xsd/2.0/am/asset_data_connector.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>13</count>
    <hasMoreRecords>false</hasMoreRecords>
    <data>
        <AssetDataConnector>
            <id>12345</id>
            <name>External VPC</name>
            <lastSync>2014-11-26T08:44:05Z</lastSync>
            <lastError />
            <connectorState>SUCCESS</connectorState>
            <type>AWS</type>
            <defaultTags>
                <list>
                    <TagSimple>
                        <id>2</id>
                        <name>External</name>
                    </TagSimple>
                </list>
            </defaultTags>
            <activation>
                <ActivationModule>VM</ActivationModule>
            </activation>
        </AssetDataConnector>
...
  
    </data>
</ServiceResponse>      
    

XSD

<platform API server>/qps/xsd/2.0/am/asset_data_connector.xsd