Create Domain

POST /api/2.0/fo/asset/domain/

Add domains and related netblocks in the subscription. The domains defined may be used as targets for network scans (maps). Basic HTTP authentication is required. Session based authentication is not supported using this API. Permissions - Manager user role is required.

Input ParametersInput Parameters

Parameter

Required/Optional

Data Type

Description

action=create

Required String Specify the create action to create a domain.
domain Required String Specify domain that you want to add.
netblock Optional Integer Specify netblocks of domain.
network_id Optional Integer

By default, the network ID for adding domains is set to GDN(0). Specify the network ID if you wish to add a domain to a different network.

Sample - Create DomainSample - Create Domain

API Request

curl --location --request POST'<qualys_base_url>/api/2.0/fo/asset/domain/?action=create&domain=Vulndashboard.com' \--header 'X-Requested-With: curl' \--header 'Authorization: XXXXXXXXXXX' \--data ''

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE SIMPLE_RETURN SYSTEM
"<qualys_base_url>/api/2.0/simple_return.dtd">
<SIMPLE_RETURN>
 <RESPONSE>
 <DATETIME>2023-10-25T09:38:13Z</DATETIME>
 <TEXT>Domain successfully created.</TEXT>
 </RESPONSE>
</SIMPLE_RETURN>