Software Secure Workload
Activity Configure

Create a Policy

This endpoint is used to create new policies.

POST /openapi/v1/applications/{application_id}/policies

Parameters:

Attribute

Type

Description

consumer_filter_id

string

ID of a defined filter.

provider_filter_id

string

ID of a defined filter.

version

string

Indicates the version of the workspace in which to update the policies.

rank

string

values can be DEFAULT, ABSOLUTE or CATCHALL for ranking

policy_action

string

values can be ALLOW or DENY: means whether we should allow or drop traffic from consumer to provider on the given service port/protocol

priority

integer

Used to sort policy.

Sample Python code


  req_payload = {
    "version": "v1",
    "rank" : "DEFAULT",
    "policy_action" : "ALLOW",
    "priority" : 100,
    "consumer_filter_id" : "123456789",
    "provider_filter_id" : "987654321",
  }
  resp = restclient.post('/openapi/v1/applications/{application_id}/policies', json_body=json.dumps(req_payload))

Create a Default Policy

This endpoint is used to create new default policies. This endpoint creates a default policy similar to the create a policy endpoint.

POST /openapi/v1/applications/{application_id}/default_policies

Create an Absolute Policy

This endpoint is used to create new absolute policies. This endpoint creates a absolute policy similar to the create a policy endpoint.

POST /openapi/v1/applications/{application_id}/absolute_policies