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

49 lines
1.3 KiB
HTML
Raw Normal View History

2017-11-10 12:39:55 +01:00
{{define "api-file-id-info-get"}}
<details th:fragment="details" class="api_doc_details request_get">
2017-12-11 20:45:55 +01:00
<summary><span class="method">GET</span>/file/{id}/info</summary>
2017-11-10 12:39:55 +01:00
<div>
<h3>Description</h3>
<p>
Returns information about one or more files.
You can also put a comma separated list of file IDs in
the URL and it will return an array of file info,
instead of a single object.
</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(s) of the file</td>
</tr>
</table>
<h3>Returns</h3>
<pre>HTTP 200: OK
{
"success": true,
"id": "123abc",
"file_name": "screenshot.png",
"date_upload": 1485894987, // Timestamp
"date_last_view": 1485894987, // Timestamp
"file_size": 5694837, // Bytes
"views" 1234, // Amount of unique file views
"mime_type" "image/png",
"description": "File description",
"mime_image": "http://pixeldra.in/res/img/mime/image-png.png", // Image associated with the mime type
"thumbnail": "http://pixeldra.in/api/thumbnail/123abc" // Link to a thumbnail of this file
}</pre>
<pre>HTTP 404: Not Found
{
"success": false,
"value": "file_not_found"
}</pre>
</div>
</details>
{{end}}