---
title: policyRulesExport mutation | Wartiva GraphQL API
description: Writes the group's rules to an export file in storage, overwriting any existing file. Wartiva GraphQL API reference with arguments, fields, and examples.
url: https://wartiva.com/api-docs/mutations/policy-rules-export.html
updated: 2026-10-07
---

Policies and findings · GraphQL mutation

# `policyRulesExport` mutation

Writes the group's rules to an export file in storage, overwriting any existing file.

## Response

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

## Arguments

| Name | Description |
|---|---|
| `orgId` - [`OrganizationId!`](https://wartiva.com/api-docs/types/organization-id.html) | The Organization identifier. |
| `input` - [`RulesExportInput!`](https://wartiva.com/api-docs/types/rules-export-input.html) | Selects which group's rules to export. |

## Example

### Query

```graphql
mutation policyRulesExport(
  $orgId: OrganizationId!,
  $input: RulesExportInput!
) {
  policyRulesExport(
    orgId: $orgId,
    input: $input
  ) {
    group
  }
}

```

### Variables

```json
{
  "orgId": "615f3b3b28284380e28a7342",
  "input": RulesExportInput
}

```

### Response

```json
{
  "data": {
    "policyRulesExport": {"group": "abc123"}
  }
}

```

---

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