# pub.chive.collection.getMarginAnnotations

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.collection.getMarginAnnotations)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.collection.getMarginAnnotations/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.collection.getMarginAnnotations/examples)

## Definitions

### `pub.chive.collection.getMarginAnnotations`

**Type**: `query`

Get Margin annotations (at.margin.annotation, at.margin.highlight) targeting a Chive eprint

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `limit` | `integer` | No | Maximum results to return |
| `cursor` | `string` | No | Pagination cursor |
| `eprintUri` | `string` | Yes | AT-URI of the eprint to get annotations for |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `total` | `integer` | No |  |
| `cursor` | `string` | No |  |
| `hasMore` | `boolean` | No |  |
| `annotations` | `array` | Yes |  |

### `pub.chive.collection.getMarginAnnotations#annotationView`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` | Yes | AT-URI of the annotation record |
| `body` | `string` | No | Annotation body text |
| `tags` | `array` | No |  |
| `color` | `string` | No | Highlight color |
| `authorDid` | `string` | Yes | DID of the annotation author |
| `createdAt` | `string` (datetime) | Yes |  |
| `pageTitle` | `string` | No | Page title at annotation time |
| `bodyFormat` | `string` | No | Body MIME type |
| `motivation` | `string` | No | W3C annotation motivation |
| `recordType` | `string` | Yes | Record type: annotation or highlight |

## Raw Schema

```json
{
  "id": "pub.chive.collection.getMarginAnnotations",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "annotations"
          ],
          "properties": {
            "total": {
              "type": "integer"
            },
            "cursor": {
              "type": "string"
            },
            "hasMore": {
              "type": "boolean"
            },
            "annotations": {
              "type": "array",
              "items": {
                "ref": "#annotationView",
                "type": "ref"
              }
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "eprintUri"
        ],
        "properties": {
          "limit": {
            "type": "integer",
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "description": "Maximum results to return"
          },
          "cursor": {
            "type": "string",
            "description": "Pagination cursor"
          },
          "eprintUri": {
            "type": "string",
            "description": "AT-URI of the eprint to get annotations for"
          }
        }
      },
      "description": "Get Margin annotations (at.margin.annotation, at.margin.highlight) targeting a Chive eprint"
    },
    "annotationView": {
      "type": "object",
      "required": [
        "uri",
        "authorDid",
        "recordType",
        "createdAt"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "description": "AT-URI of the annotation record"
        },
        "body": {
          "type": "string",
          "description": "Annotation body text"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "color": {
          "type": "string",
          "description": "Highlight color"
        },
        "authorDid": {
          "type": "string",
          "description": "DID of the annotation author"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime"
        },
        "pageTitle": {
          "type": "string",
          "description": "Page title at annotation time"
        },
        "bodyFormat": {
          "type": "string",
          "description": "Body MIME type"
        },
        "motivation": {
          "type": "string",
          "description": "W3C annotation motivation"
        },
        "recordType": {
          "type": "string",
          "description": "Record type: annotation or highlight"
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
