Skip to main content
PATCH
/
v1
/
document_versions
/
{version_id}
/
metadata
Update Document Version Metadata Handler
curl --request PATCH \
  --url http://localhost:8000/v1/document_versions/{version_id}/metadata \
  --header 'Content-Type: application/json' \
  --data '
{
  "source_s3": "<string>",
  "cleaned_source_s3": "<string>",
  "standard_pipeline_json_s3": "<string>",
  "fast_plaintext_s3": "<string>",
  "high_accuracy_content_list_s3": "<string>",
  "high_accuracy_middle_s3": "<string>",
  "hash": "<string>",
  "pipeline_state": {
    "status": "pending",
    "last_run_timestamp": "2023-11-07T05:31:56Z",
    "last_state_update_timestamp": "2023-11-07T05:31:56Z",
    "last_activity": "<string>",
    "error": "<string>",
    "temporal_workflow_id": "<string>",
    "chunks_processed": 123,
    "page_dpi": 123,
    "ingestion_mode": "high_accuracy",
    "chunk_type": "TEXT"
  },
  "total_pages": 123,
  "total_sections": 123,
  "total_chunks": 123,
  "total_formulas": 123,
  "xlsx_parse_result_s3": "<string>",
  "xlsx_named_ranges": [
    {}
  ],
  "xlsx_kpi_catalog": [
    {}
  ],
  "information_statistics": {
    "num_chunks_by_type": {},
    "total_tokens": 0,
    "num_direct_children": 0,
    "children_depth": 0
  }
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "version": 123,
  "name": "<string>",
  "parent_path_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "materialized_path": "<string>",
  "system_managed": true,
  "tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "asset_s3_url": "<string>",
  "fast_plaintext_url": "<string>",
  "system_metadata": {
    "source_s3": "<string>",
    "cleaned_source_s3": "<string>",
    "fast_plaintext_s3": "<string>",
    "hash": "<string>",
    "pipeline_state": {
      "status": "pending",
      "last_run_timestamp": "2023-11-07T05:31:56Z",
      "last_state_update_timestamp": "2023-11-07T05:31:56Z",
      "last_activity": "<string>",
      "error": "<string>",
      "temporal_workflow_id": "<string>",
      "chunks_processed": 123,
      "page_dpi": 123,
      "ingestion_mode": "high_accuracy",
      "chunk_type": "TEXT"
    },
    "total_pages": 123,
    "total_sections": 123,
    "total_chunks": 123,
    "total_formulas": 123,
    "xlsx_parse_result_s3": "<string>",
    "xlsx_named_ranges": [
      {}
    ],
    "xlsx_kpi_catalog": [
      {}
    ],
    "information_statistics": {
      "num_chunks_by_type": {},
      "total_tokens": 0,
      "num_direct_children": 0,
      "children_depth": 0
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.knowledgestack.ai/llms.txt

Use this file to discover all available pages before exploring further.

Headers

authorization
string | null

Path Parameters

version_id
string<uuid>
required

DocumentVersion ID

Cookies

ks_uat
string | null

Body

application/json

Partial update schema for document version metadata.

All fields are optional. Only non-None fields are merged into the existing metadata dict.

source_s3
string | null
cleaned_source_s3
string | null
standard_pipeline_json_s3
string | null
fast_plaintext_s3
string | null
high_accuracy_content_list_s3
string | null
high_accuracy_middle_s3
string | null
hash
string | null
pipeline_state
PipelineState · object

Pipeline execution state tracking.

total_pages
integer | null
total_sections
integer | null
total_chunks
integer | null
total_formulas
integer | null
xlsx_parse_result_s3
string | null
xlsx_named_ranges
Xlsx Named Ranges · object[] | null
xlsx_kpi_catalog
Xlsx Kpi Catalog · object[] | null
information_statistics
InformationStatistics · object

Aggregate statistics for a section subtree or document version.

Response

Successful Response

DocumentVersion response model.

Shared schema for DocumentVersion responses, used by Document endpoints and DocumentVersion endpoints.

id
string<uuid>
required

DocumentVersion ID

path_part_id
string<uuid>
required

PathPart ID

version
integer
required

Version number (0, 1, 2...)

name
string
required

Auto-generated name from path_part (v0, v1, ...)

parent_path_id
string<uuid> | null
required

Document's PathPart ID

materialized_path
string
required

Full materialized path from root

system_managed
boolean
required

Whether this version is system-managed

tenant_id
string<uuid>
required

Tenant ID

created_at
string<date-time>
required

Creation timestamp

updated_at
string<date-time>
required

Last update timestamp

asset_s3_url
string | null

Presigned URL to download the source document (6-hour validity)

fast_plaintext_url
string | null

Presigned URL to download the fast plaintext export (6-hour validity)

system_metadata
DocumentVersionMetadata · object

Version metadata (S3 artifacts, pipeline state, statistics)