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

# 获取空间文件类别列表

> 获取空间文件类别列表



## OpenAPI

````yaml /docflow/cn/rest-api/openapi.bundle.yaml get /api/app-api/sip/platform/v2/category/list
openapi: 3.0.0
info:
  title: DocFlow API
  description: DocFlow REST API，提供文件上传和获取文件处理结果能力
  version: 2.8.4
servers:
  - url: https://docflow.textin.com
security:
  - ApiId: []
    SecretCode: []
paths:
  /api/app-api/sip/platform/v2/category/list:
    get:
      tags:
        - 文件类别
      summary: 获取空间文件类别列表
      description: 获取空间文件类别列表
      operationId: listCategories
      parameters:
        - name: workspace_id
          in: query
          description: 空间ID
          required: true
          schema:
            type: string
            example: '1234567890'
        - name: page
          in: query
          description: 页码
          required: false
          schema:
            type: integer
            default: 1
        - name: page_size
          in: query
          description: 每页数量
          required: false
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
        - name: enabled
          in: query
          description: |
            启用状态
            - all: 所有
            - 1: 启用
            - 0: 禁用
            - 2: 草稿
          required: false
          schema:
            type: string
            default: '1'
            enum:
              - all
              - '1'
              - '0'
              - '2'
      responses:
        '200':
          description: 成功获取空间文件类别列表
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CodeMessage'
                  - type: object
                    properties:
                      result:
                        type: object
                        properties:
                          total:
                            type: integer
                            description: 文件类别总数
                            example: 100
                          page:
                            type: integer
                            description: 当前页码
                            example: 1
                          page_size:
                            type: integer
                            description: 每页数量
                            example: 20
                          categories:
                            type: array
                            items:
                              $ref: '#/components/schemas/Category'
components:
  schemas:
    CodeMessage:
      type: object
      properties:
        code:
          type: integer
          description: 状态码
          example: 200
        msg:
          type: string
          description: 状态描述
      required:
        - code
        - msg
    Category:
      type: object
      description: 文件类别
      properties:
        id:
          type: string
          description: 文件类别ID
          example: '1234567890'
        name:
          type: string
          description: 文件类别名称
          example: 发票
        description:
          type: string
          description: 文件类别描述
          example: 增值税发票类型
        category_prompt:
          type: string
          description: 用于分类的提示词
          example: 增值税发票，包含发票代码、发票号码等字段
        extract_model:
          type: string
          description: |
            抽取模型
            - Auto: 智能匹配抽取模型
            - Acgpt: 速度快，抽取结果稳定
            - Acgpt-VL: 多模态，适用简单抽取（≤10 页）
            - DF-M1: 适用复杂文档理解
            - mixed: 仅在响应中出现，表示该分类下各字段/表格使用了不同模型
          example: Acgpt
          enum:
            - Auto
            - Acgpt
            - Acgpt-VL
            - DF-M1
            - mixed
        enabled:
          $ref: '#/components/schemas/EnabledStatus'
      required:
        - id
        - name
    EnabledStatus:
      type: integer
      description: |
        启用状态
        - 0: 禁用
        - 1: 启用
        - 2: 草稿
      enum:
        - 0
        - 1
        - 2
  securitySchemes:
    ApiId:
      type: apiKey
      in: header
      name: x-ti-app-id
    SecretCode:
      type: apiKey
      in: header
      name: x-ti-secret-code

````