---
title: policyRulesList query | Wartiva GraphQL API
description: Lists a page of the organization's policy rules, sorted by name and then by creation time, optionally limited to one rule group. Deleted rules are not listed.
url: https://wartiva.com/api-docs/queries/policy-rules-list.html
updated: 2026-10-07
---

Policies and findings · GraphQL query

# `policyRulesList` query

Lists a page of the organization's policy rules, sorted by name and then by creation time, optionally limited to one rule group. Deleted rules are not listed. A rule describes a check evaluated against graph objects; a failing check produces a [Finding](https://wartiva.com/api-docs/types/finding.html) and an [Issue](https://wartiva.com/api-docs/types/issue.html). Manage rules with [policyRulesAdd](https://wartiva.com/api-docs/mutations/policy-rules-add.html), [policyRulesEdit](https://wartiva.com/api-docs/mutations/policy-rules-edit.html), and [policyRulesRemove](https://wartiva.com/api-docs/mutations/policy-rules-remove.html).

## Response

Returns a [`RulesListPayload!`](https://wartiva.com/api-docs/types/rules-list-payload.html)

## Arguments

| Name | Description |
|---|---|
| `orgId` - [`OrganizationId!`](https://wartiva.com/api-docs/types/organization-id.html) | The Organization identifier. |
| `input` - [`RulesListInput!`](https://wartiva.com/api-docs/types/rules-list-input.html) | Filter and pagination input. |
| `mockOptions` - [`MockDataInput`](https://wartiva.com/api-docs/types/mock-data-input.html) | When enabled, returns mock rules from the mock policy service instead of the real store. |

## Example

### Query

```graphql
query policyRulesList(
  $orgId: OrganizationId!,
  $input: RulesListInput!,
  $mockOptions: MockDataInput
) {
  policyRulesList(
    orgId: $orgId,
    input: $input,
    mockOptions: $mockOptions
  ) {
    rules {
      id
      orgId
      objectType
      objectTypeLabel
      displayName
      firstSeen
      lastSeen
      seen {
        ...SeenOnlineFragment
      }
      createdAt
      updatedAt
      snapshotInfo {
        ...GraphObjectSnapshotInfoFragment
      }
      group
      source
      applyTo
      applyToOptions {
        ...RuleApplyToOptionFragment
      }
      osNeutral
      name
      discoveryName
      description
      notes
      enabled
      severity
      type
      body {
        ... on RuleBodyConfiguration {
          ...RuleBodyConfigurationFragment
        }
        ... on RuleBodyFile {
          ...RuleBodyFileFragment
        }
        ... on RuleBodyProprietary {
          ...RuleBodyProprietaryFragment
        }
        ... on RuleBodySearch {
          ...RuleBodySearchFragment
        }
        ... on RuleBodyThreshold {
          ...RuleBodyThresholdFragment
        }
        ... on RuleBodyVulnerability {
          ...RuleBodyVulnerabilityFragment
        }
      }
      schedule {
        ...ScheduleFragment
      }
      mockOptions {
        ...MockDataOptionFragment
      }
      lastMockDataInput
      remediationInstructions {
        ...RemediationInstructionsFragment
      }
      securityFrameworks {
        ...SecurityFrameworkReferenceFragment
      }
      risks
      tactics
      createdBy {
        ...UserFragment
      }
      findings {
        ...FindingsPayloadFragment
      }
      issues {
        ...IssuesPayloadFragment
      }
      issuesSummary {
        ...IssuesSummaryFragment
      }
    }
    totalCount
  }
}

```

### Variables

```json
{
  "orgId": "615f3b3b28284380e28a7342",
  "input": RulesListInput,
  "mockOptions": MockDataInput
}

```

### Response

```json
{
  "data": {
    "policyRulesList": {
      "rules": [Rule],
      "totalCount": "-8589934592"
    }
  }
}

```

---

Wartiva is in early access. Request access: https://wartiva.com/early-access.html  
All pages: https://wartiva.com/llms.txt
