# Repzo API - Media Storage

OpenAPI specification for Repzo Media Storage endpoints.

**Version:** 1.0.0

## Overview

### Base URLs

- \*\*\*\*: `https://sv.api.repzo.me`

## Authentication

No authentication required.

## Endpoints

### `/media-storage`

#### GET /media-storage

**Summary:** Find media storage items

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `params` | query | object | No | Query parameters for filtering media storage items |

##### Responses

**200** - A list of media storage items

Content-Type: `application/json`

---

#### POST /media-storage

**Summary:** Create a media storage item

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Media storage item created

Content-Type: `application/json`

---

### `/media-storage/{id}`

#### GET /media-storage/{id}

**Summary:** Get a media storage item by ID

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `id` | path | string | Yes | No description |

##### Responses

**200** - Media storage item details

Content-Type: `application/json`

---

#### PUT /media-storage/{id}

**Summary:** Update a media storage item

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `id` | path | string | Yes | No description |

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Media storage item updated

Content-Type: `application/json`

---

#### DELETE /media-storage/{id}

**Summary:** Remove a media storage item

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `id` | path | string | Yes | No description |

##### Responses

**200** - Media storage item removed

Content-Type: `application/json`

---

## Data Models

### MediaStorageFindResult

Result of finding media storage items

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `data` | array | No | No description |

| `total_result` | number | No | Total number of media storage items |

| `current_count` | number | No | Count of media storage items in current page |

| `total_pages` | number | No | Total number of pages |

| `current_page` | number | No | Current page number |

| `per_page` | number | No | Number of media storage items per page |

### MediaStorageSchema

Media storage schema

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `_id` | string | No | Unique identifier for the media storage item |

| `filename` | string | No | Original filename |

| `url` | string | No | URL to access the media file |

| `mimeType` | string | No | MIME type of the file |

| `size` | number | No | File size in bytes |

| `category` | string | No | Media category |

| `entityType` | string | No | Type of entity this media is associated with |

| `entityId` | string | No | ID of the entity this media is associated with |

| `uploadedBy` | string | No | ID of user who uploaded the media |

| `isPublic` | boolean | No | Whether the media is publicly accessible |

| `thumbnailUrl` | string | No | URL to thumbnail version (for images) |

| `metadata` | object | No | Additional metadata about the file |

| `tags` | array | No | Tags associated with the media |

| `description` | string | No | Description of the media |

| `integration_meta` | object | No | Integration metadata |

| `company_namespace` | array | No | Company namespaces |

| `createdAt` | string | No | Creation timestamp |

| `updatedAt` | string | No | Last update timestamp |

| `__v` | number | No | Version number |

### MediaStorageCreateBody

Body for creating a media storage item

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `filename` | string | Yes | Original filename |

| `url` | string | Yes | URL to access the media file |

| `mimeType` | string | Yes | MIME type of the file |

| `size` | number | Yes | File size in bytes |

| `category` | string | No | Media category |

| `entityType` | string | No | Type of entity this media is associated with |

| `entityId` | string | No | ID of the entity this media is associated with |

| `isPublic` | boolean | No | Whether the media is publicly accessible |

| `thumbnailUrl` | string | No | URL to thumbnail version (for images) |

| `metadata` | object | No | Additional metadata about the file |

| `tags` | array | No | Tags associated with the media |

| `description` | string | No | Description of the media |

| `integration_meta` | object | No | Integration metadata |

### MediaStorageCreateResult

Result of creating a media storage item

### MediaStorageGetResult

Result of getting a media storage item

### MediaStorageUpdateBody

Body for updating a media storage item

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `filename` | string | No | Original filename |

| `category` | string | No | Media category |

| `entityType` | string | No | Type of entity this media is associated with |

| `entityId` | string | No | ID of the entity this media is associated with |

| `isPublic` | boolean | No | Whether the media is publicly accessible |

| `metadata` | object | No | Additional metadata about the file |

| `tags` | array | No | Tags associated with the media |

| `description` | string | No | Description of the media |

| `integration_meta` | object | No | Integration metadata |

### MediaStorageUpdateResult

Result of updating a media storage item

### MediaStorageRemoveResult

Result of removing a media storage item

## TypeScript Usage

See [media-storage-examples.md](./media-storage-examples.md) for detailed TypeScript usage examples.
