Files
fnx_web/res/template/fragments/api/file-id-delete.html

51 lines
1.0 KiB
HTML

{{define "api-file-id-delete"}}
<details th:fragment="details" class="api_doc_details request_delete">
<summary><span class="method">DELETE</span>/file/{id}</summary>
<div>
<h3>Description</h3>
<p>
Deletes a file. Only works when the users owns the file.
</p>
<h3>Parameters</h3>
<table>
<tr>
<td>Param</td>
<td>Required</td>
<td>Location</td>
<td>Description</td>
</tr>
<tr>
<td>id</td>
<td>true</td>
<td>URL</td>
<td>ID of the file to delete</td>
</tr>
</table>
<h3>Returns</h3>
<pre>HTTP 200: OK
{
"success": true,
"value": "file_deleted",
"message": "The file has been deleted."
}</pre>
<pre>HTTP 404: Not Found
{
"success": false,
"value": "file_not_found",
"message": "File ID was not found in the database."
}</pre>
<pre>HTTP 401: Unauthorized
{
"success": false,
"value": "unauthorized",
"message": "You are not logged in."
}</pre>
<pre>HTTP 403: Forbidden
{
"success": false,
"value": "forbidden",
"message": "This is not your file."
}</pre>
</div>
</details>
{{end}}