Perform a GET request: list policies

To start exploring the API, go to the List Policies operation in the Policies section of the API reference. Notice that 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 example https://localhost:4119/api/policies
  • First header:
    • Key: api-secret-key
    • Value: &lt;your key secret&gt;
  • Second header:
    • Key: api-version
    • Value: v1

Example curl command:

curl -X GET https:// localhost:4119/api/policies -H 'api-secret-key: 5:W+lC8YHIaYHeQuDbJZLkqwM5b8xjxla2pHtBNoiifF8=' -H 'api-version: v1'
Tip:

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.

Warning:

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.