> 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

## 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.
