# com.atproto.sync.listReposByCollection

> Published by [microcosm.blue](https://lexicon.garden/identity/did:plc:lulmyldiq4sb2ikags5sfb25)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:lulmyldiq4sb2ikags5sfb25/com.atproto.sync.listReposByCollection)
- [Documentation](https://lexicon.garden/lexicon/did:plc:lulmyldiq4sb2ikags5sfb25/com.atproto.sync.listReposByCollection/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:lulmyldiq4sb2ikags5sfb25/com.atproto.sync.listReposByCollection/examples)

## Definitions

### `com.atproto.sync.listReposByCollection`

**Type**: `query`

Enumerates all the active DIDs which have records in any of the given collection NSIDs. If omitted, active DIDs from all collections are returned.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `limit` | `integer` | No | Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists. |
| `cursor` | `string` | No |  |
| `collection` | `array` | No |  |

#### Output

**Encoding**: `application/json`

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

### `com.atproto.sync.listReposByCollection#repo`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes |  |

## Raw Schema

```json
{
  "id": "com.atproto.sync.listReposByCollection",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "repos"
          ],
          "properties": {
            "repos": {
              "type": "array",
              "items": {
                "ref": "#repo",
                "type": "ref"
              }
            },
            "cursor": {
              "type": "string"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [],
        "properties": {
          "limit": {
            "type": "integer",
            "default": 500,
            "maximum": 2000,
            "minimum": 1,
            "description": "Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists."
          },
          "cursor": {
            "type": "string"
          },
          "collection": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "nsid"
            }
          }
        }
      },
      "description": "Enumerates all the active DIDs which have records in any of the given collection NSIDs. If omitted, active DIDs from all collections are returned."
    },
    "repo": {
      "type": "object",
      "required": [
        "did"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
