Files API

📋 Table of Contents

Overview

The Files API provides comprehensive file management services for the OASIS ecosystem. It handles file upload, download, storage, sharing, and analytics with support for multiple file types, encryption, and real-time collaboration.

File Management

Get All Files

GET /api/files
Authorization: Bearer YOUR_TOKEN

Query Parameters:

  • limit (int, optional): Number of results (default: 50)

  • offset (int, optional): Number to skip (default: 0)

  • type (string, optional): Filter by file type (image, document, video, audio, archive)

  • status (string, optional): Filter by status (Active, Archived, Deleted)

  • owner (string, optional): Filter by owner ID

  • sortBy (string, optional): Sort field (name, size, createdAt, lastModified)

  • sortOrder (string, optional): Sort order (asc/desc, default: desc)

Response:

Get File by ID

Parameters:

  • fileId (string): File UUID

Response:

Upload File

Request Body:

Response:

Update File

Parameters:

  • fileId (string): File UUID

Request Body:

Delete File

Parameters:

  • fileId (string): File UUID

File Operations

Download File

Parameters:

  • fileId (string): File UUID

Query Parameters:

  • format (string, optional): Download format (original, compressed, thumbnail)

  • quality (string, optional): Quality for images/videos (low, medium, high)

Response:

Get File Content

Parameters:

  • fileId (string): File UUID

Query Parameters:

  • format (string, optional): Content format (text, json, xml, base64)

  • encoding (string, optional): Text encoding (utf-8, ascii, latin1)

Get File Thumbnail

Parameters:

  • fileId (string): File UUID

Query Parameters:

  • size (string, optional): Thumbnail size (small, medium, large)

  • format (string, optional): Thumbnail format (jpg, png, webp)

Get File Metadata

Parameters:

  • fileId (string): File UUID

Response:

Update File Metadata

Parameters:

  • fileId (string): File UUID

Request Body:

File Sharing

Share File

Parameters:

  • fileId (string): File UUID

Request Body:

Response:

Share File with Users

Parameters:

  • fileId (string): File UUID

Request Body:

Get File Shares

Parameters:

  • fileId (string): File UUID

Response:

Revoke File Share

Parameters:

  • fileId (string): File UUID

  • shareId (string): Share UUID

File Analytics

Get File Statistics

Query Parameters:

  • timeframe (string, optional): Timeframe (hour, day, week, month)

  • type (string, optional): Filter by file type

Response:

Get File Performance

Response:

Get File Health

Response:

Error Responses

File Not Found

Invalid File Type

File Too Large

Permission Denied

Storage Quota Exceeded


← Previous: Messaging API | Next: Keys API

Last updated