---
title: "List match rules"
method: GET
path: "/v1/contexts/{contextId}/rules"
tags: ["Configuration Match Rules"]
---

# List match rules

`GET /v1/contexts/{contextId}/rules`

Use this endpoint to retrieve all match rules under a specific context. You can filter the results by rule type. The response uses cursor-based pagination.

## Path parameters

- `contextId` string, required

## Query parameters

- `limit` integer
- `cursor` string
- `type` 'EXACT' | 'TOLERANCE' | 'DATE_LAG'

## Headers

- `X-Request-Id` string

## Response `200`

List of match rules with cursor pagination

- ListMatchRulesResponse — Cursor-paginated list of match rules
  - `hasMore` boolean
  - `items` MatchRuleResponse[] — List of match rules
    - `config` object — Rule configuration
    - `contextId` string — Context ID this rule belongs to
    - `createdAt` string — Creation timestamp in RFC3339 format
    - `id` string — Unique identifier for the rule
    - `priority` integer — Execution priority (lower = higher priority)
    - `type` 'EXACT' | 'TOLERANCE' | 'DATE_LAG' — Type of matching rule
    - `updatedAt` string — Last update timestamp in RFC3339 format
  - `limit` integer
  - `nextCursor` string
  - `prevCursor` string

## Other responses

- `400` — Invalid query parameters
- `401` — The request lacks valid authentication credentials.
- `403` — You do not have permission to access this resource.
- `404` — Context not found
- `500` — An unexpected error occurred on the server.

---

[API](https://skmtc.net/lerian/apis/identity-plugin.md) · [All operations](https://skmtc.net/lerian/apis/identity-plugin/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lerian/identity-plugin/versions/25daba385532/schema)
