v1/security_policies
Use the v1/security_policies API to manage security policies for the current account.
Security policies contain CIDR block rules that indicate which IP addresses are allowed to access the account for a user. After a user is assigned a security policy, all logins from that user (by API or UI) will only be allowed from IP addresses indicated in the policy.
URI
http://<hostname>/ws/v1/security_policies
Formats
Method | Format | Description | Parameters |
---|---|---|---|
GET | /ws/v1/security_policies | Get a summary of the subaccounts web service. | |
GET | /ws/v1/security_policies/inventory | Get a list of security policies. | orderby cursor size query |
GET | /ws/v1/security_policies/inventory/{id} | Get a single security policy (rules are included). | orderby cursor size query |
POST | /ws/v1/security_policies/inventory | Create a security policy. | |
DELETE | /ws/v1/security_policies/inventory/{id} | Delete a single security policy and its rules. Fails if the rule is in use by any users. | orderby cursor size query |
GET | /ws/v1/security_policies/inventory/{id}/rules/inventory | Get a list of security rules associated with the policy | orderby cursor size query |
GET | /ws/v1/security_policies/inventory/{id}/rules/inventory/{ruleId} | Get a single security rules from the policy | |
POST | /ws/v1/security_policies/inventory/{id}/rules/inventory | Create a security rule for the policy | |
DELETE | /ws/v1/security_policies/inventory/{id}/rules/inventory/{ruleId} | Delete a security rule from the policy |
Parameters
Name | Type | Description |
---|---|---|
cursor | string | Cursor to get the next page of results. Omit on initial call. |
orderby | string | Specify any field described in the object for the API. Optionally add asc or desc to control the sort order. |
query | string | The Remote Manager query language query condition used to filter results. See v1 API Query Language. |
size | integer | Number of items to return. The maximum and default is 1000. |
Security Policy Fields
customer_id
The customer ID of the account that owns the security policy.
description
(Optional) A description of the security policy.
id
The unique ID of the security policy.
name
The name of the security policy. A user is assigned a security policy by name.
type
(Optional) All security policies are of type ‘allow’. An allow security policy means that once the policy is assigned to a user, the user can only login from the IP addresses indicated in the policy.
Security Rule Fields
description
(Optional) A description of the security rule.
id
The unique ID of the security policy.
security_policy_id
The security policy ID of the owning security policy.
type
(Optional) All security policies are of type ‘CIDR’. Security rules only support CIDR block notation.
value
The CIDR notation value for the security policy. The CIDR notation value is the IP address and the subnet mask. For
example,
192.168.1.0/8
is a CIDR notation value that indicates the network 192.168.1.0 with a subnet mask of 8 bits.
The CIDR notation value can also be a single IP address. For example, 192.168.1.1/32
is a CIDR notation value that
indicates
the single IP address 192.168.1.1
.