- policy
Arguments
Return type
Detectionsquery detections($limit: Int, $offset: Int) {
detections(limit: $limit, offset: $offset) {
items {
__typename
# ...DetectionFragment
}
total
}
}{ "limit": 40, "offset": 40 }
{ "data": { "items": [ { "__typename": "Detection" } ], "total": 40 } }
Arguments
Return type
DetectionUse 'messages' field instead for typed message access
query detection($id: ID!) {
detection(id: $id) {
id
title
type
detectedAt
issue {
__typename
# ...IssueFragment
}
session {
__typename
# ...SessionFragment
}
activities {
__typename
# ...AuditEventFragment
}
agent {
__typename
# ...AgentFragment
}
description
}
}{ "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4" }
{ "data": { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "title": "Example String", "type": "PII_LEAKAGE", "detectedAt": "Example Custom Scalar", "issue": { "__typename": "Issue" }, "session": { "__typename": "Session" }, "activities": [ { "__typename": "AuditEvent" } ], "agent": { "__typename": "Agent" }, "description": "Example String" } }
Arguments
Return type
Flowquery flows(
$filter: FlowFilter
$orderBy: [FlowOrderByInput!]
$first: Int
$after: String
$last: Int
$before: String
) {
flows(
filter: $filter
orderBy: $orderBy
first: $first
after: $after
last: $last
before: $before
) {
nodes {
id
externalId
name
description
platform {
__typename
# ...PlatformFragment
}
environment {
__typename
# ...EnvironmentFragment
}
owner {
__typename
# ...OwnerFragment
}
status
mode
version
graph {
__typename
# ...FlowGraphFragment
}
agents {
__typename
# ...AgentPreviewFragment
}
tools {
__typename
# ...ToolPreviewFragment
}
dataSources {
__typename
# ...DataSourcePreviewFragment
}
findings {
__typename
# ...FindingFragment
}
issues {
__typename
# ...IssueFragment
}
createdAt
updatedAt
capturedAt
platformCreatedAt
platformUpdatedAt
metadata
}
edges {
node {
id
externalId
name
description
platform {
__typename
# ...PlatformFragment
}
environment {
__typename
# ...EnvironmentFragment
}
owner {
__typename
# ...OwnerFragment
}
status
mode
version
graph {
__typename
# ...FlowGraphFragment
}
agents {
__typename
# ...AgentPreviewFragment
}
tools {
__typename
# ...ToolPreviewFragment
}
dataSources {
__typename
# ...DataSourcePreviewFragment
}
findings {
__typename
# ...FindingFragment
}
issues {
__typename
# ...IssueFragment
}
createdAt
updatedAt
capturedAt
platformCreatedAt
platformUpdatedAt
metadata
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalCount
aggregations {
__typename
# ...FlowAggregationsFragment
}
}
}{ "filter": { "id": { "__typename": "StringFilter" }, "search": "Example String", "status": { "__typename": "FlowStatusFilter" }, "platform": { "__typename": "PlatformFilter" }, "environment": { "__typename": "EnvironmentFilter" }, "owner": { "__typename": "OwnerFilter" }, "mode": { "__typename": "FlowModeFilter" }, "hasExternalTrigger": { "__typename": "BooleanFilter" }, "severity": { "__typename": "SeverityFilter" }, "findings": { "__typename": "FindingFilter" }, "agents": { "__typename": "FlowAgentFilter" }, "createdAt": { "__typename": "DateTimeFilter" }, "updatedAt": { "__typename": "DateTimeFilter" } }, "orderBy": [ { "field": "NAME", "direction": "ASC" } ], "first": 40, "after": "Example String", "last": 40, "before": "Example String" }
{ "data": { "nodes": [ { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "externalId": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "name": "Example String", "description": "Example String", "platform": { "__typename": "Platform" }, "environment": { "__typename": "Environment" }, "owner": { "__typename": "Owner" }, "status": "ACTIVE", "mode": "SYNC", "version": "Example String", "graph": { "__typename": "FlowGraph" }, "agents": [ { "__typename": "AgentPreview" } ], "tools": [ { "__typename": "ToolPreview" } ], "dataSources": [ { "__typename": "DataSourcePreview" } ], "findings": [ { "__typename": "Finding" } ], "issues": [ { "__typename": "Issue" } ], "createdAt": "Example Custom Scalar", "updatedAt": "Example Custom Scalar", "capturedAt": "Example Custom Scalar", "platformCreatedAt": "Example Custom Scalar", "platformUpdatedAt": "Example Custom Scalar", "metadata": "Example Custom Scalar" } ], "edges": [ { "node": { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "externalId": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "name": "Example String", "description": "Example String", "platform": { "__typename": "Platform" }, "environment": { "__typename": "Environment" }, "owner": { "__typename": "Owner" }, "status": "ACTIVE", "mode": "SYNC", "version": "Example String", "graph": { "__typename": "FlowGraph" }, "agents": [ { "__typename": "AgentPreview" } ], "tools": [ { "__typename": "ToolPreview" } ], "dataSources": [ { "__typename": "DataSourcePreview" } ], "findings": [ { "__typename": "Finding" } ], "issues": [ { "__typename": "Issue" } ], "createdAt": "Example Custom Scalar", "updatedAt": "Example Custom Scalar", "capturedAt": "Example Custom Scalar", "platformCreatedAt": "Example Custom Scalar", "platformUpdatedAt": "Example Custom Scalar", "metadata": "Example Custom Scalar" }, "cursor": "Example String" } ], "pageInfo": { "hasNextPage": true, "hasPreviousPage": true, "startCursor": "Example String", "endCursor": "Example String" }, "totalCount": 40, "aggregations": { "__typename": "FlowAggregations" } } }
Arguments
Return type
Flowquery flow($id: ID!) {
flow(id: $id) {
id
externalId
name
description
platform {
__typename
# ...PlatformFragment
}
environment {
__typename
# ...EnvironmentFragment
}
owner {
__typename
# ...OwnerFragment
}
status
mode
version
graph {
__typename
# ...FlowGraphFragment
}
agents {
__typename
# ...AgentPreviewFragment
}
tools {
__typename
# ...ToolPreviewFragment
}
dataSources {
__typename
# ...DataSourcePreviewFragment
}
findings {
__typename
# ...FindingFragment
}
issues {
__typename
# ...IssueFragment
}
createdAt
updatedAt
capturedAt
platformCreatedAt
platformUpdatedAt
metadata
}
}{ "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4" }
{ "data": { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "externalId": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "name": "Example String", "description": "Example String", "platform": { "__typename": "Platform" }, "environment": { "__typename": "Environment" }, "owner": { "__typename": "Owner" }, "status": "ACTIVE", "mode": "SYNC", "version": "Example String", "graph": { "__typename": "FlowGraph" }, "agents": [ { "__typename": "AgentPreview" } ], "tools": [ { "__typename": "ToolPreview" } ], "dataSources": [ { "__typename": "DataSourcePreview" } ], "findings": [ { "__typename": "Finding" } ], "issues": [ { "__typename": "Issue" } ], "createdAt": "Example Custom Scalar", "updatedAt": "Example Custom Scalar", "capturedAt": "Example Custom Scalar", "platformCreatedAt": "Example Custom Scalar", "platformUpdatedAt": "Example Custom Scalar", "metadata": "Example Custom Scalar" } }
Get a list of policies with optional filtering and sorting
Arguments
Return type
PoliciesList of policies matching the filter
Total count of policies matching the filter (ignoring pagination)
Aggregated statistics for the filtered policies (computed lazily via field resolver)
query policies(
$filter: PolicyFilter
$orderBy: [PolicyOrderByInput!]
$limit: Int
$offset: Int
) {
policies(
filter: $filter
orderBy: $orderBy
limit: $limit
offset: $offset
) {
items {
__typename
# ...PolicyFragment
}
total
aggregations {
__typename
# ...PolicyAggregationsFragment
}
}
}{ "filter": { "search": "Example String", "mode": { "__typename": "PolicyModeFilter" }, "status": { "__typename": "PolicyStatusFilter" }, "triggerType": { "__typename": "PolicyTriggerTypeFilter" }, "issuesCount": { "__typename": "IntRangeFilter" }, "lastExecutedAt": { "__typename": "DateTimeFilter" }, "isDefault": true, "findingType": { "__typename": "FindingTypeFilter" }, "detectionType": { "__typename": "DetectionTypeFilter" } }, "orderBy": [ { "field": "NAME", "direction": "ASC" } ], "limit": 40, "offset": 40 }
{ "data": { "items": [ { "__typename": "Policy" } ], "total": 40, "aggregations": { "__typename": "PolicyAggregations" } } }
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" } ] } }