Skip to content

Get Files ​

List all your files or fetch a single file by ID.

Dashboard: View files ​

  1. Log in to atiru.io.
  2. Go to Files.
  3. Your files are listed in a table with name, type, size, URLs, and created date.
  4. Click a file row or URL to view details and copy URLs.

API: List files ​

Endpoint: GET /files

Query Parameters

ParamTypeDefaultDescription
pagenumber1Page number (1-based)
limitnumber30Items per page (max 100)
qstring—Search in name or file_id (case-insensitive, partial match)
typestring—Exact match on content_type (MIME type)
sizeMinnumber—Min size in bytes (inclusive)
sizeMaxnumber—Max size in bytes (inclusive)
isPublicboolean—Filter by visibility: true (public) or false (private)
createdAfterstring—Created at ≥ value (ISO 8601 date)
createdBeforestring—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.