# pub.chive.eprint.listRelatedWorks

> 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.eprint.listRelatedWorks)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.eprint.listRelatedWorks/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.eprint.listRelatedWorks/examples)

## Definitions

### `pub.chive.eprint.listRelatedWorks`

**Type**: `query`

List user-curated related works for an eprint

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `limit` | `integer` | No | Maximum number of related works to return |
| `cursor` | `string` | No | Pagination cursor |
| `eprintUri` | `string` (at-uri) | Yes | AT-URI of the eprint to list related works for |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `total` | `integer` | No | Total number of related works |
| `cursor` | `string` | No | Pagination cursor for next page |
| `relatedWorks` | `array` | Yes |  |

### `pub.chive.eprint.listRelatedWorks#relatedWorkView`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes | AT-URI of the related work record |
| `createdAt` | `string` (datetime) | Yes | When this related work link was created |
| `curatorDid` | `string` (did) | Yes | DID of the user who created this link |
| `description` | `string` | No | Description of the relationship |
| `targetTitle` | `string` | No | Title of the related eprint (resolved from index) |
| `relationType` | `string` | Yes | Type of relationship |
| `sourceEprintUri` | `string` (at-uri) | Yes | AT-URI of the source eprint |
| `targetEprintUri` | `string` (at-uri) | Yes | AT-URI of the related eprint |

## Raw Schema

```json
{
  "id": "pub.chive.eprint.listRelatedWorks",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "relatedWorks"
          ],
          "properties": {
            "total": {
              "type": "integer",
              "description": "Total number of related works"
            },
            "cursor": {
              "type": "string",
              "description": "Pagination cursor for next page"
            },
            "relatedWorks": {
              "type": "array",
              "items": {
                "ref": "#relatedWorkView",
                "type": "ref"
              }
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "eprintUri"
        ],
        "properties": {
          "limit": {
            "type": "integer",
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "description": "Maximum number of related works to return"
          },
          "cursor": {
            "type": "string",
            "description": "Pagination cursor"
          },
          "eprintUri": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the eprint to list related works for"
          }
        }
      },
      "description": "List user-curated related works for an eprint"
    },
    "relatedWorkView": {
      "type": "object",
      "required": [
        "uri",
        "sourceEprintUri",
        "targetEprintUri",
        "relationType",
        "curatorDid",
        "createdAt"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of the related work record"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime",
          "description": "When this related work link was created"
        },
        "curatorDid": {
          "type": "string",
          "format": "did",
          "description": "DID of the user who created this link"
        },
        "description": {
          "type": "string",
          "description": "Description of the relationship"
        },
        "targetTitle": {
          "type": "string",
          "description": "Title of the related eprint (resolved from index)"
        },
        "relationType": {
          "type": "string",
          "description": "Type of relationship"
        },
        "sourceEprintUri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of the source eprint"
        },
        "targetEprintUri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of the related eprint"
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
