This URL creates new IPS policy.
Resource URL
POST /sdkapi/domain/<domainId>/ipspolicies/createips
Request Parameters
URL Parameters:
| Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| domainId | Domain ID | Number | Yes |
Payload Parameters:
| Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| PolicyName | Policy name | String | Yes |
| Description | Policy description | String | Yes |
| IsVisibleToChildren | Is policy visible to child domain | Boolean | Yes |
| InboundRuleSet | Rule set with inbound direction | Boolean | Yes |
| OutboundRuleSet | Rule set with outbound direction | Boolean | Yes |
| DosResponseSensitivityLevel | DOS response sensitivity level value can be:
|
Number | Yes |
| isEditable | Is policy editable after creation | Boolean | No |
| direction | Consider inbound/outbound direction values can be:
|
Number | Yes |
Response Parameters
Following fields are returned if the operation was successful, otherwise error details are returned.
| Field Name | Description | Data Type |
|---|---|---|
| createdResourceId | Unique id of the created policy | Number |
Example
Request
POST https://<NSM_IP>/sdkapi/domain/<domainId>/ipspolicies/createips
Payload:
{
"PolicyName":"IPS policytest1",
"Description":"test",
"IsVisibleToChildren":true,
"InboundRuleSet":"Default Prevention",
"OutboundRuleSet":"DMZ",
"DosResponseSensitivityLevel":1,
"direction":1
}
Response
{
createdResourceId :1
}
Error Information
Following error codes are returned by this URL:
| S.No | SDK API errorId | SDK API errorMessage |
|---|---|---|
| 1 | 1001 | Unable to add a policy. A policy with same name could be existing in current or in a different admin domain. |
| 2 | 1001 | Unable to add a policy. Invalid sensitivity Level: 3. |
| 3 | 9001 | Enter valid direction code: 0:Ignore Direction, 1:Consider Direction. |
| 4 | 9001 | Rule set name not found. |