Perform a POST request: search firewall rules
Perform a POST request to search for firewall rules. In the API reference, the SearchFirewallRules operation (Firewall Rules section)
for the firewallrules
endpoint is a POST request to the path
firewallrules/search
.
The API reference also shows a series of parameters that you use in the request body. For
Search Firewall Rules
, each parameter is a search criterion. In this
example we search for the ID of 3.
Use an HTTP client to post
Use the following information to create the request in Postman or Paw:
- Request type:
POST
- URL:
https://<Deep Security Manager hostname>:<port>/api/firewallrules/search
, for examplehttps://localhost:4119/api/firewallrules/search
- First header:
- Key:
api-secret-key
- Value: your key secret
- Key:
- Second header:
- Key:
api-version
- Value:
v1
- Key:
- Third header:
- Key:
Content-Type
- Value:
application/json
- Key:
Also, add the following raw code to the body:
{
"searchCriteria": [{
"idTest":"equal",
"idValue":3
}]
}
Example curl command:
curl -X POST https:// localhost:4119/api/firewallrules/search \
-H 'Cache-Control: no-cache' \
-H 'api-secret-key: 3:zNi5ag8xPGpfEMElV0GxAIpTs5Ji8BQoCtXaTAgKkVM=' \
-H 'api-version: v1' \
-H 'content-type: application/json' \
-d '{
"searchCriteria": [{
"idTest":"equal",
"idValue":3
}]
}'
Use a client library to post
The following example creates a SearchFilter
object that defines search
criteria. The SearchFilter
object is then used as a parameter of the
searchFirewallRules
method of a ModuleFirewallApi
object.
Example code: Python, JavaScript, Java.