Skip to content

GraphQL Overview

Download GraphQL schema

Queries

Overview

policies

(...args)

Get a list of policies with optional filtering and sorting

Arguments

orderBy
limit
Int
Default:100
offset
Int
Default:0

Return type

PoliciesResponse!
items
[Policy!]!,non-null

List of policies matching the filter

total
Int!,non-null

Total count of policies matching the filter (ignoring pagination)

aggregations

Aggregated statistics for the filtered policies (computed lazily via field resolver)

Query sample
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
    }
  }
}
Variables
{ "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 }
Response sample
{ "data": { "items": [ { "__typename": "Policy" } ], "total": 40, "aggregations": { "__typename": "PolicyAggregations" } } }

policy

(id)

Get a specific policy by ID

Arguments

id
ID!,non-nullrequired

Return type

Policy
id
ID!,non-null

Unique identifier for the policy

name
String!,non-null

Policy name

description
String

Detailed description of what the policy does

mode
PolicyMode!,non-null

Current enforcement mode of the policy

status
PolicyStatus!,non-null

Current status of the policy

trigger

Event that triggers policy evaluation

conditions

Conditions that must be met for the policy to match

actions

Actions to execute when policy conditions match

autoResolve
Boolean!,non-null

Automatically resolve issues when conditions are no longer met

isDefault
Boolean!,non-null

Indicates if this policy is a system default or custom/modified by the tenant

issuesCount
Int!,non-null

Number of issues created by this policy

lastExecutedAt

When the policy was last executed

createdAt
DateTime!,non-null

When the policy was created

updatedAt
DateTime!,non-null

When the policy was last updated

createdBy

User who created the policy

updatedBy

User who last updated the policy

version
Int!,non-null

Version number, incremented on each update

deletedAt

When the policy was soft-deleted (null if active)

environmentTypes

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 sample
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 
  }
}
Variables
{ "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4" }
Response sample
{ "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" ] } }

testPolicy

(...args)

Test policy conditions against current data without creating a policy

Arguments

trigger
PolicyTriggerInput!,non-nullrequired
conditions

Return type

TestPolicyResult!
AgentTestPolicyResult

Result of testing agent-based policy conditions. Shows preview of agents that would be impacted by this policy.

Query sample
query testPolicy($trigger: PolicyTriggerInput!, $conditions: PolicyConditionGroupInput!) {
  testPolicy(trigger: $trigger, conditions: $conditions) {
    matchingAgents {
      __typename
      # ...AgentFragment
    }
    totalMatches 
  }
}
Variables
{ "trigger": { "type": "AGENT_CREATED" }, "conditions": { "agentFilter": { "__typename": "AgentFilter" }, "toolFilter": { "__typename": "ToolFilterInput" }, "findingFilter": { "__typename": "FindingFilter" }, "detectionFilter": { "__typename": "DetectionFilter" }, "groups": [ { "__typename": "PolicyConditionGroupInput" } ] } }
Response sample
{ "data": { "matchingAgents": [ { "__typename": "Agent" } ], "totalMatches": 40 } }

policyTriggerTypes

(triggerType)

Get available trigger types for building policy UI dynamically. Optional triggerType parameter for future filtering support.

Arguments

Return type

[PolicyTriggerType!]!
AGENT_CREATED
AGENT_UPDATED
TOOL_INVOCATION
USER_MESSAGE
Query sample
query policyTriggerTypes($triggerType: PolicyTriggerType) {
  policyTriggerTypes(triggerType: $triggerType) 
}
Variables
{ "triggerType": "AGENT_CREATED" }
Response sample
{ "data": [ "AGENT_CREATED" ] }

policyActionTypes

(triggerType)

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

[PolicyActionType!]!
CREATE_ISSUE
REALTIME_PREVENTION
Query sample
query policyActionTypes($triggerType: PolicyTriggerType) {
  policyActionTypes(triggerType: $triggerType) 
}
Variables
{ "triggerType": "AGENT_CREATED" }
Response sample
{ "data": [ "CREATE_ISSUE" ] }

policyFilterOptions

Get filter options for policies including dynamic ranges for numeric and date fields. Returns min/max values for issuesCount, and lastExecutedAt.

Return type

PolicyFilterOptions!
issuesCountRange
IntRange!,non-null

Range of issues count across all policies

lastExecutedAtRange

Range of last executed dates across all policies

Query sample
query policyFilterOptions {
  policyFilterOptions {
    issuesCountRange {
      __typename
      # ...IntRangeFragment
    }
    lastExecutedAtRange {
      __typename
      # ...DateTimeRangeFragment
    }
  }
}
Response sample
{ "data": { "issuesCountRange": { "__typename": "IntRange" }, "lastExecutedAtRange": { "__typename": "DateTimeRange" } } }

previewPolicyImpact

(...args)

Preview the impact of a policy before applying it. Shows matching entities and estimated issue impact (create/update/close counts).

Arguments

trigger
PolicyTriggerInput!,non-nullrequired
conditions
autoResolve
Boolean!,non-nullrequired
policyId
ID

Return type

PolicyImpactPreview!
matchingEntities

Entities that match the policy conditions

Query sample
query previewPolicyImpact(
  $trigger: PolicyTriggerInput!
  $conditions: PolicyConditionGroupInput!
  $autoResolve: Boolean!
  $policyId: ID
) {
  previewPolicyImpact(
    trigger: $trigger
    conditions: $conditions
    autoResolve: $autoResolve
    policyId: $policyId
  ) {
    matchingEntities {
      __typename
      # ...MatchingEntityGroupFragment
    }
  }
}
Variables
{ "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" }
Response sample
{ "data": { "matchingEntities": [ { "__typename": "MatchingEntityGroup" } ] } }

generatePolicyMetadata

(...args)

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

trigger
PolicyTriggerInput!,non-nullrequired
conditions
autoResolve
Boolean!,non-nullrequired

Return type

PolicyMetadata
title
String!,non-null

AI-generated title for the policy (5-8 words)

description
String!,non-null

AI-generated description explaining what this policy does (1-3 sentences)

Query sample
query generatePolicyMetadata(
  $trigger: PolicyTriggerInput!
  $conditions: PolicyConditionGroupInput!
  $autoResolve: Boolean!
  $field: PolicyMetadataField
) {
  generatePolicyMetadata(
    trigger: $trigger
    conditions: $conditions
    autoResolve: $autoResolve
    field: $field
  ) {
    title 
    description 
  }
}
Variables
{ "trigger": { "type": "AGENT_CREATED" }, "conditions": { "agentFilter": { "__typename": "AgentFilter" }, "toolFilter": { "__typename": "ToolFilterInput" }, "findingFilter": { "__typename": "FindingFilter" }, "detectionFilter": { "__typename": "DetectionFilter" }, "groups": [ { "__typename": "PolicyConditionGroupInput" } ] }, "autoResolve": true, "field": "NAME" }
Response sample
{ "data": { "title": "Example String", "description": "Example String" } }

users

[User!]!,non-null

Get a list of users with optional filtering and sorting

Return type

[User!]!
id
ID!,non-null
firstName
String
lastName
String
email
String!,non-null
role
UserRole!,non-null
createdAt
DateTime!,non-null
updatedAt
DateTime!,non-null
status
UserStatus!,non-null
Query sample
query users {
  users {
    id 
    firstName 
    lastName 
    email 
    role 
    createdAt 
    updatedAt 
    status 
  }
}
Response sample
{ "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" } ] }

exportUsers

(type)
String!,non-null

Export users with same filtering and sorting as users query

Arguments

type
ExportType!,non-nullrequired

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 sample
query exportUsers($type: ExportType!) {
  exportUsers(type: $type) 
}
Variables
{ "type": "CSV" }
Response sample
{ "data": "Example String" }

organizationConfiguration

Get SSO configuration for an organization

Return type

OrganizationConfiguration!
id
ID!,non-null
name
String!,non-null
Query sample
query organizationConfiguration {
  organizationConfiguration {
    id 
    name 
    ssoConfig {
      __typename
      # ...OrganizationSSOConfigurationFragment
    }
  }
}
Response sample
{ "data": { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "name": "Example String", "ssoConfig": { "__typename": "OrganizationSSOConfiguration" } } }

Mutations

Overview

Objects

Overview

Interfaces

Overview

Unions

Overview

Enums

Overview

Inputs

Overview

Scalars

Overview