> For the complete documentation index, see [llms.txt](https://docs.teranode.group/nchain-event/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.teranode.group/nchain-event/linked-records/api-workflow/read-link-record.md).

# Read Link Record §

##

<figure><img src="/files/gJY5yxZrW4uOOCAHrv2j" alt="" width="563"><figcaption></figcaption></figure>

* The location owner optionally publishes the link location
* Anyone who has the location can read just the headers or the full record
* They can use any industry-standard tool

#### **Example** headers **code:**

{% tabs %}
{% tab title="cURL" %}

```bash
curl --head $URL/api/v1/linkedrecords/$LOC/content \
     -H "x-api-key: $KEY" \
     -H "accept: */*"
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const response = await fetch('${url}/api/v1/linkedrecords/${loc}/content', {
  method: 'HEAD',
  headers: {
    'x-api-key': '$KEY',
    'accept': '*/*'
  }
});
```

{% endtab %}
{% endtabs %}

#### **Example record** **code:**

{% tabs %}
{% tab title="cURL" %}

```bash
curl $URL/api/v1/linkedrecords/$LOC/content \
     -H "x-api-key: $KEY" \
     -H "accept: text/plain"
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const response = await fetch('${url}/api/v1/linkedrecords/${loc}/content', {
  headers: {
    'x-api-key': '${key}',
    'accept': 'text/plain'
  }
});
```

{% endtab %}
{% endtabs %}

## **Read Encoded Link**

#### **Example** cURL headers **response:**

{% code overflow="wrap" %}

```http
content-length: 44
content-type: text/plain; event-encoded=Sha256v2|Base64
date: Tue,02 Jan 2024 14:15:41 GMT
server: nginx/1.18.0 (Ubuntu)
```

{% endcode %}

#### **Example** cURL **record** **response:**

{% code overflow="wrap" %}

```
ytfc5c5wv0V7hOo....G1ucRFzSIe6rw=
```

{% endcode %}

To find out whether the resultant fingerprint is valid, the user also needs the original record and the encoding method plus any salt used.

## **Read Unencoded Link** ‡

#### **Example** cURL headers **response:**

{% code overflow="wrap" %}

```http
content-length: 6
content-type: application/octet-stream
date: Tue,02 Jan 2024 14:18:52 GMT
server: nginx/1.18.0 (Ubuntu)
```

{% endcode %}

#### **Example** cURL **record** **response:**

{% code overflow="wrap" %}

```
hello
```

{% endcode %}
