PC Posture Streaming

The PC Posture Streaming APIs help you have posture data continuously streamed for one host ID at a time for all the specified host IDs for which posture information is available.

You can process the data concurrently, which helps you save time and achieve optimum results within a short span of time.

You must use the compliance posture streaming APIs in the following sequence:

- Get Policy List (optional): Use the Get Policy List API to fetch the list of policies against which you want to evaluate the compliance posture of your assets. If you have a list of policy IDs, you can directly use the Resolve Host IDs API.

- Resolve Host IDs: Use the policy IDs received from Get Policy List API as the input parameter for Resolve Host IDs. You can specify a maximum of 10 comma-separated policy IDs.

- Get Posture Info: Use the host IDs received from Resolve Host IDs as the input parameter to get the posture info in JSON stream.

Note: By default, for each of these APIs, you can send a maximum of 25 API requests per Qualys PC subscription in a 60-second timeframe. To customize the rate limits as per your requirement, contact your Technical Account Manager or Qualys support.

Before you start, you must authenticate to receive the token needed for the PC Posture API requests. The API Gateway is responsible for authenticating the user who accesses the Posture Streaming APIs to get the posture details.

Input parameters for Auth API:

- username

- password

- token

URL for Auth API: https://gateway.<assigned URL>/auth

headers = {'Content-Type': 'application/x-www-form-urlencoded'}

authUrl= ‘https://gateway.<assigned URL>/auth'

data = {'username':'username',

'password':'password','token':true}authResp=requests.post(authUrl,

data=data, headers=headers, verify=False)

token=authResp.content.decode('utf-8')

Note: Provide the URL, user ID, and password that have been assigned to you. For token, the value can be ’true’ or ’True’.

Related Topics

Compliance Posture Information

Get Policy IDs

Resolve Host IDs

Get Posture Info