Perform a GET request: list policies
List Policies
is a GET request on the
policies
endpoint:
Use an HTTP client
To send the request right away use Postman, Paw, or curl. Use the following information to create the request:
- URL:
https://<Manager host name>:<port>/api/policies
, for examplehttps://localhost:4119/api/policies
- First header:
- Key:
api-secret-key
- Value:
<your key secret>
- Key:
- Second header:
- Key:
api-version
- Value:
v1
- Key:
Example curl command:
curl -X GET https:// localhost:4119/api/policies -H
'api-secret-key: 5:W+lC8YHIaYHeQuDbJZLkqwM5b8xjxla2pHtBNoiifF8=' -H 'api-version:
v1'
If your Deep Security Manager is using a self-signed certificate to establish a secure
connection, in the Postman settings, turn off SSL certificate verification. For Paw, in the
Network preferences clear Validate SSL Certificates. For curl, include the
--insecure
option.
Use a client library
The following example code creates an ApiClient
object that configures
authentication with Deep Security Manager. A PoliciesApi
object is then created
and used to list all policies.
For the sake of clarity the example hard-codes authentication credentials, which is an extremely bad practice. Never hard-code your credentials.
Example code: Python, JavaScript, Java.