- previewPolicyImpact
Get a specific policy by ID
Arguments
Return type
PolicyUnique identifier for the policy
Policy name
Detailed description of what the policy does
Current enforcement mode of the policy
Current status of the policy
Event that triggers policy evaluation
Conditions that must be met for the policy to match
Actions to execute when policy conditions match
Automatically resolve issues when conditions are no longer met
Indicates if this policy is a system default or custom/modified by the tenant
Number of issues created by this policy
When the policy was last executed
When the policy was created
When the policy was last updated
User who created the policy
User who last updated the policy
Version number, incremented on each update
When the policy was soft-deleted (null if active)
Effective environment types where this policy applies. Returns specific environments if conditions include environment filters, or all environments (Prod, Sandbox, Dev) if no environment filter is specified.
query policy($id: ID!) {
policy(id: $id) {
id
name
description
mode
status
trigger {
__typename
# ...PolicyTriggerFragment
}
conditions {
__typename
# ...PolicyConditionGroupFragment
}
actions {
__typename
# ...PolicyActionFragment
}
autoResolve
isDefault
issuesCount
lastExecutedAt
createdAt
updatedAt
createdBy {
__typename
# ...OwnerFragment
}
updatedBy {
__typename
# ...OwnerFragment
}
version
deletedAt
environmentTypes
}
}{ "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4" }
{ "data": { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "name": "Example String", "description": "Example String", "mode": "DRAFT", "status": "ACTIVE", "trigger": { "__typename": "PolicyTrigger" }, "conditions": { "__typename": "PolicyConditionGroup" }, "actions": [ { "__typename": "PolicyAction" } ], "autoResolve": true, "isDefault": true, "issuesCount": 40, "lastExecutedAt": "Example Custom Scalar", "createdAt": "Example Custom Scalar", "updatedAt": "Example Custom Scalar", "createdBy": { "__typename": "Owner" }, "updatedBy": { "__typename": "Owner" }, "version": 40, "deletedAt": "Example Custom Scalar", "environmentTypes": [ "Prod" ] } }
Test policy conditions against current data without creating a policy
Arguments
Return type
TestResult of testing agent-based policy conditions. Shows preview of agents that would be impacted by this policy.
query testPolicy($trigger: PolicyTriggerInput!, $conditions: PolicyConditionGroupInput!) {
testPolicy(trigger: $trigger, conditions: $conditions) {
matchingAgents {
__typename
# ...AgentFragment
}
totalMatches
}
}{ "trigger": { "type": "AGENT_CREATED" }, "conditions": { "agentFilter": { "__typename": "AgentFilter" }, "toolFilter": { "__typename": "ToolFilterInput" }, "findingFilter": { "__typename": "FindingFilter" }, "detectionFilter": { "__typename": "DetectionFilter" }, "groups": [ { "__typename": "PolicyConditionGroupInput" } ] } }
{ "data": { "matchingAgents": [ { "__typename": "Agent" } ], "totalMatches": 40 } }
Get available trigger types for building policy UI dynamically. Optional triggerType parameter for future filtering support.
Arguments
Return type
[Policyquery policyTriggerTypes($triggerType: PolicyTriggerType) {
policyTriggerTypes(triggerType: $triggerType)
}{ "triggerType": "AGENT_CREATED" }
{ "data": [ "AGENT_CREATED" ] }
Get available action types for building policy UI dynamically. Optional triggerType parameter for future context-aware filtering (e.g., only show actions valid for the selected trigger).
Arguments
Return type
[Policyquery policyActionTypes($triggerType: PolicyTriggerType) {
policyActionTypes(triggerType: $triggerType)
}{ "triggerType": "AGENT_CREATED" }
{ "data": [ "CREATE_ISSUE" ] }
Get filter options for policies including dynamic ranges for numeric and date fields. Returns min/max values for issuesCount, and lastExecutedAt.
Return type
PolicyRange of issues count across all policies
Range of last executed dates across all policies
query policyFilterOptions {
policyFilterOptions {
issuesCountRange {
__typename
# ...IntRangeFragment
}
lastExecutedAtRange {
__typename
# ...DateTimeRangeFragment
}
}
}{ "data": { "issuesCountRange": { "__typename": "IntRange" }, "lastExecutedAtRange": { "__typename": "DateTimeRange" } } }
Preview the impact of a policy before applying it. Shows matching entities and estimated issue impact (create/update/close counts).
Arguments
Return type
PolicyEntities that match the policy conditions
query previewPolicyImpact(
$trigger: PolicyTriggerInput!
$conditions: PolicyConditionGroupInput!
$autoResolve: Boolean!
$policyId: ID
) {
previewPolicyImpact(
trigger: $trigger
conditions: $conditions
autoResolve: $autoResolve
policyId: $policyId
) {
matchingEntities {
__typename
# ...MatchingEntityGroupFragment
}
}
}{ "trigger": { "type": "AGENT_CREATED" }, "conditions": { "agentFilter": { "__typename": "AgentFilter" }, "toolFilter": { "__typename": "ToolFilterInput" }, "findingFilter": { "__typename": "FindingFilter" }, "detectionFilter": { "__typename": "DetectionFilter" }, "groups": [ { "__typename": "PolicyConditionGroupInput" } ] }, "autoResolve": true, "policyId": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4" }
{ "data": { "matchingEntities": [ { "__typename": "MatchingEntityGroup" } ] } }
Generate AI-powered policy metadata (title and description) based on policy configuration. Typically takes 1-3 seconds. Should be debounced in the UI to avoid excessive calls. Optional field parameter allows generating only name or description for better caching.
Arguments
Return type
PolicyAI-generated title for the policy (5-8 words)
AI-generated description explaining what this policy does (1-3 sentences)
query generatePolicyMetadata(
$trigger: PolicyTriggerInput!
$conditions: PolicyConditionGroupInput!
$autoResolve: Boolean!
$field: PolicyMetadataField
) {
generatePolicyMetadata(
trigger: $trigger
conditions: $conditions
autoResolve: $autoResolve
field: $field
) {
title
description
}
}{ "trigger": { "type": "AGENT_CREATED" }, "conditions": { "agentFilter": { "__typename": "AgentFilter" }, "toolFilter": { "__typename": "ToolFilterInput" }, "findingFilter": { "__typename": "FindingFilter" }, "detectionFilter": { "__typename": "DetectionFilter" }, "groups": [ { "__typename": "PolicyConditionGroupInput" } ] }, "autoResolve": true, "field": "NAME" }
{ "data": { "title": "Example String", "description": "Example String" } }
Get a list of users with optional filtering and sorting
Return type
[User!]!query users {
users {
id
firstName
lastName
email
role
createdAt
updatedAt
status
}
}{ "data": [ { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "firstName": "Example String", "lastName": "Example String", "email": "Example String", "role": "ADMIN", "createdAt": "Example Custom Scalar", "updatedAt": "Example Custom Scalar", "status": "ENABLED" } ] }
Export users with same filtering and sorting as users query
Arguments
Return type
String!The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
query exportUsers($type: ExportType!) {
exportUsers(type: $type)
}{ "type": "CSV" }
{ "data": "Example String" }
Get SSO configuration for an organization
Return type
Organizationquery organizationConfiguration {
organizationConfiguration {
id
name
ssoConfig {
__typename
# ...OrganizationSSOConfigurationFragment
}
}
}{ "data": { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "name": "Example String", "ssoConfig": { "__typename": "OrganizationSSOConfiguration" } } }