> ## Documentation Index
> Fetch the complete documentation index at: https://docs.utage-system.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 通常メディア一覧

> 通常メディア（画像・PDF・Office・動画・音声等）の一覧を取得します。キーワードやフォルダで絞り込みが可能です。

`folder_id` と `keyword` をどちらも指定しない場合は、ルートフォルダ直下のメディアのみ返します。


`GET`

```
https://api.utage-system.com/v1/media
```


## OpenAPI

````yaml GET /media
openapi: 3.0.3
info:
  title: UTAGE API
  description: |
    UTAGEのパブリックAPIです。ファネル、配信アカウント、シナリオ、メディアなどのリソースをプログラムから操作できます。

    ## 認証
    すべてのリクエストにAPIキーによるBearer認証が必要です（要素タイプエンドポイントを除く）。

    ```
    Authorization: Bearer {api_key}
    ```

    APIキーはUTAGE管理画面から発行できます。

    ## レート制限
    リクエスト数には以下の制限があります。

    | 分間上限 | 日間上限 |
    |----------|----------|
    | 60リクエスト/分 | 10,000リクエスト/日 |

    レスポンスヘッダーで現在の使用状況を確認できます。

    | ヘッダー | 説明 |
    |----------|------|
    | X-RateLimit-Limit | 分間の上限値 |
    | X-RateLimit-Remaining | 分間の残りリクエスト数 |
    | X-RateLimit-Reset | 制限がリセットされるUNIXタイムスタンプ |

    上限を超えた場合は `429 Too Many Requests` が返されます。

    ## エラーレスポンス
    エラー時は以下の形式で返されます。

    ```json
    {
      "error": {
        "code": "error_code",
        "message": "エラーメッセージ"
      }
    }
    ```
  version: '1.0'
  contact:
    name: UTAGE サポート
servers:
  - url: https://api.utage-system.com/v1
    description: UTAGE API
security:
  - BearerAuth: []
tags:
  - name: ファネル
    description: ファネルの作成・更新・一覧取得
  - name: ステップ
    description: ファネル内のステップの作成・更新・並び替え
  - name: ページ
    description: ステップ内のページの作成・更新・取得・削除
  - name: 配信アカウント
    description: 配信アカウントの作成・一覧取得
  - name: シナリオ
    description: シナリオの作成・一覧取得
  - name: メディア
    description: 動画・音声・通常メディアの一覧取得とアップロード
  - name: 要素タイプ
    description: ファネルページ・HTMLメールの要素タイプ定義、LINEメッセージタイプ・配信条件タイプの取得（認証不要）
  - name: ファネル統計
    description: ファネルの集計データ・登録者・登録経路の取得（プレビュー）
  - name: 配信メッセージ
    description: 配信メッセージの作成・更新・テスト送信・配信統計、置き換え文字の取得（プレビュー）
  - name: 読者
    description: 読者の作成・更新・取得、ラベル・配信履歴・開封/クリック履歴の取得（プレビュー）
  - name: LINE
    description: LINE友だち・カスタム送信者・1対1チャット・テンプレートの操作（プレビュー）
  - name: ラベル・共通読者・登録経路
    description: ラベル・共通読者・アクション・登録経路の操作（プレビュー）
paths:
  /media:
    get:
      tags:
        - メディア
      summary: 通常メディア一覧
      description: |
        通常メディア（画像・PDF・Office・動画・音声等）の一覧を取得します。キーワードやフォルダで絞り込みが可能です。

        `folder_id` と `keyword` をどちらも指定しない場合は、ルートフォルダ直下のメディアのみ返します。
      operationId: listMedia
      parameters:
        - name: keyword
          in: query
          description: 名前で部分一致検索
          schema:
            type: string
        - name: folder_id
          in: query
          description: フォルダIDで絞り込み。未指定かつkeyword未指定時はルートフォルダ直下のみ返却
          schema:
            type: string
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/PerPage'
      responses:
        '200':
          description: 通常メディア一覧
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Media'
                  meta:
                    $ref: '#/components/schemas/PaginationMeta'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
components:
  parameters:
    Page:
      name: page
      in: query
      description: ページ番号
      schema:
        type: integer
        minimum: 1
    PerPage:
      name: per_page
      in: query
      description: 1ページあたりの件数（既定20・最大100。超過時は100に丸められます）
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
  headers:
    X-RateLimit-Limit:
      description: 分間のリクエスト上限値
      schema:
        type: integer
    X-RateLimit-Remaining:
      description: 分間の残りリクエスト数
      schema:
        type: integer
    X-RateLimit-Reset:
      description: 制限がリセットされるUNIXタイムスタンプ
      schema:
        type: integer
  schemas:
    Media:
      type: object
      properties:
        id:
          type: string
          description: メディアID
        name:
          type: string
          description: ファイル名
        url:
          type: string
          description: ファイルの公開URL
        size:
          type: integer
          description: ファイルサイズ（バイト）
        mime_type:
          type: string
          description: MIMEタイプ
        folder_id:
          type: string
          nullable: true
          description: フォルダID（ルート直下の場合はnull）
        created_at:
          type: string
          description: 作成日時（Y-m-d H:i:s）
        notice:
          type: string
          description: >-
            動画MIMEタイプを指定した場合のみ付与される案内（動画要素では再生できない旨）。`/media/complete`
            のレスポンスでのみ付与され、一覧では返りません。
    PaginationMeta:
      type: object
      properties:
        current_page:
          type: integer
          description: 現在のページ番号
        per_page:
          type: integer
          description: 1ページあたりの件数
        total:
          type: integer
          description: 全件数
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: エラーコード
            message:
              type: string
              description: エラーメッセージ
            details:
              type: object
              nullable: true
              description: エラーの補足情報（retry_afterやフィールド別エラー等）。エラー種別により含まれる場合があります。
  responses:
    Unauthorized:
      description: 認証エラー。APIキーが無効または未指定。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: unauthorized
              message: 認証に失敗しました
    RateLimitExceeded:
      description: レート制限超過。時間を空けて再試行してください。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: rate_limit_exceeded
              message: リクエスト上限を超えました。しばらく時間を空けて再試行してください
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: APIキーをBearerトークンとして指定

````