Fetches IP Access rules of an account. These rules apply to all the zones in the account. You can filter the results using several optional parameters.
/accounts/{account_identifier}/firewall/access_rules/rules
get
IP Access rules for an account
ip-access-rules-for-an-account-list-ip-access-rules
{
"business": true,
"enterprise": true,
"free": true,
"pro": true
} {
"enum": [
"#waf:read"
]
} [
{
"in": "path",
"name": "account_identifier",
"required": true,
"schema": {}
},
{
"in": "query",
"name": "filters",
"schema": {
"properties": {
"configuration.target": {
"description": "The target to search in existing rules.",
"enum": [
"ip",
"ip_range",
"asn",
"country"
],
"example": "ip",
"type": "string"
},
"configuration.value": {
"description": "The target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`.\nNotes: You can search for a single IPv4 address, an IP address range with a subnet of '/16' or '/24', or a two-letter ISO-3166-1 alpha-2 country code.",
"example": "198.51.100.4",
"type": "string"
},
"match": {
"default": "all",
"description": "When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",
"enum": [
"any",
"all"
],
"type": "string"
},
"mode": {
"description": "The action to apply to a matched request.",
"enum": [
"block",
"challenge",
"whitelist",
"js_challenge",
"managed_challenge"
],
"example": "challenge",
"type": "string"
},
"notes": {
"description": "The string to search for in the notes of existing IP Access rules.\nNotes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive.",
"example": "my note",
"type": "string"
}
},
"type": "object"
}
},
{
"in": "query",
"name": "egs-pagination.json",
"schema": {
"properties": {
"page": {
"default": 1,
"description": "The page number of paginated results.",
"minimum": 1,
"type": "number"
},
"per_page": {
"default": 20,
"description": "The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`.",
"maximum": 1000,
"minimum": 1,
"type": "number"
}
},
"type": "object"
}
},
{
"in": "query",
"name": "page",
"schema": {
"description": "Requested page within paginated list of results.",
"example": 1,
"type": "number"
}
},
{
"in": "query",
"name": "per_page",
"schema": {
"description": "Maximum number of results requested.",
"example": 20,
"type": "number"
}
},
{
"in": "query",
"name": "order",
"schema": {
"description": "The field used to sort returned rules.",
"enum": [
"configuration.target",
"configuration.value",
"mode"
],
"example": "mode",
"type": "string"
}
},
{
"in": "query",
"name": "direction",
"schema": {
"description": "The direction used to sort returned rules.",
"enum": [
"asc",
"desc"
],
"example": "desc",
"type": "string"
}
}
] null {
"200": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"allOf": [
{
"properties": {
"errors": {
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
},
"messages": {
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "string"
}
]
},
"success": {
"description": "Whether the API call was successful",
"enum": [
true
],
"example": true,
"type": "boolean"
}
},
"required": [
"success",
"errors",
"messages",
"result"
],
"type": "object"
},
{
"properties": {
"result": {
"items": {},
"nullable": true,
"type": "array"
},
"result_info": {
"properties": {
"count": {
"description": "Total number of results for the requested service",
"example": 1,
"type": "number"
},
"page": {
"description": "Current page within paginated list of results",
"example": 1,
"type": "number"
},
"per_page": {
"description": "Number of results per page of results",
"example": 20,
"type": "number"
},
"total_count": {
"description": "Total results available without any search parameters",
"example": 2000,
"type": "number"
}
},
"type": "object"
}
}
}
],
"type": "object"
},
{
"properties": {
"result": {
"items": {
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"description": "List IP Access rules response"
},
"4xx": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"allOf": [
{
"allOf": [
{
"properties": {
"errors": {
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
},
"messages": {
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "string"
}
]
},
"success": {
"description": "Whether the API call was successful",
"enum": [
true
],
"example": true,
"type": "boolean"
}
},
"required": [
"success",
"errors",
"messages",
"result"
],
"type": "object"
},
{
"properties": {
"result": {
"items": {},
"nullable": true,
"type": "array"
},
"result_info": {
"properties": {
"count": {
"description": "Total number of results for the requested service",
"example": 1,
"type": "number"
},
"page": {
"description": "Current page within paginated list of results",
"example": 1,
"type": "number"
},
"per_page": {
"description": "Number of results per page of results",
"example": 20,
"type": "number"
},
"total_count": {
"description": "Total results available without any search parameters",
"example": 2000,
"type": "number"
}
},
"type": "object"
}
}
}
],
"type": "object"
},
{
"properties": {
"result": {
"items": {
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
]
},
{
"properties": {
"errors": {
"allOf": [
{
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
}
],
"example": [
{
"code": 7003,
"message": "No route for the URI"
}
],
"minLength": 1
},
"messages": {
"allOf": [
{
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
}
],
"example": []
},
"result": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"success": {
"description": "Whether the API call was successful",
"enum": [
false
],
"example": false,
"type": "boolean"
}
},
"required": [
"success",
"errors",
"messages",
"result"
],
"type": "object"
}
]
}
}
},
"description": "List IP Access rules response failure"
}
} [
{
"api_email": [],
"api_key": []
},
{
"api_token": []
}
]