GET method for retrieving Policies
This method returns all the power policies.
- Description
- Returns all the power policies.
- Privilege
- VIEW
- HTTP response codes
- 200
- Example
-
Input: None
Output:
{
"@odata.context": "/api/$metadata#Collection(PowerService.PowerPolicy)",
"@odata.count": 2,
"value": [
{
"@odata.type": "#PowerService.PowerPolicy",
"@odata.id": "/api/PowerService/Policies(32)",
"PolicyId": 32,
"Type": 1,
"Name": "Chassis Policy",
"Description": "Power policy created on chassis",
"Enabled": true,
"AssignedTo": "D89RG52",
"CreatedTime": "2019-06-25 13:49:59.342645",
"ExecutionState": 3,
"IsAssociatedToGroup": false
"PolicyDetails": {
"@odata.id": "/api/PowerService/Policies(32)/PolicyDetails"
}
},
{
"@odata.type": "#PowerService.PowerPolicy",
"@odata.id": "/api/PowerService/Policies(30)",
"PolicyId": 30,
"Type": 1,
"Name": "Group Policy",
"Description": "Updated policy on group",
"Enabled": true,
"AssignedTo": "DeviceGroup",
"CreatedTime": "2019-06-19 12:07:23.935816",
"ExecutionState": 3,
"IsAssociatedToGroup": false
"PolicyDetails": {
"@odata.id": "/api/PowerService/Policies(30)/PolicyDetails"
}
}
]
}
Table 1. AttributesThis table lists the attributes that this method supports.
Attribute Name
|
Description
|
PolicyId
|
ID of policy
|
Name
|
Name associated with the policy.
|
Type
|
Type of policy.
|
Description
|
Description associated with the policy
|
Enabled
|
Indicates if the policy is enabled or disabled
|
AssignedTo
|
Entity on which the policy is assigned to.
|
CreatedTime
|
Time at which the policy is created.
|
ExecutionState
|
State associated with the policy.
|
PolicyDetails
|
Link to the detailed view of the policy.
|
IsAssociatedToGroup
|
The policy is associated to group or not.
|
Table 2. Policy Execution State EnumerationThis table shows Policy Execution State Enumeration.
Enumeration Value
|
Description
|
1
|
NOSTATE (Policy execution state is not yet determined).
|
2
|
EXECUTING (Policy execution is in progress or pending).
|
3
|
SUCCESS (Policy execution is successful).
|
5
|
FAILED (Policy execution failed).
|
Table 3. FiltersThis table lists the filters that this method supports.
Field
|
Operator
|
Name
|
contains
|
Description
|
contains
|
Enabled
|
eq
|
AssignedTo
|
contains
|
Type
|
eq
|
Table 4. TypeThis table lists the types of policy
Enumeration Value
|
Description
|
1
|
Static policy
|
2
|
Temperature-triggered policy
|
List of all the sort options that this method supports:
- PolicyId
- Name
- Description
- Enabled
- AssignedTo
- CreatedTime
- Type
- IsAssociatedToGroup