@@ -10,6 +10,7 @@ Method | HTTP request | Description
1010[ ** get_document** ] ( DocumentsApi.md#get_document ) | ** GET** /v1/documents/{document_id} | Get Document Handler
1111[ ** ingest_document** ] ( DocumentsApi.md#ingest_document ) | ** POST** /v1/documents/ingest | Ingest Document Handler
1212[ ** ingest_document_version** ] ( DocumentsApi.md#ingest_document_version ) | ** POST** /v1/documents/{document_id}/ingest | Ingest Document Version Handler
13+ [ ** ingest_zip** ] ( DocumentsApi.md#ingest_zip ) | ** POST** /v1/documents/ingest-zip | Ingest Zip Handler
1314[ ** list_documents** ] ( DocumentsApi.md#list_documents ) | ** GET** /v1/documents | List Documents Handler
1415[ ** update_document** ] ( DocumentsApi.md#update_document ) | ** PATCH** /v1/documents/{document_id} | Update Document Handler
1516
@@ -597,6 +598,106 @@ Name | Type | Description | Notes
597598
598599[[ Back to top]] ( # ) [[ Back to API list]] ( ../README.md#documentation-for-api-endpoints ) [[ Back to Model list]] ( ../README.md#documentation-for-models ) [[ Back to README]] ( ../README.md )
599600
601+ # ** ingest_zip**
602+ > IngestZipResponse ingest_zip(file, path_part_id, ingestion_mode=ingestion_mode)
603+
604+ Ingest Zip Handler
605+
606+ Upload a ZIP archive and ingest each member file individually.
607+
608+ Directory structure inside the ZIP is preserved as FOLDER PathParts under
609+ the target folder. Returns 202 with per-file outcomes — each file that
610+ ingests successfully has its own Temporal workflow ID to poll for status.
611+
612+ Whole-archive failures (not a ZIP, zip-bomb, >500 files) return 400 before
613+ any DB writes. Per-file failures (unsupported type, oversized) are included
614+ in the response with `` error `` set; other files continue processing.
615+
616+ ### Example
617+
618+ * Api Key Authentication (cookieAuth):
619+ * Bearer Authentication (bearerAuth):
620+
621+ ``` python
622+ import ksapi
623+ from ksapi.models.ingest_zip_response import IngestZipResponse
624+ from ksapi.models.ingestion_mode import IngestionMode
625+ from ksapi.rest import ApiException
626+ from pprint import pprint
627+
628+ # Defining the host is optional and defaults to http://localhost:8000
629+ # See configuration.py for a list of all supported configuration parameters.
630+ configuration = ksapi.Configuration(
631+ host = " http://localhost:8000"
632+ )
633+
634+ # The client must configure the authentication and authorization parameters
635+ # in accordance with the API server security policy.
636+ # Examples for each auth method are provided below, use the example that
637+ # satisfies your auth use case.
638+
639+ # Configure API key authorization: cookieAuth
640+ configuration.api_key[' cookieAuth' ] = os.environ[" API_KEY" ]
641+
642+ # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
643+ # configuration.api_key_prefix['cookieAuth'] = 'Bearer'
644+
645+ # Configure Bearer authorization: bearerAuth
646+ configuration = ksapi.Configuration(
647+ access_token = os.environ[" BEARER_TOKEN" ]
648+ )
649+
650+ # Enter a context with an instance of the API client
651+ with ksapi.ApiClient(configuration) as api_client:
652+ # Create an instance of the API class
653+ api_instance = ksapi.DocumentsApi(api_client)
654+ file = None # bytes |
655+ path_part_id = UUID(' 38400000-8cf0-11bd-b23e-10b96e4ef00d' ) # UUID | Parent path part ID (must be a FOLDER type)
656+ ingestion_mode = ksapi.IngestionMode() # IngestionMode | (optional)
657+
658+ try :
659+ # Ingest Zip Handler
660+ api_response = api_instance.ingest_zip(file , path_part_id, ingestion_mode = ingestion_mode)
661+ print (" The response of DocumentsApi->ingest_zip:\n " )
662+ pprint(api_response)
663+ except Exception as e:
664+ print (" Exception when calling DocumentsApi->ingest_zip: %s \n " % e)
665+ ```
666+
667+
668+
669+ ### Parameters
670+
671+
672+ Name | Type | Description | Notes
673+ ------------- | ------------- | ------------- | -------------
674+ ** file** | ** bytes** | |
675+ ** path_part_id** | ** UUID** | Parent path part ID (must be a FOLDER type) |
676+ ** ingestion_mode** | [ ** IngestionMode** ] ( IngestionMode.md ) | | [ optional]
677+
678+ ### Return type
679+
680+ [ ** IngestZipResponse** ] ( IngestZipResponse.md )
681+
682+ ### Authorization
683+
684+ [ cookieAuth] ( ../README.md#cookieAuth ) , [ bearerAuth] ( ../README.md#bearerAuth )
685+
686+ ### HTTP request headers
687+
688+ - ** Content-Type** : multipart/form-data
689+ - ** Accept** : application/json
690+
691+ ### HTTP response details
692+
693+ | Status code | Description | Response headers |
694+ | -------------| -------------| ------------------|
695+ ** 202** | Successful Response | - |
696+ ** 422** | Validation Error | - |
697+ ** 0** | Error response. | - |
698+
699+ [[ Back to top]] ( # ) [[ Back to API list]] ( ../README.md#documentation-for-api-endpoints ) [[ Back to Model list]] ( ../README.md#documentation-for-models ) [[ Back to README]] ( ../README.md )
700+
600701# ** list_documents**
601702> PaginatedResponseDocumentResponse list_documents(parent_path_part_id=parent_path_part_id, sort_order=sort_order, sort_dir=sort_dir, owner_id=owner_id, document_type=document_type, with_tags=with_tags, limit=limit, offset=offset, created_after=created_after, created_before=created_before, updated_after=updated_after, updated_before=updated_before)
602703
0 commit comments