# pub.chive.eprint.listDataLinks

> Published by [lexicons.governance.chive.pub](https://lexicon.garden/identity/did:plc:egjghlwgts2hlcer2txilxeh)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:egjghlwgts2hlcer2txilxeh/pub.chive.eprint.listDataLinks)
- [Documentation](https://lexicon.garden/lexicon/did:plc:egjghlwgts2hlcer2txilxeh/pub.chive.eprint.listDataLinks/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:egjghlwgts2hlcer2txilxeh/pub.chive.eprint.listDataLinks/examples)

## Definitions

### `pub.chive.eprint.listDataLinks#dataLinkView`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `catalogRef` | `string` (at-uri) | No | The pub.layers.catalog.collection record for the dataset as a whole. A dataset need not have a corpus -- one made of judgments or expressions has none -- so this, not corpusRef, is what names the dataset a reader wants. |
| `corpusRef` | `string` (at-uri) | No | The pub.layers.corpus.corpus record, when the dataset is a corpus. |
| `createdAt` | `string` (datetime) | No |  |
| `dataKind` | `string` | Yes | Data kind slug, as Layers records it |
| `dataKindUri` | `string` (at-uri) | No | Knowledge graph node for the data kind, when Layers resolved one |
| `description` | `string` | No |  |
| `experimentRefs` | `array` | No | pub.layers.judgment.experimentDef records the eprint produced or describes. |
| `paperSection` | `string` | No | Which part of the paper the data belongs to, such as 'Table 3' |
| `uri` | `string` (at-uri) | Yes | AT-URI of the dataLink record in its author's repository |

### `pub.chive.eprint.listDataLinks`

**Type**: `query`

List Layers datasets linked to an eprint. Chive does not index pub.layers.eprint.dataLink records; it asks the Layers AppView, which is authoritative for them, and caches the answer briefly. Returns an empty list when Layers is unreachable, so an eprint page never depends on another service being up.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `eprintUri` | `string` (at-uri) | Yes | AT-URI of the eprint whose data links to list |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `dataLinks` | `array` | Yes |  |
| `source` | `string` | Yes | Where the answer came from, so a client can tell an empty list from an unavailable one. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "dataLinkView": {
      "properties": {
        "catalogRef": {
          "description": "The pub.layers.catalog.collection record for the dataset as a whole. A dataset need not have a corpus -- one made of judgments or expressions has none -- so this, not corpusRef, is what names the dataset a reader wants.",
          "format": "at-uri",
          "type": "string"
        },
        "corpusRef": {
          "description": "The pub.layers.corpus.corpus record, when the dataset is a corpus.",
          "format": "at-uri",
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "dataKind": {
          "description": "Data kind slug, as Layers records it",
          "maxLength": 128,
          "type": "string"
        },
        "dataKindUri": {
          "description": "Knowledge graph node for the data kind, when Layers resolved one",
          "format": "at-uri",
          "type": "string"
        },
        "description": {
          "maxLength": 10000,
          "type": "string"
        },
        "experimentRefs": {
          "description": "pub.layers.judgment.experimentDef records the eprint produced or describes.",
          "items": {
            "format": "at-uri",
            "type": "string"
          },
          "type": "array"
        },
        "paperSection": {
          "description": "Which part of the paper the data belongs to, such as 'Table 3'",
          "maxLength": 256,
          "type": "string"
        },
        "uri": {
          "description": "AT-URI of the dataLink record in its author's repository",
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "dataKind"
      ],
      "type": "object"
    },
    "main": {
      "description": "List Layers datasets linked to an eprint. Chive does not index pub.layers.eprint.dataLink records; it asks the Layers AppView, which is authoritative for them, and caches the answer briefly. Returns an empty list when Layers is unreachable, so an eprint page never depends on another service being up.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "dataLinks": {
              "items": {
                "ref": "#dataLinkView",
                "type": "ref"
              },
              "type": "array"
            },
            "source": {
              "description": "Where the answer came from, so a client can tell an empty list from an unavailable one.",
              "knownValues": [
                "layers",
                "cache",
                "unavailable"
              ],
              "type": "string"
            }
          },
          "required": [
            "dataLinks",
            "source"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "eprintUri": {
            "description": "AT-URI of the eprint whose data links to list",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "eprintUri"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "pub.chive.eprint.listDataLinks",
  "lexicon": 1,
  "revision": 1
}
```
