Using this API, you can import a library policy with configurable options, such as selecting specific technology IDs, importing the policy in an unlocked state, activating it immediately, and optionally assigning a custom policy title.
|
Parameter |
Required / Optional |
Data Type |
Description |
|---|---|---|---|
| Authorization | Required | String | Enter the Bearer token. |
| policyId={value} |
Required | Integer | Specify the policy ID generated using the Library Policy Details API for which the details are to be imported. |
| technologyId={value} |
Optional | Integer |
Specify the technology ID associated with the policy for which the details are to be imported. If no technology ID is provided, the details of the mapped technologies for the policy are imported. |
| importAsUnlocked={true|false} |
Optional |
Boolean | Specify 'true' to import policy as unlocked. Specify 'false to import policy as locked. |
| activatePolicy={true|false} |
Optional |
Boolean | Specify 'true' to import policy as active. Specify 'false to import policy as inactive. |
| policyTitle={value} |
Optional |
String | Add a title for the policy. |
API Request
curl --location '<qualys_base_url>/pcas/v1/library/policy/import'\
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <AuthToken>'
\
--data ' {
"policyId": "<policyId>",
"technologyIds": [
"<technologyId>"
],
"importAsUnlocked": true,
"activatePolicy": true,
"policyTitle": "New policy api"
}'
JSON Output
{
"message": "Policy imported successfully",
"policyId": 1666428,
"imported": true,
"active": true
}