> ## Documentation Index
> Fetch the complete documentation index at: https://developer.duplik.cn/llms.txt
> Use this file to discover all available pages before exploring further.

> 更新文档的元数据

# Update Document Metadata



## OpenAPI

````yaml post /v1/documents/metadata/{document_id}
openapi: 3.0.2
info:
  title: Duplik Backend
  description: The API for Duplik Backend.
  version: 0.1.0
servers:
  - url: https://api.duplik.cn
security: []
paths:
  /v1/documents/metadata/{document_id}:
    post:
      tags:
        - openapi-document
      summary: Update Document Metadata
      operationId: update_document_meta_data_v1_documents_metadata__document_id__post
      parameters:
        - required: true
          schema:
            title: Document Id
            type: integer
          name: document_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentMetadataInfo'
            examples:
              metadata_update:
                value:
                  title: Fund-operation-manual-2023.pdf
                  published_at: 1688372237936
                  url: >-
                    https://cos-qa-1252068037.cos.ap-beijing.myqcloud.com/duplik/Fund-operation-manual-2023.pdf
                  summary: I am the summary
                  entity_names:
                    - 实体1
                    - 实体2
                  time_periods:
                    - 2023年上半年
                  content_at: 0
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentDetailOfAPI'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    DocumentMetadataInfo:
      title: DocumentMetadataInfo
      type: object
      properties:
        title:
          title: Title
          type: string
        entity_names:
          title: Entity Names
          type: array
          items:
            type: string
        published_at:
          title: Published At
          type: integer
        content_at:
          title: Content At
          type: integer
        time_periods:
          title: Time Periods
          type: array
          items:
            type: string
        url:
          title: Url
          type: string
        file_path:
          title: File Path
          type: string
        file_name:
          title: File Name
          type: string
        file_type:
          title: File Type
          type: string
        summary:
          title: Summary
          type: string
        external_user:
          title: External User
          type: string
        is_sec:
          title: Is Sec
          type: boolean
          default: false
        width:
          title: Width
          type: number
        height:
          title: Height
          type: number
        document_total_page:
          title: Document Total Page
          type: integer
        source_url:
          title: Source Url
          type: string
        document_language:
          title: Document Language
          type: string
        segment_size:
          title: Segment Size
          type: integer
        segment_overlap:
          title: Segment Overlap
          type: integer
        custom_data:
          title: Custom Data
          type: object
        baidu_fs_id:
          title: Baidu Fs Id
          type: integer
    DocumentDetailOfAPI:
      title: DocumentDetailOfAPI
      required:
        - document_id
      type: object
      properties:
        document_id:
          title: Document Id
          type: integer
        name:
          title: Name
          type: string
        description:
          title: Description
          type: string
        summary:
          title: Summary
          type: string
        url:
          title: Url
          type: string
        process_status:
          title: Process Status
          type: integer
        segment_list:
          title: Segment List
          type: array
          items:
            $ref: '#/components/schemas/DocumentSegmentOfAPI'
        meta_data:
          title: Meta Data
          type: object
    ErrorResponse:
      title: ErrorResponse
      required:
        - code
        - message
      type: object
      properties:
        code:
          title: Code
          type: integer
        message:
          title: Message
          type: string
    DocumentSegmentOfAPI:
      title: DocumentSegmentOfAPI
      required:
        - segment_num
        - content
      type: object
      properties:
        name:
          title: Name
          type: string
        segment_num:
          title: Segment Num
          type: integer
        content:
          title: Content
          type: string
        start_s:
          title: Start S
          type: integer
        end_s:
          title: End S
          type: integer
        width:
          title: Width
          type: number
        height:
          title: Height
          type: number
        questions:
          title: Questions
          type: array
          items:
            type: string
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````