API Conventions

The API conventions include identifying and authentication the Qualys platform, understanding the URL conventions of API requests. 

Qualys API Server URL

The Qualys API URL you use for API requests depends on the Qualys platform where your account is located. Click here to identify your Qualys platform and the API URL and replace the URL with the appropriate server URL for your account.

To find the API server URL for your account, log in to your Qualys account and go to HelpAbout. The following screenshot is an example of the Administration application User Interface (UI) that highlights the API server:

About Section in the Qualys Account.

Request URL

The URL for making API requests has the following structure:

https://<baseurl>/<module>/<object>/<object_id>/<operation>

where the components are described as:

<baseurl>

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

<module>

The API module. For the Administration API, the module is: "am".

<object>

The module-specific object.

<object_id>

(Optional) The module-specific object ID, if appropriate.

<operation>

The request operation, such as count and search.

Authentication

You must authenticate to the Qualys Cloud Platform using Qualys account credentials (user name and password) and get the JSON Web Token (JWT) before you start using the Administration APIs. Use Qualys Authentication to get the JWT. 

Following is an example of the JWT creation curl:

curl --location 'https://gateway.qg3.apps.qualys.com/auth' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'username=username' --data-urlencode 'password=usepassword' --data-urlencode 'token=true'

where,

Operator Supported