Warning: This article describes unsupported functionality that is subject to change - test any solutions derived from it.
The method described is not intended to help you manage policy, but rather to seed policy in an organization for a TEST IQ Server.
IQ Server "/rest/" endpoints are used by the UI and we may change them to support the needs of the UI. The officially supported API is at "/api/v2/" and is documented in the IQ Server Rest APIs Help.
How to Export Policy from IQ Server
The steps below detail how to export policy from the Nexus IQ server.
-
In a terminal, issue the following command:
curl -u username:password -o policy.json http://<iq-server-url>/rest/policy/organization/ROOT_ORGANIZATION_ID/export
-
username and password are the credentials used to log into the IQ server.
-
policy.json is the file name to write the response into
-
This will will produce a policy.json file in your current working directory.
Warning
Importing a policy is a destructive operation.
Importing policies into an in use IQ Server should be avoided,
Importing deletes the references for policy violations, waivers, application categories, component labels, legacy violations, notifications, actions, and license threat groups.
Reference policies help guide.