Appearance
Get Files
List all your files or fetch a single file by ID.
Dashboard: View files
- Log in to atiru.io.
- Go to Files.
- Your files are listed in a table with name, type, size, URLs, and created date.
- Click a file row or URL to view details and copy URLs.
API: List files
Endpoint: GET /files
Query Parameters
| Param | Type | Default | Description |
|---|---|---|---|
| page | number | 1 | Page number (1-based) |
| limit | number | 30 | Items per page (max 100) |
| q | string | — | Search in name or file_id (case-insensitive, partial match) |
| type | string | — | Exact match on content_type (MIME type) |
| sizeMin | number | — | Min size in bytes (inclusive) |
| sizeMax | number | — | Max size in bytes (inclusive) |
| isPublic | boolean | — | Filter by visibility: true (public) or false (private) |
| createdAfter | string | — | Created at ≥ value (ISO 8601 date) |
| createdBefore | string | — | Created at ≤ value (ISO 8601 date) |
bash
curl -X GET "https://api.atiru.io/files?page=1&limit=30" \
-H "Authorization: Bearer YOUR_API_KEY"javascript
const res = await fetch('https://api.atiru.io/files?page=1&limit=30', {
headers: { 'Authorization': `Bearer ${API_KEY}` },
})
const { files, total, page, limit } = await res.json()python
import requests
res = requests.get(
'https://api.atiru.io/files',
headers={'Authorization': f'Bearer {API_KEY}'},
params={'page': 1, 'limit': 30},
)
data = res.json()
files = data['files']
total = data['total']
page = data['page']
limit = data['limit']Response (200)
json
{
"files": [
{
"id": "uuid",
"user_id": "uuid",
"file_id": "abc123",
"name": "example.png",
"content_type": "image/png",
"size": 12345,
"public_url": "https://cdn.atiru.io/m/abc123",
"default_url": "https://cdn.atiru.io/m/abc123",
"default_download_url": "https://cdn.atiru.io/d/abc123",
"public_download_url": "https://cdn.atiru.io/d/abc123",
"created_at": "2024-01-15T12:00:00.000Z",
"is_public": true
}
],
"total": 150,
"page": 1,
"limit": 30
}For private files (is_public: false), URL fields are null in the response.
Response (400) — Invalid filter.
API: Get one file
Endpoint: GET /files/:id
Replace :id with the file's file_id (not the id UUID).
bash
curl -X GET "https://api.atiru.io/files/abc123" \
-H "Authorization: Bearer YOUR_API_KEY"javascript
const res = await fetch(`https://api.atiru.io/files/${fileId}`, {
headers: { 'Authorization': `Bearer ${API_KEY}` },
})
const file = await res.json()python
res = requests.get(
f'https://api.atiru.io/files/{file_id}',
headers={'Authorization': f'Bearer {API_KEY}'},
)
file = res.json()Response (200)
json
{
"id": "uuid",
"user_id": "uuid",
"file_id": "abc123",
"name": "example.png",
"content_type": "image/png",
"size": 12345,
"public_url": "https://cdn.atiru.io/m/abc123",
"default_url": "https://cdn.atiru.io/m/abc123",
"default_download_url": "https://cdn.atiru.io/d/abc123",
"public_download_url": "https://cdn.atiru.io/d/abc123",
"created_at": "2024-01-15T12:00:00.000Z",
"is_public": true
}Response (404) — File not found or not owned by you.