The following example demonstrates how to display the statuses of all Policies.
A PHP file called Get_Status_Of_All_Policies.php can be found in <installdir>/apisamples. Read more in Accessing Example API Functions.
The PHP script searches all Policies in the the system and prints result messages on the screen, providing the following information:
- Policy ID, name, description, state, or "Failed to find all status of all policies."
Sequence of Automated Actions
The following steps can be accomplished by using this script:
- Find all Policies.
- Display their ID, name, description, or state.
How to Fulfill Appropriate Actions in CDP User Interface
Below, you can find the steps to perform these actions using the program user interface. Screen-shots are provided to illustrate the scripts for each step.
Defining server configuration variables
Log in to the CDP Server user interface using your username and password.
Displaying Policies' States
1. Click on "Policy" in the Main Menu to open the "Policies" window.
2. Click on the "Show All" button located in the top right-hand corner of the interface to show the list of all Policies.
3. The Policy State is graphically displayed in the "State" column. The green icon indicates the Policies that run without errors; the yellow icon indicates the Policies that have warnings while processing; the red icon indicates the Policies that run with errors; the blue icon indicates the Policies with an unknown state. If nothing is shown in this column, then the State is OK.
If one or more Policy runs with errors, the "Error" icon is displayed in the upper area of the interface, proceeded by a table containing information on the Policies' statuses.
Read more about this panel in Accessing Policies.