---
updatedAt: 2026-04-27T13:22:54.000Z
agentTools:
  projectIndex: https://developers.karte.io/llms.txt
---

# List RAG Files

RAGコーパス内のファイル一覧を取得します。ページネーションに対応しています。
#### Required Scope
APIの実行に必要なScopeです。
```
beta.craft.rag.listFiles
```

#### Required Role
管理画面でScopeを追加する際に必要な権限です。
```
Craft > Craft 設定の閲覧
```


# OpenAPI definition

````json
{
  "openapi": "3.0.0",
  "servers": [
    {
      "url": "https://api.karte.io",
      "description": "Production server"
    },
    {
      "url": "https://api-jp.karte.io",
      "description": "Production JP server. リージョン固定オプションのプロジェクトはこちらのエンドポイントを利用してください."
    }
  ],
  "info": {
    "version": "2.0.0",
    "title": "Craft"
  },
  "paths": {
    "/v2beta/craft/rag/listFiles": {
      "post": {
        "tags": [
          "RAG"
        ],
        "summary": "List RAG Files",
        "description": "RAGコーパス内のファイル一覧を取得します。ページネーションに対応しています。\n#### Required Scope\nAPIの実行に必要なScopeです。\n```\nbeta.craft.rag.listFiles\n```\n\n#### Required Role\n管理画面でScopeを追加する際に必要な権限です。\n```\nCraft > Craft 設定の閲覧\n```\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "corpusId"
                ],
                "properties": {
                  "corpusId": {
                    "type": "string",
                    "description": "RAGコーパスのID",
                    "example": "corpus-123"
                  },
                  "pageSize": {
                    "type": "integer",
                    "description": "1ページあたりのファイル数",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 50,
                    "example": 10
                  },
                  "pageToken": {
                    "type": "string",
                    "description": "次ページ取得用のトークン",
                    "example": "next-page-token"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "ragFiles": {
                      "type": "array",
                      "description": "RAGファイルのリスト",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ファイルID",
                            "example": "1234567890"
                          },
                          "displayName": {
                            "type": "string",
                            "description": "ファイル表示名",
                            "example": "document.pdf"
                          },
                          "createTime": {
                            "type": "string",
                            "description": "作成日時",
                            "example": "2023-01-01T00:00:00Z"
                          },
                          "updateTime": {
                            "type": "string",
                            "description": "更新日時",
                            "example": "2023-01-01T00:00:00Z"
                          },
                          "filePaths": {
                            "type": "array",
                            "description": "ファイルパスのリスト",
                            "items": {
                              "type": "string"
                            },
                            "example": [
                              "/path/to/file.pdf"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "description": "ファイルステータス",
                            "example": "ACTIVE"
                          },
                          "siteName": {
                            "type": "string",
                            "description": "サイト名",
                            "example": "test-site"
                          }
                        }
                      }
                    },
                    "nextPageToken": {
                      "type": "string",
                      "nullable": true,
                      "description": "次ページ取得用のトークン",
                      "example": "next-page-token"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "リクエスト数が上限を超えた場合",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "error": "Too many requests"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "in": "header",
            "name": "x-karte-api",
            "schema": {
              "type": "string"
            },
            "description": "今後利用する可能性のある予約語です。現在は設定不要です。"
          },
          {
            "in": "header",
            "name": "authorization",
            "schema": {
              "type": "string"
            },
            "description": "認証情報を含むトークンです。\"Authorization\" ヘッダーに `Bearer <token>` の形式で設定してください。"
          },
          {
            "in": "header",
            "name": "content-type",
            "schema": {
              "type": "string"
            },
            "description": "リクエストのコンテンツタイプを指定します。通常は `application/json` を使用してください。"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-explorer-enabled": false
}
````