For API version information, refer to the API Version History section.
V1.0| V2.0| V3.0 | V4.0 | V5.0
The V5.0, V4.0, and V3.0 APIs is designed to fetch only PA/PC Asset data. To retrieve both PA/PC and SCA Asset data, continue using API Versions V1.0 or V2.0. If you want to enable V5.0, V4.0, or V3.0 to support SCA Asset data, contact your Technical Account Manager (TAM).
List all Host IDs for the specified policies.
For the Resolve Host IDs API, you must use the that is returned by the authentication request. You can include a maximum of 10 policies in one API request.
|
Parameter |
Required/Optional |
Data Type |
Description |
|---|---|---|---|
|
policyId={value} |
Required |
Integer |
The ID of the policy for which you want to resolve hosts. You can specify a single policy or multiple/all the policies in your subscription using comma-separated values. |
|
Request header: Authorization |
Required |
String |
JWT encrypted . Note: Provide the received from the Authorization API as the input. |
|
lastScanDate={value} |
Optional |
Integer |
Get host IDs based on the specified date on which they were last scanned. The formats for date are: lastScanDate=YYYY-MM-DD For example: lastScanDate=2022-05-25 Or, lastScanDate=2022-05-25T18:48:16Z |
API Request
curl -X GET https://<qualys_base_url>/pcrs/2.0/posture/hostids?policyId=POLICY ID-H "accept:*/*"-H "Authorization: Bearer Token "
JSON Output
[
{
"policyId": "<POLICY ID>",
"subscriptionId": "SUBSCRIPTION ID",
"hostIds": [
"<HOST ID>"
]
}
]
API Request
curl -X GET https://<qualys_base_url>/pcrs/1.0/posture/hostids?policyId=xxx,xxx-H "accept: */*"-H"Authorization: Bearer "
JSON Output
[
{
"policyId": "<POLICY ID>",
"subscriptionId": "<SUBSCRIPTION ID>",
"hostIds": [
"<HOST ID>"
]
},
{
"policyId": "<POLICY ID>",
"subscriptionId": "SUBSCRIPTION ID",
"hostIds": [
"<HOST ID>"
]
}
]
API Request
curl -X GET https://<qualys_base_url>/pcrs/1.0/posture/hostids?policyId=4677689&lastScanDate=2022-05-25-H "accept: */*"-H"Authorization: "
JSON Output
[
{
"policyId": "4677689",
"subscriptionId": "<SUBSCRIPTION ID>",
"hostIds": [
"<HOST ID 1>",
"<HOST ID 2>",
"<HOST ID 3>",
"<HOST ID 4>",
"<HOST ID 5>",
]
}
]
List all Host IDs for the specified policies.
For the Resolve Host IDs API, you must use the that is returned by the authentication request. You can include a maximum of 10 policies in one API request.
|
Parameter |
Required/Optional |
Data Type |
Description |
|---|---|---|---|
|
policyId={value} |
Required |
Integer | The ID of the policy for which you want to resolve hosts. You can specify a single policy or multiple/all the policies in your subscription using comma-separated values. |
|
Request header: Authorization |
Required |
String |
JWT encrypted . Note: Provide the received from the Authorization API as the input. |
|
lastScanDate={value} |
Optional |
Integer |
Get host IDs based on the specified date on which they were last scanned. The formats for date are: lastScanDate=YYYY-MM-DD For example: lastScanDate=2022-05-25 Or, lastScanDate=2022-05-25T18:48:16Z |
API Request
curl -X GET https://<qualys_base_url>/pcrs/2.0/posture/hostids?policyId=POLICY ID-H "accept:*/*"-H "Authorization: Bearer Token "
JSON Output
[
{
"policyId": "<POLICY ID>",
"subscriptionId": "SUBSCRIPTION ID",
"hostIds": [
"<HOST ID>"
]
}
]
API Request
curl -X GET https://<qualys_base_url>/pcrs/2.0/posture/hostids?policyId=xxx,xxx-H "accept: */*"-H"Authorization: Bearer "
JSON Output
[
{
"policyId": "<POLICY ID>",
"subscriptionId": "<SUBSCRIPTION ID>",
"hostIds": [
"<HOST ID>"
]
},
{
"policyId": "<POLICY ID>",
"subscriptionId": "SUBSCRIPTION ID",
"hostIds": [
"<HOST ID>"
]
}
]
API Request
curl -X GET https://<qualys_base_url>/pcrs/2.0/posture/hostids?policyId=4677689&lastScanDate=2022-05-25-H "accept: */*"-H"Authorization: "
JSON Output
[
{
"policyId": "4677689",
"subscriptionId": "<SUBSCRIPTION ID>",
"hostIds": [
"<HOST ID 1>",
"<HOST ID 2>",
"<HOST ID 3>",
"<HOST ID 4>",
"<HOST ID 5>",
]
}
]
The V3.0 API is designed to fetch only PC Asset data. To retrieve both PC and SCA Asset data, continue using API Versions V1.0 or V2.0. If you want to enable V3.0 to support SCA Asset data, contact your Technical Account Manager (TAM).
This new version (/pcrs/3.0/posture/hostids) of this API enables to resolve hostIDs :
Previously, the policyID parameter was required in the API, but it is now optional. If a policy ID is not provided in the API request, the hosts are resolved for all policies within the subscription.
Important to know
|
Parameter |
Required/Optional |
Data Type |
Description |
|---|---|---|---|
|
policyId={value} |
Optional |
Integer |
The ID of the policy for which you want to resolve hosts. You can specify a single policy or multiple/all the policies in your subscription using comma-separated values. If no Policy ID is provided in the API request, then the hosts are resolved for all the policies in the subscription. |
|
Request header: Authorization |
Required |
String |
JWT encrypted . Note: Provide the received from the Authorization API as the input. |
|
lastScanDate={value} |
Optional |
Integer |
Get host IDs based on the specified date on which they were last scanned. The formats for date are: lastScanDate=YYYY-MM-DD For example: lastScanDate=2022-05-25 Or, lastScanDate=2022-05-25T18:48:16Z |
| statusChangedSince={value} | Optional | Date | Specify the date to resolve the hosts with posture modified (failed or passed ) on or after the specified date. |
API Request
curl -X GET https://<qualys_base_url>/pcrs/3.0/posture/hostids?policyId=POLICY ID-H "accept:*/*"-H "Authorization: Bearer Token "
JSON Output
[
{
"policyId": "<POLICY ID>",
"subscriptionId": "SUBSCRIPTION ID",
"hostIds": [
"<HOST ID>"
]
}
]
API Request
curl -X GET https://<qualys_base_url>/pcrs/3.0/posture/hostids?policyId=xxx,xxx-H "accept: */*"-H"Authorization: Bearer Token "
JSON Output
[
{
"policyId": "<POLICY ID>",
"subscriptionId": "<SUBSCRIPTION ID>",
"hostIds": [
"<HOST ID>"
]
},
{
"policyId": "<POLICY ID>",
"subscriptionId": "SUBSCRIPTION ID",
"hostIds": [
"<HOST ID>"
]
}
]
API Request
curl -X GET https://<qualys_base_url>/pcrs/3.0/posture/hostids?policyId=4677689&lastScanDate=2022-05-25-H "accept: */*"-H"Authorization:Bearer Token "
JSON Output
[
{
"policyId": "4677689",
"subscriptionId": "<SUBSCRIPTION ID>",
"hostIds": [
"<HOST ID 1>",
"<HOST ID 2>",
"<HOST ID 3>",
"<HOST ID 4>",
"<HOST ID 5>",
]
}
]
API Request
curl -X GET https://gateway/pcrs/3.0/posture/hostids?policyId=<Policy_ID>& statusChangedSince= <Date>
-H "accept: */*" -H "Authorization: Bearer Token"
JSON Output
[
{
"policyId": <Policy_ID>,
"subscriptionId": <Subscription_id>,
"hostIds": [
<Host_IDs>,
<Host_IDs>,
<Host_IDs>,
]
}
]
The V4.0 and V3.0 APIs is designed to fetch only PA/PC Asset data. To retrieve both PA/PC and SCA Asset data, continue using API Versions V1.0 or V2.0. If you want to enable V4.0 or V3.0 to support SCA Asset data, contact your Technical Account Manager (TAM).
This new version (/pcrs/4.0/posture/hostids) of this API enables to resolve hostIDs :
Previously, the policyID parameter was required in the API, but it is now optional. If a policy ID is not provided in the API request, the hosts are resolved for all policies within the subscription.
Important to know
|
Parameter |
Required/Optional |
Data Type |
Description |
|---|---|---|---|
|
policyId={value} |
Optional |
Integer |
The ID of the policy for which you want to resolve hosts. You can specify a single policy or multiple/all the policies in your subscription using comma-separated values. If no Policy ID is provided in the API request, then the hosts are resolved for all the policies in the subscription. |
|
Request header: Authorization |
Required |
String |
JWT encrypted . Note: Provide the received from the Authorization API as the input. |
|
lastScanDate={value} |
Optional |
Integer |
Get host IDs based on the specified date on which they were last scanned. The formats for date are: lastScanDate=YYYY-MM-DD For example: lastScanDate=2022-05-25 Or, lastScanDate=2022-05-25T18:48:16Z |
| statusChangedSince={value} | Optional | Date | Specify the date to resolve the hosts with posture modified (failed or passed ) on or after the specified date. |
API Request
curl -X GET <qualys_base_url>/pcrs/4.0/posture/hostids?policyId=POLICY ID-H "accept:*/*"-H "Authorization: Bearer Token "
JSON Output
[
{
"policyId": "<POLICY ID>",
"subscriptionId": "SUBSCRIPTION ID",
"hostIds": [
"<HOST ID>"
]
}
]
API Request
curl -X GET <qualys_base_url>/pcrs/4.0/posture/hostids?policyId=xxx,xxx-H "accept: */*"-H"Authorization: Bearer Token "
JSON Output
[
{
"policyId": "<POLICY ID>",
"subscriptionId": "<SUBSCRIPTION ID>",
"hostIds": [
"<HOST ID>"
]
},
{
"policyId": "<POLICY ID>",
"subscriptionId": "SUBSCRIPTION ID",
"hostIds": [
"<HOST ID>"
]
}
]
API Request
curl -X GET <qualys_base_url>/pcrs/4.0/posture/hostids?policyId=4677689&lastScanDate=2022-05-25-H "accept: */*"-H"Authorization:Bearer Token "
JSON Output
[
{
"policyId": "4677689",
"subscriptionId": "<SUBSCRIPTION ID>",
"hostIds": [
"<HOST ID 1>",
"<HOST ID 2>",
"<HOST ID 3>",
"<HOST ID 4>",
"<HOST ID 5>",
]
}
]
API Request
curl -X GET <qualys_base_url>/pcrs/4.0/posture/hostids?policyId=<Policy_ID>& statusChangedSince= <Date>
-H "accept: */*" -H "Authorization: Bearer Token"
JSON Output
[
{
"policyId": <Policy_ID>,
"subscriptionId": <Subscription_id>,
"hostIds": [
<Host_IDs>,
<Host_IDs>,
<Host_IDs>,
]
}
]
The V5.0, V4.0, and V3.0 APIs is designed to fetch only PA/PC Asset data. To retrieve both PA/PC and SCA Asset data, continue using API Versions V1.0 or V2.0. If you want to enable V5.0, V4.0, or V3.0 to support SCA Asset data, contact your Technical Account Manager (TAM).
This new version (/pcrs/5.0/posture/hostids) of this API enables to resolve hostIDs :
Previously, the policyID parameter was required in the API, but it is now optional. If a policy ID is not provided in the API request, the hosts are resolved for all policies within the subscription.
Important to know
|
Parameter |
Required/Optional |
Data Type |
Description |
|---|---|---|---|
|
policyId={value} |
Optional |
Integer |
The ID of the policy for which you want to resolve hosts. You can specify a single policy or multiple/all the policies in your subscription using comma-separated values. If no Policy ID is provided in the API request, then the hosts are resolved for all the policies in the subscription. |
|
Request header: Authorization |
Required |
String |
JWT encrypted . Note: Provide the received from the Authorization API as the input. |
|
lastScanDate={value} |
Optional |
Integer |
Get host IDs based on the specified date on which they were last scanned. The formats for date are: lastScanDate=YYYY-MM-DD For example: lastScanDate=2022-05-25 Or, lastScanDate=2022-05-25T18:48:16Z |
| statusChangedSince={value} | Optional | Date | Specify the date to resolve the hosts with posture modified (failed or passed ) on or after the specified date. |
| assetDeploymentType | No | String | Filter by asset deployment type: ON-PREM, CLOUD, or ALL. |
| assetState | No | String | Filter by asset state: TERMINATED, ACTIVE, or ALL. |
assetState filter is only applicable for cloud assets.
API Request
curl -X GET <qualys_base_url>/pcrs/5.0/posture/hostids?policyId=POLICY ID-H "accept:*/*"-H "Authorization: Bearer Token "
JSON Output
[
{
"policyId": "<POLICY ID>",
"subscriptionId": "SUBSCRIPTION ID",
"hostIds": [
"<HOST ID>"
]
}
]
API Request
curl -X GET <qualys_base_url>/pcrs/5.0/posture/hostids?policyId=xxx,xxx-H "accept: */*"-H"Authorization: Bearer Token "
JSON Output
[
{
"policyId": "<POLICY ID>",
"subscriptionId": "<SUBSCRIPTION ID>",
"hostIds": [
"<HOST ID>"
]
},
{
"policyId": "<POLICY ID>",
"subscriptionId": "SUBSCRIPTION ID",
"hostIds": [
"<HOST ID>"
]
}
]
API Request
curl -X GET <qualys_base_url>/pcrs/5.0/posture/hostids?policyId=4677689&lastScanDate=2022-05-25-H "accept: */*"-H"Authorization:Bearer Token "
JSON Output
[
{
"policyId": "4677689",
"subscriptionId": "<SUBSCRIPTION ID>",
"hostIds": [
"<HOST ID 1>",
"<HOST ID 2>",
"<HOST ID 3>",
"<HOST ID 4>",
"<HOST ID 5>",
]
}
]
API Request
curl -X GET <qualys_base_url>/pcrs/5.0/posture/hostids?policyId=<Policy_ID>& statusChangedSince= <Date>
-H "accept: */*" -H "Authorization: Bearer Token"
JSON Output
[
{
"policyId": <Policy_ID>,
"subscriptionId": <Subscription_id>,
"hostIds": [
<Host_IDs>,
<Host_IDs>,
<Host_IDs>,
]
}
]
API Request
curl -X GET <qualys_base_url>/pcrs/5.0/posture/hostids?policyId=4677689&lastScanDate=2025-08-25&assetDeploymentType=CLOUD&assetState=ACTIVE ' \-H 'accept: */*' -H 'Authorization: Bearer <AuthToken>
JSON Output
[
{
"policyId": "4677689",
"subscriptionId": "41",
"hostIds": [
"924781",
"724905"
]
}
]
API Request
curl -X GET <qualys_base_url>/pcrs/5.0/posture/hostids?policyId=4677689&lastScanDate=2025-08- 25&assetDeploymentType=CLOUD&assetState=TERMINATED ' \
-H 'accept: */*' -H 'Authorization: Bearer <AuthToken>’
JSON Output
[
{
"policyId": "4677689",
"subscriptionId": "41",
"hostIds": [
"504718”
]
}
]
API Request
curl -X GET <qualys_base_url>/pcrs/5.0/posture/hostids?policyId=4677689&lastScanDate=2025-08-25&assetDeploymentType=ON-PREM' \
-H 'accept: */*' -H 'Authorization: Bearer <AuthToken>’
JSON Output
[
{
"policyId": "4677689",
"subscriptionId": "41",
"hostIds": [
"3001",
"3002",
"3003"
]
}
]
API Request
curl -X GET <qualys_base_url>/pcrs/5.0/posture/hostids?policyId=4677689&lastScanDate=2025-08- 25 ' \
-H 'accept: */*' -H 'Authorization: Bearer <AuthToken>’
JSON Output
[
{
"policyId": "4677689",
"subscriptionId": "41",
"hostIds": [
"924781",
"724905",
"504718",
]
}
]
API Request
curl -X GET <qualys_base_url>/pcrs/5.0/posture/hostids?policyId=4677689&lastScanDate=2025-08- 25&assetDeploymentType=ALL&assetState=ACTIVE ' \
-H 'accept: */*' -H 'Authorization: Bearer <AuthToken>’
OR
curl -X GET <qualys_base_url>/pcrs/5.0/posture/hostids?policyId=4677689&lastScanDate=2025-08- 25&assetState=ACTIVE ' \
-H 'accept: */*' -H 'Authorization: Bearer <AuthToken>’
JSON Output
[
{
"policyId": "4677689",
"subscriptionId": "41",
"hostIds": [
"924781",
"724905",
"3001",
"3002",
"3003"
]
}
]
The following table depicts the information about the different versions of this API along with the status:
| API Version | EOS | EOL |
| /pcrs/5.0/posture/hostids? | Active | Active |
| /pcrs/4.0/posture/hostids? | Active | Active |
| /pcrs/3.0/posture/hostids? | Active | Active |
| /pcrs/2.0/posture/hostids? | Active | Active |
| /pcrs/1.0/posture/hostids? | Active | Active |