knowledge-bases-books-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-5

Endpoint

  • API Name: jef-knowledge-bases

  • Action Name: patch

  • Method: PATCH

  • Scope Label: Async

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

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

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

  • curl payload mode: json_body

API Gateway Description

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

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

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

Payload Example:
- pk: document-001
- gsi_1_pk: kb-001
- gsi_1_sk: 2026-05-01T01:00:00+08:00
- document_id: document-001
- book_version: v1
- knowledge_base_id: kb-001
- book_id: book-001
- book_slug: sample-book
- slug: sample-book
- name: Sample Book
- title: Sample Knowledge Base Book
- subtitle: Sample Subtitle
- description: Sample knowledge base record for local testing.
- author: JEF
- publisher: JEF
- language: en
- owner_entity_number: entity-001
- 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
- extraction_engine: pdfplumber
- ingestion_status: completed
- status: active
- active: True
- total_pages: 1
- pages_submitted: 1
- last_page_submitted: 1
- failed_page_count: 0
- empty_page_count: 0
- total_text_length: 0
- total_word_count: 0
- total_chunk_count: 0
- manifest_verified: True
- manifest_missing_pages:
- manifest_uri: s3://sample-bucket/knowledge-bases/sample-book-manifest.json
- manifest_hash: sample-manifest-hash
- pipeline_run_id: pipeline-run-001
- latest_build_number: 1
- started_at: 2026-05-01T01:00:00+08:00
- completed_at: 2026-05-01T01:00:00+08:00
- failed_at: 2026-05-01T01:00:00+08:00
- created_at: 2026-05-01T01:00:00+08:00
- updated_at: 2026-05-01T01:00:00+08:00
- published_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: e07a9711-d39a-4d44-a071-acd63e4e6444

Payload Schema:
- pk: string-{document_id}
- gsi_1_pk: string-{knowledge_base_id}
- gsi_1_sk: string-{updated_at}
- document_id: string
- book_version: string
- knowledge_base_id: string
- book_id: string
- book_slug: string
- slug: string
- name: string
- title: string
- subtitle: string
- description: string
- author: string
- publisher: string
- language: string
- owner_entity_number: string
- source_type: string
- source_uri: string
- source_hash: string
- s3_bucket: string
- s3_key: string
- content_type: string
- extraction_engine: string
- ingestion_status: string
- status: string
- active: boolean
- total_pages: number
- pages_submitted: number
- last_page_submitted: number
- failed_page_count: number
- empty_page_count: number
- total_text_length: number
- total_word_count: number
- total_chunk_count: number
- manifest_verified: boolean
- manifest_missing_pages: string
- manifest_uri: string
- manifest_hash: string
- pipeline_run_id: string
- latest_build_number: number
- started_at: string
- completed_at: string
- failed_at: string
- created_at: string
- updated_at: string
- published_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",
  "gsi_1_pk": "kb-001",
  "gsi_1_sk": "2026-05-01T01:00:00+08:00",
  "document_id": "document-001",
  "book_version": "v1",
  "knowledge_base_id": "kb-001",
  "book_id": "book-001",
  "book_slug": "sample-book",
  "slug": "sample-book",
  "name": "Sample Book",
  "title": "Sample Knowledge Base Book",
  "subtitle": "Sample Subtitle",
  "description": "Sample knowledge base record for local testing.",
  "author": "JEF",
  "publisher": "JEF",
  "language": "en",
  "owner_entity_number": "entity-001",
  "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",
  "extraction_engine": "pdfplumber",
  "ingestion_status": "completed",
  "status": "active",
  "active": "True",
  "total_pages": "1",
  "pages_submitted": "1",
  "last_page_submitted": "1",
  "failed_page_count": "0",
  "empty_page_count": "0",
  "total_text_length": "0",
  "total_word_count": "0",
  "total_chunk_count": "0",
  "manifest_verified": "True",
  "manifest_missing_pages": "",
  "manifest_uri": "s3://sample-bucket/knowledge-bases/sample-book-manifest.json",
  "manifest_hash": "sample-manifest-hash",
  "pipeline_run_id": "pipeline-run-001",
  "latest_build_number": "1",
  "started_at": "2026-05-01T01:00:00+08:00",
  "completed_at": "2026-05-01T01:00:00+08:00",
  "failed_at": "2026-05-01T01:00:00+08:00",
  "created_at": "2026-05-01T01:00:00+08:00",
  "updated_at": "2026-05-01T01:00:00+08:00",
  "published_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": "e07a9711-d39a-4d44-a071-acd63e4e6444"
}

Response

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

CMD curl

curl -X PATCH "https://in42anzkh6.execute-api.ap-southeast-1.amazonaws.com/prod/knowledge-bases-books-patch-one" -H "Content-Type: application/json" --data-raw "{\"pk\": \"document-001\", \"gsi_1_pk\": \"kb-001\", \"gsi_1_sk\": \"2026-05-01T01:00:00+08:00\", \"document_id\": \"document-001\", \"book_version\": \"v1\", \"knowledge_base_id\": \"kb-001\", \"book_id\": \"book-001\", \"book_slug\": \"sample-book\", \"slug\": \"sample-book\", \"name\": \"Sample Book\", \"title\": \"Sample Knowledge Base Book\", \"subtitle\": \"Sample Subtitle\", \"description\": \"Sample knowledge base record for local testing.\", \"author\": \"JEF\", \"publisher\": \"JEF\", \"language\": \"en\", \"owner_entity_number\": \"entity-001\", \"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\", \"extraction_engine\": \"pdfplumber\", \"ingestion_status\": \"completed\", \"status\": \"active\", \"active\": true, \"total_pages\": 1, \"pages_submitted\": 1, \"last_page_submitted\": 1, \"failed_page_count\": 0, \"empty_page_count\": 0, \"total_text_length\": 0, \"total_word_count\": 0, \"total_chunk_count\": 0, \"manifest_verified\": true, \"manifest_missing_pages\": \"\", \"manifest_uri\": \"s3://sample-bucket/knowledge-bases/sample-book-manifest.json\", \"manifest_hash\": \"sample-manifest-hash\", \"pipeline_run_id\": \"pipeline-run-001\", \"latest_build_number\": 1, \"started_at\": \"2026-05-01T01:00:00+08:00\", \"completed_at\": \"2026-05-01T01:00:00+08:00\", \"failed_at\": \"2026-05-01T01:00:00+08:00\", \"created_at\": \"2026-05-01T01:00:00+08:00\", \"updated_at\": \"2026-05-01T01:00:00+08:00\", \"published_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\": \"e07a9711-d39a-4d44-a071-acd63e4e6444\"}"

PowerShell curl

curl.exe -X PATCH "https://in42anzkh6.execute-api.ap-southeast-1.amazonaws.com/prod/knowledge-bases-books-patch-one" -H "Content-Type: application/json" --data-raw '{"pk": "document-001", "gsi_1_pk": "kb-001", "gsi_1_sk": "2026-05-01T01:00:00+08:00", "document_id": "document-001", "book_version": "v1", "knowledge_base_id": "kb-001", "book_id": "book-001", "book_slug": "sample-book", "slug": "sample-book", "name": "Sample Book", "title": "Sample Knowledge Base Book", "subtitle": "Sample Subtitle", "description": "Sample knowledge base record for local testing.", "author": "JEF", "publisher": "JEF", "language": "en", "owner_entity_number": "entity-001", "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", "extraction_engine": "pdfplumber", "ingestion_status": "completed", "status": "active", "active": true, "total_pages": 1, "pages_submitted": 1, "last_page_submitted": 1, "failed_page_count": 0, "empty_page_count": 0, "total_text_length": 0, "total_word_count": 0, "total_chunk_count": 0, "manifest_verified": true, "manifest_missing_pages": "", "manifest_uri": "s3://sample-bucket/knowledge-bases/sample-book-manifest.json", "manifest_hash": "sample-manifest-hash", "pipeline_run_id": "pipeline-run-001", "latest_build_number": 1, "started_at": "2026-05-01T01:00:00+08:00", "completed_at": "2026-05-01T01:00:00+08:00", "failed_at": "2026-05-01T01:00:00+08:00", "created_at": "2026-05-01T01:00:00+08:00", "updated_at": "2026-05-01T01:00:00+08:00", "published_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": "e07a9711-d39a-4d44-a071-acd63e4e6444"}'