# Search user uploads with filters

Searches and retrieves uploads for a specific user with optional filtering by upload type (IMAGE, VIDEO, AUDIO, DOCUMENT) and tags (Avatar, Header, Post, etc.). Supports pagination for large result sets. Returns upload metadata including file information, processing status, and associated tags.

RBAC: requires Uploads.Read

Endpoint: GET /api/v1/admin/uploads/search
Version: 1.0
Security: header

## Query parameters:

  - `lastId` (string,null)
    Get older records (records with IDs less than this value) Alias maxId/max_id
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

  - `limit` (integer,null)

  - `offset` (integer,null)

  - `sortBy` (string,null)

  - `sortOrder` (string,null)
    Sort order. Supported values: ASC or DESC

  - `tag` (string,null)
    Filter by upload tag (Avatar, Header, Post, etc.). Omit to include all tags.
    Enum: "Post", "Avatar", "Header", "Album", "Emoji", "Event"

  - `untilId` (string,null)
    Get newer records (records with IDs greater than this value) Alias minId/min_id
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

  - `uploadType` (string,null)
    Filter by upload type (IMAGE, VIDEO, AUDIO, DOCUMENT). Omit to include all types.
    Enum: "VIDEO", "IMAGE", "AUDIO", "DOCUMENT", "OTHER"

  - `userId` (string, required)
    User ID whose uploads to search. Must be a valid USER type TypeId.
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

## Response 200 fields (application/json):

  - `list` (array, required)

  - `list.uploadId` (string, required)
    Internal id
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

  - `list.uploaderId` (string,null)
    User who physically uploaded this file. Null for platform-owned uploads (e.g., default covers). This is an audit/meta field — use ownerId for authorization.
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

  - `list.ownerId` (string, required)
    Entity that owns this upload (user, channel/group, or event). TypeID prefix indicates the owner type.
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

  - `list.attachedToId` (string,null)
    Entity this upload is attached to (e.g., a post or event). NULL for standalone uploads like avatars, covers, or media library items.
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

  - `list.uploadType` (string, required)
    Type of the upload
    Enum: "VIDEO", "IMAGE", "AUDIO", "DOCUMENT", "OTHER"

  - `list.meta` (object)
    Meta data

  - `list.meta.blurhash` (string,null)

  - `list.meta.name` (string,null)

  - `list.meta.altText` (string,null)

  - `list.size` (integer, required)
    Size in bytes of all the files in this upload

  - `list.files` (array, required)
    List of all the files this upload has

  - `list.files.uri` (string,null, required)
    Full url of the file

  - `list.files.fileId` (string, required)
    File id
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

  - `list.files.extension` (string, required)
    File extension
    Example: "mp4"

  - `list.files.original` (boolean, required)
    true if this file is original, false if it is a derivative

  - `list.files.meta` (object, required)
    File metadata. Contains optional values for width, height etc.

  - `list.files.meta.duration` (number,null)
    Video duration in seconds

  - `list.files.meta.width` (integer,null)
    Media width

  - `list.files.meta.height` (integer,null)
    Media height

  - `list.files.meta.codec` (string,null)
    Video codec

  - `list.files.meta.rotate` (integer,null)
    Rotation in degrees

  - `list.files.size` (integer, required)
    File size in bytes

  - `list.files.createdAt` (string, required)
    Example: "2022-03-10T16:15:50Z"

  - `list.files.updatedAt` (string, required)
    Example: "2022-03-10T16:15:50Z"

  - `list.files.type` (string, required)
    File type
    Enum: "VIDEO", "IMAGE", "AUDIO", "DOCUMENT", "OTHER"

  - `list.tags` (array, required)
    List of tags attached to upload
    Enum: "Post", "Avatar", "Header", "Album", "Emoji", "Event"

  - `list.error` (string,null)
    Upload processing error

  - `list.cached` (boolean)
    true if cached

  - `list.logs` (string,null)
    Logs

  - `list.remote` (boolean)
    true if this upload is remote

  - `list.createdAt` (string, required)
    Example: "2022-03-10T16:15:50Z"

  - `list.updatedAt` (string, required)
    Example: "2022-03-10T16:15:50Z"

  - `total` (integer, required)

## Response 400 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation

## Response 403 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation


