# net.atpix.gallery.listCollectionRules

> Published by [lexicon.atpix.net](https://lexicon.garden/identity/did:plc:x4crpdfko2d7xrcd5eovpwex)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:x4crpdfko2d7xrcd5eovpwex/net.atpix.gallery.listCollectionRules)
- [Documentation](https://lexicon.garden/lexicon/did:plc:x4crpdfko2d7xrcd5eovpwex/net.atpix.gallery.listCollectionRules/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:x4crpdfko2d7xrcd5eovpwex/net.atpix.gallery.listCollectionRules/examples)

## Definitions

### `net.atpix.gallery.listCollectionRules`

**Type**: `query`

List collection rules owned by the authenticated user.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `limit` | `integer` | No |  |
| `cursor` | `string` | No |  |
| `activeOnly` | `boolean` | No |  |
| `targetScope` | `ref` → `net.atpix.gallery.defs#targetScope` | No |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `rules` | `array` | Yes |  |
| `cursor` | `string` | No |  |

## Raw Schema

```json
{
  "id": "net.atpix.gallery.listCollectionRules",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "rules"
          ],
          "properties": {
            "rules": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "uri",
                  "cid",
                  "author",
                  "record"
                ],
                "properties": {
                  "cid": {
                    "type": "string",
                    "format": "cid"
                  },
                  "uri": {
                    "type": "string",
                    "format": "at-uri"
                  },
                  "author": {
                    "type": "string",
                    "format": "did"
                  },
                  "record": {
                    "type": "object",
                    "required": [
                      "name",
                      "targetScope",
                      "createdAt"
                    ],
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "active": {
                        "type": "boolean"
                      },
                      "hashtags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "datetime"
                      },
                      "modifiedAt": {
                        "type": "string",
                        "format": "datetime"
                      },
                      "description": {
                        "type": "string"
                      },
                      "targetScope": {
                        "ref": "net.atpix.gallery.defs#targetScope",
                        "type": "ref"
                      },
                      "followedActors": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "did"
                        }
                      },
                      "targetAlbumUri": {
                        "type": "string",
                        "format": "at-uri"
                      },
                      "useFollowGraph": {
                        "type": "boolean"
                      },
                      "includeOwnPhotos": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            },
            "cursor": {
              "type": "string"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "limit": {
            "type": "integer",
            "default": 20,
            "maximum": 100,
            "minimum": 1
          },
          "cursor": {
            "type": "string"
          },
          "activeOnly": {
            "type": "boolean",
            "default": true
          },
          "targetScope": {
            "ref": "net.atpix.gallery.defs#targetScope",
            "type": "ref"
          }
        }
      },
      "description": "List collection rules owned by the authenticated user."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
