> For the complete documentation index, see [llms.txt](https://handbook.joystream.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://handbook.joystream.org/system/storage/storage-node.md).

# Storage Node

Storage nodes accept user uploads and do long term archiving of user data objects, as well as share these objects with bandwidth nodes which do low latency last mile on-demand delivery.

## Preamble

This document is not yet complete and is primarily informed by the following more comprehensive documentation

{% embed url="<https://github.com/Joystream/joystream/tree/giza_staging/storage-node-v2>" %}

## Introduction

WIP.

## API

### files/{id}

#### GET

Returns a media file.

{% openapi src="<https://raw.githubusercontent.com/Joystream/joystream/giza_staging/storage-node-v2/src/api-spec/openapi.yaml>" path="/files/{id}" method="get" %}
<https://raw.githubusercontent.com/Joystream/joystream/giza_staging/storage-node-v2/src/api-spec/openapi.yaml>
{% endopenapi %}

#### HEAD

Returns media file headers.

{% openapi src="<https://raw.githubusercontent.com/Joystream/joystream/giza_staging/storage-node-v2/src/api-spec/openapi.yaml>" path="undefined" method="undefined" %}
<https://raw.githubusercontent.com/Joystream/joystream/giza_staging/storage-node-v2/src/api-spec/openapi.yaml>
{% endopenapi %}

### files

Upload data.

{% openapi src="<https://raw.githubusercontent.com/Joystream/joystream/giza_staging/storage-node-v2/src/api-spec/openapi.yaml>" path="/files" method="post" %}
<https://raw.githubusercontent.com/Joystream/joystream/giza_staging/storage-node-v2/src/api-spec/openapi.yaml>
{% endopenapi %}

### authToken

Get auth token.

{% openapi src="<https://raw.githubusercontent.com/Joystream/joystream/giza_staging/storage-node-v2/src/api-spec/openapi.yaml>" path="/authToken" method="post" %}
<https://raw.githubusercontent.com/Joystream/joystream/giza_staging/storage-node-v2/src/api-spec/openapi.yaml>
{% endopenapi %}

### state/data-objects

Returns all local data objects.

{% openapi src="<https://raw.githubusercontent.com/Joystream/joystream/giza_staging/storage-node-v2/src/api-spec/openapi.yaml>" path="/state/data-objects" method="get" %}
<https://raw.githubusercontent.com/Joystream/joystream/giza_staging/storage-node-v2/src/api-spec/openapi.yaml>
{% endopenapi %}

### state/bags/{bagId}/data-objects

Returns local data objects for a bag.

{% openapi src="<https://raw.githubusercontent.com/Joystream/joystream/giza_staging/storage-node-v2/src/api-spec/openapi.yaml>" path="/state/bags/{bagId}/data-objects" method="get" %}
<https://raw.githubusercontent.com/Joystream/joystream/giza_staging/storage-node-v2/src/api-spec/openapi.yaml>
{% endopenapi %}

### version

Returns server version.

{% openapi src="<https://raw.githubusercontent.com/Joystream/joystream/giza_staging/storage-node-v2/src/api-spec/openapi.yaml>" path="/version" method="get" %}
<https://raw.githubusercontent.com/Joystream/joystream/giza_staging/storage-node-v2/src/api-spec/openapi.yaml>
{% endopenapi %}

### state/data

Returns local uploading directory stats.

{% openapi src="<https://raw.githubusercontent.com/Joystream/joystream/giza_staging/storage-node-v2/src/api-spec/openapi.yaml>" path="/state/data" method="get" %}
<https://raw.githubusercontent.com/Joystream/joystream/giza_staging/storage-node-v2/src/api-spec/openapi.yaml>
{% endopenapi %}

## Scenarios

WIP.
