---
title: "List the rules"
method: GET
path: "/api/ab/rules"
tags: ["address book"]
---

# List the rules

`GET /api/ab/rules`

This function is an API endpoint that lists the rules attached to a shared address book. It is tagged with "address book" for OpenAPI documentation.

## Parameters

- `current`: The current page number for pagination. This parameter is currently unused.

- `pageSize`: The number of items per page for pagination. This parameter is currently unused.

- `ab`: The identifier of the shared address book.

## Returns

If successful, this function returns a `Json<AbRulesResponse>` object containing the rules for the address book.  <br> If the address book does not exist or the user is not authorized to access it, this function returns a `status::Unauthorized` error.  <br>

## Errors

This function will return an error if the system is in maintenance mode, or if the address book does not exist or the user is not authorized to access it.

## Query parameters

- `current` integer, required
- `pageSize` integer, required
- `ab` string, required

## Response `200`

- AbRulesResponse
  - `msg` string, required
  - `total` integer, required
  - `data` AbRule[], required
    - `guid` string, required
    - `user` string, nullable
    - `group` string, nullable
    - `rule` integer, required

## Other responses

- `401`

## Changes

- **2024-05-31** `12b1b72bc3f3` — 1 info
  - endpoint added
- **2024-05-19** `fafd43b82c78` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/nesaku/apis/sctgdesk-api-server/changes/api/ab/rules/get.md)

---

[API](https://skmtc.dev/nesaku/apis/sctgdesk-api-server.md) · [All operations](https://skmtc.dev/nesaku/apis/sctgdesk-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nesaku/sctgdesk-api-server/revisions/b1c0e7a4434f/schema)
