This URL creates new IPS policy.
Resource URL
POST /sdkapi/domain/<domainId>/ipspolicies/createips
Request Parameters
URL Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Domain ID | Number | Yes |
Payload Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Policy name | String | Yes |
| Policy description | String | Yes |
| Is policy visible to child domain | Boolean | Yes |
| Rule set with inbound direction | Boolean | Yes |
| Rule set with outbound direction | Boolean | Yes |
| DOS response sensitivity level value can be:
| Number | Yes |
| Is policy editable after creation | Boolean | No |
| 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 |
|---|---|---|
| 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. |