Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
177 views226 pages

Qualys Connectors Api v3 User Guide

Uploaded by

Karthik T
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
177 views226 pages

Qualys Connectors Api v3 User Guide

Uploaded by

Karthik T
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 226

Connectors API

User Guide
November 07, 2023
Copyright 2019-2023 by Qualys, Inc. All Rights Reserved.
Qualys and the Qualys logo are registered trademarks of Qualys, Inc. All other trademarks are the
property of their respective owners.
Qualys, Inc.
919 E Hillsdale Blvd
4th Floor
Foster City, CA 94404
1 (650) 801 6100
Qualys Asset Management & Tagging API

Table of Contents
Get Started ................................................................................................................................. 4
Asset Management & Tagging API ....................................................................................... 4
Qualys user account ............................................................................................................... 5
URL to Qualys API server ..................................................................................................... 6
Making API calls ................................................................................................................... 7
Tracking API usage by user ................................................................................................. 10
Available operators .............................................................................................................. 12
JSON Support ...................................................................................................................... 13
Know your portal version .................................................................................................... 17
Connectors 3.0 ......................................................................................................................... 19
Connector APIs (3.0) ........................................................................................................... 19
AWS Connectors 3.0 ........................................................................................................... 20
Azure Connectors 3.0........................................................................................................... 73
GCP Connectors 3.0........................................................................................................... 117
OCI Connectors 3.0 ........................................................................................................... 145
Global Scan Configuration ................................................................................................ 168
Snapshot-based Scan.......................................................................................................... 176
Azure Organization Connectors 3.0................................................................................... 182
Qualys Asset Management & Tagging API
Get Started

Get Started
Asset Management & Tagging API

Manage assets in your account that you want to scan for security and
compliance, define asset tags and AWS connectors.

Modules supported

VM, PC, SCA, CERTVIEW, CLOUDVIEW

Authentication

Authentication to your Qualys account with valid Qualys credentials is


required for making Qualys API requests to the Qualys API servers. Learn
more about authentication to your Qualys account

Get API Notifications

We recommend you join our Community and subscribe to our API


Notifications RSS Feeds for announcements and discussions.

https://community.qualys.com/community/developer/notifications-api

About Qualys

Qualys, Inc. (NASDAQ: QLYS) is a pioneer and leading provider of cloud-


based security and compliance solutions. The Qualys Cloud Platform and
its integrated Cloud Apps deliver businesses critical security intelligence
continuously, enabling them to automate the full spectrum of auditing,
compliance and protection for IT systems and web applications on
premises, on endpoints and elastic clouds. For more information, please
visit www.qualys.com

Qualys and the Qualys logo are proprietary trademarks of Qualys, Inc. All
other products or names may be trademarks of their respective companies

4
Qualys Asset Management & Tagging API
Get Started

Qualys user account

Authentication to your Qualys account with valid Qualys credentials is


required for making Qualys API requests to the Qualys API servers.

The application must authenticate using Qualys account credentials (user


name and password) as part of the HTTP request. The credentials are
transmitted using the “Basic Authentication Scheme” over HTTPS.

For information, see the “Basic Authentication Scheme” section of RFC


#2617:

http://www.faqs.org/rfcs/rfc2617.html

The exact method of implementing authentication will vary according to


which programming language is used.

The allowed methods, POST and/or GET, for each API request are
documented with each API call in this user guide.

Sample request - basic authentication


curl -u "USERNAME:PASSWORD"
https://qualysapi.qualys.com/qps/rest/3.0/get/am/awsassetdataconnect
or/179407

5
Qualys Asset Management & Tagging API
Get Started

URL to Qualys API server

The Qualys API URL you should use for API requests depends on the
Qualys platform where your account is located.

Click here to identify your Qualys platform and get the API URL

This document uses the API server URL for Qualys US Platform 1
(https://qualysapi.qualys.com) in sample API requests. If you’re on another
platform, replace this URL with the appropriate server URL for your
account.

Looking for your API server URL for your account? You can find this easily.
Just log in to your Qualys account and go to Help > About. You'll see this
information under Security Operations Center (SOC).

6
Qualys Asset Management & Tagging API
Get Started

Making API calls

Curl samples in our API doc

We use curl in our API documentation to show an example how to form


REST API calls, and it is not meant to be an actual production example of
implementation.

Object types

You have core objects, which represent domain objects for specific
business goals and related objects which contain related information or
collections of information. Related objects are often simplified
representations of core objects but are not implicitly core objects. For
example, the tags collection on Asset is a simpler form of the Tag core
object, but the ports collection is not.

Collections

Collections of related objects are found within a container object called a


QList. These lists will have a specific name for the type of objects they
contain. For example, the tags collection Asset is a TagSimpleQList and will
read and write TagSimple API objects. These lists can contain a number of
sub elements.

count - (Read only) The total number of items returned in the list element

list - (Read only) The items contained in the collection on the server

set - A new collection of items to place in the server side object. Any
existing items not in the list provided will be discarded.

add - A new item to be added to the server side object. The item may be
keyed of one ore more fields depending on the collection. In the even that
that an item in the add collection collides with an existing entry, the
existing entry will be updated with the fields provided. Many collections
will allow you to either associate an existing item with the targeted
collection, or create a new one and add it to the collection. If you provide a
key field, most often id or uuid, the object will be looked up and associated.
In the absence of these fields, a new object will be created (if the list allows
it).

7
Qualys Asset Management & Tagging API
Get Started

remove - Removes an element from the list by the collections key, usually
id. If the item does not exist, the entry will be ignored. Additional fields
beyond the item key will also be ignored.

update - Updates item(s) in the collection. This allows you to update the
fields of non-core items via the objects and reference them. Items will be
resolved by the collection’s key, and then additional fields applied to the
found object. In the event that the supplied item does not match an
existing related object, it will be ignored.

Whitespace in HTML tags

Whitespace (which includes line breaks) is not allowed in XML tags that are
numbers.

Invalid tag - This syntax will not work


<id>
34234
</id>

Valid tag - This syntax will work just fine


<id>345254</id>

Pagination

Some API actions will return a list of core objects but will limit the number
returned (default is 100). You can change which objects are returned and
the number of objects by specifying a preferences tag in the POST body of
your request.

Preferences tag fields:

startFromOffset - The first item to return by index. The default is 1.

startFromId - The first item to return by primary key. No default value.

limitResults - The total number of items to return. The default is 100.

The allowed methods, POST and/or GET, for each API request are
documented with each API call in this user guide.

8
Qualys Asset Management & Tagging API
Get Started

Sample pagination settings


<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<preferences>
<startFromOffset>100</startFromOffset>
<limitResults>50</limitResults>
</preferences>
</ServiceRequest>

Limit your results

Use the optional “fields” parameter for any Search or Get API request to
limit the amount of information returned in the results. Simply specify the
fields you want to include in the output, and all other information will be
filtered out. Multiple fields are comma separated and wildcards are
supported.

This get request will fetch tag ID 12345 and return the tag ID, name and
creation date:

Sample limit results


https://qualysapi.qualys.com/qps/rest/2.0/get/am/tag/12345?fields=id
,name,created

This search request will return the ID of the connector and the ID of any
default tags attached to the connector:

Sample search connectors


https://qualysapi.qualys.com/qps/rest/2.0/search/am/awsassetdataconn
ector?fields=id,defaultTags.list.SimpleTag.id

Using wildcards, the example above could be represented as:

Sample search connectors using wildcards


https://qualysapi.qualys.com/qps/rest/2.0/search/am/awsassetdataconn
ector?fields=id,defaultTags.*.*.iddSimpleTag.id

9
Qualys Asset Management & Tagging API
Get Started

Tracking API usage by user

You can track API usage by a user without the need to provide user
credentials such as the username and password.

Optional X-Powered-By header

API usage can be tracked using the X-Powered-By HTTP header which
includes a unique ID generated for each subscription and a unique ID
generated for each user. Once enabled, the X-Powered-By HTTP header is
returned for each API request made by a user. The X-Powered-By HTTP
header will be returned for both valid and invalid requests. However, it will
not be returned if an invalid URL is hit or when user authentication fails.

Contact Qualys Support to get the X-Powered-By HTTP header enabled.

The X-Powered-By header is returned in the following format:

X-Powered-By: Qualys:<POD_ID>:<SUB_UUID>:<USER_UUID>

where,

- POD_ID is the shared POD or a PCP. Shared POD is USPOD1, USPOD2,


etc.

- SUB_UUID is the unique ID generated for the subscription

- USER_UUID is the unique ID generated for the user. You can use the
USER_UUID to track API usage per user.

Sample X-Powered-By header


X-Powered-By: Qualys:testpodSJC:f972e2cc-69d6-7ebd-
80e67b9a931475d8:06198167-43f3-7591-802a-1c400a0e81b1

Sample outputs

Here are sample outputs showing the X-Powered-By HTTP header.

Sample output for VM, PC


...
< HTTP/1.1 200 OK

10
Qualys Asset Management & Tagging API
Get Started

< Date: Thu, 14 Sep 2017 09:11:21 GMT


< Server: Qualys < X-XSS-Protection: 1
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-Powered-By: Qualys:USPOD1:d9a7e94c-0a9d-c745-
82e9980877cc5043:f178af1e-4049-7fce-81ca-75584feb8e93
< X-RateLimit-Limit: 300
< X-RateLimit-Window-Sec: 3600
< X-Concurrency-Limit-Limit: 500
< X-Concurrency-Limit-Running: 0
< X-RateLimit-ToWait-Sec: 0
< X-RateLimit-Remaining: 298
< X-Qualys-Application-Version: QWEB-8.11.0.0-
SNAPSHOT20170914072818#4205
< X-Server-Virtual-Host: qualysapi.qualys.com
< X-Server-Http-Host: qualysapi.qualys.com
< Transfer-Encoding: chunked < Content-Type: text/xml;charset=UTF-8
...

Sample output for other Qualys apps


...
229HTTP/1.1 200 OK
X-Powered-By: Qualys:testpodSJC:f972e2cc-69d6-7ebd-
80e67b9a931475d8:06198167-43f3-7591-802a-1c400a0e81b1
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Mon, 04 Dec 2017 05:36:29 GMT
Server: Apache
LBDEBUG: NS=10.44.1.12,SERVER=10.44.77.81:50205,CSW=cs-
qualysapi443,VSERVER=vs-papi-80,ACTIVE-SERVICES=2,HEALTH=100
...

11
Qualys Asset Management & Tagging API
Get Started

Available operators

Operators supported by input parameters:

Integer - EQUALS, NOT EQUALS, GREATER, LESSER, IN

Text - CONTAINS, EQUALS, NOT EQUALS

Date - EQUALS, NOT EQUALS, GREATER, LESSER

Keyword - EQUALS, NOT EQUALS, IN

Boolean (true/false) - EQUALS, NOT EQUALS

* NOT EQUALS operator is not supported for update and delete actions.
Using the NOT EQUALS operator for updating or deleting objects (such as
tags, assets, host assets, AWS connectors, AWS authentication records,
etc.) could result in accidental update or deletion of the objects without
any warning. To prevent accidental updates/deletions, we do not support
NOT EQUALS operator for updating/deleting objects.

12
Qualys Asset Management & Tagging API
Get Started

JSON Support
Qualys Asset Management and Tagging API supports JSON requests and
responses starting with version 2.11. Samples are shown below.

Headers used in
samples

Send JSON "Content-Type:


request application/json"

Get response in "Accept:


JSON application/json"

Sample 1 - Create a tag

API request
cat createTag.json | curl -s -k -X POST -H "Accept:
application/json" -H "Content-Type: application/json" -H "user:
acme_ss2" -H "password: passwd" -d @-
"https://qualysapi.qualys.com/qps/rest/2.0/create/am/tag"

POST data:
{
"ServiceRequest": {
"data": {
"Tag": {
"name": "Parent Tag",
"ruleType": "NAME_CONTAINS",
"ruleText": "windows",
"color": "#FFFFFF",
"children": {
"set": {
"TagSimple": [
{ "name": "Child 1" },
{ "name": "Child 2" }
]
}
}
}
}
}
}

13
Qualys Asset Management & Tagging API
Get Started

JSON output
{
"ServiceResponse" : {
"data" : [ {
"Tag" : {
"ruleText" : "windows",
"color" : "#FFFFFF",
"modified" : "2016-01-04T19:51:56Z",
"name" : "Parent Tag",
"children" : {
"list" : [ {
"TagSimple" : {
"name" : "Child 2",
"id" : 2066216
}
}, {
"TagSimple" : {
"name" : "Child 1",
"id" : 2066217
}
} ]
},
"created" : "2016-01-04T19:51:56Z",
"ruleType" : "NAME_CONTAINS",
"id" : 2066215
}
} ],
"count" : 1,
"responseCode" : "SUCCESS"
}
}

Sample 2 - Search tags

API request
cat searchTag.json | curl -s -k -X POST -H "Accept:
application/json" -H "Content-Type: application/json" -H "user:
acme_ss2" -H "password: passwd" -d @-
"https://qualysapi.qualys.com/qps/rest/2.0/search/am/tag"

POST data:
{
"ServiceRequest": {

14
Qualys Asset Management & Tagging API
Get Started

"filters": {
"Criteria": [{
"field": "parent",
"operator": "EQUALS",
"value": "2035617"
},
{
"field": "name",
"operator": "CONTAINS",
"value": "child"
},
{
"field": "id",
"operator": "IN",
"value": "2035619,2035618,2029815"
},
{
"field": "ruleType",
"operator": "EQUALS",
"value": "GROOVY"

},
{
"field": "color",
"operator": "EQUALS",
"value": "#EC7000"
}
]
}
}
}

JSON output
{
"ServiceResponse" : {
"data" : [ {
"Tag" : {
"ruleText" : "windows",
"color" : "#FFFFFF",
"modified" : "2016-01-04T19:51:56Z",
"name" : "Parent Tag",
"children" : {
"list" : [ {
"TagSimple" : {
"name" : "Child 2",
"id" : 2066216

15
Qualys Asset Management & Tagging API
Get Started

}
}, {
"TagSimple" : {
"name" : "Child 1",
"id" : 2066217
}
} ]
},
"created" : "2016-01-04T19:51:56Z",
"ruleType" : "NAME_CONTAINS",
"id" : 2066215
}
} ],
"count" : 1,
"responseCode" : "SUCCESS"
}
}

16
Qualys Asset Management & Tagging API
Get Started

Know your portal version


/qps/rest/portal/version/

[GET]

Using the Version API you can find out the installed version of Portal and
its sub-modules that are available in your subscription.

Sample XML

API request
curl -u "USERNAME:PASSWORD" -X "GET" -H "Accept: application/xml"
https://qualysapi.qualys.com/qps/rest/portal/version

Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
version.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<Portal-Version>
<PortalApplication-VERSION>2.33.0.0-SNAPSHOT-1 DEVELOP
#352 (2018-05-07T22:53:43Z)</PortalApplication-VERSION>
<WAS-VERSION>6.0.0.0</WAS-VERSION>
<FIM-VERSION>1.5.1</FIM-VERSION>
<VM-VERSION>1.0.3</VM-VERSION>
<CERTVIEW-VERSION>1.1.0.0</CERTVIEW-VERSION>
<CM-VERSION>1.20.1</CM-VERSION>
<MDS-VERSION>2.11.7.0</MDS-VERSION>
<CA-VERSION>2.9.1.0</CA-VERSION>
<IOC-VERSION>1.1.0</IOC-VERSION>
<AV2-VERSION>0.1.0</AV2-VERSION>
<QUESTIONNAIRE-VERSION>2.14.0.4</QUESTIONNAIRE-VERSION>
<WAF-VERSION>2.7.0.0</WAF-VERSION>
</Portal-Version>
</data>
</ServiceResponse>

17
Qualys Asset Management & Tagging API
Get Started

Sample JSON

API request
curl -u "USERNAME:PASSWORD" -X "GET" -H "Accept: application/json"
https://qualysapi.qualys.com/qps/rest/portal/version

Response
{
"ServiceResponse": {
"data": [
{
"Portal-Version": {
"PortalApplication-VERSION": "2.33.0.0-SNAPSHOT-1 DEVELOP
#352 (2018-05-07T22:53:43Z)",
"WAS-VERSION": "6.0.0.0",
"VM-VERSION": "1.0.3",
"CM-VERSION": "1.20.1",
"MDS-VERSION": "2.11.7.0",
"CA-VERSION": "2.9.1.0",
"QUESTIONNAIRE-VERSION": "2.14.0.4",
"WAF-VERSION": "2.7.0.0"
},
...
}
}
],
"responseCode": "SUCCESS",
"count": 1
}
}

18
Qualys Asset Management & Tagging API
Connectors 3.0

Connectors 3.0
Connector APIs (3.0)
We have one centralized place for you to create connectors needed for
AssetView and CloudView. The application named “Connectors”
application.

We are introducing new APIs in Asset Management and Tagging


application that can be used as new centralized APIs for AssetView and
CloudView connectors. All the new APIs for connectors belong to version
3. The existing AssetView connector APIs (version 2) continue to work
without any change. However, we plan to deprecate those version 2 APIs in
the coming months.

We recommend you use the new APIs (version 3) for both AssetView and
CloudView connectors. The Asset Management and Tagging APIs (version
3) is available to use.

AWS Connectors APIs 3.0

Azure Connectors APIs 3.0

GCP Connectors APIs 3.0

19
Qualys Asset Management & Tagging API
Connectors 3.0

AWS Connectors 3.0

AWS Connectors 3.0

We support the following operations for all AWS connectors in the


Connectors application.

Create AWS Connector

Update AWS Connector

Run AWS Connector

Search AWS Connector

Delete AWS Connector

Get AWS Connector Info

Get AWS Base Account

Download AWS CloudFormation Template

20
Qualys Asset Management & Tagging API
Connectors 3.0

Create AWS Connector 3.0

/qps/rest/3.0/create/am/awsassetdataconnector

[POST]

Specify the connector details such as arn, externalId, and so on and create
a new connector in the Connectors application.

Permissions required - Managers with full scope.

Input Parameter

Parameters Description

name The ID of the connector that you want to


update.

description Name of the connector you want to


update.

defaultTags (TagSimpleQList) Tags applied to any


asset discovered by the connector.

activation (List<ActivationModule>) Assets


discovered by the connector is activated
for the modules specified.

allRegions (boolean) If true, the end point’s collection


is ignored and all the AWS regions
scanned.

disabled (boolean) Whether execution of the


connector is disabled. (YES). If disabled,
the connector does not synchronize
assets. The disabled (boolean) parameter
is used to disable a connector.

This parameter when set to “true” the


connector is disabled and will not run.

21
Qualys Asset Management & Tagging API
Connectors 3.0

- If a single connector is run and it is


disabled an error is returned.

- If multiple connectors are run and all are


disabled an error is returned.

- If multiple connectors are run and some


are disabled, only connectors that are
enabled will run.

arn Generated by AWS. Ensure that you


provide the same ARN that is generated
by AWS.

externalId Random string which is unique for each


user.

runFrequency runFrequency for a connector decides the


rate at which the connector should poll the
cloud provider and fetch the data.
Specified in minutes.

isRemediationEnabled A flag to enable or disable remediation for


the connector.

connectorAppInfos.set. A mandatory parent parameter when you


need to provide the below parameter,
ConnectorAppInfoQList set.ConnectorAppInfo.

set.ConnectorAppInfo It holds the list of list of ConnectorAppInfo


which includes App Name, identifiers and
tag details. Connector can one or more
apps from list [AI, CI, CSA].

AI-Asset Inventory, CI- Cloud Inventory,


CSA- Cloud Security Assessment

Input Parameters for Cloud Perimeter Scan

You can secure publicly exposed cloud assets by enabling cloud perimeter
scans for your connectors. Cloud perimeter scans use Qualys External
Scanners (Internet Remote Scanners), located at the Qualys Cloud
Platform.

22
Qualys Asset Management & Tagging API
Connectors 3.0

You can automate asset discovery of Connectors and with the Cloud
Perimeter Scan. This ensures all publicly-exposed assets have perimeter
scans performed, based on configurations provided at Connector.

Parameters Description

isCPSEnabled (optional) Set this flag to enable or disable cloud


perimeter scan for the AWS connector. (Note: If
isCPSEnabled flag is enabled, you need to provide the
following parameters for the Cloud Perimeter Scan).

connectorScanSetting Tag to include cloud perimeter scan settings.

isCustomScanConfig Use this flag to indicate the scan configuration to be used


for cloud perimeters scan. By default, this flag is disabled
Enabled and the global scan configuration is applied to the cloud
perimeter scan. To use custom scan configuration, you
need to enable this flag.

optionProfileId Specify the Option Profile Id. This Id is unique for every
user. You can fetch the option profile Id using the List VM
Option Profile API
(/api/2.0/fo/subscription/option_profile/vm/?action=list).
For more information on the how to fetch the option
profile Id, refer to Qualys API (VM, PC) User Guide.

recurrence Specify if the scan should be scheduled on DAILY or


WEEKLY basis.

daysOfWeek Specify the days when the scan should be scheduled. For
example, SUN, MON, TUE, WED, THU, FRI, SAT.Note: This
field is applicable only if the recurrence field is set to
WEEKLY.

scanPrefix Specify a prefix to be appended to the scan name. Once


the cloud perimeter scan is triggered from the
Vulnerability Management application, the prefix is
appended to the scan name. The scan name is in following
format: <prefix>-<connectorId>-<timestamp>

startDate Specify the start date of scan in mm/dd/yyyy format.

23
Qualys Asset Management & Tagging API
Connectors 3.0

startTime Specify the start time of scan in HH:MM (24 hrs) format.

timezone Specify the time zone for the cloud perimeter scan to be
initiated.

Sample 1 - Create new AWS asset data connector

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --
data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/create/am/awsassetdatacon
nector"

Request POST data


<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<data>
<AwsAssetDataConnector>
<name>Test AWSConnector API</name>
<description>Connector created through API
automation</description>
<defaultTags>
<set>
<TagSimple>
<id>42458382</id>
</TagSimple>
</set>
</defaultTags>
<activation>
<set>
<ActivationModule>VM</ActivationModule>
<ActivationModule>CERTVIEW</ActivationModule>
</set>
</activation>
<disabled>false</disabled>
<arn>arn:aws:iam:::12345678911/role:testrole</arn>
<externalId>POD-999999-11213331</externalId>
<isGovCloudConfigured>false</isGovCloudConfigured>
<isDeleted>true</isDeleted >
<allRegions>true</allRegions>
<runFrequency>300</runFrequency>
<isRemediationEnabled>true</isRemediationEnabled>
<connectorAppInfos>

24
Qualys Asset Management & Tagging API
Connectors 3.0

<set>
<ConnectorAppInfoQList>
<set>
<ConnectorAppInfo>
<name>AI</name>
<identifier>arn:aws:iam:::12345678911/ro
le:testrole</identifier>
<tagId>42458382</tagId>
</ConnectorAppInfo>
</set>
</ConnectorAppInfoQList>
<ConnectorAppInfoQList>
<set>
<ConnectorAppInfo>
<name>CI</name>
<identifier>arn:aws:iam:::12345678911/ro
le:testrole</identifier>
<tagId>42458382</tagId>
</ConnectorAppInfo>
</set>
</ConnectorAppInfoQList>
<ConnectorAppInfoQList>
<set>
<ConnectorAppInfo>
<name>CSA</name>
<identifier>arn:aws:iam:::12345678911/ro
le:testrole</identifier>
<tagId>42458382</tagId>
</ConnectorAppInfo>
</set>
</ConnectorAppInfoQList>
</set>
</connectorAppInfos>
</AwsAssetDataConnector>
</data>
</ServiceRequest>

Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
3.0/am/awsassetdataconnector.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<AwsAssetDataConnector>

25
Qualys Asset Management & Tagging API
Connectors 3.0

<id>xxxx</id>
<name>Test AWSConnector API</name>
<awsAccountId>xxxxxxxxx</awsAccountId>
<description>Connector created through API
automation</description>
<connectorState>QUEUED</connectorState>
<type>AWS</type>
<defaultTags>
<list>
<TagSimple>
<id>xxxxxx</id>
<name>CV_Automation_Tag</name>
</TagSimple>
</list>
</defaultTags>
<activation>
<list>
<ActivationModule>CLOUDVIEW</ActivationModule>
<ActivationModule>CERTVIEW</ActivationModule>
<ActivationModule>VM</ActivationModule>
</list>
</activation>
<disabled>false</disabled>
<isGovCloudConfigured>false</isGovCloudConfigured>
<isChinaConfigured>false</isChinaConfigured>
<runFrequency>300</runFrequency>
<isRemediationEnabled>true</isRemediationEnabled>
<connectorAppInfos>
<list>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CSA</name>
<identifier>arn:aws:iam::xxxxxxxxxxx
:role/CV_UI_TestPod</identifier>
<tagId>20485923</tagId>
<tagMetadata>
<id>xxxxxxxxxxx</id>
</tagMetadata>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>AI</name>
<identifier>arn:aws:iam::xxxxxxxxxxx
:role/CV_UI_TestPod</identifier>

26
Qualys Asset Management & Tagging API
Connectors 3.0

<tagId>20485923</tagId>
<tagMetadata>
<id>xxxxxxxxxxx</id>
</tagMetadata>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CI</name>
<identifier>arn:aws:iam::xxxxxxxxxxx
:role/CV_UI_TestPod</identifier>
<tagId>xxxxxxxxxxx</tagId>
<tagMetadata>
<id>xxxxxxxxxxx</id>
</tagMetadata>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
</list>
</connectorAppInfos>
<arn>arn:aws:iam::xxxxxxxx:role/CV_UI_TestPod</arn>
<externalId>POD-999999-11213331</externalId>
<qualysAwsAccountId>xxxxxxxxxxx</qualysAwsAccountId>
<allRegions>true</allRegions>
</AwsAssetDataConnector>
</data>
</ServiceResponse>

Sample 2: Create AWS Connector

API Request (JSON)


curl -u "USERNAME:PASSWORD" -X "POST" --data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/create/am/awsassetdatacon
nector"
--header 'Accept: application/json'

Request POST Data (JSON)


{
"ServiceRequest": {
"data": {
"AwsAssetDataConnector": {
"name": "AWS Connector Via API",
"description": "Connector created through API",
27
Qualys Asset Management & Tagging API
Connectors 3.0

"defaultTags": {
"set": {
"TagSimple": {
"id": 42458382
}
}
},
"activation": {
"set": {
"ActivationModule": [
"VM","SCA"
]
}
},
"disabled": false,
"arn": "arn:aws:iam:::12345678911/role:testrole",
"externalId": "POD-999999-11213331",
"allRegions": true,
"runFrequency": 240,
"isRemediationEnabled": true,
"connectorAppInfos": {
"set": {
"ConnectorAppInfoQList": [
{
"set": {
"ConnectorAppInfo": {
"name": "AI",
"identifier":
"arn:aws:iam:::12345678911/role:testrole",
"tagId": 42458382
}
}
},
{
"set": {
"ConnectorAppInfo": {
"name": "CI",
"identifier":
"arn:aws:iam:::12345678911/role:testrole",
"tagId": 42458382
}
}
},
{
"set": {
"ConnectorAppInfo": {
"name": "CSA",

28
Qualys Asset Management & Tagging API
Connectors 3.0

"identifier":
"arn:aws:iam:::12345678911/role:testrole",
"tagId": 42458382
}
}
}
]
}
}
}
}
}
}

Response (JSON)
{
"ServiceResponse": {
"data": [
{
"AwsAssetDataConnector": {
"description": "Connector created through API",
"type": "AWS",
"name": "AWS Connector Via API",
"externalId": "POD-999999-11213331",
"isChinaConfigured": "false",
"disabled": "false",
"qualysAwsAccountId": "xxxxxxxxxx",
"runFrequency": 240,
"id": xxxxxxx,
"connectorAppInfos": {
"list": [
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"tagMetadata": {
"id": xxxxxxx
},
"name": "AI",
"identifier":
"arn:aws:iam::xxxxxxxxxxxx:role/CV_UI_TestPod",
"tagId": xxxxxxx
}
}
]
}

29
Qualys Asset Management & Tagging API
Connectors 3.0

},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"tagMetadata": {
"id": xxxxxxx
},
"name": "CSA",
"identifier":
"arn:aws:iam::xxxxxxxxxxxx:role/CV_UI_TestPod",
"tagId": xxxxxxx
}
}
]
}
},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"tagMetadata": {
"id": xxxxxxx
},
"name": "CI",
"identifier":
"arn:aws:iam::xxxxxxxxx:role/CloudViewPOD1",
"tagId": xxxxxxx
}
}
]
}
}
]
},
"defaultTags": {
"list": [
{
"TagSimple": {
"id": xxxxxxx,
"name": "CV_Automation_Tag"
}
}
]
},
"activation": {

30
Qualys Asset Management & Tagging API
Connectors 3.0

"ActivationModule": [
"CLOUDVIEW",
"SCA",
"VM"
]
},
"isGovCloudConfigured": "false",
"allRegions": "true",
"connectorState": "QUEUED",
"arn":
"arn:aws:iam::xxxxxxxxx:role/CV_UI_TestPod",
"awsAccountId": "xxxxxxxxx",
"isRemediationEnabled": "true"
}
}
],
"count": 1,
"responseCode": "SUCCESS"
}
}
}

Sample 3: Create AWS Connector with Cloud Perimeter Scan Enabled

API Request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --
data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/create/am/awsassetdatacon
nector"
--header 'Accept: application/json'

Request POST data


<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<data>
...
<id>12345</id>
<name>Sample Connector</name>
<lastSync />
<lastError />
<connectorState>PENDING</connectorState>
<type>AWS</type>
<defaultTags>
<list>
<TagSimple>
31
Qualys Asset Management & Tagging API
Connectors 3.0

<id>1</id>
<name>EC2</name>
</TagSimple>
</list>
</defaultTags>
<activation>
<ActivationModule>VM</ActivationModule>
</activation>
<disabled>false</disabled>
<isGovCloudConfigured>false</isGovCloudConfigured>
<arn>arn:aws:iam:::12345678911/role:testrole</arn>
<externalId>POD-999999-11213331</externalId>
<endpoints>
<list/>
</endpoints>
<allRegions>true</allRegions>
</AwsAssetDataConnector>
</data>
</ServiceRequest>

Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
3.0/am/aws_asset_data-connector.xsd">
<responseCode>SUCCESS</responseCode>
...
<isCPSEnabled>true</isCPSEnabled>
<connectorScanSetting>
<isCustomScanConfigEnabled>true</isCustomScanConfigEnabled>
</connectorScanSetting>
<connectorScanConfig>
<set>
<ConnectorScanConfiguration>
<daysOfWeek>
<set>
<Day>SUN</Day>
<Day>MON</Day>
<Day>TUE</Day>
</set>
</daysOfWeek>
<optionProfileId>2</optionProfileId>
<recurrence>WEEKLY</recurrence>
<scanPrefix>Scan aws 02</scanPrefix>
<startDate>31/05/2022</startDate>
<startTime>15:45</startTime>

32
Qualys Asset Management & Tagging API
Connectors 3.0

<timezone>Africa/Cairo</timezone>
</ConnectorScanConfiguration>
</set>
</connectorScanConfig>
...
</data>
</ServiceResponse>

Sample 4: Create Connector with specific regions using V3 APIs (XML)

API Request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --
data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/create/am/awsassetdatacon
nector"

Request POST data

Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse
xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
3.0/am/awsassetdataconnector.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<AwsAssetDataConnector>
<id>xxxx</id>
<name>Test AWSConnector API</name>
<awsAccountId>xxxxxxxxx</awsAccountId>
<description>Connector created through API
automation</description>
<connectorState>SUCCESS</connectorState>
<type>AWS</type>
<defaultTags>
<list>
<TagSimple>
<id>xxxxxx</id>
<name>CV_Automation_Tag</name>
</TagSimple>
</list>
</defaultTags>
<activation>

33
Qualys Asset Management & Tagging API
Connectors 3.0

<list>
<ActivationModule>CLOUDVIEW</ActivationModule>
<ActivationModule>CERTVIEW</ActivationModule>
<ActivationModule>VM</ActivationModule>
</list>
</activation>
<disabled>false</disabled>
<isGovCloudConfigured>false</isGovCloudConfigured>
<isChinaConfigured>false</isChinaConfigured>
<runFrequency>300</runFrequency>
<isRemediationEnabled>true</isRemediationEnabled>
<connectorAppInfos>
<list>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CSA</name>
<identifier>arn:aws:iam::xxxxxxxx
xxx:role/CV_UI_TestPod</identifier>
<tagId>20485923</tagId>
<tagMetadata>
<id>xxxxxxxxxxx</id>
</tagMetadata>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>AI</name>
<identifier>arn:aws:iam::xxxxxxxx
xxx:role/CV_UI_TestPod</identifier>
<tagId>20485923</tagId>
<tagMetadata>
<id>xxxxxxxxxxx</id>
</tagMetadata>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CI</name>
<identifier>arn:aws:iam::xxxxxxxx
xxx:role/CV_UI_TestPod</identifier>
<tagId>xxxxxxxxxxx</tagId>
<tagMetadata>
<id>xxxxxxxxxxx</id>

34
Qualys Asset Management & Tagging API
Connectors 3.0

</tagMetadata>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
</list>
</connectorAppInfos>
<arn>arn:aws:iam::xxxxxxxx:role/CV_UI_TestPod</arn>
<externalId>POD-999999-11213331</externalId>
<qualysAwsAccountId>xxxxxxxxxxx</qualysAwsAccountId>

<allRegions>false</allRegions>
</AwsAssetDataConnector>
</ServiceResponse>

Sample 5: Create Connector with specific regions using V3 APIs (JSON)

API Request
curl -u "USERNAME:PASSWORD" -X "POST" --data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/create/am/awsassetdatacon
nector"
--header 'Accept: application/json'

Request POST data


<{
"ServiceRequest": {
"data": {
"AwsAssetDataConnector": {
"name": "Test AWSConnector API",
"description": "Connector created through API automation",
"defaultTags": {
"set": {
"TagSimple": {
"id": 42458382
}
}
},
"activation": {
"set": {
"ActivationModule": [
"VM","SCA"
]
}
},
"disabled": false,
"arn": "arn:aws:iam::XXXXXXXXXXXX:role/ARN_UPGRADE",
35
Qualys Asset Management & Tagging API
Connectors 3.0

"externalId": "US1-1368984-11213331",
"allRegions": false,
"endpoints": {
"add": {
"AwsEndpointSimple": [
{
"regionCode": "af-south-1"
},
{
"regionCode": "eu-south-1"
}
]
}
},
"runFrequency": 240,
"isRemediationEnabled": true,
"connectorAppInfos": {
"set": {
"ConnectorAppInfoQList": [
{
"set": {
"ConnectorAppInfo": {
"name": "AI",
"identifier":
"arn:aws:iam:::12345678911/role:testrole"
}
},
"set": {
"ConnectorAppInfo": {
"name": "CI",
"identifier":
"arn:aws:iam:::12345678911/role:testrole"
}
},
"set": {
"ConnectorAppInfo": {
"name": "CSA",
"identifier":
"arn:aws:iam:::12345678911/role:testrole"
}
}
}
]
}
}
}
}
}

36
Qualys Asset Management & Tagging API
Connectors 3.0

Response
{
"ServiceResponse": {
"count": 1,
"responseCode": "SUCCESS",
"data": [
{
"AwsAssetDataConnector": {
"qualysAwsAccountId": "205767712438",
"isChinaConfigured": "false",
"runFrequency": 240,
"arn":
"arn:aws:iam::XXXXXXXXXXXX:role/ARN_UPGRADE",
"externalId": "US1-1368984-11213331",
"id": 1998546,
"name": "Test AWSConnector API",
"description": "Connector created through API
automation",
"connectorState": "QUEUED",
"disabled": "false",
"isInstantAssessmentEnabled": "false",
"awsAccountId": "",
"isGovCloudConfigured": "false",
"isCPSEnabled": "false",
"isRemediationEnabled": "true",
"allRegions": "false",
"activation": {
"ActivationModule": [
"SCA",
"VM",
"CLOUDVIEW"
]
},
"connectorAppInfos": {
"list": [
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"identifier":
"arn:aws:iam:::12345678911/role:testrole",
"name": "CI"
}
}

37
Qualys Asset Management & Tagging API
Connectors 3.0

]
}
},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"identifier":
"arn:aws:iam:::12345678911/role:testrole",
"name": "AI"
}
}
]
}
},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"identifier":
"arn:aws:iam:::12345678911/role:testrole",
"name": "CSA"
}
}
]
}
}
]
},
"type": "AWS",
"defaultTags": {
"list": [
{
"TagSimple": {
"id": 42458382,
"name": "CV_Automation_Tag"
}
}
]
}
}
}
]
}
}

38
Qualys Asset Management & Tagging API
Connectors 3.0

Update AWS Connector 3.0

/qps/rest/3.0/update/am/awsassetdataconnector

/qps/rest/3.0/update/am/awsassetdataconnector/<id>

[POST]

You can update only those connectors that created in the Connector
application. Specify the connector ID and you can then update details of
the specified connector.

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

Permissions required - Managers with full scope.

Input Parameters

Parameters Description

name The name of the connector that you want


to update.

description Provide a description for your connector.

defaultTags (TagSimpleQList) Tags applied to any asset


discovered by the connector.

activation (List<ActivationModule>) Assets


discovered by the connector is activated
for the modules specified.

allRegions (boolean) If true, the end point’s collection


is ignored and all the AWS regions
scanned.

39
Qualys Asset Management & Tagging API
Connectors 3.0

disabled (boolean) Whether execution of the


connector is disabled (YES). If disabled, the
connector does not synchronize assets.

arn Generated by AWS. Ensure that you


provide the same ARN that is generated by
AWS.

externalId Random string which is unique for each


user.

runFrequency runFrequency for a connector decides the


rate at which the connector should poll the
cloud provider and fetch the data.
Specified in minutes.

isRemediationEnabled A flag to enable or disable remediation for


the connector.

connectorAppInfos.set. A mandatory parent parameter when you


ConnectorAppInfoQList need to provide the below parameter,
set.ConnectorAppInfo.

connectorAppInfos It holds the list of list of ConnectorAppInfo


which includes App Name, identifiers and
tag details. Connector can one or more
apps from list [AI, CI, CSA].

AI-Asset Inventory, CI- Cloud Inventory,


CSA- Cloud Security Assessment

Input Parameters for Cloud Perimeter Scan

You can secure publicly exposed cloud assets by enabling cloud perimeter
scans for your connectors. Cloud perimeter scans use Qualys External
Scanners (Internet Remote Scanners), located at the Qualys Cloud
Platform.

You can automate asset discovery of Connectors and with the Cloud
Perimeter Scan. This ensures all publicly-exposed assets have perimeter
scans performed, based on configurations provided at Connector.

40
Qualys Asset Management & Tagging API
Connectors 3.0

Parameters Description

isCPSEnabled (optional) Set this flag to enable or disable cloud


perimeter scan for the AWS connector (Note: If
isCPSEnabled flag is enabled, you need to provide the
following parameters for the Cloud Perimeter Scan).

connectorScanSetting Tag to include cloud perimeter scan settings.

isCustomScanConfig Use this flag to indicate the scan configuration to be used


for cloud perimeters scan. By default, this flag is disabled
Enabled and the global scan configuration is applied to the cloud
perimeter scan.

To use custom scan configuration, you need to enable this


flag.

optionProfileId Specify the Option Profile Id. This Id is unique for every
user. You can fetch the option profile Id using the List VM
Option Profile API
(/api/2.0/fo/subscription/option_profile/vm/?action=list).
For more information on the how to fetch the option
profile Id, refer to Qualys API (VM, PC) User Guide.

recurrence Specify if the scan should be scheduled on DAILY or


WEEKLY basis.

daysOfWeek Specify the days when the scan should be scheduled. For
example, SUN, MON, TUE, WED, THU, FRI, SAT.

Note: This field is applicable only if the recurrence field is


set to WEEKLY.

scanPrefix Specify a prefix to be appended to the scan name. Once


the cloud perimeter scan is triggered from the
Vulnerability Management application, the prefix is
appended to the scan name. The scan name is in following
format:

<prefix>-<connectorId>-<timestamp>

startDate Specify the start date of scan in mm/dd/yyyy format.

41
Qualys Asset Management & Tagging API
Connectors 3.0

startTime Specify the start time of scan in HH:MM (24 hrs) format.

timezone Specify the time zone for the cloud perimeter scan to be
initiated.

Sample 1 - Update AWS connector name

Change the name of an asset data connector with ID of 12345, add a tag
with the ID of 1 to the defaultTags collection, and add us-east-1 as scanned
region

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --
data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/update/am/awsassetdatacon
nector/XXXXX"

Request POST data


<ServiceRequest>
<data>
<AwsAssetDataConnector>
<name>AWSConnector API Updated</name>
<description>Updated Description Via API
Updated</description>
<defaultTags>
<set>
<TagSimple>
<id>42458382</id>
</TagSimple>
</set>
</defaultTags>
<activation>
<set>
<ActivationModule>VM</ActivationModule>
</set>
</activation>
<allRegions>true</allRegions>
<disabled>false</disabled>
<runFrequency>120</runFrequency>
<isRemediationEnabled>false</isRemediationEnabled>
<arn>arn:aws:iam:::12345678911/role:testrole</arn>
<externalId>POD-999999-11213331</externalId>
<connectorAppInfos>

42
Qualys Asset Management & Tagging API
Connectors 3.0

<set>
<ConnectorAppInfoQList>
<set>
<ConnectorAppInfo>
<name>AI</name>
<identifier>arn:aws:iam:::1234567891
1/role:testrole</identifier>
<tagId>42458382</tagId>
</ConnectorAppInfo>
</set>
<set>
<ConnectorAppInfo>
<name>CI</name>
<identifier>arn:aws:iam:::1234567891
1/role:testrole</identifier>
<tagId>42458382</tagId>
</ConnectorAppInfo>
</set>
<set>
<ConnectorAppInfo>
<name>CSA</name>
<identifier>arn:aws:iam:::1234567891
1/role:testrole</identifier>
<tagId>42458382</tagId>
</ConnectorAppInfo>
</set>
</ConnectorAppInfoQList>
</set>
</connectorAppInfos>
</AwsAssetDataConnector>
</data>
</ServiceRequest>

Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
3.0/am/awsassetdataconnector.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<AwsAssetDataConnector>
<id>843003</id>
</AwsAssetDataConnector>
</data>
</ServiceResponse>

43
Qualys Asset Management & Tagging API
Connectors 3.0

Sample 2 - Update AWS connector details

API Request (JSON)


curl -u "USERNAME:PASSWORD" -X "POST" --data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/update/am/awsassetdatacon
nector/XXXXX" --header 'Accept: application/json'

Request POST Data (JSON)


{
"ServiceRequest": {
"data": {
"AwsAssetDataConnector": {
"name": "AWSConnector API ",
"description": "Updated Description Via API ",
"defaultTags": {
"set": {
"TagSimple": {
"id": 42458382
}
}
},
"activation": {
"set": {
"ActivationModule": [
"SCA","PC"
]
}
},
"allRegions": false,
"disabled": false,
"runFrequency": 600,
"isRemediationEnabled": true,
"connectorAppInfos": {
"set": {
"ConnectorAppInfoQList": [
{
"set": {
"ConnectorAppInfo": {
"name": "AI",
"identifier":
"arn:aws:iam:::12345678911/role:testrole",
"tagId": 42458382
}
}
},
{

44
Qualys Asset Management & Tagging API
Connectors 3.0

"set": {
"ConnectorAppInfo": {
"name": "CI",
"identifier":
"arn:aws:iam:::12345678911/role:testrole",
"tagId": 42458382
}
}
},
{
"set": {
"ConnectorAppInfo": {
"name": "CSA",
"identifier":
"arn:aws:iam:::12345678911/role:testrole",
"tagId": 42458382
}
}
}
]
}
}
}
}
}
}

Response (JSON)
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": [
{
"AwsAssetDataConnector": {
"id": xxxxx
}
}
]
}
}

Sample 3 - Update AWS connector to enable Cloud Perimeter Scan

API request

45
Qualys Asset Management & Tagging API
Connectors 3.0

curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --


data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/update/am/awsassetdatacon
nector/"< file.xml

Request POST data


<ServiceRequest>
<data>
...
<isCPSEnabled>true</isCPSEnabled>
<connectorScanSetting>
<isCustomScanConfigEnabled>true</isCustomScanConfigEnabled
>
</connectorScanSetting>
<connectorScanConfig>
<set>
<ConnectorScanConfiguration>
<daysOfWeek>
<set>
<Day>SUN</Day>
<Day>MON</Day>
<Day>TUE</Day>
</set>
</daysOfWeek>
<optionProfileId>2</optionProfileId>
<recurrence>WEEKLY</recurrence>
<scanPrefix>update scan prefix</scanPrefix>
<startDate>31/05/2022</startDate>
<startTime>15:45</startTime>
<timezone>Africa/Cairo</timezone>
</ConnectorScanConfiguration>
</set>
</connectorScanConfig>
...
</data>
</ServiceRequest>

Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
3.0/am/awsassetdataconnector.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>

46
Qualys Asset Management & Tagging API
Connectors 3.0

...
<isCPSEnabled>true</isCPSEnabled>
<connectorScanSetting>
<isCustomScanConfigEnabled>true</isCustomScanConfigEnabled
>
</connectorScanSetting>
<connectorScanConfig>
<set>
<ConnectorScanConfiguration>
<daysOfWeek>
<set>
<Day>SUN</Day>
<Day>MON</Day>
<Day>TUE</Day>
</set>
</daysOfWeek>
<optionProfileId>2</optionProfileId>
<recurrence>WEEKLY</recurrence>
<scanPrefix>updated- AWS scan prefix</scanPrefix>
<startDate>31/05/2022</startDate>
<startTime>15:45</startTime>
<timezone>Africa/Cairo</timezone>
</ConnectorScanConfiguration>
</set>
</connectorScanConfig>
...
</data>
</ServiceResponse>

47
Qualys Asset Management & Tagging API
Connectors 3.0

Delete AWS Connector 3.0

/qps/rest/3.0/delete/am/awsassetdataconnector

/qps/rest/3.0/delete/am/awsassetdataconnector/<id>

[POST]

Delete one or more AWS connectors from the Connectors application.

Permissions required - Managers with full scope.

Sample 1 - Delete a single AWS connector

API request
curl -n -u "USERNAME:PASSWORD"
"https://qualysapi.qualys.com/qps/rest/3.0/delete/am/awsassetdatacon
nector/12345"

Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
3.0/am/aws_asset_data_connector.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<AwsAssetDataConnector ><id>12345</id></AwsAssetDataConnector >
</data>
</ServiceResponse>

API Request (JSON)


curl -n -u "USERNAME:PASSWORD"
"https://qualysapi.qualys.com/qps/rest/3.0/delete/am/awsassetdatacon
nector/12345"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Response (JSON)
{

48
Qualys Asset Management & Tagging API
Connectors 3.0

"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": {
"AwsAssetDataConnector ": {
"id": 12345
}
}
}
}

Sample 2 - Delete several AWS connectors tagged with the To Delete


tag

API request
curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST" --
data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/delete/am/awsassetdatacon
nector"

Request POST data


<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<filters>
<Criteria field="tagName" operator="EQUALS">To
Delete</Criteria>
</filters>
</ServiceRequest>

Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
3.0/am/awsassetdataconnector.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<AwsAssetDataConnector >
<id>1680408</id>
</AwsAssetDataConnector>
</data>
</ServiceResponse>

49
Qualys Asset Management & Tagging API
Connectors 3.0

API Request (JSON)


curl -u "USERNAME:PASSWORD" -X "POST" --data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/delete/am/awsassetdatacon
nector"
--header 'Accept: application/json'

Request POST Data (JSON)


{
"ServiceRequest": {
"filters": {
"Criteria": [
{
"field": "activation",
"operator": "EQUALS",
" tagName": "Outdated"
}
]
}
}
}

Response (JSON)
{
"ServiceResponse": {
"data": [
{
"AwsAssetDataConnector": {
"id": 1680411
}
}
],
"count": 1,
"responseCode": "SUCCESS"
}
}

XSD

<platform API server>/qps/xsd/3.0/am/aws_asset_data_connector.xsd

50
Qualys Asset Management & Tagging API
Connectors 3.0

Run AWS Connector 3.0

/qps/rest/3.0/run/am/awsassetdataconnector

/qps/rest/3.0/run/am/awsassetdataconnector/<id>

[POST]

The run connector API will fetch the latest changes related to your
connector.

Permissions required - Managers with full scope.

API Request
curl -n -u "USERNAME:PASSWORD"
"https://qualysapi.qualys.com/qps/rest/3.0/run/am/awsassetdataconnec
tor/<id>"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Response (JSON)
{
"ServiceResponse": {
"count": 1,
"data": [
{
"AwsAssetDataConnector": {
"connectorAppInfos": {
"list": [
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CI",
"identifier":
"arn:aws:iam::xxxxxxxxx:role/test-pod"
}
}
]
}
},
{
"ConnectorAppInfoQList": {
"list": [

51
Qualys Asset Management & Tagging API
Connectors 3.0

{
"ConnectorAppInfo": {
"name": "AI",
"identifier":
"arn:aws:iam::xxxxxxxx:role/test-pod"
}
}
]
}
},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CSA",
"identifier":
"arn:aws:iam::xxxxxxxx:role/test-pod"
}
}
]
}
}
]
},
"id": xxxxxx,
"nextSync": "2022-07-04T08:48:27Z",
"isRemediationEnabled": "false",
"lastSync": "2022-07-04T04:50:04Z",
"connectorState": "FINISHED_ERRORS",
"runFrequency": 240,
"awsAccountId": "xxxxxxxx",
"allRegions": "false",
"lastError": "Error getting EBS Encryption By Default
Status from af-south-1. Please check if region is enabled or EC2
service is enabled for this region",
"type": "AWS",
"activation": {
"ActivationModule": [
"CLOUDVIEW"
]
},
"disabled": "false",
"name": "sign",
"isChinaConfigured": "false",
"externalId": "pod-xxxxxx-1662018652278",
"cloudviewUuid": "xxxxxx-85d6-xxxx-a779-4a7eb643444f",
"isDeleted": "false",

52
Qualys Asset Management & Tagging API
Connectors 3.0

"isGovCloudConfigured": "false",
"qualysAwsAccountId": "xxxxxxxx",
"description": "testing"
}
}
],
"responseCode": "SUCCESS"
}
}

53
Qualys Asset Management & Tagging API
Connectors 3.0

Search AWS Connector 3.0

/qps/rest/3.0/search/am/awsassetdataconnector

Returns a list of AWS connectors in the user's account that match the
provided criteria. Narrow down your search results using the parameters
listed below.

Pagination - A maximum of 100 instances are returned by default. To


customize this specify a "preferences" tag in the POST body of your
request.

Input Parameter

Parameters Description

id The ID of the connector that you want to


search.

name Name of the connector you want to search.

description Description of the connector you want to


search.

lastSync Last sync date of the connector.

lastError Last error date of the connector.

connectorState State of the connector. States include


PENDING, SUCCESS,ERROR, QUEUED,
RUNNING,
PROCESSING,FINISHED_SUCCESS,
FINISHED_ERRORS,
DISABLED,INCOMPLETE.

activation Activation of Qualys modules. Includes VM,


PC, SCA, CERTVIEW.

defaultTags.name The name of a tag in the defaultTags


collection.

54
Qualys Asset Management & Tagging API
Connectors 3.0

defaultTag (Integer) The ID of a tag in the defaultTags


collection.

allRegions Whether all regions should be selected.

endpoint.region AWS region code.

disabled (Boolean) Whether execution of the


connector is disabled (YES). If disabled, the
connector does not synchronize assets.

appCapability.name Connector application capability name.

appCapability.tag.name Tag name associates with connector


identifier.

awsAccountId The AWS account ID an asset data


connector is connecting to perform
searches.

Sample: Find all asset data connectors with tag name USA

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --
data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/search/am/awsassetdatacon
nector"

Request POST data


<?xml version="1.0" encoding="UTF-8"?>
<ServiceRequest>
<filters>
<Criteria field="defaultTags.name" operator="EQUALS">USA</Criteria>
</filters>
</ServiceRequest>

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

55
Qualys Asset Management & Tagging API
Connectors 3.0

<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
3.0/am/awsassetdataconnector.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<hasMoreRecords>false</hasMoreRecords>
<data>
<AwsAssetDataConnector>
<id>1680606</id>
<name>AWSConnector API</name>
<awsAccountId>xxxxxxxx</awsAccountId>
<description>Connector created through API
automation</description>
<lastSync>2022-04-30T11:58:06Z</lastSync>
<connectorState>FINISHED_SUCCESS</connectorState>
<type>AWS</type>
<defaultTags>
<list>
<TagSimple>
<id>xxxxxxxx</id>
<name>testpod</name>
</TagSimple>
</list>
</defaultTags>
<activation>
<list>
<ActivationModule>CLOUDVIEW</ActivationModule>
<ActivationModule>CERTVIEW</ActivationModule>
<ActivationModule>VM</ActivationModule>
</list>
</activation>
<disabled>false</disabled>
<isGovCloudConfigured>false</isGovCloudConfigured>
<isChinaConfigured>false</isChinaConfigured>
<runFrequency>240</runFrequency>
<isRemediationEnabled>true</isRemediationEnabled>
<connectorAppInfos>
<list>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CSA</name>
<identifier>arn:aws:iam::xxxxxxxx:ro
le/test_pod</identifier>
<tagId>xxxxxxxx</tagId>
<tagMetadata>
<id>xxxxxxxx</id>

56
Qualys Asset Management & Tagging API
Connectors 3.0

<name>TestTag</name>
</tagMetadata>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CI</name>
<identifier>arn:aws:iam::xxxxxxxx:ro
le/test_pod</identifier>
<tagId>xxxxxxxx</tagId>
<tagMetadata>
<id>xxxxxxxx</id>
<name>TestTag</name>
</tagMetadata>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>AI</name>
<identifier>arn:aws:iam::xxxxxxxx:ro
le/test_pod</identifier>
<tagId>xxxxxxxx</tagId>
<tagMetadata>
<id>xxxxxxxx</id>
<name>Tag123</name>
</tagMetadata>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
</list>
</connectorAppInfos>
<cloudviewUuid>xxxxxxx-6726-xxxx-ad4c-
a5fb811a9d72</cloudviewUuid>
<arn>arn:aws:iam::xxxxxxxx:role/Saur_Test_04</arn>
<externalId>pod13-xxxxxx-xxxxx</externalId>
<qualysAwsAccountId>xxxxxxxx</qualysAwsAccountId>
<allRegions>true</allRegions>
</AwsAssetDataConnector>
</data>
</ServiceResponse>

API Request (JSON)

57
Qualys Asset Management & Tagging API
Connectors 3.0

curl -u "USERNAME:PASSWORD" -X "POST" --data-binary @-


"https://qualysapi.qualys.com/qps/rest/3.0/search/am/awsassetdatacon
nector"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Request POST data (JSON)


{
"ServiceRequest": {
"filters": {
"Criteria": [
{
"field": "defaultTags.name",
"operator": "EQUALS",
"value": "USA"
}
]
}
}
}

Response (JSON)
{
"ServiceResponse": {
"data": [
{
"AwsAssetDataConnector": {
"description": "Connector created through API
automation",
"name": "AWSConnector API",
"externalId": "pod-3734136-1652751983927",
"isChinaConfigured": "false",
"lastSync": "2022-04-30T11:58:06Z",
"disabled": "false",
"connectorState": "FINISHED_SUCCESS",
"qualysAwsAccountId": "XXXXXXXXXXXX",
"runFrequency": 240,
"id": 1680606,
"activation": {
"ActivationModule": [
"CLOUDVIEW",
"CERTVIEW",
"VM"
]
},

58
Qualys Asset Management & Tagging API
Connectors 3.0

"cloudviewUuid": "95c9c13b-6726-3ef1-ad4c-
a5fb811a9d72",
"type": "AWS",
"isGovCloudConfigured": "false",
"allRegions": "true",
"arn":
"arn:aws:iam::XXXXXXXXXXXX:role/sample_user",
"connectorAppInfos": {
"list": [
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CSA",
"identifier":
"arn:aws:iam::XXXXXXXXXXXX:role/sample_user",
"tagId": 123489465,
"tagMetadata": {
"id": 123489465,
"name":
"Sample_tag"
}
}
}
]
}
},
{
...
},
"isRemediationEnabled": "true"
}
}
],
"hasMoreRecords": "false",
"responseCode": "SUCCESS",
"count": 1
}
}

59
Qualys Asset Management & Tagging API
Connectors 3.0

Get AWS Connector Details 3.0

[GET]

/qps/rest/3.0/get/am/awsassetdataconnector/<id>

Specify the AWS connector ID to fetch the details of the connector.

Permissions required - Managers with full scope.

Sample 1: Fetch the AWS connector with the ID 179407

API Request (JSON)


curl -u "USERNAME:PASSWORD"--request GET --data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/get/am/awsassetdataconnec
tor/179407"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Response (JSON)
{
"ServiceResponse": {
"data": [
{
"AwsAssetDataConnector": {
"name": "AWS AV CONN",
"externalId": "pod-xxxxxx-1662018652278",
"isChinaConfigured": "false",
"lastSync": "2022-07-05T03:20:18Z",
"nextSync": "2022-07-05T07:20:00Z",
"disabled": "false",
"qualysAwsAccountId": "xxxxx",
"runFrequency": 240,
"id": 179407,
"connectorAppInfos": {
"list": [
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "AI",

60
Qualys Asset Management & Tagging API
Connectors 3.0

"identifier":
"arn:aws:iam::xxxxxxxxx:role/Cloudview_Test"
}
}
]
}
}
]
},
"isGovCloudConfigured": "false",
"connectorState": "FINISHED_SUCCESS",
"allRegions": "false",
"type": "AWS",
"arn": "arn:aws:iam::xxxxxxxxx:role/Cloudview_Test",
"isDeleted": "false",
"awsAccountId": "xxxxxxxxx",
"isRemediationEnabled": "false"
}
}
],
"responseCode": "SUCCESS",
"count": 1
}
}

Sample 2: Get Details of AWS Connector with Cloud Perimeter Scan


Enabled

API Request (JSON)


curl -u "USERNAME:PASSWORD"--request GET --data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/get/am/awsassetdataconnec
tor/179407"
--header 'Accept: application/json'

Response (JSON)
<ServiceResponse>
<data>
...
isCPSEnabled>true</isCPSEnabled>
<connectorAppInfos>
<list>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>AI</name>
61
Qualys Asset Management & Tagging API
Connectors 3.0

<identifier>arn:aws:iam::XXXXXXXXXXXX:role/Sample-
IAMRole</identifier>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
</list>
</connectorAppInfos>
<connectorScanSetting>
<isCustomScanConfigEnabled>true</isCustomScanConfigEnabled>
</connectorScanSetting>
<connectorScanConfig>
<list>
<ConnectorScanConfiguration>
<scanPrefix>AWS CPS 6/2/22</scanPrefix>
<optionProfileId>2</optionProfileId>
<recurrence>WEEKLY</recurrence>
<startDate>MM/DD/YYYY</startDate>
<startTime>HH:MM</startTime>
<daysOfWeek>
<list>
<Day>SUN</Day>
<Day>MON</Day>
<Day>TUE</Day>
</list>
</daysOfWeek>
<timezone>Africa/Cairo</timezone>
</ConnectorScanConfiguration>
</list>
...
</data>
</ServiceResponse>

62
Qualys Asset Management & Tagging API
Connectors 3.0

Get AWS Base Account Id 3.0

[GET]

/qps/rest/3.0/search/am/awsbaseaccount

/qps/rest/3.0/get/am/awsbaseaccount/<id>

Retrieve the base account details of a connector either by searching for


name or id.

Permissions required - Managers with full scope.

Sample: Get Base Account with Name

API request
curl -u "USERNAME:PASSWORD"--request GET --data-binary @-
'https://qualysapi.qualys.com/qps/rest/3.0/search/am/awsbaseaccount'
\

Response (XML)
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
version.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<hasMoreRecords>false</hasMoreRecords>
<data>
<globalAccountId>2057xxxxx438</globalAccountId>
<govAccountId>011xxxxx917</govAccountId>
<chinaAccountId>011xxxx917</chinaAccountId>
<customerGlobalAccount>false</customerGlobalAccount>
<customerGovAccount>false</customerGovAccount>
<customerChinaAccount>false</customerChinaAccount>
</data>
</ServiceResponse>

API request(JSON)
curl --request GET --data-binary @-
'https://qualysapi.qualys.com/qps/rest/3.0/search/am/awsbaseaccount'

63
Qualys Asset Management & Tagging API
Connectors 3.0

\
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Cookie: JSESSIONID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Response (JSON)
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": [
{
"globalAccountId": "2057xxxxx438",
"govAccountId": "011xxxxx917",
"chinaAccountId": "011xxxx917",
"customerGlobalAccount": "false",
"customerGovAccount": "false",
"customerChinaAccount": "false"
}
],
"hasMoreRecords": "false"
}
}

64
Qualys Asset Management & Tagging API
Connectors 3.0

Get All Errors for AWS Connector 3.0

[GET]

/qps/rest/3.0/search/am/assetdataconnectorerrors

Get the list of errors encountered when executing a connector in the


connector application.

Permissions required - Managers with full scope.

Sample: Get all errors of connector

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: application/json" -H
"Accept:
application/json" --request GET --data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/search/am/assetdataconnec
torerrors"

Request POST data


<?xml version="1.0" encoding="UTF-8"?>
<ServiceRequest>
<filters>
<Criteria field="id" operator="EQUALS">167405</Criteria>
</filters>
</ServiceRequest>

Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
3.0/am/assetdataconnectorerrors.xsd">
<responseCode>SUCCESS</responseCode>
<count>11</count>
<hasMoreRecords>false</hasMoreRecords>
<data>

65
Qualys Asset Management & Tagging API
Connectors 3.0

<AssetDataConnectorErrors>
<errorMessage>Error processing instance-id i-
05012c5470e31894a, Error reference: 8a0a9084-7eba-4d73-8855-
1ac223fd88db</errorMessage>
<created>2022-05-23T10:10:12Z</created>
</AssetDataConnectorErrors>
<AssetDataConnectorErrors>
<errorMessage>Error processing instance-id i-
0be39baf8d595fedd, Error reference: 72a61d1d-f365-4527-92e3-
07807737d2cb</errorMessage>
<created>2022-05-23T10:10:12Z</created>
</AssetDataConnectorErrors>
<AssetDataConnectorErrors>
<errorMessage>Error processing instance-id i-
08cc2b4a5bef80d13, Error reference: 7757336e-a636-45a4-8907-
e134244ac42e</errorMessage>
<created>2022-05-23T10:10:12Z</created>
</AssetDataConnectorErrors>
<AssetDataConnectorErrors>
<errorMessage>Error processing instance-id i-
0f9ff0ee787ec1554, Error reference: 7f7b7461-45f1-491c-8a5b-
2a47542414fe</errorMessage>
<created>2022-05-23T10:10:36Z</created>
</AssetDataConnectorErrors>
<AssetDataConnectorErrors>
<errorMessage>Error processing instance-id i-
05bcf1815e3326d29, Error reference: a034a6c8-ed66-44a6-9878-
664c48cafa07</errorMessage>
<created>2022-05-23T10:10:36Z</created>
</AssetDataConnectorErrors>
<AssetDataConnectorErrors>
<errorMessage>Error processing instance-id i-
030e059e876ce6848, Error reference: 92d1e044-7be9-4648-8486-
f12818f97ab1</errorMessage>
<created>2022-05-23T10:10:36Z</created>
</AssetDataConnectorErrors>
<AssetDataConnectorErrors>
<errorMessage>Error processing instance-id i-
0c7416add8f64cfff, Error reference: 602f12cc-d8f5-439e-91e8-
e07b57d2192d</errorMessage>
<created>2022-05-23T10:11:00Z</created>
</AssetDataConnectorErrors>
<AssetDataConnectorErrors>
<errorMessage>Processing error while evaluating control:
LAMBDA. Please contact support</errorMessage>
<created>2022-05-23T10:10:13Z</created>
</AssetDataConnectorErrors>
<AssetDataConnectorErrors>

66
Qualys Asset Management & Tagging API
Connectors 3.0

<errorMessage>Error getting EBS Encryption By Default


Status from af-south-1. Please check if region is enabled or EC2
service is enabled for this region</errorMessage>
<created>2022-05-23T10:09:43Z</created>
</AssetDataConnectorErrors>
<AssetDataConnectorErrors>
<errorMessage>Error getting EBS Encryption By Default
Status from eu-south-1. Please check if region is enabled or EC2
service is enabled for this region</errorMessage>
<created>2022-05-23T10:09:32Z</created>
</AssetDataConnectorErrors>
<AssetDataConnectorErrors>
<errorMessage>com.amazonaws.AmazonServiceException: AWS
was not able to validate the provided access credentials (Service:
AmazonEC2; Status Code: 401; Error Code: AuthFailure; Request ID:
5a5ac505-b83c-4681-84a4-3c39b1383bb9)</errorMessage>
<created>2022-05-23T10:09:08Z</created>
</AssetDataConnectorErrors>
</data>
</ServiceResponse>

API request(JSON)
curl -u "USERNAME:PASSWORD"--request GET --data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/search/am/assetdataconnec
torerrors"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Request POST data(JSON)


{
"ServiceRequest": {
"filters": {
"Criteria": [
{
"field": "id",
"operator": "EQUALS",
"value": "1xxxxxx"
}
]
}
}
}

Response(JSON)

67
Qualys Asset Management & Tagging API
Connectors 3.0

{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 11,
"hasMoreRecords": false,
"data": {
"AssetDataConnectorErrors": [
{
"errorMessage": "Error processing instance-id i-
05012c5470e31894a, Error reference:\n8a0a9084-7eba-4d73-8855-
1ac223fd88db",
"created": "2022-05-23T10: 10: 12Z"
},
{
"errorMessage": "Error processing instance-id i-
0be39baf8d595fedd, Error reference:\n72a61d1d-f365-4527-92e3-
07807737d2cb",
"created": "2022-05-23T10: 10: 12Z"
},
{
"errorMessage": "Error processing instance-id i-
08cc2b4a5bef80d13, Error reference:\n7757336e-a636-45a4-8907-
e134244ac42e",
"created": "2022-05-23T10: 10: 12Z"
},
{
"errorMessage": "Error processing instance-id i-
0f9ff0ee787ec1554, Error reference:\n7f7b7461-45f1-491c-8a5b-
2a47542414fe",
"created": "2022-05-23T10: 10: 36Z"
},
{
"errorMessage": "Error processing instance-id i-
05bcf1815e3326d29, Error reference:\na034a6c8-ed66-44a6-9878-
664c48cafa07",
"created": "2022-05-23T10: 10: 36Z"
},
{
"errorMessage": "Error processing instance-id i-
030e059e876ce6848, Error reference:\n92d1e044-7be9-4648-8486-
f12818f97ab1",
"created": "2022-05-23T10: 10: 36Z"
},
{
"errorMessage": "Error processing instance-id i-
0c7416add8f64cfff, Error reference:\n602f12cc-d8f5-439e-91e8-
e07b57d2192d",
"created": "2022-05-23T10: 11: 00Z"

68
Qualys Asset Management & Tagging API
Connectors 3.0

},
{
"errorMessage": "Processing error while evaluating
control: LAMBDA. Please contact\nsupport",
"created": "2022-05-23T10: 10: 13Z"
},
{
"errorMessage": "Error getting EBS Encryption By Default
Status from af-south-1.\nPlease check if region is enabled or EC2
service is enabled for this region",
"created": "2022-05-23T10: 09: 43Z"
},
{
"errorMessage": "Error getting EBS Encryption By Default
Status from eu-south-1.\nPlease check if region is enabled or EC2
service is enabled for this region",
"created": "2022-05-23T10: 09: 32Z"
},
{
"errorMessage": "com.amazonaws.AmazonServiceException: AWS
was not able to validate\nthe provided access credentials (Service:
AmazonEC2; Status Code: 401; Error Code:\nAuthFailure; Request ID:
5a5ac505-b83c-4681-84a4-3c39b1383bb9)",
"created": "2022-05-23T10: 09: 08Z"
}
]
}
}
}

69
Qualys Asset Management & Tagging API
Connectors 3.0

Download AWS CloudFormation Template 3.0

/qps/rest/3.0/download/am/awscloudformationtemplate

[POST]

Returns a AWS CloudFormation template based on AI or CI/CSA


capability.

Permissions required - Managers with full scope.

Sample: Download AWS CloudFormation template for AI

API request(JSON)
curl -n -u "USERNAME:PASSWORD"
"https://qualysapi.qualys.com/qps/rest/3.0/download/am/awscloudforma
tiontemplate"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Request POST data(JSON)


{
"ServiceRequest": {
"data": {
"AwsCloudformationTemplate": {
"awsCloudType": "Global",
"externalId": "p11-1234-12129126127",
"capability": "AI"
}
}
}
}

Response(JSON)
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": " IAM Role for Qualys EC2 Connector to fetch
instances",
"Outputs": {
70
Qualys Asset Management & Tagging API
Connectors 3.0

"RoleARN": {
"Description": "The ARN of the role that can be assumed by the
Qualys EC2 Connector",
"Value": {
"Fn::GetAtt": [
"QualysRole",
"Arn"
]
}
}
},
"Resources": {
"QualysRole": {
"Type": "AWS::IAM::Role",
"Properties": {
"RoleName": "Role_For_QualysEC2Connector",
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::xxxxxxxx:root"
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"sts:ExternalId": "p19-1234-12129126127"
}
}
}
]
},
"Policies": [
{
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances",
"ec2:DescribeAddresses",
"ec2:DescribeImages"
],
"Resource": "*"

71
Qualys Asset Management & Tagging API
Connectors 3.0

}
]
},
"PolicyName": "IAM_Policy_For_EC2Connector"
}
]
}
}
}
}

72
Qualys Asset Management & Tagging API
Connectors 3.0

Azure Connectors 3.0

Azure Connectors 3.0

We support the following operations for all Microsoft Azure connectors in


the Connectors application.

Create Azure Connector

Update Azure Connector

Run Azure Connector

Search Azure Connector

Delete Azure Connector

Get Azure Connector Info

73
Qualys Asset Management & Tagging API
Connectors 3.0

Create Azure Connector 3.0

/qps/rest/3.0/create/am/azureassetdataconnector

[POST]

Specify the connector details such as application Id, authenticationKey,


description, directoryId, name, and subscription Id of your Azure account
and create a new connector in the Connectors application.

Permissions required - Managers with full scope.

Input Parameter

Parameters Description

id The ID of the connector that you want to


create.

name Name of the connector you want to create.

description Description of the connector you want to


create.

defaultTags (TagSimpleQList) Tags applied to any asset


discovered by the connector.

activation (List<ActivationModule>) Assets


discovered by the connector is activated
for the modules specified.

authRecord (AzureAuthRecordSimple) The Azure


authentication record the connector uses
to connect to Azure. When
writing/updating it is looked up by the ID
field.

disabled (boolean) Whether execution of the


connector is disabled

(YES). If disabled, the connector does not

74
Qualys Asset Management & Tagging API
Connectors 3.0

synchronize assets.

applicationId Unique identifier of the application you


create on Azure portal.

directoryId Unique identifier of your Azure Active


Directory.

subscriptionId Unique identifier of your Microsoft Azure


subscription.

authenticationKey The secret key generated after you provide


permission to the application to access the
Windows Azure Service.

connectorAppInfos.set. A mandatory parent parameter when you


ConnectorAppInfoQList need to provide the below parameter,
set.ConnectorAppInfo.

connectorAppInfos It holds the list of list of ConnectorAppInfo


which includes App Name, identifiers and
tag details. Connector can one or more
apps from list [AI, CI, CSA].

AI-Asset Inventory, CI- Cloud Inventory,


CSA- Cloud Security Assessment

runFrequency runFrequency for a connector decides the


rate at which the connector should poll the
cloud provider and fetch the data.
Specified in minutes.

isRemediationEnabled A flag to enable or disable remediation for


the connector.

Input Parameters for Cloud Perimeter Scan

You can secure publicly exposed cloud assets by enabling cloud perimeter
scans for your connectors. Cloud perimeter scans use Qualys External
Scanners (Internet Remote Scanners), located at the Qualys Cloud
Platform.

75
Qualys Asset Management & Tagging API
Connectors 3.0

You can automate asset discovery of Connectors and with the Cloud
Perimeter Scan. This ensures all publicly-exposed assets have perimeter
scans performed, based on configurations provided at Connector.

Parameters Description

isCPSEnabled (optional) Set this flag to enable or disable cloud


perimeter scan for the AWS connector (Note: If
isCPSEnabled flag is enabled, you need to provide the
below parameters for the Cloud Perimeter Scan).

connectorScanSetting Tag to include cloud perimeter scan settings.

isCustomScanConfig Use this flag to indicate the scan configuration to be used


for cloud perimeters scan. By default, this flag is disabled
Enabled and the global scan configuration is applied to the cloud
perimeter scan.

To use custom scan configuration, you need to enable this


flag.

optionProfileId Specify the Option Profile Id. This Id is unique for every
user. You can fetch the option profile Id using the List VM
Option Profile API
(/api/2.0/fo/subscription/option_profile/vm/?action=list).
For more information on the how to fetch the option
profile Id, refer to Qualys API (VM, PC) User Guide.

recurrence Specify if the scan should be scheduled on DAILY or


WEEKLY basis.

daysOfWeek Specify the days when the scan should be scheduled. For
example, SUN, MON, TUE, WED, THU, FRI, SAT.

Note: This field is applicable only if the recurrence field is


set to WEEKLY.

scanPrefix Specify a prefix to be appended to the scan name. Once


the cloud perimeter scan is triggered from the
Vulnerability Management application, the prefix is
appended to the scan name. The scan name is in following
format:

76
Qualys Asset Management & Tagging API
Connectors 3.0

<prefix>-<connectorId>-<timestamp>

startDate Specify the start date of scan in mm/dd/yyyy format.

startTime Specify the start time of scan in HH:MM (24 hrs) format.

timezone Specify the time zone for the cloud perimeter scan to be
initiated.

Sample 1 - Create Azure connector

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" -
data-binary
@"https://qualysapi.qualys.com/qps/rest/3.0/create/am/azureassetdata
connector"

Request POST data


<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<data>
<AzureAssetDataConnector>
<name>Azure Connector Via API</name>
<description>Sample Azure Connector API</description>
<defaultTags>
<set>
<TagSimple>
<id>123488470</id>
</TagSimple>
</set>
</defaultTags>
<activation>
<set>
<ActivationModule>VM</ActivationModule>
<ActivationModule>CERTVIEW</ActivationModule>
<ActivationModule>SCA</ActivationModule>
</set>
</activation>
<disabled>false</disabled>
<runFrequency>240</runFrequency>
<isRemediationEnabled>true</isRemediationEnabled>
<isGovCloudConfigured>false</isGovCloudConfigured>
<authRecord>

77
Qualys Asset Management & Tagging API
Connectors 3.0

<applicationId>xxxxxxxxx-694d-xxxx-ae0b-
d2bd14d1a4d7</applicationId>
<directoryId>xxxxxxxxx-65ab-xxxx-9e5b-
1ea02d3d94eb</directoryId>
<subscriptionId>xxxxxxxxx-4f67-xxxx-917d-
2246853844e1</subscriptionId>
<authenticationKey>02LCb8/RCn0lbGj6xxxxxxxxnoH01rog=</authen
ticationKey>
</authRecord>
<connectorAppInfos>
<set>
<ConnectorAppInfoQList>
<set>
<ConnectorAppInfo>
<name>AI</name>
<identifier>xxxxxxxxx-4f67-xxxx-917d-
2246853844e1</identifier>
<tagId>123489465</tagId>
</ConnectorAppInfo>
</set>
</ConnectorAppInfoQList>
<ConnectorAppInfoQList>
<set>
<ConnectorAppInfo>
<name>CI</name>
<identifier>xxxxxxxxx-4f67-xxxx-917d-
2246853844e1</identifier>
<tagId>123489465</tagId>
</ConnectorAppInfo>
</set>
</ConnectorAppInfoQList>
<ConnectorAppInfoQList>
<set>
<ConnectorAppInfo>
<name>CSA</name>
<identifier>xxxxxxxxx-4f67-xxxx-917d-
2246853844e1</identifier>
<tagId>123489465</tagId>
</ConnectorAppInfo>
</set>
</ConnectorAppInfoQList>
</set>
</connectorAppInfos>
</AzureAssetDataConnector>
</data>
</ServiceRequest>

78
Qualys Asset Management & Tagging API
Connectors 3.0

XML output
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
3.0/am/azureassetdataconnector.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<AzureAssetDataConnector>
<id>1672602</id>
<name>Azure Connector Via API</name>
<description>Sample Azure Connector API</description>
<connectorState>QUEUED</connectorState>
<type>AZURE</type>
<disabled>false</disabled>
<isGovCloudConfigured>false</isGovCloudConfigured>
<runFrequency>240</runFrequency>
<isRemediationEnabled>true</isRemediationEnabled>
<connectorAppInfos>
<list>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CI</name>
<identifier>xxxxxxxxx-4f67-xxxx-
917d-2246853844e1</identifier>
<tagId>123xxx65</tagId>
<tagMetadata>
<id>123xxx65</id>
</tagMetadata>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CSA</name>
<identifier>xxxxxxxxx-4f67-xxxx-
917d-2246853844e1</identifier>
<tagId>123489465</tagId>
<tagMetadata>
<id>123489465</id>
</tagMetadata>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
<ConnectorAppInfoQList>

79
Qualys Asset Management & Tagging API
Connectors 3.0

<list>
<ConnectorAppInfo>
<name>AI</name>
<identifier>xxxxxxxxx-4f67-xxxx-
917d-2246853844e1</identifier>
<tagId>123489465</tagId>
<tagMetadata>
<id>123489465</id>
</tagMetadata>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
</list>
</connectorAppInfos>
<authRecord/>
</AzureAssetDataConnector>
</data>
</ServiceResponse>

Sample 2 - Create Azure connector

API Request (JSON)


curl -u "USERNAME:PASSWORD" -X "POST" -data-binary
@"https://qualysapi.qualys.com/qps/rest/3.0/create/am/azureassetdata
connector"
--header 'Accept: application/json'

Request POST Data (JSON)


{
"ServiceRequest": {
"data": {
"AzureAssetDataConnector": {
"name": "Azure Connector Via API",
"description": "Sample Azure Connector API",
"defaultTags": {
"set": {
"TagSimple": {
"id": 123488470
}
}
},
"activation": {
"set": {
"ActivationModule": [
"VM",
"CERTVIEW",

80
Qualys Asset Management & Tagging API
Connectors 3.0

"SCA"
]
}
},
"disabled": false,
"runFrequency": 240,
"isRemediationEnabled": true,
"isGovCloudConfigured": false,
"authRecord": {
"applicationId": "xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7",
"directoryId": "xxxxxxxxx-65ab-xxxx-9e5b-1ea02d3d94eb",
"subscriptionId": "xxxxxxxxx-4f67-xxxx-917d-2246853844e1",
"authenticationKey": "02LCb8/RCn0lbGj6xxxxxxxxxxnoH01rog="
},
"connectorAppInfos": {
"set": {
"ConnectorAppInfoQList": [
{
"set": {
"ConnectorAppInfo": {
"name": "AI",
"identifier": "xxxxxxxxx-4f67-xxxx-917d-
2246853844e1",
"tagId": 123489465
}
}
},
{
"set": {
"ConnectorAppInfo": {
"name": "CI",
"identifier": "xxxxxxxxx-4f67-xxxx-917d-
2246853844e1",
"tagId": 123489465
}
}
},
{
"set": {
"ConnectorAppInfo": {
"name": "CSA",
"identifier": "xxxxxxxxx-4f67-xxxx-917d-
2246853844e1",
"tagId": 123489465
}
}
}
]

81
Qualys Asset Management & Tagging API
Connectors 3.0

}
}
}
}
}
}

Response (JSON)
{
"ServiceResponse": {
"data": [
{
"AzureAssetDataConnector": {
"description": "Sample Azure Connector API",
"name": "Azure Connector Via API",
"authRecord": {},
"connectorAppInfos": {
"list": [
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "AI",
"identifier":
"xxxxxxxxx-4f67-xxxx-917d-2246853844e1",
"tagId": 123489465,
"tagMetadata": {
"id": 123489465
}
}
}
]
}
},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CSA",
"identifier":
"xxxxxxxxx-4f67-xxxx-917d-2246853844e1",
"tagId": 123489465,
"tagMetadata": {
"id": 123489465
}

82
Qualys Asset Management & Tagging API
Connectors 3.0

}
}
]
}
},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CI",
"identifier":
"xxxxxxxxx-4f67-xxxx-917d-2246853844e1",
"tagId": 123489465,
"tagMetadata": {
"id": 123489465
}
}
}
]
}
}
]
},
"isGovCloudConfigured": "false",
"connectorState": "QUEUED",
"type": "AZURE",
"disabled": "false",
"runFrequency": 240,
"isRemediationEnabled": "true",
"id": 1672601
}
}
],
"responseCode": "SUCCESS",
"count": 1
}
}

Sample 3 - Create Azure connector with Cloud Perimeter Scan Enabled

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" -
data-binary
@"https://qualysapi.qualys.com/qps/rest/3.0/create/am/azureassetdata
connector"

83
Qualys Asset Management & Tagging API
Connectors 3.0

Request POST data


<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<data>
...
<isCPSEnabled>true</isCPSEnabled>
<authRecord>
<applicationId>33333333-3333-3333-3333-
333333333333</applicationId>
<directoryId>22222222-2222-2222-2222-
222222222222</directoryId>
<subscriptionId>11111111-1111-1111-1111-
111111111111</subscriptionId>
<authenticationKey>02LCb8/RCn0lbGj6xcOGQPZlYG2z85aSm
CxnoH01rog=</authenticationKey>
</authRecord>
<connectorScanSetting>
<isCustomScanConfigEnabled>true</isCustomScanConfigEn
abled>
</connectorScanSetting>
<connectorScanConfig>
<set>
<ConnectorScanConfiguration>
<daysOfWeek>
<set>
<Day>SUN</Day>
<Day>MON</Day>
<Day>TUE</Day>
</set>
</daysOfWeek>
<optionProfileId>2</optionProfileId>
<recurrence>WEEKLY</recurrence>
<scanPrefix>Scan azure 01</scanPrefix>
<startDate>31/05/2022</startDate>
<startTime>15:45</startTime>
<timezone>Africa/Cairo</timezone>
</ConnectorScanConfiguration>
</set>
</connectorScanConfig>
</AzureAssetDataConnector>
</data>
</ServiceRequest>

XML output
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

84
Qualys Asset Management & Tagging API
Connectors 3.0

xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
3.0/am/aws_asset_data-connector.xsd">
<responseCode>SUCCESS</responseCode>
...
<isCPSEnabled>true</isCPSEnabled>
<connectorScanSetting>
<isCustomScanConfigEnabled>true</isCustomScanConfigEnabled>
</connectorScanSetting>
<connectorScanConfig>
<set>
<ConnectorScanConfiguration>
<daysOfWeek>
<set>
<Day>SUN</Day>
<Day>MON</Day>
<Day>TUE</Day>
</set>
</daysOfWeek>
<optionProfileId>2</optionProfileId>
<recurrence>WEEKLY</recurrence>
<scanPrefix>Scan azure 01</scanPrefix>
<startDate>31/05/2022</startDate>
<startTime>15:45</startTime>
<timezone>Africa/Cairo</timezone>
</ConnectorScanConfiguration>
</set>
</connectorScanConfig>
...
</data>
</ServiceResponse>

XSD

<platform API server>/qps/xsd/3.0/am/awsassetdataconnector.xsdre.

85
Qualys Asset Management & Tagging API
Connectors 3.0

Update Azure Connector 3.0

/qps/rest/3.0/update/am/azureassetdataconnector

/qps/rest/3.0/update/am/azureassetdataconnector/<id>

[POST]

Specify the connector ID and the details of the connector that you would
want to update in the request. Your connector details get updated.

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

Permissions required - Managers with full scope.

Input Parameters

Parameters Description

name The ID of the connector that you want to


update.

description Name of the connector you want to


update.

defaultTags (TagSimpleQList) Tags applied to any asset


discovered by the connector.

activation (List<ActivationModule>) Assets


discovered by the connector is activated
for the modules specified.

authRecord (AzureAuthRecordSimple) The Azure


authentication record the connector uses
to connect to Azure. When
writing/updating it is looked up by the ID
field.

86
Qualys Asset Management & Tagging API
Connectors 3.0

disabled (boolean) Whether execution of the


connector is disabled (YES). If disabled, the
connector does not synchronize assets.

runFrequency runFrequency for a connector decides the


rate at which the connector should poll the
cloud provider and fetch the data specified
in minutes.

isRemediationEnabled A flag to enable or disable remediation for


the connector.

connectorAppInfos.set. A mandatory parent parameter when you


ConnectorAppInfoQList need to provide the below parameter,
set.ConnectorAppInfo.

connectorAppInfos It holds the list of list of ConnectorAppInfo


which includes App. Name, identifiers and
tag details. Connector can one or more
apps from list [AI, CI, CSA].

AI-Asset Inventory, CI- Cloud Inventory,


CSA- Cloud Security Assessment

Input Parameters for Cloud Perimeter Scan

You can secure publicly exposed cloud assets by enabling cloud perimeter
scans for your connectors. Cloud perimeter scans use Qualys External
Scanners (Internet Remote Scanners), located at the Qualys Cloud
Platform.

You can automate asset discovery of Connectors and with the Cloud
Perimeter Scan. This ensures all publicly-exposed assets have perimeter
scans performed, based on configurations provided at Connector.

Parameters Description

isCPSEnabled (optional) Set this flag to enable or disable cloud


perimeter scan for the AWS connector (Note: If
isCPSEnabled flag is enabled, you need to provide the
below parameters for the Cloud Perimeter Scan).

87
Qualys Asset Management & Tagging API
Connectors 3.0

connectorScanSetting Tag to include cloud perimeter scan settings.

isCustomScanConfig Use this flag to indicate the scan configuration to be used


for cloud perimeters scan. By default, this flag is disabled
Enabled and the global scan configuration is applied to the cloud
perimeter scan.

To use custom scan configuration, you need to enable this


flag.

optionProfileId Specify the Option Profile Id. This Id is unique for every
user. You can fetch the option profile Id using the List VM
Option Profile API
(/api/2.0/fo/subscription/option_profile/vm/?action=list).
For more information on the how to fetch the option
profile Id, refer to Qualys API (VM, PC) User Guide.

recurrence Specify if the scan should be scheduled on DAILY or


WEEKLY basis.

daysOfWeek Specify the days when the scan should be scheduled. For
example, SUN, MON, TUE, WED, THU, FRI, SAT.

Note: This field is applicable only if the recurrence field is


set to WEEKLY.

scanPrefix Specify a prefix to be appended to the scan name. Once


the cloud perimeter scan is triggered from the
Vulnerability Management application, the prefix is
appended to the scan name. The scan name is in following
format:

<prefix>-<connectorId>-<timestamp>

startDate Specify the start date of scan in mm/dd/yyyy format.

startTime Specify the start time of scan in HH:MM (24 hrs) format.

timezone Specify the time zone for the cloud perimeter scan to be
initiated.

Sample 1 - Update Azure connector name

88
Qualys Asset Management & Tagging API
Connectors 3.0

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --
data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/update/am/azureassetdatac
onnector/12345"

Request POST data


<?xml version="1.0" encoding="UTF-8" ?>
<root>
<ServiceRequest>
<data>
<AzureAssetDataConnector>
<id>2004</id>
<name>Azure Connector</name>
<description>Updated Description Via API New1</description>
<defaultTags>
<set>
<TagSimple>
<id>123488470</id>
</TagSimple>
</set>
</defaultTags>
<activation>
<set>
<ActivationModule>VM</ActivationModule>
</set>
</activation>
<authRecord>
<applicationId>xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7</applicationId>
<directoryId>xxxxxxxxx-65ab-xxxx-9e5b-1ea02d3d94eb</directoryId>
<subscriptionId>xxxxxxxxx-4f67-xxxx-917d-
2246853844e1</subscriptionId>
<authenticationKey>02LCb8/RCn0lbGj6xxxxxxxxnoH01rog=</authentication
Key>
</authRecord>
<disabled>false</disabled>
<runFrequency>300</runFrequency>
<isRemediationEnabled>true</isRemediationEnabled>
<connectorAppInfos>
<set>
<ConnectorAppInfoQList>
<set>
<ConnectorAppInfo>
<name>CSA</name>
<identifier>xxxxxxxxx-4f67-xxxx-917d-2246853844e1</identifier>
<tagId>123489465</tagId>
</ConnectorAppInfo>

89
Qualys Asset Management & Tagging API
Connectors 3.0

</set>
</ConnectorAppInfoQList>
</set>
</connectorAppInfos>
</AzureAssetDataConnector>
</data>
</ServiceRequest>
</root>

Response
<?xml version="1.0" encoding="UTF-8" ?>
<ServiceResponse>
<data>
<AzureAssetDataConnector>
<id>842602</id>
</AzureAssetDataConnector>
</data>
<count>1</count>
<responseCode>SUCCESS</responseCode>
</ServiceResponse>

Sample 2 - Update Azure connector details

API Request (JSON)


curl -u "USERNAME:PASSWORD" -X "POST" --data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/update/am/azureassetdatac
onnector/12345"
--header 'Accept: application/json'

Request POST Data (JSON)


{
"ServiceRequest": {
"data": {
"AzureAssetDataConnector": {
"id": 2004,
"name": "Azure Connector",
"description": "Updated Description Via API New1",
"defaultTags": {
"set": {
"TagSimple": {
"id": 123488470
}
}
},
"activation": {

90
Qualys Asset Management & Tagging API
Connectors 3.0

"set": {
"ActivationModule": "VM"
}
},
"authRecord": {
"applicationId": "f076c321-694d-4929-ae0b-d2bd14d1a4d7",
"directoryId": "ff4e2413-65ab-4dc2-9e5b-1ea02d3d94eb",
"subscriptionId": "9de9e0a7-4f67-4812-917d-2246853844e1",
"authenticationKey":
"02LCb8/RCn0lbGj6xcOGQPZlYG2z85aSmCxnoH01rog="
},
"disabled": false,
"runFrequency": 300,
"isRemediationEnabled": true,
"connectorAppInfos": {
"set": {
"ConnectorAppInfoQList": {
"set": {
"ConnectorAppInfo": {
"name": "AI",
"identifier": "9de9e0a7-4f67-4812-917d-
2246853844e1",
"tagId": 123489465
}
}
},
"ConnectorAppInfoQList": {
"set": {
"ConnectorAppInfo": {
"name": "CI",
"identifier": "9de9e0a7-4f67-4812-917d-
2246853844e1",
"tagId": 123489465
}
}
},
"ConnectorAppInfoQList": {
"set": {
"ConnectorAppInfo": {
"name": "CSA",
"identifier": "9de9e0a7-4f67-4812-917d-
2246853844e1",
"tagId": 123489465
}
}
}
}
}

91
Qualys Asset Management & Tagging API
Connectors 3.0

}
}
}
}

Response (JSON)
{
"ServiceResponse": {
"data": [
{
"AzureAssetDataConnector": {
"id": 842602
}
}
],
"count": 1,
"responseCode": "SUCCESS"
}
}

Sample 3 - Update Azure connector to enable Cloud Perimeter Scan

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --
data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/update/am/azureassetdatac
onnector/12345"
--header 'Accept: application/json'

Request POST data


<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<data>
...
<isCPSEnabled>true</isCPSEnabled>
<connectorScanSetting>
<isCustomScanConfigEnabled>true</isCustomScanConfig
Enabled>
</connectorScanSetting>
<connectorScanConfig>
<set>
<ConnectorScanConfiguration>
<daysOfWeek>
<set>
<Day>SUN</Day>

92
Qualys Asset Management & Tagging API
Connectors 3.0

<Day>MON</Day>
<Day>TUE</Day>
</set>
</daysOfWeek>
<optionProfileId>2</optionProfileId>
<recurrence>WEEKLY</recurrence>
<scanPrefix>update azure 01</scanPrefix>
<startDate>31/05/2022</startDate>
<startTime>15:45</startTime>
<timezone>Africa/Cairo</timezone>
</ConnectorScanConfiguration>
</set>
</connectorScanConfig>
...
</ServiceRequest>

Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
3.0/am/aws_asset_data-connector.xsd">
<responseCode>SUCCESS</responseCode>
...
<isCPSEnabled>true</isCPSEnabled>
<connectorScanSetting>
<isCustomScanConfigEnabled>true</isCustomScanConfigEnabled
>
</connectorScanSetting>
<connectorScanConfig>
<set>
<ConnectorScanConfiguration>
<daysOfWeek>
<set>
<Day>SUN</Day>
<Day>MON</Day>
<Day>TUE</Day>
</set>
</daysOfWeek>
<optionProfileId>2</optionProfileId>
<recurrence>WEEKLY</recurrence>
<scanPrefix>updated- AWS scan prefix</scanPrefix>
<startDate>31/05/2022</startDate>
<startTime>15:45</startTime>
<timezone>Africa/Cairo</timezone>
</ConnectorScanConfiguration>
</set>

93
Qualys Asset Management & Tagging API
Connectors 3.0

</connectorScanConfig>
...
</data>
</ServiceResponse>

XSD

<platform API server>/qps/xsd/3.0/am/azure_asset_data_connector.xsd

94
Qualys Asset Management & Tagging API
Connectors 3.0

Delete Azure Connector 3.0

/qps/rest/3.0/delete/am/azureassetdataconnector

/qps/rest/3.0/delete/am/azureassetdataconnector/<id>

[POST]

Delete one or more Azure connectors.

Permissions required - Managers with full scope.

Sample 1 - Delete Azure connector

API request
curl -n -u "USERNAME:PASSWORD"
"https://qualysapi.qualys.com/qps/rest/3.0/delete/am/azureassetdatac
onnector/289201"

Response
<?xml version="1.0" encoding="UTF-8" ?>
<ServiceResponse>
<data>
<AzureAssetDataConnector>
<id>842602</id>
</AzureAssetDataConnector>
</data>
<count>1</count>
<responseCode>SUCCESS</responseCode>
</ServiceResponse>

API request(JSON)
curl -n -u "USERNAME:PASSWORD"
"https://qualysapi.qualys.com/qps/rest/3.0/delete/am/azureassetdatac
onnector/289201"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Response(JSON)
{
"ServiceResponse": {

95
Qualys Asset Management & Tagging API
Connectors 3.0

"data": [
{
"AzureAssetDataConnector": {
"id": 842602
}
}
],
"count": 1,
"responseCode": "SUCCESS"
}
}

XSD

<platform API server>/qps/xsd/3.0/am/azure_asset_data_connector.xsd

96
Qualys Asset Management & Tagging API
Connectors 3.0

Run Azure Connector 3.0

/qps/rest/3.0/run/am/azureassetdataconnector

/qps/rest/3.0/run/am/azureassetdataconnector/<id>

[POST]

API to run the Azure connector. The connectors may be run immediately or
queued to run when there is capacity. The run connector API will fetch the
latest changes related to your connector.

Permissions required - Managers with full scope.

API request(XML)
curl -n -u "USERNAME:PASSWORD"
"https://qualysapi.qualys.com/qps/rest/3.0/run/am/azureassetdataconn
ector/<id>"

Response(XML)
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse>
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<AzureAssetDataConnector>
<nextSync>2022-06-30T18:51:02Z</nextSync>
<connectorAppInfos>
<list>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CI</name>
<identifier>f076c321-694d-4929-ae0b-d2bd14d1a4d7</identifier>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
</list>
<list>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CSA</name>
<identifier>f076c321-694d-4929-ae0b-d2bd14d1a4d7</identifier>

97
Qualys Asset Management & Tagging API
Connectors 3.0

</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
</list>
<list>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>AI</name>
<identifier>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx</identifier>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
</list>
</connectorAppInfos>
<disabled>false</disabled>
<id>842602</id>
<connectorState>FINISHED_SUCCESS</connectorState>
<name>Azure Connector Via API Updated12</name>
<isRemediationEnabled>true</isRemediationEnabled>
<lastSync>2022-06-30T15:06:02Z</lastSync>
<runFrequency>240</runFrequency>
<authRecord>
<authenticationKey>02LCb8/RCn0lbGj6xcOGQPZlYG2z85aSmCxnoH01rog=</aut
henticationKey>
<applicationId>f076c321-694d-4929-ae0b-d2bd14d1a4d7</applicationId>
<directoryId>ff4e2413-65ab-4dc2-9e5b-1ea02d3d94eb</directoryId>
<subscriptionId>9de9e0a7-4f67-4812-917d-
2246853844e1</subscriptionId>
</authRecord>
<cloudviewUuid>2ad0a7a1-f881-330c-b5d7-c5c1faddfa39</cloudviewUuid>
<isDeleted>false</isDeleted>
<isGovCloudConfigured>false</isGovCloudConfigured>
<type>AZURE</type>
<activation>
<ActivationModule>CLOUDVIEW</ActivationModule>
</activation>
<subscriptionName>cvtest</subscriptionName>
<description>Sample Azure Connector API Updated</description>
</AzureAssetDataConnector>
</data>
</ServiceResponse>

API request(JSON)
curl -n -u "USERNAME:PASSWORD"
"https://qualysapi.qualys.com/qps/rest/3.0/run/am/azureassetdataconn
ector/<id>"

98
Qualys Asset Management & Tagging API
Connectors 3.0

--header 'Accept: application/json'


--header 'Content-Type: application/json'

Response(JSON)
{
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": [
{
"AzureAssetDataConnector": {
"nextSync": "2022-06-30T18:51:02Z",
"connectorAppInfos": {
"list": [
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CI",
"identifier":
"xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7"
}
}
]
}
},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CSA",
"identifier":
"xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7"
}
}
]
}
},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {

99
Qualys Asset Management & Tagging API
Connectors 3.0

"name": "AI",
"identifier":
"xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7"
}
}
]
}
}
]
},
"disabled": "false",
"id": 842602,
"connectorState": "FINISHED_SUCCESS",
"name": "Azure Connector Via API Updated12",
"isRemediationEnabled": "true",
"lastSync": "2022-06-30T15:06:02Z",
"runFrequency": 240,
"authRecord": {
"authenticationKey":
"02LCb8/RCn0lbGj6xxxxxxxxnoH01rog=",
"applicationId": "xxxxxxxxx-694d-xxxx-ae0b-
d2bd14d1a4d7",
"directoryId": "xxxxxxxxx-65ab-xxxx-9e5b-
1ea02d3d94eb",
"subscriptionId": "xxxxxxxxx-4f67-xxxx-917d-
2246853844e1"
},
"cloudviewUuid": "xxxxxxxxx-f881-xxxx-b5d7-
c5c1faddfa39",
"isDeleted": "false",
"isGovCloudConfigured": "false",
"type": "AZURE",
"activation": {
"ActivationModule": [
"CLOUDVIEW"
]
},
"subscriptionName": "cvtest",
"description": "Sample Azure Connector API
Updated"
}
}
]
}
}
}

100
Qualys Asset Management & Tagging API
Connectors 3.0

Search Azure Connector 3.0

/qps/rest/3.0/search/am/azureassetdataconnector

Returns a list of Azure connectors that match the provided criteria.

Limit your results -Narrow down your search results using the parameters
listed below.

Pagination - A maximum of 100 instances are returned by default. To


customize this specify a "preferences" tag in the POST body of your
request.

Input Parameters

Parameters Description

id The ID of the connector that you want to


search.

name Name is the name for the connector you


want to search.

description Description of the connector you want to


search.

lastSync Last sync date of the connector

connectorState State of the connector. States include


PENDING, SUCCESS, ERROR, QUEUED,
RUNNING, PROCESSING,
FINISHED_SUCCESS,
FINISHED_ERRORS, DISABLED,
INCOMPLETE.

Type Type of connector- Azure

authrecord.applicationId Unique identifier of the application you


create on Azure portal.

authrecord.directoryId Unique identifier of your Azure Active

101
Qualys Asset Management & Tagging API
Connectors 3.0

Directory.

activation Activation of Qualys modules. Includes


VM, PC, SCA, CERTVIEW

authrecord.subscriptionId Unique identifier of your Microsoft Azure


subscription.

appCapability.name Connector application capability name

appCapability.tag.name Tag name associates with Connector


identifier.

disabled (boolean) Whether execution of the


connector is disabled

(YES). If disabled, the connector does not


synchronize assets.

defaultTags.name The name of a tag in the defaultTags


collection.

defaultTag (Integer) The ID of a tag in the


defaultTags collection.

lastError Last error date of the connector.

Sample: Search Azure connector name

API request
curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST" --
data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/search/am/azureassetdatac
onnector"

Request POST data (XML)


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

102
Qualys Asset Management & Tagging API
Connectors 3.0

<root>
<ServiceRequest>
<filters>
<Criteria>
<field>id</field>
<operator>EQUALS</operator>
<value>xxxxx</value>
</Criteria>
<Criteria>
<field>name</field>
<operator>EQUALS</operator>
<value>Azure Connector Via API</value>
</Criteria>
<Criteria>
<field>description</field>
<operator>EQUALS</operator>
<value>Sample Azure Connector API</value>
</Criteria>
<Criteria>
<field>connectorState</field>
<operator>EQUALS</operator>
<value>FINISHED_SUCCESS</value>
</Criteria>
<Criteria>
<field>lastSync</field>
<operator>EQUALS</operator>
<value>2022-05-27T13:48:17Z</value>
</Criteria>
<Criteria>
<field>type</field>
<operator>EQUALS</operator>
<value>AZURE</value>
</Criteria>
<Criteria>
<field>activation</field>
<operator>EQUALS</operator>
<value>PC</value>
</Criteria>
<Criteria>
<field>authRecord.applicationId</field>
<operator>EQUALS</operator>
<value>xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7</value>
</Criteria>
<Criteria>
<field>authRecord.directoryId</field>
<operator>EQUALS</operator>
<value>xxxxxxxxx-65ab-xxxx-9e5b-1ea02d3d94eb</value>
</Criteria>

103
Qualys Asset Management & Tagging API
Connectors 3.0

<Criteria>
<field>authRecord.subscriptionId</field>
<operator>EQUALS</operator>
<value>xxxxxxxxx-4f67-xxxx-917d-2246853844e1</value>
</Criteria>
<Criteria>
<field>appCapability.name</field>
<operator>EQUALS</operator>
<value>CSA</value>
</Criteria>
<Criteria>
<field>appCapability.tag.name</field>
<operator>EQUALS</operator>
<value>QATag</value>
</Criteria>
<Criteria>
<field>disabled</field>
<operator>EQUALS</operator>
<value>false</value>
</Criteria>
<Criteria>
<field>defaultTags.name</field>
<operator>EQUALS</operator>
<value>QATag</value>
</Criteria>
<Criteria>
<field>defaultTags</field>
<operator>EQUALS</operator>
<value>123442387</value>
</Criteria>
<Criteria>
<field>lastError</field>
<operator>EQUALS</operator>
<value>2022-04-28T19:05:04Z</value>
</Criteria>
</filters>
</ServiceRequest>
</root>

Response (XML)
<?xml version="1.0" encoding="UTF-8" ?>
<ServiceResponse>
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<AzureAssetDataConnector>

104
Qualys Asset Management & Tagging API
Connectors 3.0

<nextSync>2022-06-30T18:51:02Z</nextSync>
<connectorAppInfos>
<list>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CI</name>
<identifier>xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7</identifier>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
</list>
<list>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CSA</name>
<identifier>xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7</identifier>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
</list>
<list>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>AI</name>
<identifier>xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7</identifier>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
</list>
</connectorAppInfos>
<disabled>false</disabled>
<id>842602</id>
<connectorState>QUEUED</connectorState>
<name>Azure Connector Via API Updated12</name>
<isRemediationEnabled>true</isRemediationEnabled>
<lastSync>2022-06-30T14:51:14Z</lastSync>
<runFrequency>240</runFrequency>
<authRecord>
<authenticationKey>02LCb8/RCn0xxxxxxx85aSmCxnoH01rog=</authenticatio
nKey>
<applicationId>xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7</applicationId>
<directoryId>xxxxxxxxx-65ab-xxxx-9e5b-1ea02d3d94eb</directoryId>
<subscriptionId>9de9e0a7-4f67-4812-917d-
2246853844e1</subscriptionId>
</authRecord>

105
Qualys Asset Management & Tagging API
Connectors 3.0

<cloudviewUuid>xxxxxxxxx-f881-xxxx-b5d7-c5c1faddfa39</cloudviewUuid>
<isDeleted>false</isDeleted>
<isGovCloudConfigured>false</isGovCloudConfigured>
<type>AZURE</type>
<activation>
<ActivationModule>CLOUDVIEW</ActivationModule>
</activation>
<subscriptionName>cvtest</subscriptionName>
<description>Sample Azure Connector API Updated</description>
</AzureAssetDataConnector>
</data>
<hasMoreRecords>false</hasMoreRecords>
</ServiceResponse>

API Request (JSON)


curl -u "USERNAME:PASSWORD" -X "POST" --
data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/search/am/azureassetdatac
onnector"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Request POST Data (JSON)


{
"ServiceRequest": {
"filters": {
"Criteria": [
{ "field" : "id","operator" : "EQUALS","value" :
"842602"},
{ "field" : "name","operator" : "EQUALS","value" :
"Azure Connector Via API"},
{ "field" : "description","operator" :
"EQUALS","value" : "Sample Azure Connector API" },
{ "field" : "connectorState","operator" :
"EQUALS","value" : "FINISHED_SUCCESS" },
{ "field" : "lastSync", "operator" : "EQUALS",
"value" : "2022-05-27T13:48:17Z" },
{ "field" : "type", "operator" : "EQUALS", "value"
: "AZURE" },
{ "field" : "activation", "operator" : "EQUALS",
"value" : "PC" },
{ "field" : "authRecord.applicationId", "operator"
: "EQUALS", "value" : "xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7" },
{ "field" : "authRecord.directoryId", "operator" :
"EQUALS", "value" : "xxxxxxxxx-65ab-xxxx-9e5b-1ea02d3d94eb" },

106
Qualys Asset Management & Tagging API
Connectors 3.0

{ "field" : "authRecord.subscriptionId",
"operator" : "EQUALS", "value" : "xxxxxxxxx-4f67-xxxx-917d-
2246853844e1" },
{ "field" : "appCapability.name","operator" :
"EQUALS","value" : "CSA" },
{ "field" : "appCapability.tag.name","operator" :
"EQUALS","value" : "QATag" },
{ "field" : "disabled","operator" :
"EQUALS","value" : "false" },
{ "field" : "defaultTags.name","operator" :
"EQUALS","value" : "QATag" },
{ "field" : "defaultTags","operator" :
"EQUALS","value" : "123442387" },
{ "field" : "lastError","operator" :
"EQUALS","value" : "2022-04-28T19:05:04Z" }
]
}
}
}

Response (JSON)
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": [
{
"AzureAssetDataConnector": {
"nextSync": "2022-06-30T18:51:02Z",
"connectorAppInfos": {
"list": [
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CI",
"identifier":
"xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7"
}
}
]
}
},
{
"ConnectorAppInfoQList": {

107
Qualys Asset Management & Tagging API
Connectors 3.0

"list": [
{
"ConnectorAppInfo": {
"name": "CSA",
"identifier":
"xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7"
}
}
]
}
},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "AI",
"identifier":
"xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7"
}
}
]
}
}
]
},
"disabled": "false",
"id": 842602,
"connectorState": "QUEUED",
"name": "Azure Connector Via API Updated12",
"isRemediationEnabled": "true",
"lastSync": "2022-06-30T14:51:14Z",
"runFrequency": 240,
"authRecord": {
"authenticationKey":
"02LCb8/RCn0lbGxxxxxxG2z85aSmCxnoH01rog=",
"applicationId": "xxxxxxxxx-694d-xxxx-ae0b-
d2bd14d1a4d7",
"directoryId": "xxxxxxxxx-65ab-xxxx-9e5b-
1ea02d3d94eb",
"subscriptionId": "xxxxxxxxx-4f67-xxxx-917d-
2246853844e1"
},
"cloudviewUuid": "xxxxxxxxx-f881-xxxx-b5d7-
c5c1faddfa39",
"isDeleted": "false",
"isGovCloudConfigured": "false",
"type": "AZURE",

108
Qualys Asset Management & Tagging API
Connectors 3.0

"activation": {
"ActivationModule": [
"CLOUDVIEW"
]
},
"subscriptionName": "cvtest",
"description": "Sample Azure Connector API
Updated"
}
}
],
"hasMoreRecords": "false"
}
}

Sample 2 - Search Azure Connector by Capability name and subscription


ID

API request

curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST" --


data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/search/am/azureassetdatac
onnector"

Request POST data (XML)


ServiceRequest>
<filters>
<Criteria field="appCapability.name"
operator="EQUALS">AI</Criteria>
<Criteria field="authRecord.subscriptionId"
operator="EQUALS">9*********4e1</Criteria>
</filters>
</ServiceRequest>

Response (XML)
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.p01.eng.sjc01.qualy
s.
com/qps/xsd/3.0/am/azureassetdataconnector.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>

109
Qualys Asset Management & Tagging API
Connectors 3.0

<hasMoreRecords>false</hasMoreRecords>
<data>
<AzureAssetDataConnector>
<id>1071442</id>
<name>AZURE AV CV UI CONN</name>
<lastSync>2023-05-08T07: 43: 07Z</lastSync>
<connectorState>PROCESSING</connectorState>
<type>AZURE</type>
<activation>
<list>
<ActivationModule>CLOUDVIEW</ActivationModule>
<ActivationModule>SCA</ActivationModule>
<ActivationModule>CERTVIEW</ActivationModule>
</list>
</activation>
<disabled>false</disabled>
<isGovCloudConfigured>false</isGovCloudConfigured>
<isDeleted>false</isDeleted>
<runFrequency>120</runFrequency>
<nextSync>2023-05-08T09: 30: 01Z</nextSync>
<isRemediationEnabled>true</isRemediationEnabled>
<isCPSEnabled>false</isCPSEnabled>
<connectorAppInfos>
<list>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CSA</name>
<identifier>f07*******4d7</identifier>
<tagId>22935213</tagId>
<tagMetadata>
<id>22935213</id>
<name>CONNtag1</name>
</tagMetadata>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>AI</name>
<identifier>f07*******4d7</identifier>
<tagId>22935213</tagId>
<tagMetadata>
<id>22935213</id>
<name>CONNtag1</name>
</tagMetadata>
</ConnectorAppInfo>

110
Qualys Asset Management & Tagging API
Connectors 3.0

</list>
</ConnectorAppInfoQList>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CI</name>
<identifier>f07*******4d7</identifier>
<tagId>22935213</tagId>
<tagMetadata>
<id>22935213</id>
<name>CONNtag1</name>
</tagMetadata>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
</list>
</connectorAppInfos>
<cloudviewUuid>202309bb-xxxx-xxxx-xxxx-xxxxxxxxxxxx</cloudviewUuid>
<isInstantAssessmentEnabled>false
</isInstantAssessmentEnab
led>
<authRecord>
<applicationId>f07*******4d7</applicationId>
<directoryId>ff4e2***********d94eb</directoryId>
<authenticationKey>02**************1rog=</authenticationKey>
<subscriptionId>*********e1</subscriptionId>
</authRecord>
<subscriptionName>qlys-dev-cvdev</subscriptionName>
</AzureAssetDataConnector>
</data>
</ServiceResponse>

API request (JSON)

curl -u "USERNAME:PASSWORD" -X "POST" --data-binary @-


"https://qualysapi.qualys.com/qps/rest/3.0/search/am/azureassetdatac
onnector"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Request POST data (XML)


{
"ServiceRequest": {
"filters": {

111
Qualys Asset Management & Tagging API
Connectors 3.0

"Criteria": [

{ "field" : "authRecord.subscriptionId","operator" :
"EQUALS","value" : "1d7*******" }
]
}
}
}

Response (XML)
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"data": [
{
"AzureAssetDataConnector": {
"authRecord": {
"authenticationKey":
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx8=",
"subscriptionId": "****86",
"applicationId":
"d8*****************6e2d61aec",
"directoryId": "ff4e*************eb"
},
"activation": {
"ActivationModule": [
"CLOUDVIEW"
]
},
"type": "AZURE",
"cloudviewUuid": "b0bc5468-c9ed-3538-9fb7-
f09a79fb3aab", "isDeleted": "false",
"subscriptionName": "qlys-dev-cvsignature",
"isRemediationEnabled": "false",
"runFrequency": 240,
"nextSync": "2023-05-08T10:22:17Z",
"name": "AZURE 1D CONN",
"lastSync": "2023-05-08T06:22:17Z",
"isCPSEnabled": "false",
"id": ***,
"isGovCloudConfigured": "false",
"isInstantAssessmentEnabled": "false",
"connectorAppInfos": {
"list": [
{
"ConnectorAppInfoQList": {
"list": [

112
Qualys Asset Management & Tagging API
Connectors 3.0

{
"ConnectorAppInfo": {
"identifier":
"******c",
"name": "CI"
}
}
]
}
},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"identifier":
"d8c****************61aec",
"name": "CSA"
}
}
]
}
},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"identifier":
"d8c*************c",
"name": "AI"
}
}
]
}
}
]
},
"connectorState": "QUEUED",
"disabled": "false"
}
}
],
"hasMoreRecords": "false",
"count": 1
}
}

113
Qualys Asset Management & Tagging API
Connectors 3.0

Get Azure Connector Info 3.0

[GET]

/qps/rest/3.0/get/am/azureassetdataconnector/<id>

View details for a connector which is in the user’s scope. Specify the
connector ID and fetch the details of the connector.

Permissions required - Managers with full scope.

Sample: List (view) specific Azure Connector Id 166007

API request(JSON)
curl -u "USERNAME:PASSWORD"--request GET --data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/search/am/azureassetdatac
onnector"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Response(JSON)
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": [
{
"AzureAssetDataConnector": {
"nextSync": "2022-06-30T20:03:28Z",
"connectorAppInfos": {
"list": [
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CI",
"identifier":
"xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7"
}
}
]
}
},

114
Qualys Asset Management & Tagging API
Connectors 3.0

{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CSA",
"identifier":
"xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7"
}
}
]
}
},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "AI",
"identifier":
"xxxxxxxxx-694d-xxxx-ae0b-d2bd14d1a4d7"
}
}
]
}
}
]
},
"disabled": "false",
"id": 842602,
"connectorState": "FINISHED_SUCCESS",
"name": "Azure Connector Via API Updated12",
"isRemediationEnabled": "true",
"lastSync": "2022-06-30T16:05:02Z",
"runFrequency": 240,
"authRecord": {
"authenticationKey":
"02LCb8/RCn0lbGj6xxxxxxxx5aSmCxnoH01rog=",
"applicationId": "xxxxxxxxx-694d-xxxx-ae0b-
d2bd14d1a4d7",
"directoryId": "xxxxxxxxx-65ab-xxxx-9e5b-
1ea02d3d94eb",
"subscriptionId": "xxxxxxxxx-4f67-xxxx-917d-
2246853844e1"
},
"cloudviewUuid": "xxxxxxxxx-f881-xxxx-b5d7-
c5c1faddfa39",
"isDeleted": "false",

115
Qualys Asset Management & Tagging API
Connectors 3.0

"isGovCloudConfigured": "false",
"type": "AZURE",
"activation": {
"ActivationModule": [
"CLOUDVIEW"
]
},
"subscriptionName": "cvtest",
"description": "Sample Azure Connector API
Updated"
}
}
]
}
}

116
Qualys Asset Management & Tagging API
Connectors 3.0

GCP Connectors 3.0

GCP Connectors 3.0

We support the following operations for all GCP connectors in the


Connectors application.

Create GCP Connector 3.0

Update GCP Connector 3.0

Run GCP Connector 3.0

Search GCP Connector 3.0

Delete GCP Connector 3.0

Get GCP Connector Info 3.0

Get All Errors of GCP Connector 3.0

117
Qualys Asset Management & Tagging API
Connectors 3.0

Create GCP Connector 3.0

/qps/rest/3.0/create/am/gcpassetdataconnector

[POST]

Specify the connector details such as name, description, polling frequency,


project ID and upload the configuration (JSON) file and create a new
connector in the Connectors application.

Permissions required - Managers with full scope.

Input Parameters

Parameters Description

id The ID of the connector that you want to


create.

name Name ofthe connector you want to create.

description Description of the connector you want to


create.

type Type of connector - GCP.

authRecord (GCPAuthRecordSimple) The GCP


authentication record the connector uses
to connect to GCP. When writing/updating
it is looked up by the ID field.

allRegions (boolean) If true, the end point’s collection


is ignored an all GCP regions scanned.

disabled (boolean) Whether execution of the


connector is disabled (YES). If disabled, the
connector does not synchronize assets.

runFrequency runFrequency for a connector decides the

118
Qualys Asset Management & Tagging API
Connectors 3.0

rate at which the connector should poll the


cloud provider and fetch the data specified
in minutes.

isRemediationEnabled A flag to enable or disable remediation for


the connector.

connectorAppInfos.set. A mandatory parent parameter when you


need to provide the below parameter,
ConnectorAppInfoQList set.ConnectorAppInfo.

set.ConnectorAppInfos It holds the list of list of ConnectorAppInfo


which includes App Name, identifiers and
tag details. Connector can one or more
apps from list [AI, CI, CSA].

AI-Asset Inventory, CI- Cloud Inventory,


CSA- Cloud Security Assessment.

Sample: Create a new GCP connector

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --
data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/create/am/gcpassetdatacon
nector"

Request POST data


<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<data>
<GcpAssetDataConnector>
<disabled>false</disabled>
<connectorAppInfos>
<set>
<ConnectorAppInfoQList>
<set>
<ConnectorAppInfo>
<name>CSA</name>

119
Qualys Asset Management & Tagging API
Connectors 3.0

<identifier>my-project-
151366xxxx9</identifier>
<tagId>123489465</tagId>
</ConnectorAppInfo>
</set>
</ConnectorAppInfoQList>
<ConnectorAppInfoQList>
<set>
<ConnectorAppInfo>
<name>CI</name>
<identifier>my-project-
151366xxxx9</identifier>
<tagId>123489465</tagId>
</ConnectorAppInfo>
</set>
</ConnectorAppInfoQList>
</set>
</connectorAppInfos>
<runFrequency>240</runFrequency>
<isDeleted>false</isDeleted>
<isGovCloudConfigured>false</isGovCloudConfigured>
<isRemediationEnabled>true</isRemediationEnabled>
<name>Test GCP connector</name>
<authRecord>
<projectId>my-project-1513669048551</projectId>
<auth_provider_x509_cert_url>https://www.googleapis.
com/oauth2/v1/certs</auth_provider_x509_cert_url>
<auth_uri>https://accounts.google.com/o/oauth2/auth<
/auth_uri>
<client_email>crm-70975@my-project-
1513669048551.iam.gserviceaccount.com</client_email>
<client_id>105994049705415737317</client_id>
<client_x509_cert_url>https://www.googleapis.com/rob
ot/v1/metadata/x509/crm-70975%40my-project-
1513669048551.iam.gserviceaccount.com</client_x509_cert_url>
<private_key>-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC64ocFtknagk8N
4iQd9lhhHXGo8JLVgqSruO8ebxa002+ps8PPukPuAS9IazPrNjdyndVezOClANJu
xj3NhAOQ5xHTANFQH33CXcrxhoNKvdQLIxg0wH8HS94wCOvvDU7wKuOdkfSdLE6Z
a3FM7v2J5iZgC2QgF/stwl13pLszLsOyOuJlMiiV4nYBUMbQrZr8sJvbSBoiEXVt
enk4Dm2a6khRdRFsa9d9g3Z0t2GyXT3ln8KEAdn8plUu1C6WIHg9HJtYi3ib/4bn
2tahZ/T5C6BQk+3BTbRAoGBALMpb9z3MsEckgNJAF3P
y0pko3GuZx4nq3f20oADxsYfwRjJ5ZfchKbW/rE0IcK0enw3sEHlcFFHgcvMSnr4
Hl0zCZ6uq9rEytwXtM3JKf3ywIH6AzAdkw4s/AVQmk3ejSJkRzxly8FRPNeJjSzm
5WqpzucZNtGdP2UoMMGIv/iq
-----END PRIVATE KEY-----
</private_key>
<private_key_id>9f5cd117dd7bcaad4</private_key_id>

120
Qualys Asset Management & Tagging API
Connectors 3.0

<token_uri>https://oauth2.googleapis.com/token</toke
n_uri>
<type>service_account</type>
</authRecord>
</GcpAssetDataConnector>
</data>
</ServiceRequest>

Response
<?xml version="1.0" encoding="UTF-8" ?>
<ServiceResponse>
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<GcpAssetDataConnector>
<nextSync>2022-06-30T16:38:21Z</nextSync>
<connectorAppInfos>
<list>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CSA</name>
<identifier>my-project-
151366xxxx1</identifier>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
</list>
<list>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CI</name>
<identifier>my-project-
151366xxxx1</identifier>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
</list>
</connectorAppInfos>
<disabled>false</disabled>
<id>842873</id>
<connectorState>FINISHED_SUCCESS</connectorState>
<name>sign</name>
<isRemediationEnabled>true</isRemediationEnabled>

121
Qualys Asset Management & Tagging API
Connectors 3.0

<authRecord>
<projectId>my-project-151366xxxx1</projectId>
</authRecord>
<lastSync>2022-06-30T13:21:57Z</lastSync>
<runFrequency>240</runFrequency>
<cloudviewUuid>xxxxxxxxx-2007-xxxx-adab-
9db19bd5fdb9</cloudviewUuid>
<isDeleted>false</isDeleted>
<isGovCloudConfigured>false</isGovCloudConfigured>
<description>testing</description>
</GcpAssetDataConnector>
</data>
</ServiceResponse>

API Request (JSON)


curl -u "USERNAME:PASSWORD"-X "POST" --
data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/create/am/gcpassetdatacon
nector"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Request POST Data (JSON)


{
"ServiceRequest": {
"data": {
"GcpAssetDataConnector": {
"disabled": "false",
"connectorAppInfos": {
"set": {
"ConnectorAppInfoQList": [
{
"set": {
"ConnectorAppInfo": [
{
"name": "CSA",
"identifier": "my-
project-151366xxxx9",
"tagId": 123489465
}
]
}
},
{
"set": {

122
Qualys Asset Management & Tagging API
Connectors 3.0

"ConnectorAppInfo": [
{
"name": "CI",
"identifier": "my-
project-151366xxxx9",
"tagId": 123489465
}
]
}
}
]
}
},
"runFrequency": 240,
"isDeleted": "false",
"isGovCloudConfigured": "false",
"isRemediationEnabled": "true",
"name": "Test GCP connector",
"authRecord": {
"projectId": "my-project-1513669048551",
"auth_provider_x509_cert_url":
"https://www.googleapis.com/oauth2/v1/certs",
"auth_uri":
"https://accounts.google.com/o/oauth2/auth",
"client_email": "crm-70975@my-project-
1513669048551.iam.gserviceaccount.com",
"client_id": "105994049705415737317",
"client_x509_cert_url":
"https://www.googleapis.com/robot/v1/metadata/x509/crm-70975%40my-
project-1513669048551.iam.gserviceaccount.com",
"private_key": "-----BEGIN PRIVATE KEY-----
\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC64ocFtknagk8NU7
stwl13pLszLsOyOuJlMiiV4
nYBUMbQrZr8sJvbSBoiEXVt\nenk4Dm2a6khRdRFsa9d9g3Z0t2GyXT3ln8KEAdn8plU
u1C6WIHg9HJtYi3ib/4bn\n
2tahZ/T5C6BQk+3B38xsnsAJ0TfZFE+xW8mLVMCJRGkPf4sMMP/h9oZbjFdZvf4K\nGE
953kjFAgMBAAECggEAHEY19eYGpe
3FnpzaaIMTCgNHjo8Xm7KtHoBdWDh\nrDruYtPLXBQMrJPPYTfBG8fKG3bJKAeJFvfbr
AalvqBasMa24Scvm8AWl+bDeztm\nJjIEFokpUJwAb3ufb6aZRl4v
yQKBgQDZC72Ddcs9AZ+0v/CYWB27Qm06bQ8m/p6D3lnKSlyBV5AoGBAMHf\nhszib0Rz
KuEdjE3MIKoMstWxFLACV42pccpyBaLMHawLpNQJVdNQUo+EJZIFPhwF\nbTVIvThGy7
+Wmnu608SN6hyDG+tX9V6DgrwBkQWbVZGf9wv6dKbth9dvnIdlACDv
\nm94RPIQteQmamx2T90t+djTTNKNpHdHLwOKYNTbRAoGBALMpb9z3MsEckgNJAF3P\n
y0pko3GuZx4nq3f20oADxsYfwRjJ5ZfchKbW/rE0IcK0enw3sEHlcFFHgcvMSnr4\nHl
0zCZ6uq9rEytwXtM3JKf3ywIH6AzAdkw4s/AVQmk3ejSJkRzxly8FRPNeJjSzm\n5Wqp
zucZNtGdP2UoMMGIv/iq\n-----END PRIVATE KEY-----\n",
"private_key_id":
"9f0f1f305cd1124c8c75f9a900695e7dd7bcaad4",

123
Qualys Asset Management & Tagging API
Connectors 3.0

"token_uri":
"https://oauth2.googleapis.com/token",
"type": "service_account"
}
}
}
}
}

Response (JSON)
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": [
{
"GcpAssetDataConnector": {
"nextSync": "2022-06-30T16:38:21Z",
"connectorAppInfos": {
"list": [
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CSA",
"identifier": "my-
project-151366xxxx1"
}
}
]
}
},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CI",
"identifier": "my-
project-151366xxxx1"
}
}
]
}
}

124
Qualys Asset Management & Tagging API
Connectors 3.0

]
},
"disabled": "false",
"id": 842873,
"connectorState": "FINISHED_SUCCESS",
"name": "sign",
"isRemediationEnabled": "true",
"authRecord": {
"projectId": "my-project-151366xxxx1"
},
"lastSync": "2022-06-30T13:21:57Z",
"runFrequency": 240,
"cloudviewUuid": "xxxxxx-2007-xxxx-adab-
9db19bd5fdb9",
"isDeleted": "false",
"isGovCloudConfigured": "false",
"description": "testing"
}
}
]
}
}

125
Qualys Asset Management & Tagging API
Connectors 3.0

Update GCP Connector 3.0

/qps/rest/3.0/update/am/gcpassetdataconnector

/qps/rest/3.0/update/am/gcpassetdataconnector/<id>

[POST]

Specify the connector ID and the details to be updated to update details of


the specified connector.

Permissions required - Managers with full scope.

Input Parameters

Parameters Description

name The ID of the connector that you want to


update.

description Name of the connector you want to update.

authRecord (AzureAuthRecordSimple) The GCP


authentication record the connector uses to
connect to GCP. When writing/updating it is
looked up by the ID field.

disabled (boolean) Whether execution of the


connector is disabled (YES). If disabled the
connector does not synchronize assets.

runFrequency runFrequency for a connector decides the


rate at which the connector should poll the
cloud provider and fetch the data specified
in minutes.

isRemediationEnabled A flag to enable or disable remediation for


the connector.

connectorAppInfos It holds the list of list of ConnectorAppInfo


which includes App Name, identifiers and tag
details. Connector can one or more apps

126
Qualys Asset Management & Tagging API
Connectors 3.0

from list [AI, CI, CSA]. AI-Asset Inventory, CI-


Cloud Inventory, CSA- Cloud Security
Assessment

Sample: Update GCP connector name

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --
data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/update/am/gcpassetdatacon
nector/178202"

Request POST data


<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<data>
<GcpAssetDataConnector>
<name>Test GCP connector API UPDATED</name>
<description>Updated Description By API
UPDATED</description>
<disabled>false</disabled>
<runFrequency>500</runFrequency>
<isRemediationEnabled>false</isRemediationEnabled>
<authRecord>
<projectId>my-project-xxxxxxxxxx</projectId>
</authRecord>
<connectorAppInfos>
<set>
<ConnectorAppInfoQList>
<set>
<ConnectorAppInfo>
<name>CI</name>
<identifier>my-project-
xxxxxxxxx</identifier>
<tagId>121212</tagId>
</ConnectorAppInfo>
</set>
</ConnectorAppInfoQList>
<ConnectorAppInfoQList>
<set>
<ConnectorAppInfo>
<name>CSA</name>

127
Qualys Asset Management & Tagging API
Connectors 3.0

<identifier>my-project-
xxxxxxxxx</identifier>
<tagId>121212</tagId>
</ConnectorAppInfo>
</set>
</ConnectorAppInfoQList>
</set>
</connectorAppInfos>
</GcpAssetDataConnector>
</data>
</ServiceRequest>

Response
<?xml version="1.0" encoding="UTF-8" ?>
<ServiceResponse>
<data>
<GcpAssetDataConnector>
<id>842873</id>
</GcpAssetDataConnector>
</data>
<count>1</count>
<responseCode>SUCCESS</responseCode>
</ServiceResponse>

API Request (JSON)


curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --
data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/update/am/gcpassetdatacon
nector/178202"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Request POST Data (JSON)


{
"ServiceRequest": {
"data": {
"GcpAssetDataConnector": {
"name": "Test GCP connector API UPDATED",
"description": "Updated Description By API UPDATED",
"disabled": false,
"runFrequency": 500,
"isRemediationEnabled": false,

128
Qualys Asset Management & Tagging API
Connectors 3.0

"authRecord": {
"projectId": "my-project-xxxxxxxxx"
},
"connectorAppInfos": {
"set": {
"ConnectorAppInfoQList": [

{
"set": {
"ConnectorAppInfo": {
"name": "CI",
"identifier": "my-project-
xxxxxxxxx",
"tagId": 121212
}
}
},
{
"set": {
"ConnectorAppInfo": {
"name": "CSA",
"identifier": "my-project-
xxxxxxxxx",
"tagId": 121212
}
}
}
]
}
}
}
}
}
}

Response (JSON)
{
"ServiceResponse": {
"data": [
{
"GcpAssetDataConnector": {
"id": 842873
}
}
],
"count": 1,

129
Qualys Asset Management & Tagging API
Connectors 3.0

"responseCode": "SUCCESS"
}
}

130
Qualys Asset Management & Tagging API
Connectors 3.0

Delete GCP Connector 3.0

/qps/rest/3.0/delete/am/gcpassetdataconnector

/qps/rest/3.0/delete/am/gcpassetdataconnector/<id>

We will now deprecate the API endpoint to delete one or more GCP
connectors from the CloudView application and introduce an alternative
API in the Asset Management application.

Permissions required - Managers with full scope

Sample: Delete a GCP connector

API request
curl -n -u "USERNAME:PASSWORD"
"https://qualysapi.qualys.com/qps/rest/3.0/delete/am/gcpassetdatacon
nector/289201"

Response (XML)
<?xml version="1.0" encoding="UTF-8" ?>
<ServiceResponse>
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<GcpAssetDataConnector>
<id>289201</id>
</GcpAssetDataConnector>
</data>
</ServiceResponse>

API request(JSON)
curl -n -u "USERNAME:PASSWORD"
"https://qualysapi.qualys.com/qps/rest/3.0/delete/am/gcpassetdatacon
nector/289201"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Response(JSON)
{

131
Qualys Asset Management & Tagging API
Connectors 3.0

"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": [
{
"GcpAssetDataConnector": {
"id": 289201
}
}
]
}
}

132
Qualys Asset Management & Tagging API
Connectors 3.0

Run GCP Connector 3.0

/qps/rest/3.0/run/am/gcpassetdataconnector

/qps/rest/3.0/run/am/gcpassetdataconnector/<id>

[POST]

We will now deprecate the API endpoint to run one or more GCP
connectors from the CloudView application and introduce an alternative
API in the Asset Management application. The run connector API will fetch
the latest changes related to your connector.

Permissions required - Managers with full scope.

API request(JSON)
curl -n -u "USERNAME:PASSWORD"
"https://qualysapi.qualys.com/qps/rest/3.0/run/am/gcpassetdataconnec
tor/<id>"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Response(JSON)
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": [
{
"GcpAssetDataConnector": {
"nextSync": "2022-06-30T16:38:21Z",
"connectorAppInfos": {
"list": [
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CSA",
"identifier": "my-
project-xxxxxxxxx"
}
}

133
Qualys Asset Management & Tagging API
Connectors 3.0

]
}
},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CI",
"identifier": "my-
project-xxxxxxxxx"
}
}
]
}
}
]
},
"disabled": "false",
"id": 842873,
"connectorState": "FINISHED_SUCCESS",
"name": "Test GCP connector API UPDATED",
"isRemediationEnabled": "true",
"authRecord": {
"projectId": "my-project-xxxxxxxxx"
},
"lastSync": "2022-06-30T16:11:28Z",
"runFrequency": 240,
"cloudviewUuid": "xxxxxxxxx-2007-xxxx-adab-
9db19bd5fdb9",
"isDeleted": "false",
"isGovCloudConfigured": "false",
"description": "testing"
}
}
]
}
}

134
Qualys Asset Management & Tagging API
Connectors 3.0

Search GCP Connector 3.0

/qps/rest/3.0/search/am/gcpassetdataconnector

We will now deprecate the API endpoint to return a list of GCP connectors
that match the provided criteria from the CloudView application and
introduce an alternative in the Asset Management application.

Limit your results- Narrow down your search results using the parameters
listed below.

Pagination - A maximum of 100 instances are returned by default. To


customize this

specify a "preferences" tag in the POST body of your request.

input Parameters

Parameters Description

id The ID of the connector that you want to


search.

name Name is the name for the connector you want


to search.

description Description of the connector you want to


search.

lastSync Last sync date of the connector.

Type Type of connector - GCP.

authRecord.projectId Unique identifier of project in Google cloud.


(Text)

appCapability.name Connector application capability name

Sample: Search GCP Connector by project ID

135
Qualys Asset Management & Tagging API
Connectors 3.0

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --
data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/search/am/gcpassetdatacon
nector/1xxxxx"

Request POST data (XML)


<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<filters>
<Criteria>
<field>id</field>
<operator>EQUALS</operator>
<value>xxxxx</value>
</Criteria>
<Criteria>
<field>name</field>
<operator>EQUALS</operator>
<value>GCP connector API Updated</value>
</Criteria>
<Criteria>
<field>description</field>
<operator>EQUALS</operator>
<value>Connector Created from API</value>
</Criteria>
<Criteria>
<field>lastSync</field>
<operator>EQUALS</operator>
<value>2022-05-09T16:21:57Z</value>
</Criteria>
<Criteria>
<field>type</field>
<operator>EQUALS</operator>
<value>GCP</value>
</Criteria>
<Criteria>
<field>authRecord.projectId</field>
<operator>EQUALS</operator>
<value>my-project-xxxxxxxxx</value>
</Criteria>
<Criteria>
<field>connectorState</field>
<operator>EQUALS</operator>
<value>FINISHED_SUCCESS</value>
</Criteria>
<Criteria>

136
Qualys Asset Management & Tagging API
Connectors 3.0

<field>appCapability.name</field>
<operator>EQUALS</operator>
<value>CSA</value>
</Criteria>
<Criteria>
<field>appCapability.tag.name</field>
<operator>EQUALS</operator>
<value>QATag</value>
</Criteria>
<Criteria>
<field>disabled</field>
<operator>EQUALS</operator>
<value>false</value>
</Criteria>
</filters>
</ServiceRequest>

Response (XML)
<?xml version="1.0" encoding="UTF-8" ?>
<ServiceResponse>
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<GcpAssetDataConnector>
<nextSync>2022-06-30T16:38:21Z</nextSync>
<connectorAppInfos>
<list>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CSA</name>
<identifier>my-project-
1513669048551</identifier>
</ConnectorAppInfo>
</list>
</ConnectorAppInfoQList>
</list>
<list>
<ConnectorAppInfoQList>
<list>
<ConnectorAppInfo>
<name>CI</name>
<identifier>my-project-
1513669048551</identifier>
</ConnectorAppInfo>
</list>

137
Qualys Asset Management & Tagging API
Connectors 3.0

</ConnectorAppInfoQList>
</list>
</connectorAppInfos>
<disabled>false</disabled>
<id>842873</id>
<connectorState>FINISHED_SUCCESS</connectorState>
<name>Test GCP connector API UPDATED</name>
<isRemediationEnabled>true</isRemediationEnabled>
<authRecord>
<projectId>my-project-1513669048551</projectId>
</authRecord>
<lastSync>2022-06-30T16:11:28Z</lastSync>
<runFrequency>240</runFrequency>
<cloudviewUuid>a8014b65-2007-3ad0-adab-
9db19bd5fdb9</cloudviewUuid>
<isDeleted>false</isDeleted>
<isGovCloudConfigured>false</isGovCloudConfigured>
<description>testing</description>
</GcpAssetDataConnector>
</data>
<hasMoreRecords>false</hasMoreRecords>
</ServiceResponse>

API Request (JSON)


curl -u "USERNAME:PASSWORD" -X "POST" --data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/search/am/gcpassetdatacon
nector/1xxxxx"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Request POST Data (JSON)


{
"ServiceRequest": {
"filters": {
"Criteria": [
{ "field" : "id","operator" : "EQUALS","value" :
"842873"},
{ "field" : "name","operator" : "EQUALS","value" :
"GCP connector API Updated"},
{ "field" : "description","operator" :
"EQUALS","value" : "Connector Created from API" },
{ "field" : "lastSync", "operator" : "EQUALS",
"value" : "2022-05-09T16:21:57Z"},
{ "field" : "type", "operator" : "EQUALS", "value"
: "GCP" },

138
Qualys Asset Management & Tagging API
Connectors 3.0

{ "field" : "authRecord.projectId", "operator" :


"EQUALS", "value" : "my-project-1513669048551" },
{ "field" : "connectorState","operator" :
"EQUALS","value" : "FINISHED_SUCCESS" },
{ "field" : "appCapability.name","operator" :
"EQUALS","value" : "CSA" },
{ "field" : "appCapability.tag.name","operator" :
"EQUALS","value" : "QATag" },
{ "field" : "disabled","operator" :
"EQUALS","value" : "false" }
]
}
}
}

Response (JSON)
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": [
{
"GcpAssetDataConnector": {
"nextSync": "2022-06-30T16:38:21Z",
"connectorAppInfos": {
"list": [
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CSA",
"identifier": "my-
project-1513669048551"
}
}
]
}
},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CI",
"identifier": "my-
project-1513669048551"

139
Qualys Asset Management & Tagging API
Connectors 3.0

}
}
]
}
}
]
},
"disabled": "false",
"id": 842873,
"connectorState": "FINISHED_SUCCESS",
"name": "Test GCP connector API UPDATED",
"isRemediationEnabled": "true",
"authRecord": {
"projectId": "my-project-1513669048551"
},
"lastSync": "2022-06-30T16:11:28Z",
"runFrequency": 240,
"cloudviewUuid": "a8014b65-2007-3ad0-adab-
9db19bd5fdb9",
"isDeleted": "false",
"isGovCloudConfigured": "false",
"description": "testing"
}
}
],
"hasMoreRecords": "false"
}
}

140
Qualys Asset Management & Tagging API
Connectors 3.0

Get GCP Connector Info 3.0

[GET]

/qps/rest/3.0/get/am/gcpassetdataconnector/<id>

We will now deprecate the old CloudView API endpoint for ’Get GCP
connector Info’ and an alternative API will be introduced in the Asset
Management application. You can select whether the ’Get GCP Connector
Info’ API applies to AssetView and/or CloudView in the Connector
application.

Permissions required - Managers with full scope.

Sample: List specific GCP Connector Id 176001

API request(JSON)
curl -u "USERNAME:PASSWORD" --request GET
"https://qualysapi.qualys.com/qps/rest/3.0/get/am/gcpassetdataconnec
tor/17601"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Response(JSON)
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": [
{
"GcpAssetDataConnector": {
"nextSync": "2022-06-30T16:38:21Z",
"connectorAppInfos": {
"list": [
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CSA",
"identifier": "my-
project-xxxxxxxxx"
}

141
Qualys Asset Management & Tagging API
Connectors 3.0

}
]
}
},
{
"ConnectorAppInfoQList": {
"list": [
{
"ConnectorAppInfo": {
"name": "CI",
"identifier": "my-
project-xxxxxxxxx"
}
}
]
}
}
]
},
"disabled": "false",
"id": 842873,
"connectorState": "FINISHED_SUCCESS",
"name": "sign",
"isRemediationEnabled": "true",
"authRecord": {
"projectId": "my-project-xxxxxxxxx"
},
"lastSync": "2022-06-30T13:21:57Z",
"runFrequency": 240,
"cloudviewUuid": "xxxxxxxxx-2007-xxxx-adab-
9db19bd5fdb9",
"isDeleted": "false",
"isGovCloudConfigured": "false",
"description": "testing"
}
}
]
}
}

142
Qualys Asset Management & Tagging API
Connectors 3.0

Get All Errors of GCP Connector 3.0

/qps/rest/3.0/search/am/assetdataconnectorerrors

Get the list of errors encountered when executing a connector in the


connector application

Permissions required - Managers with full scope.

Sample: Get all errors of connector

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: application/json" -H
"Accept:
application/json" --request GET --data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/search/am/assetdataconnec
torerrors"

Request POST data (XML)


<?xml version="1.0" encoding="UTF-8"?>
<ServiceRequest>
<filters>
<Criteria field="id" operator="EQUALS">1xxxxxx</Criteria>
</filters>
</ServiceRequest>

Response (XML)
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
3.0/am/assetdataconnectorerrors.xsd">
<responseCode>SUCCESS</responseCode>
<count>0</count>
</ServiceResponse>

API request(JSON)

143
Qualys Asset Management & Tagging API
Connectors 3.0

curl -u "USERNAME:PASSWORD" -H "Content-type: application/json" -H


"Accept:
application/json" -X "POST" --data-binary @-
"https://qualysapi.qualys.com/qps/rest/3.0/search/am/assetdataconnec
torerrors"
--header 'Accept: application/json'
--header 'Content-Type: application/json'

Request POST data(JSON)


{
"ServiceRequest": {
"filters": {
"Criteria": [
{
"field": "id",
"operator": "EQUALS",
"value": "1xxxxxxx"
}
]
}
}
}

Response(JSON)
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 0
}
}

144
Qualys Asset Management & Tagging API
Connectors 3.0

OCI Connectors 3.0

OCI Connectors 3.0

We support the following operations for all OCI connectors in the


Connectors application.

Note: The OCI Connector support must be enabled for your subscription to
run these APIs. Contact support enable OCI connectors in your
subscription.

Create OCI Connector 3.0

Update OCI Connector 3.0

Search OCI Connector 3.0

Delete OCI Connector 3.0

Get OCI Connector 3.0

Run OCI Connector 3.0

145
Qualys Asset Management & Tagging API
Connectors 3.0

Create OCI Connector 3.0

/qps/rest/3.0/create/am/ociassetdataconnector

[POST]

Specify the connector details of your OCI account and create a new
connector in the Connectors application.

Input Parameter

Parameters Description

name Name of the connector you want to create.

runFrequency runFrequency for a connector decides the


rate at which the connector should poll the
cloud provider and fetch the data. Specified
in minutes.

homeRegion Select the region from which you want to


discover OCI resources.

tenantId The Tenant ID of your OCI account.

authRecord The OCI authentication record the connector


uses to connect to OCI. When
writing/updating it is looked up by the ID
field.

userId The user ID of your OCI account.

privateKey The private key generated with your OCI


account,

fingerprint The fingerprint of the API signing key.

connectorAppInfos A mandatory parent parameter when you

146
Qualys Asset Management & Tagging API
Connectors 3.0

need to provide the below parameter,


set.ConnectorAppInfo.

set.ConnectorAppInfo It holds the list of list of ConnectorAppInfo


which includes App Name, identifiers and tag
details. Connector can one or more apps
from list [AI, CI, CSA].

AI-Asset Inventory, CI- Cloud Inventory,


CSA- Cloud Security Assessment

Sample 1 - Create an OCI connector

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" -
data-binary
@"https://qualysapi.qualys.com/qps/rest/3.0/create/am/ociassetdataco
nnector"

Request POST data


{
"ServiceRequest": {
"data": {
"OciAssetDataConnector": {
"homeRegion": "us-ashburn-1",
"runFrequency": 240,
"isRemediationEnabled": [
false,
true
],
"name": "Oci2",
"description": "Master oci Connector",
"disabled": false,
"isGovCloudConfigured": true,
"isCPSEnabled": true,
"authRecord": {
"tenantId":
"ocid1.tenancy.oc1.."xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"userId":
"ocid1.user.oc1.."xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"fingerprint":
"xx:74:xx:60:xx:04:xx:d4:xx:ca:xx:b4:xx:23:xx:fg",

147
Qualys Asset Management & Tagging API
Connectors 3.0

"privateKey":
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x7Ii7q4qnPMKL8upZOnqPDGBPfBr8sieWW2cJTSMM8EvBfMD1Y4Z5+utkyanngEF&#xd
;
CZFtPRGWyhftC7jVvSCihwH0K0oRkSpesscuYrjO9ramI3MSVz7YPB9jdpvXDm/s&#xd
;
oG0AIm2or54luchTxrauNKIPPVFGDkmjjpBsEjBzcxXLpZEO4ecyycdHLx4F3uAH&#xd
;
m6zNcSFZo4lqiwJ9BnMWMARtIp9ZtN4MQqib3ysLC0SAki1F/ru/8ASuD8STtsRy&#xd
;
uZUYtbf8AVxfLcJ/MoS91R56vHOGyDfqQ7ddbCQeSTX/OXMCqPsthFOHfoJHbd4N&#xd
;
KaWrse2zAgMBAAECggEAONYJZHT8i2iy/GgnFukJkTQDS5+pkE0urWRNBTLJpb56&#xd
;
9/9c1/3UsSBI8skhdWG9bsoOEm6GWTtKif2mA4mMzQdrspXdypG/TLipnZOv42nP&#xd
;
afSLBuZ5drIlZi2qNzK2z6RitmYdO24XXF5Ts9zPH70AuwqAggqKYHs2yLOu7i&#xd;j
&
Vu07NFA0vPE3b4jsy1nauexAuEGUVYfcoNnhvJGAn8tnBNTzqHxX2NG2J2LILJQ5&#xd
;
K25fnYkvxp+ndJiXi7+MaMNGrH2EAnJW4OKAX2I5sFi0qduWrpY325yV0dVJ0W&#xd;T
&
6Zjki+VTr6TR+i4rjvUPzP9gl4O2a4XYGN5Mm738iQKBgQDRC4pU7Y+jSMDe&#xd;ns9
&
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
0ZrGEevYi5hPAD7uOxSksbDwvQKBgQDQKmF1LSLY5zHhI2WZ0qpQNTCZrUOc6OGZ&#xd
;
ydmGinLfBkEK3wbH51MToJ1nkjvn2HERrfJxy+d6t2+qbKCFk3NkO5A2+VOcfyoc&#xd
;
bFHnsHpKoK0I0J6YmaJfFpWQbc0Hd1AzYcg7c196FdElZp9zcjatvcJbApP9qf3K&#xd
;
7jKFJBPXLwKBgQCVR3hxTXPVVo7kLqvzAIMA7KPCeKWaI0TjQuJ3SmpGUUVuxI+c&#xd
;
uto2ZZeTbJkZeglp1YKNlULmO2Dq9B7QO8/UDHbo6gIhsGuQwohJ037ntgohjSC9&#xd
;
/7NQWiDls+ESFL2fBzpixwGM4qBPxkbRGO09pG6XJJiPUc2esfH76ihAwQKBgC9d&#xd
;
dU90Nbmk4XSY2UVm6dnWQHi3M+tAEhUsGJLEbd7RTXtrw984g26z3Rzz6S2X0iJz&#xd
;
sfayrrj9hCsDDINYSalE5Eud76hsRuiwvPI69ZiFdtnKnkuaqZd5TA7Q7RYFz/nh&#xd
;
Be6BEfh1fmFEOIPMOSTPSKnsrD/LrjO+f0BMNTeBAoGAK02hk7e+l04vAj9QDHG2&#xd
;
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

148
Qualys Asset Management & Tagging API
Connectors 3.0

/Tt0usbYfCJBIQio76Z1QUc=&#xd;",
"passphrase": "passphrase1"
},
"connectorAppInfos": {
"set": {
"ConnectorAppInfoQList": {
"set": {
"ConnectorAppInfo": [
{
"name": "AI",
"identifier":
"ocid1.tenancy.oc1.."xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"tagId": ""
},
{
"name": "CI",
"identifier":
"ocid1.tenancy.oc1.."xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"tagId": ""
},
{
"name": "CSA",
"identifier":
"ocid1.tenancy.oc1.."xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"tagId": ""
}
]
}
}
}
}
}
}
}
}

Response
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": {
"OciAssetDataConnector": {
"id": "xxxxxx",
"name": "Oci4",
"description": "Master oci Connector",
"lastSync": "2023-07-28T09:12:01Z",

149
Qualys Asset Management & Tagging API
Connectors 3.0

"disabled": false,
"isDeleted": false,
"connectorAppInfos": {
"list": {
"ConnectorAppInfoQList": {
"list": {
"ConnectorAppInfo": {
"name": "AI",
"identifier":
"ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
}
}
},
"authRecord": {
"tenantId":
"ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
}
}
}

150
Qualys Asset Management & Tagging API
Connectors 3.0

Update OCI Connector 3.0

/qps/rest/3.0/update/am/ociassetdataconnector/

[POST]

You can update the connectors created in the Connector application.


Specify the connector ID and you can then update details of the specified
connector.

Input Parameter

Parameters Description

name The name of the connector that you want


to update.

description Update the description of the connector.

defaultTags (TagSimpleQList) Tags applied to any asset


discovered by the connector.

disabled (boolean) Whether execution of the


connector is disabled (YES). If disabled, the
connector does not synchronize assets.

connectorAppInfos.set. A mandatory parent parameter when you


ConnectorAppInfoQList need to update the below parameter,
set.ConnectorAppInfo.

connectorAppInfos It holds the list of list of ConnectorAppInfo


which includes App Name, identifiers and
tag details. Connector can use one or more
apps from list [AI, CI, CSA].

AI- Asset Inventory, CI- Cloud Inventory,


CSA- Cloud Security Assessment

Sample - Update an OCI Connector

151
Qualys Asset Management & Tagging API
Connectors 3.0

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" -
data-binary
@"https://qualysapi.qualys.com/qps/rest/3.0/update/am/ociassetdataco
nnector/xxxxxx"

Request POST data


{
"ServiceRequest": {
"data": {
"OciAssetDataConnector": {
"id": xxxxxx,
"name": "TestConnector3",
"disabled": true,
"description": "Sample oci Connector",
"connectorAppInfos": {
"set": {
"ConnectorAppInfoQList": {
"set": {
"ConnectorAppInfo": {
"name": "AI",
"identifier":
"ocid1.tenancy.oc1.xxxxxxxxxxxxxxxxxxxxxxx",
"tagId": ""
}
}
}
}
}
}
}
}
}

Response
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": {
"OciAssetDataConnector": {
"id": "xxxxxx",
"name": "TestConnector3",
"description": "Sample oci Connector",
"lastSync": "2023-07-28T11:59:43Z",
"disabled": true,

152
Qualys Asset Management & Tagging API
Connectors 3.0

"isDeleted": false,
"connectorAppInfos": {
"list": {
"ConnectorAppInfoQList": {
"list": {
"ConnectorAppInfo": {
"name": "AI",
"identifier":
"ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxx"
}
}
}
}
},
"authRecord": {
"tenantId": "ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxx"
}
}
}
}
}

153
Qualys Asset Management & Tagging API
Connectors 3.0

Search OCI Connector 3.0

/qps/rest/3.0/search/am/ociassetdataconnector/

[POST]

Returns a list of OCI connectors in the user's account that match the
provided criteria. Narrow down your search results using the parameters
listed below.

Sample - Search OCI Connector Details

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" -
data-binary
@"https://qualysapi.qualys.com/qps/rest/3.0/search/am/ociassetdataco
nnector/"

Response
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 3,
"hasMoreRecords": false,
"data": {
"OciAssetDataConnector": [
{
"id": xxxxxxx,
"name": "Oci2",
"description": "Master oci Connector",
"lastSync": "2023-07-19T11:15:32Z",
"lastError": "Internal processing error",
"connectorState": "FINISHED_ERRORS",
"type": "OCI",
"disabled": false,
"isGovCloudConfigured": false,
"isDeleted": false,
"runFrequency": 240,
"nextSync": "2023-07-19T15:15:23Z",
"isCPSEnabled": false,
"connectorAppInfos": {
"list": {
"ConnectorAppInfoQList": [
{
"list": {

154
Qualys Asset Management & Tagging API
Connectors 3.0

"ConnectorAppInfo": {
"name": "AI",
"identifier":
"ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"tagId": 132798612,
"tagMetadata": {
"id": 132798612,
"name": "test-tag"
}
}
}
},
{
"list": {
"ConnectorAppInfo": {
"name": "CI",
"identifier":
"ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"tagId": 132798612,
"tagMetadata": {
"id": 132798612,
"name": "test-tag"
}
}
}
},
{
"list": {
"ConnectorAppInfo": {
"name": "CSA",
"identifier":
"ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"tagId": 132798612,
"tagMetadata": {
"id": 132798612,
"name": "test-tag"
}
}
}
}
]
}
},
"cloudviewUuid": "e17b24f8-4e1d-4da7-abe4-20584e78b102",
"isInstantAssessmentEnabled": false,
"isSnapshotAssessmentEnabled": false,
"homeRegion": "us-ashburn-1",
"authRecord": {

155
Qualys Asset Management & Tagging API
Connectors 3.0

"tenantId":
"ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"userId": "ocid1.user.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"fingerprint":
"f1:74:98:60:ea:04:08:d4:59:ca:af:b4:ed:23:b7:fg",
"privateKey":
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x7Ii7q4qnPMKL8upZOnqPDGBPfBr8sieWW2cJTSMM8EvBfMD1Y4Z5+utkyanngEF&#xd
;
CZFtPRGWyhftC7jVvSCihwH0K0oRkSpesscuYrjO9ramI3MSVz7YPB9jdpvXDm/s&#xd
;
oG0AIm2or54luchTxrauNKIPPVFGDkmjjpBsEjBzcxXLpZEO4ecyycdHLx4F3uAH&#xd
;
m6zNcSFZo4lqiwJ9BnMWMARtIp9ZtN4MQqib3ysLC0SAki1F/ru/8ASuD8STtsRy&#xd
;
uZUYtbf8AVxfLcJ/MoS91R56vHOGyDfqQ7ddbCQeSTX/OXMCqPsthFOHfoJHbd4N&#xd
;
KaWrse2zAgMBAAECggEAONYJZHT8i2iy/GgnFukJkTQDS5+pkE0urWRNBTLJpb56&#xd
;
9/9c1/3UsSBI8skhdWG9bsoOEm6GWTtKif2mA4mMzQdrspXdypG/TLipnZOv42nP&#xd
;
afSLBuZ5drIlZi2qNzK2z6RitmYdO24XXF5Ts9zPH70AuwqAggqKYHs2yLOu7i&#xd;j
&
Vu07NFA0vPE3b4jsy1nauexAuEGUVYfcoNnhvJGAn8tnBNTzqHxX2NG2J2LILJQ5&#xd
;
K25fnYkvxp+ndJiXi7+MaMNGrH2EAnJW4OKAX2I5sFi0qduWrpY325yV0dVJ0W&#xd;T
&
6Zjki+VTr6TR+i4rjvUPzP9gl4O2a4XYGN5Mm738iQKBgQDRC4pU7Y+jSMDe&#xd;ns9
&
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
0ZrGEevYi5hPAD7uOxSksbDwvQKBgQDQKmF1LSLY5zHhI2WZ0qpQNTCZrUOc6OGZ&#xd
;
ydmGinLfBkEK3wbH51MToJ1nkjvn2HERrfJxy+d6t2+qbKCFk3NkO5A2+VOcfyoc&#xd
;
bFHnsHpKoK0I0J6YmaJfFpWQbc0Hd1AzYcg7c196FdElZp9zcjatvcJbApP9qf3K&#xd
;
7jKFJBPXLwKBgQCVR3hxTXPVVo7kLqvzAIMA7KPCeKWaI0TjQuJ3SmpGUUVuxI+c&#xd
;
uto2ZZeTbJkZeglp1YKNlULmO2Dq9B7QO8/UDHbo6gIhsGuQwohJ037ntgohjSC9&#xd
;
/7NQWiDls+ESFL2fBzpixwGM4qBPxkbRGO09pG6XJJiPUc2esfH76ihAwQKBgC9d&#xd
;
dU90Nbmk4XSY2UVm6dnWQHi3M+tAEhUsGJLEbd7RTXtrw984g26z3Rzz6S2X0iJz&#xd
;

156
Qualys Asset Management & Tagging API
Connectors 3.0

sfayrrj9hCsDDINYSalE5Eud76hsRuiwvPI69ZiFdtnKnkuaqZd5TA7Q7RYFz/nh&#xd
;
Be6BEfh1fmFEOIPMOSTPSKnsrD/LrjO+f0BMNTeBAoGAK02hk7e+l04vAj9QDHG2&#xd
;
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
/Tt0usbYfCJBIQio76Z1QUc=&#xd"
}
},
{
"id": 2087469,
"name": "aaaaaaaaa",
"description": "aaaaaaaaa",
"lastSync": "2023-07-28T09:53:59Z",
"connectorState": "FINISHED_SUCCESS",
"type": "OCI",
"disabled": false,
"isGovCloudConfigured": false,
"isDeleted": false,
"runFrequency": 240,
"nextSync": "2023-07-28T13:27:13Z",
"isRemediationEnabled": false,
"isCPSEnabled": false,
"connectorAppInfos": {
"list": {
"ConnectorAppInfoQList": [
{
"list": {
"ConnectorAppInfo": {
"name": "CSA",
"identifier":
"ocid1.tenancy.oc1..aaaaaaaax2gwhq3hszjqhte5pgzijgyge6gvlsrqar6kxn7i
twhk7keokamq"
}
}
},
{
"list": {
"ConnectorAppInfo": {
"name": "AI",
"identifier":
"ocid1.tenancy.oc1..aaaaaaaax2gwhq3hszjqhte5pgzijgyge6gvlsrqar6kxn7i
twhk7keokamq"
}
}
},
{
"list": {

157
Qualys Asset Management & Tagging API
Connectors 3.0

"ConnectorAppInfo": {
"name": "CI",
"identifier":
"ocid1.tenancy.oc1..aaaaaaaax2gwhq3hszjqhte5pgzijgyge6gvlsrqar6kxn7i
twhk7keokamq"
}
}
}
]
}
},
"cloudviewUuid": "a9f64613-8e59-4f32-b94a-3f86cf6e3c23",
"isInstantAssessmentEnabled": false,
"isSnapshotAssessmentEnabled": false,
"homeRegion": "us-ashburn-1",
"authRecord": {
"tenantId":
"ocid1.tenancy.oc1..aaaaaaaax2gwhq3hszjqhte5pgzijgyge6gvlsrqar6kxn7i
twhk7keokamq",
"userId":
"ocid1.user.oc1..aaaaaaaapou2ejjozieglgsve5lojtxgc6t6tf5w7udswqfhfrd
27fm5k3ca",
"fingerprint":
"8a:cd:10:fc:f7:3c:c2:7d:a6:88:27:cb:1a:ad:52:7b",
"privateKey": "-----BEGIN PRIVATE KEY-----
&#xd;\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCp+/vewX+RB
7oO&#xd;\nx7Ii7q4qnPMKL8upZOnqPDGBPfBr8sieWW2cJTSMM8EvBfMD1Y4Z5+utky
anngEF&#xd;\nCZFtPRGWyhftC7jVvSCihwH0K0oRkSpesscuYrjO9ramI3MSVz7YPB9
jdpvXDm/s&#xd;\noG0AIm2or54luchTxrauNKIPPVFGDkmjjpBsEjBzcxXLpZEO4ecy
ycdHLx4F3uAH&#xd;\nm6zNcSFZo4lqiwJ9BnMWMARtIp9ZtN4MQqib3ysLC0SAki1F/
ru/8ASuD8STtsRy&#xd;\nuZUYtbf8AVxfLcJ/MoS91R56vHOGyDfqQ7ddbCQeSTX/OX
MCqPsthFOHfoJHbd4N&#xd;\nKaWrse2zAgMBAAECggEAONYJZHT8i2iy/GgnFukJkTQ
DS5+pkE0urWRNBTLJpb56&#xd;\n9/9c1/3UsSBI8skhdWG9bsoOEm6GWTtKif2mA4mM
zQdrspXdypG/TLipnZOv42nP&#xd;\nafSLBuZ5drIlZi2qNzK2z6RitmYdO24XXF5Ts
9zPH70AuwqAggqKYHs2yLOu7iYj&#xd;\nVu07NFA0vPE3b4jsy1nauexAuEGUVYfcoN
nhvJGAn8tnBNTzqHxX2NG2J2LILJQ5&#xd;\nK25fnYkvxp+ndJiXi7+MaMNGrH2EAnJ
W4OKAX2I5sFi0qduWrpY325yV0dVJ0W9T&#xd;\n6Zjki+VTr6TR+i4rjvUPzP9gl4O2
a4XYGN5Mm738iQKBgQDRC4pU7Y+jSMDeSns9&#xd;\nPt+JlOZDi/2m86d2zxtcwW5H6
w8kM3Ql3dEu0qcgqxXTeAHyVz0xwT/0FnHP+nO6&#xd;\nIOiLI4GPoKmBXtuvYeX8ee
CkIS5At86y5WaTSNMZweWZ5PRK8d9/LRjgmkjrHlGF&#xd;\n0ZrGEevYi5hPAD7uOxS
ksbDwvQKBgQDQKmF1LSLY5zHhI2WZ0qpQNTCZrUOc6OGZ&#xd;\nydmGinLfBkEK3wbH
51MToJ1nkjvn2HERrfJxy+d6t2+qbKCFk3NkO5A2+VOcfyoc&#xd;\nbFHnsHpKoK0I0
J6YmaJfFpWQbc0Hd1AzYcg7c196FdElZp9zcjatvcJbApP9qf3K&#xd;\n7jKFJBPXLw
KBgQCVR3hxTXPVVo7kLqvzAIMA7KPCeKWaI0TjQuJ3SmpGUUVuxI+c&#xd;\nuto2ZZe
TbJkZeglp1YKNlULmO2Dq9B7QO8/UDHbo6gIhsGuQwohJ037ntgohjSC9&#xd;\n/7NQ
WiDls+ESFL2fBzpixwGM4qBPxkbRGO09pG6XJJiPUc2esfH76ihAwQKBgC9d&#xd;\nd
U90Nbmk4XSY2UVm6dnWQHi3M+tAEhUsGJLEbd7RTXtrw984g26z3Rzz6S2X0iJz&#xd;
\nsfayrrj9hCsDDINYSalE5Eud76hsRuiwvPI69ZiFdtnKnkuaqZd5TA7Q7RYFz/nh&#

158
Qualys Asset Management & Tagging API
Connectors 3.0

xd;\nBe6BEfh1fmFEOIPMOSTPSKnsrD/LrjO+f0BMNTeBAoGAK02hk7e+l04vAj9QDHG
2&#xd;\nYJeEu5IFAQ7jeTAN3qf2zVxorrk+yajv+SFc29vJI8mgaTMrxkw6HvFQZpP8
lTHu&#xd;\nuUD8cPzy5YCWrTOkXbfZrMMI0fSZxVlC5VCxpF7SqY1nUct+E6B+bjcPN
YGX1uzH&#xd;\n/Tt0usbYfCJBIQio76Z1QUc=&#xd;\n-----END PRIVATE KEY---
--"
}
},
{
"id": 2094517,
"name": "test-incorrect",
"lastSync": "2023-07-21T16:55:27Z",
"lastError": "Error returned by SearchResources operation
in ResourceSearch service.(401 NotAuthenticated false) The required
information to complete authentication was not provided or was
incorrect. (opc-request-id:
40EC2CE9E574499483E68B29F9B4D0C1/E89D2E0712F709375E1",
"connectorState": "FINISHED_ERRORS",
"type": "OCI",
"disabled": false,
"isGovCloudConfigured": false,
"isDeleted": false,
"runFrequency": 240,
"nextSync": "2023-07-21T20:55:11Z",
"isCPSEnabled": false,
"connectorAppInfos": {
"list": {
"ConnectorAppInfoQList": [
{
"list": {
"ConnectorAppInfo": {
"name": "CSA",
"identifier":
"ocid1.tenancy.oc1..aaaaaaaaffe7m2cq46gipucityq62uoevyzou3stboiyoev4
26hmy3iq35hd"
}
}
},
{
"list": {
"ConnectorAppInfo": {
"name": "CI",
"identifier":
"ocid1.tenancy.oc1..aaaaaaaaffe7m2cq46gipucityq62uoevyzou3stboiyoev4
26hmy3iq35hd"
}
}
},
{

159
Qualys Asset Management & Tagging API
Connectors 3.0

"list": {
"ConnectorAppInfo": {
"name": "AI",
"identifier":
"ocid1.tenancy.oc1..aaaaaaaaffe7m2cq46gipucityq62uoevyzou3stboiyoev4
26hmy3iq35hd"
}
}
}
]
}
},
"cloudviewUuid": "6c5edc30-e26e-4f49-99d1-0f5f86aa7437",
"isInstantAssessmentEnabled": false,
"isSnapshotAssessmentEnabled": false,
"homeRegion": "us-sanjose-1",
"authRecord": {
"tenantId":
"ocid1.tenancy.oc1..aaaaaaaaffe7m2cq46gipucityq62uoevyzou3stboiyoev4
26hmy3iq35hd",
"userId":
"ocid1.tenancy.oc1..aaaaaaaaffe7m2cq46gipucityq62uoevyzou3stboiyoev4
26hmy3iq35hd",
"fingerprint": "asd",
"privateKey": "-----BEGIN PRIVATE KEY-----
&#xd;\n&#xd;\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCQgN
tNi7Lhw73M&#xd;\n&#xd;\niBq2l6ghrc93SY04sCeuFaKCSSLq5PbHwK4HN1VB1YSl
+s0NmKU9zuMdCWUcw0wg&#xd;\n&#xd;\nNLbihCQ8Sr4ubknPxt5cwfHRWRto92svfz
if+oFz04J4YetWBb1sdFng84BU7wAg&#xd;\n&#xd;\nxsfLgXizzr4NR0jqKA6cTrgZ
BCHsv7CxTWzmI0QTCYLcd99Zrj1A3oCHpKeq+iBW&#xd;\n&#xd;\ni1EHmP3BbjGp2F
skx1cgKFr3oCk2B2X/DI/jXGTqXMeX3OjEY4zf4LsP3O1iuhWt&#xd;\n&#xd;\nPocn
yGlXfszZnwaT/22I7rEYmUK9i8PLSKsAOeWyvSBJL9uAw8RGLPZobVxOfttU&#xd;\n&
#xd;\nw/w6cKcdAgMBAAECggEAKXKsdKuzXYp1sGsBrooFkdN3BLI2LaJpX0eZW2F7AI
E4&#xd;\n&#xd;\nP8eGo089xyplZ+5uTo4QJ5BmGHgPZpamCT7Vjld0xU5zCoJb7ZsP
QO/oWrICaLM/&#xd;\n&#xd;\nLVqCdXC3HO/4Jmt/wybWVHtzJFDz6Gi9UqlxuW+jnX
+Zh9mAkpl2x2LU72f+Cxfq&#xd;\n&#xd;\nUj1G0NoapiQuH+JHF10ATYBzAemeCBME
uXUGQj6xyxI798SPlQ4vqgxvvxz88PgE&#xd;\n&#xd;\nuD/rhK70ZuPOutML/sfdAt
+6Fy49gC6Yv5b/DWDBKDaDooUFkJDzyo3q9HPKe1qa&#xd;\n&#xd;\nhw2N/KySBXc6
iRlh+voCAQA/AZxcr6yeanPq46ODyQKBgQDA0aDGd5sTWQCMY5lO&#xd;\n&#xd;\n89
6pw1yqSbBOrUsbK3XXyBQjpl407m7svUetM4pFEqFhumDB0PgLvPILNi5ljM6w&#xd;\
n&#xd;\nhLDJ59sZHBVcFY2pQ8plTWtY2v5iLo7zJojbTryiHW4SoeK6WOUCFu85QgKm
gHEL&#xd;\n&#xd;\njetGdwgHPw12s6iGCcFfYcadPwKBgQC/2ldpT3EuklbpSeFUNX
3Cy0ImZTi9htWo&#xd;\n&#xd;\nlV2nx10j1txb7Nb1uP6o6c+M9AwY7AtzEXIGFttQ
f/cR50vmdWlVaW0zmmInua8l&#xd;\n&#xd;\n65FnOGpSTgo13nMwoZZu/Uw2cUIG6Q
MVdoc3k0UUnwOiVeNnb4Jh0rV7BncnN9cm&#xd;\n&#xd;\nKJQDLnt4owKBgQCYLdqC
SSuvXXM9We5JjdeSjIm6LGZl8gdw7iAXqeWbLVb016nc&#xd;\n&#xd;\nVpcXb7IVSd
rs0rhCv7bFLN6rUpvTsgn+7vrIn6EgdDW3c5tWmBZJVYz/l/dlbfGM&#xd;\n&#xd;\n
nkEtNTtTh360XegfwsEboRY1To/g8UZHJD8oYhGIBo+Nu8Wp5FEmAnlK6QKBgEY6&#xd

160
Qualys Asset Management & Tagging API
Connectors 3.0

;\n&#xd;\ncMD1+aJoozPmfXtL0Wta6C4R44FNOCzr8EqYafnSjvt/aPit7Vp7rCQWuc
7tqQtI&#xd;\n&#xd;\nGYstFr8S+KgvGNOVqyc+3mCDZObRy9F/t8wnFJRoSMiLU3M7
00txoVJUhyzsYtqa&#xd;\n&#xd;\ndsjbOfBgfP4RnpqgcQPKE/Ci3z8V68XmGLhJbZ
0tAoGAfz01xbw7WBxibFNqQZbx&#xd;\n&#xd;\ncklcFPPADSKa+zvZ9Xcj729IzKWk
z5CMPEbKCbWWPPtqjbM08qrz97td1vf7UcgT&#xd;\n&#xd;\nol0hIRN2jFmZO28S6q
2ObDbl3smujPrSksABVQ12YKBQphCP3IAOCXVWPCwtxuqg&#xd;\n&#xd;\nWsH+ieB4
lpeYOYZJq4hwtdg=&#xd;\n&#xd;\n-----END PRIVATE KEY-----"
}
}
]
}
}
}

161
Qualys Asset Management & Tagging API
Connectors 3.0

Delete OCI Connector 3.0

/qps/rest/3.0/delete/am/ociassetdataconnector/

[POST]

Delete one or more OCI connectors from the Connectors application.

Sample - Delete OCI connector

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" -
data-binary
@"https://qualysapi.qualys.com/qps/rest/3.0/delete/am/azureassetdata
connector/xxxxxx"

Response
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": {
"OciAssetDataConnector": {
"id": "xxxxxxxxx"
}
}
}
}

162
Qualys Asset Management & Tagging API
Connectors 3.0

Run OCI Connector 3.0

/qps/rest/3.0/run/am/ociassetdataconnector

[POST]

The run connector API will fetch the latest changes related to your
connector.

Sample - Run OCI Connector

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" -
data-binary
@"https://qualysapi.qualys.com/qps/rest/3.0/run/am/ociassetdataconne
ctor/xxxxx"

Response
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": {
"OciAssetDataConnector": {
"id": "xxxxxx"
}
}
}
}

163
Qualys Asset Management & Tagging API
Connectors 3.0

Get OCI Connector Details 3.0

/qps/rest/3.0/get/am/ociassetdataconnector

[GET]

Specify the OCI connector ID to fetch the details of the connector.

Sample - Get OCI Connector Details

API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "GET" -
data-binary
@"https://qualysapi.qualys.com/qps/rest/3.0/get/am/ociassetdataconne
ctor/xxxxxx"

Response
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": {
"OciAssetDataConnector": {
"id": "xxxxxx",
"name": "TestConnector2",
"description": "Sample oci Connector",
"lastSync": "2023-07-26T08:54:51Z",
"connectorState": "QUEUED",
"type": "OCI",
"disabled": false,
"isGovCloudConfigured": false,
"isDeleted": false,
"runFrequency": 240,
"nextSync": "2023-07-26T12:54:51Z",
"isRemediationEnabled": false,
"isCPSEnabled": false,
"connectorAppInfos": {
"list": {
"ConnectorAppInfoQList": [
{
"list": {
"ConnectorAppInfo": {
"name": "CSA",

164
Qualys Asset Management & Tagging API
Connectors 3.0

"identifier":
"ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"tagId": "xxxxxxx",
"tagMetadata": {
"id": "xxxxxxx",
"name": "Connector-Tag2",
"color": "java.awt.Color[r=0,g=204,b=0]"
}
}
}
},
{
"list": {
"ConnectorAppInfo": {
"name": "CI",
"identifier":
"ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"tagId": 8608468,
"tagMetadata": {
"id": 8608468,
"name": "Connector-Tag2",
"color": "java.awt.Color[r=0,g=204,b=0]"
}
}
}
},
{
"list": {
"ConnectorAppInfo": {
"name": "AI",
"identifier":
"ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"tagId": "xxxxxxx",
"tagMetadata": {
"id": "xxxxxxx",
"name": "Connector-Tag2",
"color": "java.awt.Color[r=0,g=204,b=0]"
}
}
}
}
]
}
},
"cloudviewUuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"isInstantAssessmentEnabled": false,
"isSnapshotAssessmentEnabled": false,
"homeRegion": "us-ashburn-1",

165
Qualys Asset Management & Tagging API
Connectors 3.0

"authRecord": {
"tenantId":
"ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"userId":
"ocid1.user.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"fingerprint":
"8a:xx:10:xx:f7:xx:c2:xx:a6:xx:27:xx:1a:xx:52:xx",
"privateKey":
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x7Ii7q4qnPMKL8upZOnqPDGBPfBr8sieWW2cJTSMM8EvBfMD1Y4Z5+utkyanngEF&#xd
;
CZFtPRGWyhftC7jVvSCihwH0K0oRkSpesscuYrjO9ramI3MSVz7YPB9jdpvXDm/s&#xd
;
oG0AIm2or54luchTxrauNKIPPVFGDkmjjpBsEjBzcxXLpZEO4ecyycdHLx4F3uAH&#xd
;
m6zNcSFZo4lqiwJ9BnMWMARtIp9ZtN4MQqib3ysLC0SAki1F/ru/8ASuD8STtsRy&#xd
;
uZUYtbf8AVxfLcJ/MoS91R56vHOGyDfqQ7ddbCQeSTX/OXMCqPsthFOHfoJHbd4N&#xd
;
KaWrse2zAgMBAAECggEAONYJZHT8i2iy/GgnFukJkTQDS5+pkE0urWRNBTLJpb56&#xd
;
9/9c1/3UsSBI8skhdWG9bsoOEm6GWTtKif2mA4mMzQdrspXdypG/TLipnZOv42nP&#xd
;
afSLBuZ5drIlZi2qNzK2z6RitmYdO24XXF5Ts9zPH70AuwqAggqKYHs2yLOu7i&#xd;j
&
Vu07NFA0vPE3b4jsy1nauexAuEGUVYfcoNnhvJGAn8tnBNTzqHxX2NG2J2LILJQ5&#xd
;
K25fnYkvxp+ndJiXi7+MaMNGrH2EAnJW4OKAX2I5sFi0qduWrpY325yV0dVJ0W&#xd;T
&
6Zjki+VTr6TR+i4rjvUPzP9gl4O2a4XYGN5Mm738iQKBgQDRC4pU7Y+jSMDe&#xd;ns9
&
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
0ZrGEevYi5hPAD7uOxSksbDwvQKBgQDQKmF1LSLY5zHhI2WZ0qpQNTCZrUOc6OGZ&#xd
;
ydmGinLfBkEK3wbH51MToJ1nkjvn2HERrfJxy+d6t2+qbKCFk3NkO5A2+VOcfyoc&#xd
;
bFHnsHpKoK0I0J6YmaJfFpWQbc0Hd1AzYcg7c196FdElZp9zcjatvcJbApP9qf3K&#xd
;
7jKFJBPXLwKBgQCVR3hxTXPVVo7kLqvzAIMA7KPCeKWaI0TjQuJ3SmpGUUVuxI+c&#xd
;
uto2ZZeTbJkZeglp1YKNlULmO2Dq9B7QO8/UDHbo6gIhsGuQwohJ037ntgohjSC9&#xd
;
/7NQWiDls+ESFL2fBzpixwGM4qBPxkbRGO09pG6XJJiPUc2esfH76ihAwQKBgC9d&#xd
;

166
Qualys Asset Management & Tagging API
Connectors 3.0

dU90Nbmk4XSY2UVm6dnWQHi3M+tAEhUsGJLEbd7RTXtrw984g26z3Rzz6S2X0iJz&#xd
;
sfayrrj9hCsDDINYSalE5Eud76hsRuiwvPI69ZiFdtnKnkuaqZd5TA7Q7RYFz/nh&#xd
;
Be6BEfh1fmFEOIPMOSTPSKnsrD/LrjO+f0BMNTeBAoGAK02hk7e+l04vAj9QDHG2&#xd
;
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
/Tt0usbYfCJBIQio76Z1QUc=&#xd;"
}
}
}
}
}

167
Qualys Asset Management & Tagging API
Connectors 3.0

Global Scan Configuration

Global Scan Configuration

Once you enable cloud perimeter scan for your connector, you need to
provide scan configuration for the cloud perimeter scan. You can either
choose to provide custom scan configuration or specify global scan
configuration settings to be used.

You can use the new API to create global scan configuration to be used for
the cloud perimeter scan. If the custom scan configuration is not specified
for the cloud perimeter scan, then the global scan configuration is used.

Create Global Scan Configuration

Update Global Scan Configuration

Search Global Scan Configuration

168
Qualys Asset Management & Tagging API
Connectors 3.0

Create Global Scan Configuration

/qps/rest/3.0/create/am/globalscanconfiguration

[POST]

Once you enable cloud perimeter scan for your connector, you need to
provide scan configuration for the cloud perimeter scan. You can either
choose to provide custom scan configuration or specify global scan
configuration settings to be used.

You can create global scan configuration to be used for the cloud
perimeter scan. If the custom scan configuration is not specified for the
cloud perimeter scan, then the global scan configuration is used.

Permissions required - Managers with full scope.

Input Parameter

Parameters Description

optionProfileId Specify the Option Profile Id. This Id is unique for every
user. You can fetch the option profile Id using the List VM
Option Profile API
(/api/2.0/fo/subscription/option_profile/vm/?action=list).
For more information on the how to fetch the option
profile Id, refer to Qualys API (VM, PC) User Guide.

recurrence Specify if the scan should be scheduled on DAILY or


WEEKLY basis.

daysOfWeek Specify the days when the scan should be scheduled. For
example, SUN, MON, TUE, WED, THU, FRI, SAT.

Note: This field is applicable only if the recurrence field is


set to WEEKLY.

scanPrefix Specify a prefix to be appended to the scan name. Once


the cloud perimeter scan is triggered from the
Vulnerability Management application, the prefix is
appended to the scan name. The scan name is in following

169
Qualys Asset Management & Tagging API
Connectors 3.0

format:

<prefix>-<connectorId>-<timestamp>

startDate Specify the start date of scan in mm/dd/yyyy format.

startTime Specify the start time of scan in HH:MM (24 hrs) format.

timezone Specify the time zone for the cloud perimeter scan to be
initiated.

Sample 1 - Create Global Scan Configuration

API request
curl -n -u "USERNAME:PASSWORD" -H "content-type: text/xml"
"https://qualysapi.qualys.com/r/qps/rest/3.0/create/am/globalscancon
figuration"

Request POST data


<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<data>
<GlobalScanConfiguration>
<scanPrefix>Global Scan</scanPrefix>
<optionProfileId>2</optionProfileId>
<recurrence>WEEKLY</recurrence>
<startDate>06/22/2022</startDate>
<startTime>12:45</startTime>
<daysOfWeek>
<set>
<Day>SUN</Day>
<Day>TUE</Day>
</set>
</daysOfWeek>
<timezone>Africa/Cairo</timezone>
</GlobalScanConfiguration>
</data>
</ServiceRequest>

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

170
Qualys Asset Management & Tagging API
Connectors 3.0

<ServiceResponse
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
3.0/am/globalscanconfiguration.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<GlobalScanConfiguration>
<scanPrefix>Global Scan</scanPrefix>
<optionProfileId>2</optionProfileId>
<recurrence>WEEKLY</recurrence>
<startDate>06/22/2022</startDate>
<startTime>12:45</startTime>
<daysOfWeek>
<list>
<Day>SUN</Day>
<Day>TUE</Day>
</list>
</daysOfWeek>
<timezone>Africa/Cairo</timezone>
</GlobalScanConfiguration>
</data>
</ServiceResponse>

171
Qualys Asset Management & Tagging API
Connectors 3.0

Update Global Scan Configuration

/qps/rest/3.0/update/am/globalscanconfiguration

[POST]

Once you enable cloud perimeter scan for your connector, you need to
provide scan configuration for the cloud perimeter scan. You can either
choose to provide custom scan configuration or specify global scan
configuration settings to be used.

You can create global scan configuration to be used for the cloud
perimeter scan. If the custom scan configuration is not specified for the
cloud perimeter scan, then the global scan configuration is used.

Permissions required - Managers with full scope.

Input Parameter

Parameters Description

optionProfileId Specify the Option Profile Id. This Id is unique for every
user. You can fetch the option profile Id using the List VM
Option Profile API
(/api/2.0/fo/subscription/option_profile/vm/?action=list).
For more information on the how to fetch the option
profile Id, refer to Qualys API (VM, PC) User Guide.

recurrence Specify if the scan should be scheduled on DAILY or


WEEKLY basis.

daysOfWeek Specify the days when the scan should be scheduled. For
example, SUN, MON, TUE, WED, THU, FRI, SAT.

Note: This field is applicable only if the recurrence field is


set to WEEKLY.

scanPrefix Specify a prefix to be appended to the scan name. Once


the cloud perimeter scan is triggered from the
Vulnerability Management application, the prefix is
appended to the scan name. The scan name is in following

172
Qualys Asset Management & Tagging API
Connectors 3.0

format:

<prefix>-<connectorId>-<timestamp>

startDate Specify the start date of scan in mm/dd/yyyy format.

startTime Specify the start time of scan in HH:MM (24 hrs) format.

timezone Specify the time zone for the cloud perimeter scan to be
initiated.

Sample 1 - Update Global Scan Configuration

API request
curl -n -u "USERNAME:PASSWORD" -H "content-type: text/xml"
"https://qualysapi.qualys.com/r/qps/rest/3.0/update/am/globalscancon
figuration"

Request POST data


<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<data>
<GlobalScanConfiguration>
<scanPrefix>update global scan</scanPrefix>
<optionProfileId>2</optionProfileId>
<recurrence>WEEKLY</recurrence>
<startDate>06/22/2022</startDate>
<startTime>12:45</startTime>
<daysOfWeek>
<set>
<Day>SUN</Day>
<Day>TUE</Day>
</set>
</daysOfWeek>
<timezone>Africa/Cairo</timezone>
</GlobalScanConfiguration>
</data>
</ServiceRequest>

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

173
Qualys Asset Management & Tagging API
Connectors 3.0

<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
3.0/am/globalscanconfiguration.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<GlobalScanConfiguration>
<scanPrefix>update global scan</scanPrefix>
<optionProfileId>2</optionProfileId>
<recurrence>WEEKLY</recurrence>
<startDate>06/22/2022</startDate>
<startTime>12:45</startTime>
<daysOfWeek>
<list>
<Day>SUN</Day>
<Day>TUE</Day>
</list>
</daysOfWeek>
<timezone>Africa/Cairo</timezone>
</GlobalScanConfiguration>
</data>
</ServiceRequest>

174
Qualys Asset Management & Tagging API
Connectors 3.0

Search Global Scan Configuration

/qps/rest/3.0/search/am/globalscanconfiguration

[POST]

Use the API to search for the global scan configuration. You need not
provide any input parameters.

Permissions required - Managers with full scope.

Sample 1 - Search Global Scan Configuration

API request
curl -n -u "USERNAME:PASSWORD" -H "content-type: text/xml"
"https://qualysapi.qualys.com/qps/rest/3.0/search/am/globalscanconfi
guration"

Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/xsd/
3.0/am/globalscanconfiguration.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<hasMoreRecords>false</hasMoreRecords>
<data>
<GlobalScanConfiguration>
<scanPrefix>Global Scan</scanPrefix>
<optionProfileId>2</optionProfileId>
<recurrence>WEEKLY</recurrence>
<startDate>06/22/2022</startDate>
<startTime>12:45</startTime>
<daysOfWeek>
<list>
<Day>SUN</Day>
<Day>TUE</Day>
</list>
</daysOfWeek>
<timezone>Africa/Cairo</timezone>
</GlobalScanConfiguration>
</data>
</ServiceResponse>

175
Qualys Asset Management & Tagging API
Connectors 3.0

Snapshot-based Scan

Snapshot-based Assessment

We support the following operations for Snapshot Based Assessment in


the Connectors application.

Register Service Account

Run Snapshot Scan

Deregister Service Account

176
Qualys Asset Management & Tagging API
Connectors 3.0

Register Service Account

/conn/snapshot/v1.0/register-service-account

[POST]

Configure your AWS account as a service account to be used for the


Snapshot Based scan.

Input Parameter

Parameters Description

accountId (Required) Amazon Account Id to register the service


account with.

schedule (Required) The interval where the snapshot scan runs


periodically. Format is a cron expression.

tagkey (Optional) Provide the tag key to filter instances for


scans.

tagvalue (Optional) Provide the tag value to filter instances for


scans

tagkey1 (Optional) Provide an additional tag key to filter


instances for scans.

tagvalue1 (Optional) Provide an additional tag value to filter


instances for scans

Sample 1 - Register a Service Account

API request
curl -X 'POST'
'https://gateway.xxx.xxx.xxxxx.qualys.com/conn/snapshot/v1.0/registe
r-service-account' \ -H 'accept: application/json' \ -H 'Content-
Type: application/json'

Request POST data

177
Qualys Asset Management & Tagging API
Connectors 3.0

{
"accountId": "95xxxxxxxx75",
"schedule": "0 0 2 ? * * *",
"tags": [
{
"tagKey": "Owner",
"tagValue": "test"
}
}
]
}

Response
Successfully registered the service account

Error Codes:

Code Message

200 OK

201 Created

304 Already Registered

400 Incorrect Params or connector is not cloudview

401 Invalid customer or back office entry not exists.

404 Connector not found

178
Qualys Asset Management & Tagging API
Connectors 3.0

Run Snapshot Scan

/conn/snapshot/v1.0/register-scanner-run

[GET]

Run a snapshot scan on all the registered target accounts.

Sample 1 - Run Snapshot Scan

API request
curl -X 'GET'
\'https://gateway.xxx.xxx.xxxxx.qualys.com/conn/snapshot/v1.0/regist
er-scanner-run' \
-H 'accept: application/json' \
-H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXX'

Response
{
{
"targetAccounts": [
{
"awsAccountId": "95xxxxxxxx75",
"connectorId": "xxxxxxx"
}
],
"amis": {
"ap-northeast-1": "ami-06xxxxxxxxxxxxa3",
"ap-northeast-2": "ami-05xxxxxxxxxxxx26",
"ap-northeast-3": "ami-07xxxxxxxxxxxxe7",
"ap-south-1": "ami-05xxxxxxxxxxxx02",
"ap-southeast-1": "ami-09xxxxxxxxxxxxf5"
}
}

Error Codes:

Code Message

200 OK

179
Qualys Asset Management & Tagging API
Connectors 3.0

401 Invalid customer or back office entry not exists.

404 Service account not found

429 Too many requests

180
Qualys Asset Management & Tagging API
Connectors 3.0

Deregister Service Account

/conn/snapshot/v1.0/deregister-service-account

[DELETE]

Deregister your registered service account to disable snapshot based


assessment.

Sample 1 - Deregister a Service Account

API request
curl -X 'DELETE' \
'https://gateway.xxx.xxx.xxxxx.qualys.com/conn/snapshot/v1.0/deregi
ster-service-account' \
-H 'accept: */*' \
-H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXX'

Response
Successfully deregistered.

Error Codes:

Code Message

204 Successfully deregistered

404 Service account not found

500 Internal server error

181
Qualys Asset Management & Tagging API
Connectors 3.0

Azure Organization Connectors 3.0

Azure Organization Connectors

We support the following operations for all Microsoft Azure Organization


connectors in the Connectors application.

To run Azure Organization Connectors, your user must have the following
permission:

• ASSET.MANAGE_DATA_CONNECTORS

Or, you should be a manager user. Read more about configuring user
access and permissions at TotalCloud Online Help.

Azure Organization Connector APIs

Test Azure Organization Connection

Get Job Status

Create Azure Organization Connector

Edit Azure Organization Connector

List Azure Organization Connector

Run Azure Organization Connector

Get All Azure Management Group

Get Management Groups Attached to a Connector

Enable/Disable Azure Organization Connector

Attach Azure Member Connector

Detach Azure Member Connector

Get Valid Organization Connectors To Attach

Get Attached Member Connectors

Get Last Job Summary of Organization Connectors

182
Qualys Asset Management & Tagging API
Connectors 3.0

Delete Azure Organization Connector

183
Qualys Asset Management & Tagging API
Connectors 3.0

Test Azure Organization Connection

/connectors/v1.0/org/azure/test/

[POST]

Specify the Organization connector details of the Azure account to test the
connection.

Input Parameter

Parameter Mandatory/Optional Data Description


Type

applicationId Mandatory String Unique identifier of the


application you create
on Azure portal.

tenantId Mandatory String The Tenant ID of the


Azure account of the
organization.

secretValue Mandatory String The secret key value


generated after you
provide permission to
the application to
access the Windows
Azure Service.

Sample: Test Azure Organization connection

API request
curl --location
'https://<QualysGatewayURL>/connectors/v1.0/org/azure/test/"
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \

Request Data
{

184
Qualys Asset Management & Tagging API
Connectors 3.0

"tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"secretValue": "xxxxx~xxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxx"
}

Response
{
"responseMessage": null,
"responseCode": "SUCCESS",
"jobUuid": "xxxxxxxx-xxxxxxxxx-xxxxxxxxxxxxxxxx"
}

185
Qualys Asset Management & Tagging API
Connectors 3.0

Get Job Status

/connectors/v1.0/org/azure/job/{jobUuid}

[GET]

An API endpoint to get the status of the Job initiated via test connection.
This Job syncs all management groups of the given Tenant from Azure
cloud to Qualys database.

Sample: Get Job Status

API request
curl --location
"https://<QualysGatewayURL>/connectors/v1.0/org/azure/job/xxxxxxxx-
xxxx-xxxx-xxxx-xxxxxxxxxxxx"
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \

Response
{
"status": "COMPLETED",
"error": null,
"createOn": "2023-05-17T07:23:33.061+00:00",
"updatedOn": "2023-05-17T07:23:33.467+00:00"
}

186
Qualys Asset Management & Tagging API
Connectors 3.0

Create Azure Organization Connector

/connectors/v1.0/org/azure/

[POST]

A connector API endpoint for creating Microsoft Azure organization


connectors.

Input Parameter

Parameter Mandatory/Optional Data Description


Type

applicationId Mandatory String Unique identifier


of the application
you create on
Azure portal.

secretValue Mandatory String The secret key


value generated
after you provide
permission to the
application to
access the
Windows Azure
Service.

tenantId Mandatory String The Tenant ID of


the Azure account
you want to fetch
the Management
Group.

name Mandatory String A unique name for


the organization
connector you
want to create.

description Optional String Description of the


organization
connector you

187
Qualys Asset Management & Tagging API
Connectors 3.0

want to create.

connectorAppInfos Mandatory String It holds the list of


ConnectorAppInfo
which includes
App Name,
identifiers and tag
details. Connector
can choose one or
more apps from
list [AI, CI, CSA].
AI-Asset
Inventory, CI-
Cloud Inventory,
CSA- Cloud
Security
Assesment.

orgRunFrequency Mandatory Integer runFrequency for


an organization
connector decides
the rate at which
the connector
should poll the
cloud provider
and fetch the
data. Specified in
minutes.

connectorRunFrequency Mandatory Integer runFrequency for


a connector
decides the rate
at which the
connector should
poll the cloud
provider and fetch
the data.
Specified in
minutes.

includedMem Optional String List of


management
groups to include.

excludedMem Optional String List of

188
Qualys Asset Management & Tagging API
Connectors 3.0

management
groups to exclude.

isCreateConnector Optional Boolean Boolean to


determine
ForNewSubscriptions whether new
connectors should
Automatically be automatically
created for new
cloud
subscriptions.

isDisableConnectors Optional Boolean Boolean to


determine
ForDeletedManagemen whether
connectors should
tGroups be automatically
disabled when a
management
group is deleted.

autoActivateCertView Optional Boolean Automatically


activate CertView
application for
newly created
connectors.

autoActivatePC Optional Boolean Automatically


activate Policy
Compliance
application for
newly created
connectors.

autoActivateSCA Optional Boolean Automatically


activate Security
Configuration
Assesment
application for
newly created
connectors.

autoActivateVM Optional Boolean Automatically


activate

189
Qualys Asset Management & Tagging API
Connectors 3.0

Vulnerability
Management
application for
newly created
connectors.

defaultTagIds Optional String IDs of tags for


cloud resources

connectorPrefixName Mandatory String The prefix name


for member
connectors of the
organization.
Character limit is
30. Cannot be
edited after Org
connector is
created.

tenantName Mandatory String Name of the


Azure Tenant to
which the
organization
belongs.

Sample: Create a New Organization Connector

Create an organization connector for your Azure account.

API request
curl --location
"https://<QualysGatewayURL>/connectors/v1.0/org/azure/
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \

Request Data
{
"name": "Azure Org",
"description": "azure org connector description",
"connectorAppInfos": [
{
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "AI",

190
Qualys Asset Management & Tagging API
Connectors 3.0

"tagId": null
},
{
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "CI",
"tagId": null
},
{
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "CSA",
"tagId": null
}
],
"isRemediationEnabled": true,
"tenantName": "Tenant name",
"tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"secretValue": "xxxxx~xxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxx",
"orgRunFrequency": {
"hours": 1,
"minutes": 0
},
"connectorPrefixName": "createdbyorg",
"connectorRunFrequency": {
"hours": 1,
"minutes": 0
},
"excludedMem": [],
"includedMem": [
"TestingManagementGroup"
],
"isCreateConnectorForNewSubscriptionsAutomatically": true,
"isDisableConnectorsForDeletedManagementGroups": true,
"autoActivateCV": false,
"autoActivateCertView": false,
"autoActivatePC": false,
"autoActivateSCA": false,
"autoActivateVM": false,
"defaultTagIds": []
}

Response
{
"id": xxxxxx,
"name": "Azure Org",
"description": "azure org connector description",
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",

191
Qualys Asset Management & Tagging API
Connectors 3.0

"orgRunFrequency": {
"hours": 1,
"minutes": 0
},
"connectorRunFrequency": {
"hours": 1,
"minutes": 0
},
"lastSynced": "2023-05-17T05:19:11.727+00:00",
"nextSync": "2023-05-17T06:19:11.727+00:00",
"type": "AZURE",
"customerId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"userUuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"userName": "abcde_xxxx",
"lastError": null,
"state": "PENDING",
"connectorPrefixName": "createdbyorg",
"defaultTagIds": [],
"connectorAppInfos": [
{
"name": "AI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,
"tagId": null,
"tagMetadata": null
},
{
"name": "CI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CSA",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
}
],
"connectorCapabilities": [
"AI",
"CI",
"CSA"
],
"lastSuccessfulSync": "2023-05-17T05:19:11.727+00:00",
"createdBy": "Test User",
"organizationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",

192
Qualys Asset Management & Tagging API
Connectors 3.0

"autoActivateVM": false,
"autoActivatePC": false,
"autoActivateSCA": false,
"autoActivateCertView": false,
"autoActivateCV": false,
"includedMem": [
"TestingManagementGroup"
],
"excludedMem": [],
"createConnectorForNewSubscriptionsAutomatically": true,
"disableConnectorsForDeletedManagementGroups": true,
"disabled": false,
"deleted": false,
"remediationEnabled": true
}

193
Qualys Asset Management & Tagging API
Connectors 3.0

Edit Azure Organization Connector

/connectors/v1.0/org/azure/{organizationConnectorId}

[POST]

A connector API endpoint to edit the Organization connector. The


following fields cannot be edited using the Edit API.

• applicationId
• name
• connectorPrefixName
• identifier
• tenantId
• tenantName

Input Parameter

Parameter Mandatory/Optional Data Description


Type

applicationId Mandatory String Unique identifier


of the application
you create on
Azure portal.

secretValue Mandatory String The secret key


value generated
after you provide
permission to the
application to
access the
Windows Azure
Service.

tenantId Mandatory String The Tenant ID of


the Azure account
you want to fetch
the Management
Group.

name Mandatory String A unique name for


the organization

194
Qualys Asset Management & Tagging API
Connectors 3.0

connector you
want to create.

description Optional String Description of the


organization
connector you
want to create.

connectorAppInfos Mandatory String It holds the list of


ConnectorAppInfo
which includes
App Name,
identifiers and tag
details. Connector
can choose one or
more apps from
list [AI, CI, CSA].
AI-Asset
Inventory, CI-
Cloud Inventory,
CSA- Cloud
Security
Assesment.

orgRunFrequency Mandatory Integer runFrequency for


an organization
connector decides
the rate at which
the connector
should poll the
cloud provider
and fetch the
data. Specified in
minutes.

connectorRunFrequency Mandatory Integer runFrequency for


a connector
decides the rate
at which the
connector should
poll the cloud
provider and fetch
the data.
Specified in
minutes.

195
Qualys Asset Management & Tagging API
Connectors 3.0

includedMem Optional String List of


management
groups to include.

excludedMem Optional String List of


management
groups to exclude.

isCreateConnectorFor Optional Boolean Boolean to


determine
NewSubscriptions whether new
connectors should
Automatically be automatically
created for new
cloud
subscriptions.

isDisableConnectorsFo Optional Boolean Boolean to


determine
rDeletedManagement whether
connectors should
Groups be automatically
disabled when a
management
group is deleted.

autoActivateCertView Optional Boolean Automatically


activate CertView
application for
newly created
connectors.

autoActivatePC Optional Boolean Automatically


activate Policy
Compliance
application for
newly created
connectors.

autoActivateSCA Optional Boolean Automatically


activate Security
Configuration
Assesment
application for

196
Qualys Asset Management & Tagging API
Connectors 3.0

newly created
connectors.

autoActivateVM Optional Boolean Automatically


activate
Vulnerability
Management
application for
newly created
connectors.

defaultTagIds Optional String IDs of tags for


cloud resources

connectorPrefixName Mandatory String The prefix name


for member
connectors of the
organization.
Character limit is
30. Cannot be
edited after Org
connector is
created.

tenantName Mandatory String Name of the


Azure Tenant to
which the
organization
belongs.

Sample: Edit Azure Organization Connector

API request
curl --location 'https://<QualysGatewayURL>
/connectors/v1.0/org/azure/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json'

Request Data
{
"name": "Azure Org",
"description": "azure org connector description",
"connectorAppInfos": [

197
Qualys Asset Management & Tagging API
Connectors 3.0

{
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "AI",
"tagId": null
},
{
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "CI",
"tagId": null
},
{
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "CSA",
"tagId": null
}
],
"isRemediationEnabled": true,
"tenantName": "Tenant name",
"tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"secretValue": "xxxxx~xxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxx",
"orgRunFrequency": {
"hours": 1,
"minutes": 0
},
"connectorPrefixName": "createdbyorg",
"connectorRunFrequency": {
"hours": 1,
"minutes": 0
},
"excludedMem": [],
"includedMem": [
"TestingManagementGroup"
],
"isCreateConnectorForNewSubscriptionsAutomatically": true,
"isDisableConnectorsForDeletedManagementGroups": true,
"autoActivateCV": false,
"autoActivateCertView": false,
"autoActivatePC": false,
"autoActivateSCA": false,
"autoActivateVM": false,
"defaultTagIds": []
}

Response
{
"id": xxxxxx,

198
Qualys Asset Management & Tagging API
Connectors 3.0

"name": "Azure Org",


"description": "azure org connector description",
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"orgRunFrequency": {
"hours": 1,
"minutes": 0
},
"connectorRunFrequency": {
"hours": 1,
"minutes": 0
},
"lastSynced": "2023-05-17T07:56:37.711+00:00",
"nextSync": "2023-05-17T08:56:37.711+00:00",
"type": "AZURE",
"customerId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"userUuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"userName": "abcde_xxxx",
"lastError": null,
"state": "PENDING",
"connectorPrefixName": "createdbyorg",
"defaultTagIds": [],
"connectorAppInfos": [
{
"name": "AI",
"identifier": "8xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CSA",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
}
],
"connectorCapabilities": [
"AI",
"CI",
"CSA"
],
"lastSuccessfulSync": "2023-05-17T07:56:37.711+00:00",
"createdBy": "User",

199
Qualys Asset Management & Tagging API
Connectors 3.0

"organizationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"autoActivateVM": false,
"autoActivatePC": false,
"autoActivateSCA": false,
"autoActivateCertView": false,
"autoActivateCV": false,
"includedMem": [
"TestingManagementGroup"
],
"excludedMem": [],
"createConnectorForNewSubscriptionsAutomatically": true,
"disableConnectorsForDeletedManagementGroups": true,
"disabled": false,
"deleted": false,
"remediationEnabled": true
}

200
Qualys Asset Management & Tagging API
Connectors 3.0

List Azure Organization Connector

/connectors/v1.0/org/azure/

[GET]

Get all the available Azure Organization connectors. Use the following
tokens in the request header to narrow down your search.

Input Parameter

Parameter Mandatory/Optional Data Description


Type

pageSize Optional Integer The number of records per


page to be included in the
response.

pageNumber Optional Integer The page to be returned.

query Optional String Use the following tokens


in the request header to
narrow down your search:

• id
• name
• description
• status
• remediationEnabled
• isDisabled
• organizationId
• tenantId
• applicationId

Sample: List All Azure Organization Connectors

API request
curl --x "GET" --location 'https://<QualysGatewayURL>
/connectors/v1.0/org/azure/
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxx...' \
--header 'Content-Type: application/json'

201
Qualys Asset Management & Tagging API
Connectors 3.0

Response
{
"currentPage": 0,
"currentPageSize": 1,
"totalPages": 1,
"numberOfElements": 1,
"content": [
{
"id": xxxxxx,
"organizationId": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"name": "Azure Org",
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"type": "AZURE",
"state": "FINISHED_SUCCESS",
"connectorCapabilities": [
"CSA",
"CI",
"AI"
],
"lastSynced": "2023-05-17T07:35:36.638+00:00",
"numberOfConnectorsAttached": 0
}
],
"hasContent": true,
"hasNext": false,
"hasPrevious": false,
"first": true,
"last": true
}

202
Qualys Asset Management & Tagging API
Connectors 3.0

Run Azure Organization Connector

/connectors/v1.0/org/azure/run/

[POST]

API to run the Azure organization connector. The run organization


connector API will fetch the latest changes related to your organization
connector.

During connector run,

If ‘isCreateConnectorForNewSubscriptionsAutomatically’ is set to true, the


Organization connector creates member connectors for newly identified
subscriptions.

If ‘isDisableConnectorsForDeletedManagementGroups’ is set to true, the


Organization connector disables member connectors for deleted
subscriptions.

Sample: Run an Organization Connector

API request
curl --x "POST" --location
'https://<QualysGatewayURL>/connectors/v1.0/org/azure/run/"
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \

Request Data
xxxxx,xxxxx

Response
A total of 2 Organization connectors have been successfully marked
for running.

203
Qualys Asset Management & Tagging API
Connectors 3.0

Get Azure Organization Connector Details

/connectors/v1.0/org/azure/{organizationConnectorId}

[GET]

View details for an organization connector which is in the user’s scope.


Specify the organization connector ID and fetch the details of the
connector.

Sample: Find All the Details of an Organization Connector

API request
curl --x "GET" --location 'https://<QualysGatewayURL>
/connectors/v1.0/org/azure/xxxxxx \
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json'

Response
{
"id": xxxxxx,
"name": "Azure Org",
"description": "azure org connector description",
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,
"orgRunFrequency": {
"hours": 1,
"minutes": 0
},
"connectorRunFrequency": {
"hours": 1,
"minutes": 0
},
"lastSynced": "2023-05-17T07:35:36.000+00:00",
"nextSync": "2023-05-17T08:35:36.000+00:00",
"type": "AZURE",
"customerId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"userUuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"userName": "abcde_xxxx",
"lastError": null,
"state": "FINISHED_SUCCESS",
"connectorPrefixName": "createdbyorg",
"defaultTagIds": [],
"connectorAppInfos": [
{

204
Qualys Asset Management & Tagging API
Connectors 3.0

"name": "AI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CSA",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
}
],
"connectorCapabilities": [
"AI",
"CI",
"CSA"
],
"lastSuccessfulSync": "2023-05-17T07:35:36.000+00:00",
"createdBy": "TestUser",
"organizationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"autoActivateVM": false,
"autoActivatePC": false,
"autoActivateSCA": false,
"autoActivateCertView": false,
"autoActivateCV": false,
"includedMem": [
"TestingManagementGroup"
],
"excludedMem": [],
"createConnectorForNewSubscriptionsAutomatically": true,
"disableConnectorsForDeletedManagementGroups": true,
"disabled": false,
"deleted": false,
"remediationEnabled": true
}

205
Qualys Asset Management & Tagging API
Connectors 3.0

Get All Azure Management Group

/connectors/v1.0/org/azure/management-groups/

[POST]

API to fetch all the Azure management groups for the provided customer
accounts.

Input Parameter

Parameter Mandatory/Optional Data Description


Type

tenantId Mandatory String The Tenant ID of the


Azure account of the
organization.

applicationId Mandatory String Unique identifier of


the application you
create on Azure
portal.

pageSize Optional Integer The number of records


per page to be
included in the
response.

pageNumber Optional Integer The page to be


returned.

Sample: Get a Management Group

API request
curl --x "POST" --location
'https://<QualysGatewayURL>/connectors/v1.0/org/azure/management-
groups/
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \

206
Qualys Asset Management & Tagging API
Connectors 3.0

Request POST data


{
"tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
}

Response
{
"currentPage": 0,
"currentPageSize": 6,
"totalPages": 1,
"numberOfElements": 6,
"content": [
"Test",
"testing2",
"testing3",
"testing4",
"testing5",
"testing6"
],
"hasContent": true,
"hasNext": false,
"hasPrevious": false,
"first": true,
"last": true
}

207
Qualys Asset Management & Tagging API
Connectors 3.0

Get Management Groups Attached to a Connector

/connectors/v1.0/org/azure/management-
groups/{organizationConnectorId}

[GET]

An API endpoint to get all the attached management groups of a provided


Azure organization connector.

Sample: Get Attached Management Groups

API request
curl --x "GET" --location 'https://<QualysGatewayURL>
"https://qualysapi.qualys.com/connectors/v1.0/org/azure/management-
groups/xxxxxx
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json'

Response
{
"includedMembers": [
"TestingManagementGroup"
],
"excludedMembers": []
}

208
Qualys Asset Management & Tagging API
Connectors 3.0

Enable/Disable Azure Organization Connector

/connectors/v1.0/org/azure/status/

[POST]

We are introducing an API endpoint to update the status of an


Organization connector. You can toggle between enabling or disabling the
Org connector by specifying the action as ENABLE or DISABLE.

Input Parameter

Parameter Mandatory/Optional Data Description


Type

organizationConnectorId Mandatory Integer The ID (s) of


the
organization
connector
you want to
detach
member
connector
from.

Sample: Enable an Organization Connector

API request
curl --x "PUT" --location
'https://<QualysGatewayURL>/connectors/v1.0/org/azure/status/?action
=ENABLE

--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \

--header 'Content-Type: application/json' \

Request POST data


[xxxxxx]

209
Qualys Asset Management & Tagging API
Connectors 3.0

Response
{
"currentPage": 0,
"currentPageSize": 1,
"totalPages": 1,
"numberOfElements": 1,
"content": [
{
"id": xxxxxx,
"organizationId": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"name": "Azure Org",
"connectorPrefixName": "createdbyorg",
"runFrequency": "60",
"connectorRunFrequency": "60",
"lastSynced": "2023-05-17T07:56:38.051+00:00",
"customerId": "axxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"userUuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"userName": "abcde_xxxx",
"type": "AZURE",
"lastError": null,
"isDeleted": false,
"isDisabled": false,
"description": "azure org connector description",
"state": "FINISHED_SUCCESS",
"nextSync": "2023-05-17T08:56:38.051+00:00",
"isRemediationEnabled": true,
"organizationName": "Azure org",
"uuid": xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"isAssignStaticTagToAssetsPulledByThatConnector": false,
"isAssignStaticTagToConnectors": false,
"connectorAppInfos": [
{
"name": "AI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CSA",

210
Qualys Asset Management & Tagging API
Connectors 3.0

"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
}
],
"defaultTagIds": [],
"memberConfigurations": {
"includedMembers": [
"TestingManagementGroup"
],
"excludedMembers": []
},
"createConnectorForNewSubscriptionsAutomatically": true,
"disableConnectorsForDeletedManagementGroups": true,
"createStaticTagsForManagementGroups": false
}],
"hasContent": true,
"hasNext": false,
"hasPrevious": false,
"first": true,
"last": true
}

Sample: Disable an Organization Connector

API request
curl --x "PUT" --location
'https://<QualysGatewayURL>/connectors/v1.0/org/azure/status/?action
=DISABLE

--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \

--header 'Content-Type: application/json' \

Request POST data


[xxxxxx]

Response
{
"currentPage": 0,
"currentPageSize": 1,
"totalPages": 1,

211
Qualys Asset Management & Tagging API
Connectors 3.0

"numberOfElements": 1,
"content": [
{
"id": xxxxxx,
"organizationId": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"name": "Azure Org",
"connectorPrefixName": "createdbyorg",
"runFrequency": "60",
"connectorRunFrequency": "60",
"lastSynced": "2023-05-17T07:56:38.051+00:00",
"customerId": "axxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"userUuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"userName": "abcde_xxxx",
"type": "AZURE",
"lastError": null,
"isDeleted": false,
"isDisabled": true,
"description": "azure org connector description",
"state": "FINISHED_SUCCESS",
"nextSync": "2023-05-17T08:56:38.051+00:00",
"isRemediationEnabled": true,
"organizationName": "Azure org",
"uuid": xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"isAssignStaticTagToAssetsPulledByThatConnector": false,
"isAssignStaticTagToConnectors": false,
"connectorAppInfos": [
{
"name": "AI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CSA",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
}

212
Qualys Asset Management & Tagging API
Connectors 3.0

],
"defaultTagIds": [],
"memberConfigurations": {
"includedMembers": [
"TestingManagementGroup"
],
"excludedMembers": []
},
"createConnectorForNewSubscriptionsAutomatically": true,
"disableConnectorsForDeletedManagementGroups": true,
"createStaticTagsForManagementGroups": false
}],
"hasContent": true,
"hasNext": false,
"hasPrevious": false,
"first": true,
"last": true
}

213
Qualys Asset Management & Tagging API
Connectors 3.0

Attach Azure Member Connector

/connectors/v1.0/azure/attach

[PUT]

An API endpoint to attach a member connector to the specified Azure


Organization connector.

Input Parameter

Parameter Mandatory/Optional Data Description


Type

organizationConnectorId Mandatory Integer The ID (s) of


the
organization
connector
you want to
detach
member
connector
from.

connectorId Mandatory Integer The


connectors
to attach.

Sample: Attach a Member Connector

API request
curl --x "PUT" --location
'https://<QualysGatewayURL>connectors/v1.0/azure/attach
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \

Request Data
{
"connectorId" : xxxxxxx,
"organizationConnectorId": xxxxxxx

214
Qualys Asset Management & Tagging API
Connectors 3.0

Response
{
"id": 1204278,
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"customerId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"userUuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"username": "abcde_xxxx",
"name": "Azure Org",
"description": "",
"defaultTagIds": null,
"state": "FINISHED_SUCCESS",
"cloudType": "AZURE",
"isRemediationEnabled": true,
"isDisabled": true,
"isDeleted": false,
"scanUuid": null,
"activatedModules": [
"QWEB_VM",
"CLOUDVIEW"
],
"connectorAppInfos": [
{
"name": "AI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CSA",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
}
],
"lastSynced": "2023-05-15T11:53:05.580+00:00",
"isAttachedToOrgConnector": false,

215
Qualys Asset Management & Tagging API
Connectors 3.0

"organizationId": null,
"organizationConnectorId": null,
"parentId": null
}

216
Qualys Asset Management & Tagging API
Connectors 3.0

Detach Azure Member Connector

/connectors/v1.0/azure/detach

[PUT]

An API endpoint to detach the member connector from the specified


Azure Organization connector.

Input Parameter

Parameter Mandatory/Optional Data Description


Type

organizationConnectorId Mandatory Integer The ID (s) of


the
organization
connector
you want to
detach
member
connector
from.

Sample: Detach a Member Connector

API request
curl --x "PUT" --location
'https://<QualysGatewayURL>connectors/v1.0/azure/detach
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \

Request Data
[xxxxxx]

Response
{
"currentPage": 0,

217
Qualys Asset Management & Tagging API
Connectors 3.0

"currentPageSize": 1,
"totalPages": 1,
"numberOfElements": 1,
"content": [
{
"id": 1204278,
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"customerId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"userUuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"username": "abcde_xxxx",
"name": "Azure Org",
"description": "",
"defaultTagIds": null,
"state": "FINISHED_SUCCESS",
"cloudType": "AZURE",
"isRemediationEnabled": true,
"isDisabled": true,
"isDeleted": false,
"scanUuid": null,
"activatedModules": [
"QWEB_VM",
"CLOUDVIEW"
],
"connectorAppInfos": [
{
"name": "AI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CSA",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
}
],
"lastSynced": "2023-05-15T11:53:05.580+00:00",
"isAttachedToOrgConnector": false,

218
Qualys Asset Management & Tagging API
Connectors 3.0

"organizationId": null,
"organizationConnectorId": null,
"parentId": null
}
],
"hasContent": true,
"hasNext": false,
"hasPrevious": false,
"first": true,
"last": true
}

219
Qualys Asset Management & Tagging API
Connectors 3.0

Delete Azure Organization Connector

/connectors/v1.0/org/azure/{organizationConnectorId}

[DELETE]

An API endpoint to delete an Azure Organization connector. Deleting the


Org connector will detach the member connector associated with it.

Sample: Delete an Organization Connector

API request
curl --x "DELETE" --location
'https://<QualysGatewayURL>/connectors/v1.0/org/azure/xxxxxx
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \

220
Qualys Asset Management & Tagging API
Connectors 3.0

Get Valid Organization Connectors To Attach

/connectors/v1.0/azure/valid-org-connectors/{connectorId}

[GET]

An API endpoint to get all the Organization connectors that are eligible to
attach to a member connector.

Input Parameter

Parameter Mandatory/Optional Data Description


Type

pageSize Optional Integer The number of records


per page to be
included in the
response.

pageNumber Optional Integer The page to be


returned.

Sample: Get List of Valid Organization Connectors

API request
curl --location
'https://<QualysGatewayURL>/connectors/v1.0/azure/valid-org-
connectors/xxxxxxx’
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \

Response
{
"currentPage": 0,
"currentPageSize": 1,
"totalPages": 1,
"numberOfElements": 1,
"content": [
{
"id": xxxxxx,
"organizationId": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",

221
Qualys Asset Management & Tagging API
Connectors 3.0

"name": "Azure Org",


"connectorPrefixName": "createdbyorg",
"runFrequency": "60",
"connectorRunFrequency": "60",
"lastSynced": "2023-05-17T07:35:36.638+00:00",
"customerId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"userUuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"userName": "abcde_xxxx",
"type": "AZURE",
"lastError": null,
"isDeleted": false,
"isDisabled": false,
"description": "azure org connector description",
"state": "FINISHED_SUCCESS",
"nextSync": "2023-05-17T08:35:36.638+00:00",
"isRemediationEnabled": true,
"organizationName": "Azure org",
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"isAssignStaticTagToAssetsPulledByThatConnector": false,
"isAssignStaticTagToConnectors": false,
"connectorAppInfos": [
{
"name": "AI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CSA",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
}
],
"defaultTagIds": [],
"memberConfigurations": {
"includedMembers": [
"TestingManagementGroup"
],

222
Qualys Asset Management & Tagging API
Connectors 3.0

"excludedMembers": []
},
"createConnectorForNewSubscriptionsAutomatically": true,
"disableConnectorsForDeletedManagementGroups": true,
"createStaticTagsForManagementGroups": false
}
],
"hasContent": true,
"hasNext": false,
"hasPrevious": false,
"first": true,
"last": true
}

223
Qualys Asset Management & Tagging API
Connectors 3.0

Get Attached Member Connectors

/connectors/v1.0/org/azure/member-
connectors/{organizationConnectorId}

[GET]

An API endpoint to get the list of attached azure member connectors.

Sample: Get List of Member Connectors

API request
curl --location
'https://<QualysGatewayURL>/connectors/v1.0/org/azure/member-
connectors/xxxxxx"
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \

Response
{
"currentPage": 0,
"currentPageSize": 1,
"totalPages": 1,
"numberOfElements": 1,
"content": [
{
"id": xxxxxxx,
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"customerId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"userUuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"username": "abcde_xxxx",
"name": " AI _Pay-As-You-Go",
"description": "",
"defaultTagIds": null,
"state": "FINISHED_SUCCESS",
"cloudType": "AZURE",
"isRemediationEnabled": true,
"isDisabled": false,
"isDeleted": false,
"scanUuid": null,
"activatedModules": [
"CLOUDVIEW"
],

224
Qualys Asset Management & Tagging API
Connectors 3.0

"connectorAppInfos": [
{
"name": "AI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CI",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
},
{
"name": "CSA",
"identifier": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"tagId": null,
"tagMetadata": null
}
],
"lastSynced": "2023-05-25T06:06:07.493+00:00",
"isAttachedToOrgConnector": true,
"organizationId": "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx",
"organizationConnectorId": xxxxxx,
"parentId": "/providers/Microsoft.Management/managementG
roups/QAtesting3"
}
],
"hasContent": true,
"hasNext": false,
"hasPrevious": false,
"first": true,
"last": true
}

225
Qualys Asset Management & Tagging API
Connectors 3.0

Get Last Job Summary of Organization Connectors

/connectors/v1.0/org/azure/last-job-summary/{organizationConnectorId}

[GET]

An API endpoint to get the last job summary of Azure Organization


connector.

Sample: Get Last Job Summary

API request
curl --location
'https://<QualysGatewayURL>/connectors/v1.0/org/azure/last-job-
summary/xxxxxx
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \

Response
{
"currentPage": 0,
"currentPageSize": 1,
"totalPages": 1,
"numberOfElements": 1,
"content": [
{
"type": null,
"errorMsg": "An exception occurred while running Org
Connector. Contact support to resolve the issue.",
"created": "2023-05-08T05:43:57.000+00:00"
}
],
"hasContent": true,
"hasNext": false,
"hasPrevious": false,
"first": true,
"last": true
}

226

You might also like