---
title: "Search contract rules by tag"
method: GET
path: "/search/contract/rules"
tags: ["Search", "Contracts"]
---

# Search contract rules by tag

`GET /search/contract/rules`

Returns all contract rules across all artifacts that contain the specified tag.

## Query parameters

- `tag` string, required

## Response `200`

A list of contract rules matching the specified tag, with their artifact coordinates.

- ContractRuleSearchResult[]
  - `groupId` string — The group ID of the artifact containing the rule.
  - `artifactId` string — The artifact ID containing the rule.
  - `globalId` integer — The global ID of the version (null for artifact-level rules).
  - `ruleCategory` 'DOMAIN' | 'MIGRATION' — The rule category (DOMAIN or MIGRATION).
  - `rule` ContractRule — A single contract rule definition.
    - `name` string, required — The rule name.
    - `kind` 'CONDITION' | 'TRANSFORM', required — The rule kind.
    - `type` string, required — Rule executor type (CEL, CEL_FIELD, ENCRYPT, etc.).
    - `mode` 'WRITE' | 'READ' | 'WRITEREAD' | 'UPGRADE' | 'DOWNGRADE', required — When the rule is applied.
    - `expr` string — The rule expression.
    - `params` object — Rule parameters.
    - `tags` string[] — Tags for categorizing the rule.
    - `onSuccess` 'NONE' | 'ERROR' | 'DLQ' — Action on rule success.
    - `onFailure` 'NONE' | 'ERROR' | 'DLQ' — Action on rule failure.
    - `disabled` boolean — Whether the rule is disabled.

## Other responses

- `400` — Common response for all operations that can return a `400` error.
- `500` — Common response for all operations that can fail with an unexpected server error.

---

[API](https://skmtc.net/apicurio/apis/apicurio-registry-api-v3.md) · [All operations](https://skmtc.net/apicurio/apis/apicurio-registry-api-v3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/apicurio/apicurio-registry-api-v3/revisions/c39cb56d7dbc/schema)
