knowledge-bases-books-pages-manifests-patch-one

Source

  • Repository: jef-systems/jef-knowledge-bases-backend

  • Source Run ID: 25225199457

  • Source SHA: aa5ff95e9fc61b1117b4e8fbff26c3c0f37efea2

  • Module: knowledge-bases

  • Documentation Scope: async

  • Lambda: jef-knowledge-bases-patch-8

Endpoint

  • API Name: jef-knowledge-bases

  • Action Name: patch

  • Method: PATCH

  • Scope Label: Async

  • Resource Path: /knowledge-bases-books-pages-manifests-patch-one

  • Complete Endpoint: https://in42anzkh6.execute-api.ap-southeast-1.amazonaws.com/prod/knowledge-bases-books-pages-manifests-patch-one

  • Lambda ARN: arn:aws:lambda:ap-southeast-1:246715082475:function:jef-knowledge-bases-patch-8

  • curl payload mode: json_body

API Gateway Description

Function: jef-knowledge-bases-patch-8
Module: jef-knowledge-bases
Action: patch
Method: PATCH
Invocation Mode: ASYNC
Resource Path: /knowledge-bases-books-pages-manifests-patch-one

API Gateway Response:
- status_code: 202
- message: Request accepted for asynchronous processing.

Table:
- table: jef-knowledge-bases-books-pages-manifests

Payload Example:
- pk: document-001-page-0001
- gsi_1_pk: kb-001
- gsi_1_sk: 1
- document_id: document-001
- page_key: document-001-page-0001
- knowledge_base_id: kb-001
- book_id: book-001
- book_version: v1
- book_slug: sample-book
- title: Sample Knowledge Base Book
- source_type: pdf
- source_uri: s3://sample-bucket/knowledge-bases/sample-book.pdf
- source_hash: sample-source-hash
- s3_bucket: sample-bucket
- s3_key: knowledge-bases/sample-book.pdf
- content_type: application/pdf
- page_number: 1
- text: This is sample extracted page text for testing.
- text_length: 47
- text_hash: sample-text-hash
- word_count: 8
- normalized: True
- empty_page: False
- chunk_count: 0
- extraction_engine: pdfplumber
- ingestion_status: completed
- status: active
- active: True
- pipeline_run_id: pipeline-run-001
- created_at: 2026-05-01T01:00:00+08:00
- updated_at: 2026-05-01T01:00:00+08:00
- submitted_at: 2026-05-01T01:00:00+08:00
- created_by: system
- updated_by: system
- error_message:
- idempotency_key: c9f7021f-568d-4c18-8d00-c0c92365c42c

Payload Schema:
- pk: string-{page_key}
- gsi_1_pk: string-{knowledge_base_id}
- gsi_1_sk: string-{page_number}
- document_id: string
- page_key: string
- knowledge_base_id: string
- book_id: string
- book_version: string
- book_slug: string
- title: string
- source_type: string
- source_uri: string
- source_hash: string
- s3_bucket: string
- s3_key: string
- content_type: string
- page_number: number
- text: string
- text_length: number
- text_hash: string
- word_count: number
- normalized: boolean
- empty_page: boolean
- chunk_count: number
- extraction_engine: string
- ingestion_status: string
- status: string
- active: boolean
- pipeline_run_id: string
- created_at: string
- updated_at: string
- submitted_at: string
- created_by: string
- updated_by: string
- error_message: string
- idempotency_key: string

Response Schema:
- is_accepted: boolean
- message: string

Request Payload

{
  "pk": "document-001-page-0001",
  "gsi_1_pk": "kb-001",
  "gsi_1_sk": "1",
  "document_id": "document-001",
  "page_key": "document-001-page-0001",
  "knowledge_base_id": "kb-001",
  "book_id": "book-001",
  "book_version": "v1",
  "book_slug": "sample-book",
  "title": "Sample Knowledge Base Book",
  "source_type": "pdf",
  "source_uri": "s3://sample-bucket/knowledge-bases/sample-book.pdf",
  "source_hash": "sample-source-hash",
  "s3_bucket": "sample-bucket",
  "s3_key": "knowledge-bases/sample-book.pdf",
  "content_type": "application/pdf",
  "page_number": "1",
  "text": "This is sample extracted page text for testing.",
  "text_length": "47",
  "text_hash": "sample-text-hash",
  "word_count": "8",
  "normalized": "True",
  "empty_page": "False",
  "chunk_count": "0",
  "extraction_engine": "pdfplumber",
  "ingestion_status": "completed",
  "status": "active",
  "active": "True",
  "pipeline_run_id": "pipeline-run-001",
  "created_at": "2026-05-01T01:00:00+08:00",
  "updated_at": "2026-05-01T01:00:00+08:00",
  "submitted_at": "2026-05-01T01:00:00+08:00",
  "created_by": "system",
  "updated_by": "system",
  "error_message": "",
  "idempotency_key": "c9f7021f-568d-4c18-8d00-c0c92365c42c"
}

Response

{
  "is_accepted": "boolean",
  "message": "string"
}

CMD curl

curl -X PATCH "https://in42anzkh6.execute-api.ap-southeast-1.amazonaws.com/prod/knowledge-bases-books-pages-manifests-patch-one" -H "Content-Type: application/json" --data-raw "{\"pk\": \"document-001-page-0001\", \"gsi_1_pk\": \"kb-001\", \"gsi_1_sk\": 1, \"document_id\": \"document-001\", \"page_key\": \"document-001-page-0001\", \"knowledge_base_id\": \"kb-001\", \"book_id\": \"book-001\", \"book_version\": \"v1\", \"book_slug\": \"sample-book\", \"title\": \"Sample Knowledge Base Book\", \"source_type\": \"pdf\", \"source_uri\": \"s3://sample-bucket/knowledge-bases/sample-book.pdf\", \"source_hash\": \"sample-source-hash\", \"s3_bucket\": \"sample-bucket\", \"s3_key\": \"knowledge-bases/sample-book.pdf\", \"content_type\": \"application/pdf\", \"page_number\": 1, \"text\": \"This is sample extracted page text for testing.\", \"text_length\": 47, \"text_hash\": \"sample-text-hash\", \"word_count\": 8, \"normalized\": true, \"empty_page\": false, \"chunk_count\": 0, \"extraction_engine\": \"pdfplumber\", \"ingestion_status\": \"completed\", \"status\": \"active\", \"active\": true, \"pipeline_run_id\": \"pipeline-run-001\", \"created_at\": \"2026-05-01T01:00:00+08:00\", \"updated_at\": \"2026-05-01T01:00:00+08:00\", \"submitted_at\": \"2026-05-01T01:00:00+08:00\", \"created_by\": \"system\", \"updated_by\": \"system\", \"error_message\": \"\", \"idempotency_key\": \"c9f7021f-568d-4c18-8d00-c0c92365c42c\"}"

PowerShell curl

curl.exe -X PATCH "https://in42anzkh6.execute-api.ap-southeast-1.amazonaws.com/prod/knowledge-bases-books-pages-manifests-patch-one" -H "Content-Type: application/json" --data-raw '{"pk": "document-001-page-0001", "gsi_1_pk": "kb-001", "gsi_1_sk": 1, "document_id": "document-001", "page_key": "document-001-page-0001", "knowledge_base_id": "kb-001", "book_id": "book-001", "book_version": "v1", "book_slug": "sample-book", "title": "Sample Knowledge Base Book", "source_type": "pdf", "source_uri": "s3://sample-bucket/knowledge-bases/sample-book.pdf", "source_hash": "sample-source-hash", "s3_bucket": "sample-bucket", "s3_key": "knowledge-bases/sample-book.pdf", "content_type": "application/pdf", "page_number": 1, "text": "This is sample extracted page text for testing.", "text_length": 47, "text_hash": "sample-text-hash", "word_count": 8, "normalized": true, "empty_page": false, "chunk_count": 0, "extraction_engine": "pdfplumber", "ingestion_status": "completed", "status": "active", "active": true, "pipeline_run_id": "pipeline-run-001", "created_at": "2026-05-01T01:00:00+08:00", "updated_at": "2026-05-01T01:00:00+08:00", "submitted_at": "2026-05-01T01:00:00+08:00", "created_by": "system", "updated_by": "system", "error_message": "", "idempotency_key": "c9f7021f-568d-4c18-8d00-c0c92365c42c"}'