# Read Record

##

<figure><img src="/files/MsrPEReZtRKDbiPGzI6Y" alt="" width="375"><figcaption></figcaption></figure>

1. The location owner optionally publishes the location
2. Anyone who has the location can read just the headers or the full record
3. They can use any industry-standard third-party tools

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

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

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

{% endtab %}

{% tab title="JavaScript" %}

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

{% endtab %}
{% endtabs %}

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

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

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

{% endtab %}

{% tab title="JavaScript" %}

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

{% endtab %}
{% endtabs %}

## **Read Encoded Record**

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

{% code overflow="wrap" %}

```http
content-length: 32
content-type: application/nce-fingerprint-sha256v2|Base64
date: Tue,02 Jan 2024 13:14:27 GMT
server: nginx/1.18.0 (Ubuntu) 
```

{% endcode %}

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

{% code overflow="wrap" %}

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

{% endcode %}

You can compare this to the final "output" in the response from the write record command.

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 Record** [**‡**](/nchain-event/overview/configuration-symbols.md)

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

{% code overflow="wrap" %}

```http
content-length: 7  
content-type: application/octet-stream  
date: Tue,02 Jan 2024 13:15:31 GMT  
server: Kestrel 
```

{% endcode %}

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

{% code overflow="wrap" %}

```http
hello 
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.teranode.group/nchain-event/independent-records/api-workflow/read-record.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
