50 lines
1.3 KiB
HTML
50 lines
1.3 KiB
HTML
{{define "api-file-id-info-get"}}
|
|
<details th:fragment="details" class="api_doc_details request_get">
|
|
<summary><span class="method">GET</span>/file/{id}/info</summary>
|
|
<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
|
|
"days_valid": 60, // Days of inactivity until it gets deleted
|
|
"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}} |