

Cloud users are granted to use cloud data storage.  
Storage capacity will be increased by devices an account has and other reasons.

Also, It provide REST API.

## Upload

Uploading a file to repository with a file.

```
POST /users/me/repo/{file_name}
```

### Request Parameter

<table class="table-default">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Optional</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>access\_token</td>
<td>Cookie</td>
<td>Required</td>
<td>String of user's access token</td>
</tr>
<tr>
<td>file</td>
<td>Body/Multipart-form</td>
<td>Required</td>
<td>The file to be uploaded</td>
</tr>
</tbody>
</table>

### Response

json format.

<table class="table-default">
<thead>
<tr>
<th>Status</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>200</td>
<td>Success</td>
</tr>
<tr>
<td>400</td>
<td>Format Error</td>
</tr>
<tr>
<td>403</td>
<td>Invalid access token / capacity full</td>
</tr>

</tbody>
</table>

## Download

Download a file from repository.

```
GET /users/me/repo/{file_name}
```

or

```
GET /users/{user_id}/repo/{file_name}
```

### Request Parameter

<table class="table-default">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Optional</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>access\_token</td>
<td>Cookie</td>
<td>Optional</td>
<td>String of user's access token</td>
</tr>
</tbody>
</table>

### Response

File it self. octet-stream.

<table class="table-default">
<thead>
<tr>
<th>Status</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>200</td>
<td>Success</td>
</tr>
<tr>
<td>403</td>
<td>Invalid access token / capacity full</td>
</tr>
<tr>
<td>404</td>
<td>Not Found</td>
</tr>

</tbody>
</table>
