GET method for Policies(<PolicyId>)
This method returns a specific policy.
- Description
- Returns details of a specific policy.
- Privilege
- VIEW
- HTTP response codes
- 200
- Example
-
Input: None
Output:
{
"@odata.context": "/api/$metadata#Collection(PowerService.PowerPolicy)",
"@odata.count": 1,
"value": [
{
"@odata.type": "#PowerService.PowerPolicy",
"@odata.id": "/api/PowerService/Policies(1)",
"PolicyId": 4,
"Type": 1,
"Name": "Policy for Power",
"Description": "Policy for Power",
"Enabled": true,
"AssignedTo": "4xBzewP",
"CreatedTime": "2019-06-12 16:54:14.411943",
"ExecutionState": 3,
"IsAssociatedToGroup": false
"PolicyDetails": {
"@odata.id": "/api/PowerService/Policies(4)/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).
|
Data is not available for the Topic