Policies
APIs for managing Cloud Workload Policies
Fetches a list of all CWP policy instances. You can filter the results by policy type (e.g., COMPLIANCE, MALWARE, SECRET, TRUSTED_IMAGES). By default, all policy types are returned. Use the disableVerbose flag to optimize performance by skipping asset group data updates.
Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management.
Flag to bypass calling platform for asset groups data when fetching policies. Note that this means asset groups will not be updated upon fetching policies.
false{api_key}
UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP{api_key_id}
241Success
The response you get when calling the get policies V2 path
One of the supported policy types
MALWAREPossible values: One of the supported evaluation stages
CIPossible values: One of the supported policy actions
ISSUEPossible values: One of the supported policy severities
CRITICALPossible values: One of the supported policy actions
ISSUEPossible values: Grace period duration string in days
Client error
Service had unexpected internal error
GET /public_api/v2/cwp/policies HTTP/1.1
Host: api-yourfqdn
Authorization: UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP
x-xdr-auth-id: 241
Accept: */*
[
{
"id": "1",
"revision": 3,
"createdAt": "2024-07-28T18:50:55Z",
"modifiedAt": "2024-07-28T18:50:55Z",
"type": "COMPLIANCE",
"createdBy": "admin",
"disabled": false,
"name": "some policy",
"description": "some policy description",
"evaluationModes": [
"PERIODIC"
],
"usingSystemAssetGroups": false,
"gracePeriod": "",
"evaluationStage": "CI",
"policyRules": [
{
"id": "2",
"rule_id": "3",
"policy_id": "1",
"severity": "CRITICAL",
"action": "ISSUE",
"policy_revision": 3,
"rule_name": "ruleName",
"remediation_guidance": "",
"user_remediation_guidance": ""
},
{
"id": "3",
"rule_id": "4",
"policy_id": "1",
"severity": "HIGH",
"action": "PREVENT",
"policy_revision": 4,
"rule_name": "ruleName2",
"remediation_guidance": "",
"user_remediation_guidance": ""
}
],
"condition": "U19tZUJhc2U2NERhdGE=",
"exception": "U39tZUJhc2U2NERhdGE=",
"assetScope": "U59tZUJhc2U2NERhdGE=",
"assetGroupsIDs": [
1,
2
],
"assetGroups": [
"group1",
"group2"
],
"action": "ISSUE",
"severity": "CRITICAL",
"remediationGuidance": "some remediation guidance",
"missingInformationAction": "ISSUE"
}
]Creates new CWP policy. This version supports advanced configuration including policyRules, gracePeriod, and usingSystemAssetGroups.
Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management.
{api_key}
UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP{api_key_id}
241The schema of a created policy
One of the supported policy types
MALWAREPossible values: One of the supported evaluation stages
CIPossible values: One of the supported policy actions
ISSUEPossible values: One of the supported policy severities
CRITICALPossible values: One of the supported policy actions
ISSUEPossible values: Grace period duration string in days
Success
Client error
Forbidden error
Service had unexpected internal error
POST /public_api/v2/cwp/policies HTTP/1.1
Host: api-yourfqdn
Authorization: UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP
x-xdr-auth-id: 241
Content-Type: application/json; charset=UTF-8
Accept: */*
Content-Length: 675
{
"type": "COMPLIANCE",
"disabled": false,
"name": "some policy",
"description": "some policy description",
"evaluationModes": [
"PERIODIC"
],
"evaluationStage": "CI",
"gracePeriod": "",
"policyRules": [
{
"rule_id": "3",
"severity": "CRITICAL",
"action": "ISSUE",
"user_remediation_guidance": "2"
},
{
"rule_id": "4",
"severity": "HIGH",
"action": "PREVENT",
"user_remediation_guidance": "1"
}
],
"condition": "Y29uZGl0aW9u",
"exception": "ZXhjZXB0aW9u",
"assetScope": "YXNzZXRTY29wZQ==",
"assetGroupsIDs": [
1,
2
],
"assetGroups": [
"group1",
"group2"
],
"action": "ISSUE",
"severity": "CRITICAL",
"remediationGuidance": "some remediation guidance",
"createdBy": "user",
"missingInformationAction": "ISSUE",
"usingSystemAssetGroups": false
}{
"id": "text"
}Fetches the detailed configuration of a single CWP policy identified by its unique ID. This includes associated rules, evaluation stages, and asset scope. Use disableVerbose to exclude platform-specific asset group metadata.
Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management.
Flag to bypass calling platform for asset groups data when fetching policies. Note that this means asset groups will not be updated upon fetching policies.
false{api_key}
UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP{api_key_id}
241Success
The schema of a returned policy
One of the supported policy types
MALWAREPossible values: One of the supported evaluation stages
CIPossible values: One of the supported policy actions
ISSUEPossible values: One of the supported policy severities
CRITICALPossible values: One of the supported policy actions
ISSUEPossible values: Grace period duration string in days
Policy ID not found
Service had unexpected internal error
GET /public_api/v2/cwp/policies/{id} HTTP/1.1
Host: api-yourfqdn
Authorization: UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP
x-xdr-auth-id: 241
Accept: */*
{
"id": "1",
"revision": 3,
"createdAt": "2024-07-28T18:50:55Z",
"modifiedAt": "2024-07-28T18:50:55Z",
"type": "COMPLIANCE",
"createdBy": "admin",
"disabled": false,
"name": "some policy",
"description": "some policy description",
"evaluationModes": [
"PERIODIC"
],
"gracePeriod": "",
"evaluationStage": "CI",
"policyRules": [
{
"id": "2",
"rule_id": "3",
"policy_id": "1",
"severity": "CRITICAL",
"action": "ISSUE",
"policy_revision": 3,
"rule_name": "Rule1",
"remediation_guidance": "",
"user_remediation_guidance": ""
},
{
"id": "3",
"rule_id": "4",
"policy_id": "1",
"severity": "HIGH",
"action": "PREVENT",
"policy_revision": 4,
"rule_name": "Rule2",
"remediation_guidance": "",
"user_remediation_guidance": ""
}
],
"condition": "U29tZUJhc1U2NERhdGE=",
"exception": "U29tZUJhc3U2NERhdGE=",
"assetScope": "U29tZUJh42U2NERhdGE=",
"assetGroupsIDs": [
1,
2
],
"assetGroups": [
"group1",
"group2"
],
"action": "ISSUE",
"severity": "CRITICAL",
"remediationGuidance": "some remediation guidance",
"missingInformationAction": "ISSUE",
"usingSystemAssetGroups": false
}Updates the configuration of an existing CWP policy. The policy ID is mandatory. Note: The policy revision will be automatically incremented upon a successful update. Fields not provided in the request body will be reset to their default values.
Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management.
The policy ID to delete
{api_key}
UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP{api_key_id}
241The schema of a created policy
One of the supported policy types
MALWAREPossible values: One of the supported evaluation stages
CIPossible values: One of the supported policy actions
ISSUEPossible values: One of the supported policy severities
CRITICALPossible values: One of the supported policy actions
ISSUEPossible values: Grace period duration string in days
Success
No content
Client error
Forbidden error
Policy ID not found
Service had unexpected internal error
PUT /public_api/v2/cwp/policies/{id} HTTP/1.1
Host: api-yourfqdn
Authorization: UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP
x-xdr-auth-id: 241
Content-Type: application/json; charset=UTF-8
Accept: */*
Content-Length: 711
{
"id": "policyID",
"type": "COMPLIANCE",
"disabled": false,
"name": "some policy",
"description": "some policy description",
"evaluationModes": [
"PERIODIC"
],
"gracePeriod": "",
"evaluationStage": "CI",
"policyRules": [
{
"rule_id": "3",
"severity": "CRITICAL",
"action": "ISSUE",
"user_remediation_guidance": "1"
},
{
"rule_id": "4",
"severity": "HIGH",
"action": "PREVENT",
"user_remediation_guidance": "1"
}
],
"condition": "U29tZUJhc2U2NERfdGE=",
"exception": "U29tZUJhc2U2NERfdGE=",
"assetScope": "U29tZUJhc2U2NEFhdGE=",
"assetGroupsIDs": [
1,
2
],
"assetGroups": [
"group1",
"group2"
],
"action": "ISSUE",
"severity": "CRITICAL",
"remediationGuidance": "some remediation guidance",
"createdBy": "user",
"missingInformationAction": "ISSUE",
"usingSystemAssetGroups": false
}No content
Cloud Workload Policies help you prevent and manage security violations in your cloud runtime instances. They enable you to apply detection logic to specific asset groups at the desired SDLC stage, and define what action needs to be taken if the conditions are met.
Get all CWP policies of the given type. Default behavior is all.
Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management.
{api_key}
UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP{api_key_id}
241Success
The response you get when calling the get policies path
One of the supported policy types
MALWAREPossible values: One of the supported evaluation stages
CIPossible values: The UUIDs of the rules that define the condition
The rulesIds field is only required for non-compliance policies.
The condition field is only required for non-compliance policies.
One of the supported policy actions
ISSUEPossible values: One of the supported policy severities
CRITICALPossible values: One of the supported policy actions
ISSUEPossible values: Client error
Service had unexpected internal error
GET /public_api/v1/cwp/policies HTTP/1.1
Host: api-yourfqdn
Authorization: UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP
x-xdr-auth-id: 241
Accept: */*
[
{
"id": "1",
"revision": 3,
"createdAt": "2024-07-28T18:50:55Z",
"modifiedAt": "2024-07-28T18:50:55Z",
"type": "COMPLIANCE",
"createdBy": "admin",
"disabled": false,
"name": "some policy",
"description": "some policy description",
"evaluationModes": [
"PERIODIC"
],
"evaluationStage": "CI",
"rulesIds": [
"1",
"2"
],
"condition": "U29tZUJhc2U2NEGhdGE=",
"exception": "U29tZUJhc2U2NEhhdGE=",
"assetScope": "U29tZUJhc2U2NE2hdGE=",
"assetGroupsIDs": [
1,
2
],
"assetGroups": [
"group1",
"group2"
],
"action": "ISSUE",
"severity": "CRITICAL",
"missingInformationAction": "ISSUE",
"remediationGuidance": "some remediation guidance"
}
]Add CWP policy instances.
Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management.
{api_key}
UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP{api_key_id}
241The schema of a policy
One of the supported policy types
MALWAREPossible values: One of the supported evaluation stages
CIPossible values: The UUIDs of the rules that define the condition
The rulesIds field is only required for non-compliance policies.
The condition field is only required for non-compliance policies.
One of the supported policy actions
ISSUEPossible values: One of the supported policy severities
CRITICALPossible values: One of the supported policy actions
ISSUEPossible values: Success
Client error
Service had unexpected internal error
POST /public_api/v1/cwp/policies HTTP/1.1
Host: api-yourfqdn
Authorization: UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP
x-xdr-auth-id: 241
Content-Type: application/json
Accept: */*
Content-Length: 567
{
"id": "1",
"revision": 3,
"createdAt": "2024-07-28T18:50:44Z",
"modifiedAt": "2024-07-28T18:50:55Z",
"type": "COMPLIANCE",
"createdBy": "admin",
"disabled": false,
"name": "some policy",
"description": "some policy description",
"evaluationModes": [
"PERIODIC"
],
"evaluationStage": "CI",
"rulesIds": [],
"condition": "U29tZUJhc1U2NERhdGE=",
"exception": "U29tZUJhc5U2NERhdGE=",
"assetScope": "U29tZUJh72U2NERhdGE=",
"assetGroupsIDs": [
1,
2
],
"assetGroups": [
"group1",
"group2"
],
"action": "ISSUE",
"severity": "CRITICAL",
"missingInformationAction": "ISSUE",
"remediationGuidance": "some remediation guidance"
}{
"id": "text"
}Get a CWP policy by its ID.
Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management.
{api_key}
UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP{api_key_id}
241Success
The schema of a policy
One of the supported policy types
MALWAREPossible values: One of the supported evaluation stages
CIPossible values: The UUIDs of the rules that define the condition
The rulesIds field is only required for non-compliance policies.
The condition field is only required for non-compliance policies.
One of the supported policy actions
ISSUEPossible values: One of the supported policy severities
CRITICALPossible values: One of the supported policy actions
ISSUEPossible values: Policy ID not found
Service had unexpected internal error
GET /public_api/v1/cwp/policies/{id} HTTP/1.1
Host: api-yourfqdn
Authorization: UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP
x-xdr-auth-id: 241
Accept: */*
{
"id": "1",
"revision": 3,
"createdAt": "2024-07-28T18:50:44Z",
"modifiedAt": "2024-07-28T18:50:55Z",
"type": "COMPLIANCE",
"createdBy": "admin",
"disabled": false,
"name": "some policy",
"description": "some policy description",
"evaluationModes": [
"PERIODIC"
],
"evaluationStage": "CI",
"rulesIds": [],
"condition": "U29tZUJhc1U2NERhdGE=",
"exception": "U29tZUJhc5U2NERhdGE=",
"assetScope": "U29tZUJh72U2NERhdGE=",
"assetGroupsIDs": [
1,
2
],
"assetGroups": [
"group1",
"group2"
],
"action": "ISSUE",
"severity": "CRITICAL",
"missingInformationAction": "ISSUE",
"remediationGuidance": "some remediation guidance"
}Update a CWP policy by its ID.
Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management.
The policy ID to delete
{api_key}
UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP{api_key_id}
241The schema of a policy
One of the supported policy types
MALWAREPossible values: One of the supported evaluation stages
CIPossible values: The UUIDs of the rules that define the condition
The rulesIds field is only required for non-compliance policies.
The condition field is only required for non-compliance policies.
One of the supported policy actions
ISSUEPossible values: One of the supported policy severities
CRITICALPossible values: One of the supported policy actions
ISSUEPossible values: Success
No content
Client error
Policy ID not found
Service had unexpected internal error
PUT /public_api/v1/cwp/policies/{id} HTTP/1.1
Host: api-yourfqdn
Authorization: UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP
x-xdr-auth-id: 241
Content-Type: application/json; charset=UTF-8
Accept: */*
Content-Length: 567
{
"id": "1",
"revision": 3,
"createdAt": "2024-07-28T18:50:44Z",
"modifiedAt": "2024-07-28T18:50:55Z",
"type": "COMPLIANCE",
"createdBy": "admin",
"disabled": false,
"name": "some policy",
"description": "some policy description",
"evaluationModes": [
"PERIODIC"
],
"evaluationStage": "CI",
"rulesIds": [],
"condition": "U29tZUJhc1U2NERhdGE=",
"exception": "U29tZUJhc5U2NERhdGE=",
"assetScope": "U29tZUJh72U2NERhdGE=",
"assetGroupsIDs": [
1,
2
],
"assetGroups": [
"group1",
"group2"
],
"action": "ISSUE",
"severity": "CRITICAL",
"missingInformationAction": "ISSUE",
"remediationGuidance": "some remediation guidance"
}No content
Delete a CWP policy by its ID.
Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management.
The policy ID to delete
If set, will trigger issue closing of issues opened by the deleted policy
{api_key}
UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP{api_key_id}
241Success
No content
Client error
Policy ID not found
Service had unexpected internal error
DELETE /public_api/v1/cwp/policies/{id} HTTP/1.1
Host: api-yourfqdn
Authorization: UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP
x-xdr-auth-id: 241
Accept: */*
No content
Last updated
Was this helpful?
