ksapi 1.24.0
Knowledge Stack API
Requires Python: >=3.9
Keywords: OpenAPI, OpenAPI-Generator, Knowledge Stack API

# ksapi
Knowledge Stack backend API for authentication and knowledge management

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 0.1.0
- Package version: 1.24.0
- Generator version: 7.20.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python 3.9+

## Installation & Usage
### pip install

If the python package is hosted on a repository, you can install directly using:

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import ksapi
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import ksapi
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import ksapi
from ksapi.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
    host = "http://localhost:8000"
)



# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ksapi.ThreadMessagesApi(api_client)
    thread_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    create_thread_message_request = ksapi.CreateThreadMessageRequest() # CreateThreadMessageRequest | 
    ks_uat = 'ks_uat_example' # str |  (optional)

    try:
        # Create Thread Message Handler
        api_response = api_instance.create_thread_message(thread_id, create_thread_message_request, ks_uat=ks_uat)
        print("The response of ThreadMessagesApi->create_thread_message:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ThreadMessagesApi->create_thread_message: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *http://localhost:8000*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ThreadMessagesApi* | [**create_thread_message**](docs/ThreadMessagesApi.md#create_thread_message) | **POST** /v1/threads/{thread_id}/messages | Create Thread Message Handler
*ThreadMessagesApi* | [**get_thread_message**](docs/ThreadMessagesApi.md#get_thread_message) | **GET** /v1/threads/{thread_id}/messages/{message_id} | Get Thread Message Handler
*ThreadMessagesApi* | [**list_thread_messages**](docs/ThreadMessagesApi.md#list_thread_messages) | **GET** /v1/threads/{thread_id}/messages | List Thread Messages Handler
*ThreadsApi* | [**create_thread**](docs/ThreadsApi.md#create_thread) | **POST** /v1/threads | Create Thread Handler
*ThreadsApi* | [**delete_thread**](docs/ThreadsApi.md#delete_thread) | **DELETE** /v1/threads/{thread_id} | Delete Thread Handler
*ThreadsApi* | [**get_thread**](docs/ThreadsApi.md#get_thread) | **GET** /v1/threads/{thread_id} | Get Thread Handler
*ThreadsApi* | [**list_threads**](docs/ThreadsApi.md#list_threads) | **GET** /v1/threads | List Threads Handler
*ThreadsApi* | [**stream_thread**](docs/ThreadsApi.md#stream_thread) | **GET** /v1/threads/{thread_id}/stream | Stream Thread Handler
*ThreadsApi* | [**update_thread**](docs/ThreadsApi.md#update_thread) | **PATCH** /v1/threads/{thread_id} | Update Thread Handler
*AuthApi* | [**create_password_user**](docs/AuthApi.md#create_password_user) | **POST** /v1/auth/pw/user | Create Password User Handler
*AuthApi* | [**initiate_sso**](docs/AuthApi.md#initiate_sso) | **POST** /v1/auth/sso/initiate | Initiate Sso Handler
*AuthApi* | [**oauth2_callback**](docs/AuthApi.md#oauth2_callback) | **GET** /v1/auth/sso/oauth2/callback | Oauth2 Callback Handler
*AuthApi* | [**pw_email_verification**](docs/AuthApi.md#pw_email_verification) | **POST** /v1/auth/pw/email_verification | Pw Email Verification Handler
*AuthApi* | [**pw_signin**](docs/AuthApi.md#pw_signin) | **POST** /v1/auth/pw/signin | Signin Handler
*AuthApi* | [**refresh_uat**](docs/AuthApi.md#refresh_uat) | **POST** /v1/auth/uat | Refresh Uat Handler
*AuthApi* | [**reset_password**](docs/AuthApi.md#reset_password) | **POST** /v1/auth/pw/reset | Reset Password Handler
*AuthApi* | [**reset_password_with_token**](docs/AuthApi.md#reset_password_with_token) | **POST** /v1/auth/pw/reset_with_token | Reset Password With Token Handler
*AuthApi* | [**send_pw_reset_email**](docs/AuthApi.md#send_pw_reset_email) | **POST** /v1/auth/pw/send_reset_email | Send Pw Reset Email Handler
*AuthApi* | [**signout**](docs/AuthApi.md#signout) | **POST** /v1/auth/signout | Signout Handler
*ChunkLineagesApi* | [**create_chunk_lineage**](docs/ChunkLineagesApi.md#create_chunk_lineage) | **POST** /v1/chunk-lineages | Create Chunk Lineage Handler
*ChunkLineagesApi* | [**delete_chunk_lineage**](docs/ChunkLineagesApi.md#delete_chunk_lineage) | **DELETE** /v1/chunk-lineages | Delete Chunk Lineage Handler
*ChunkLineagesApi* | [**get_chunk_lineage**](docs/ChunkLineagesApi.md#get_chunk_lineage) | **GET** /v1/chunk-lineages/{chunk_id} | Get Chunk Lineage Handler
*ChunksApi* | [**create_chunk**](docs/ChunksApi.md#create_chunk) | **POST** /v1/chunks | Create Chunk Handler
*ChunksApi* | [**delete_chunk**](docs/ChunksApi.md#delete_chunk) | **DELETE** /v1/chunks/{chunk_id} | Delete Chunk Handler
*ChunksApi* | [**get_chunk**](docs/ChunksApi.md#get_chunk) | **GET** /v1/chunks/{chunk_id} | Get Chunk Handler
*ChunksApi* | [**search_chunks**](docs/ChunksApi.md#search_chunks) | **POST** /v1/chunks/search | Search Chunks Handler
*ChunksApi* | [**update_chunk_content**](docs/ChunksApi.md#update_chunk_content) | **PATCH** /v1/chunks/{chunk_id}/content | Update Chunk Content Handler
*ChunksApi* | [**update_chunk_metadata**](docs/ChunksApi.md#update_chunk_metadata) | **PATCH** /v1/chunks/{chunk_id} | Update Chunk Metadata Handler
*DefaultApi* | [**health_check**](docs/DefaultApi.md#health_check) | **GET** /healthz | Health Check Handler
*DefaultApi* | [**hello**](docs/DefaultApi.md#hello) | **GET** / | Root Handler
*DocumentVersionsApi* | [**clear_document_version_contents**](docs/DocumentVersionsApi.md#clear_document_version_contents) | **DELETE** /v1/document_versions/{version_id}/contents | Clear Document Version Contents Handler
*DocumentVersionsApi* | [**create_document_version**](docs/DocumentVersionsApi.md#create_document_version) | **POST** /v1/documents/{document_id}/versions | Create Document Version Handler
*DocumentVersionsApi* | [**delete_document_version**](docs/DocumentVersionsApi.md#delete_document_version) | **DELETE** /v1/document_versions/{version_id} | Delete Document Version Handler
*DocumentVersionsApi* | [**get_document_version**](docs/DocumentVersionsApi.md#get_document_version) | **GET** /v1/document_versions/{version_id} | Get Document Version Handler
*DocumentVersionsApi* | [**get_document_version_contents**](docs/DocumentVersionsApi.md#get_document_version_contents) | **GET** /v1/document_versions/{version_id}/contents | Get Document Version Contents Handler
*DocumentVersionsApi* | [**list_document_versions**](docs/DocumentVersionsApi.md#list_document_versions) | **GET** /v1/document_versions | List Document Versions Handler
*DocumentVersionsApi* | [**update_document_version_metadata**](docs/DocumentVersionsApi.md#update_document_version_metadata) | **PATCH** /v1/document_versions/{version_id}/metadata | Update Document Version Metadata Handler
*DocumentsApi* | [**create_document**](docs/DocumentsApi.md#create_document) | **POST** /v1/documents | Create Document Handler
*DocumentsApi* | [**delete_document**](docs/DocumentsApi.md#delete_document) | **DELETE** /v1/documents/{document_id} | Delete Document Handler
*DocumentsApi* | [**get_document**](docs/DocumentsApi.md#get_document) | **GET** /v1/documents/{document_id} | Get Document Handler
*DocumentsApi* | [**ingest_document**](docs/DocumentsApi.md#ingest_document) | **POST** /v1/documents/ingest | Ingest Document Handler
*DocumentsApi* | [**list_documents**](docs/DocumentsApi.md#list_documents) | **GET** /v1/documents | List Documents Handler
*DocumentsApi* | [**update_document**](docs/DocumentsApi.md#update_document) | **PATCH** /v1/documents/{document_id} | Update Document Handler
*FoldersApi* | [**create_folder**](docs/FoldersApi.md#create_folder) | **POST** /v1/folders | Create Folder Handler
*FoldersApi* | [**delete_folder**](docs/FoldersApi.md#delete_folder) | **DELETE** /v1/folders/{folder_id} | Delete Folder Handler
*FoldersApi* | [**get_folder**](docs/FoldersApi.md#get_folder) | **GET** /v1/folders/{folder_id} | Get Folder Handler
*FoldersApi* | [**list_folder_contents**](docs/FoldersApi.md#list_folder_contents) | **GET** /v1/folders/{folder_id}/contents | List Folder Contents Handler
*FoldersApi* | [**list_folders**](docs/FoldersApi.md#list_folders) | **GET** /v1/folders | List Folders Handler
*FoldersApi* | [**update_folder**](docs/FoldersApi.md#update_folder) | **PATCH** /v1/folders/{folder_id} | Update Folder Handler
*InvitesApi* | [**accept_invite**](docs/InvitesApi.md#accept_invite) | **POST** /v1/invites/{invite_id}/accept | Accept Invite
*InvitesApi* | [**create_invite**](docs/InvitesApi.md#create_invite) | **POST** /v1/invites | Create Invite
*InvitesApi* | [**delete_invite**](docs/InvitesApi.md#delete_invite) | **DELETE** /v1/invites/{invite_id} | Delete Invite
*InvitesApi* | [**list_invites**](docs/InvitesApi.md#list_invites) | **GET** /v1/invites | List Invites Handler
*PathPartsApi* | [**bulk_add_path_part_tags**](docs/PathPartsApi.md#bulk_add_path_part_tags) | **POST** /v1/path-parts/{path_part_id}/tags | Bulk Add Path Part Tags Handler
*PathPartsApi* | [**bulk_remove_path_part_tags**](docs/PathPartsApi.md#bulk_remove_path_part_tags) | **DELETE** /v1/path-parts/{path_part_id}/tags | Bulk Remove Path Part Tags Handler
*PathPartsApi* | [**get_path_part**](docs/PathPartsApi.md#get_path_part) | **GET** /v1/path-parts/{path_part_id} | Get Path Part Handler
*PathPartsApi* | [**list_path_parts**](docs/PathPartsApi.md#list_path_parts) | **GET** /v1/path-parts | List Path Parts Handler
*SectionsApi* | [**create_section**](docs/SectionsApi.md#create_section) | **POST** /v1/sections | Create Section Handler
*SectionsApi* | [**delete_section**](docs/SectionsApi.md#delete_section) | **DELETE** /v1/sections/{section_id} | Delete Section Handler
*SectionsApi* | [**get_section**](docs/SectionsApi.md#get_section) | **GET** /v1/sections/{section_id} | Get Section Handler
*SectionsApi* | [**update_section**](docs/SectionsApi.md#update_section) | **PATCH** /v1/sections/{section_id} | Update Section Handler
*TagsApi* | [**create_tag**](docs/TagsApi.md#create_tag) | **POST** /v1/tags | Create Tag Handler
*TagsApi* | [**delete_tag**](docs/TagsApi.md#delete_tag) | **DELETE** /v1/tags/{tag_id} | Delete Tag Handler
*TagsApi* | [**get_tag**](docs/TagsApi.md#get_tag) | **GET** /v1/tags/{tag_id} | Get Tag Handler
*TagsApi* | [**list_tags**](docs/TagsApi.md#list_tags) | **GET** /v1/tags | List Tags Handler
*TagsApi* | [**update_tag**](docs/TagsApi.md#update_tag) | **PATCH** /v1/tags/{tag_id} | Update Tag Handler
*TenantsApi* | [**create_tenant**](docs/TenantsApi.md#create_tenant) | **POST** /v1/tenants | Create Tenant
*TenantsApi* | [**delete_tenant**](docs/TenantsApi.md#delete_tenant) | **DELETE** /v1/tenants/{tenant_id} | Delete Tenant
*TenantsApi* | [**delete_tenant_user**](docs/TenantsApi.md#delete_tenant_user) | **DELETE** /v1/tenants/{tenant_id}/users/{user_id} | Delete Tenant User
*TenantsApi* | [**get_tenant**](docs/TenantsApi.md#get_tenant) | **GET** /v1/tenants/{tenant_id} | Get Tenant
*TenantsApi* | [**list_tenant_users**](docs/TenantsApi.md#list_tenant_users) | **GET** /v1/tenants/{tenant_id}/users | List Tenant Users
*TenantsApi* | [**list_tenants**](docs/TenantsApi.md#list_tenants) | **GET** /v1/tenants | List Tenants
*TenantsApi* | [**update_tenant**](docs/TenantsApi.md#update_tenant) | **PATCH** /v1/tenants/{tenant_id} | Update Tenant
*TenantsApi* | [**update_tenant_user**](docs/TenantsApi.md#update_tenant_user) | **PATCH** /v1/tenants/{tenant_id}/users/{user_id} | Update Tenant User
*UserPermissionsApi* | [**create_user_permission**](docs/UserPermissionsApi.md#create_user_permission) | **POST** /v1/user-permissions | Create User Permission Handler
*UserPermissionsApi* | [**delete_user_permission**](docs/UserPermissionsApi.md#delete_user_permission) | **DELETE** /v1/user-permissions/{permission_id} | Delete User Permission Handler
*UserPermissionsApi* | [**list_user_permissions**](docs/UserPermissionsApi.md#list_user_permissions) | **GET** /v1/user-permissions | List User Permissions Handler
*UserPermissionsApi* | [**update_user_permission**](docs/UserPermissionsApi.md#update_user_permission) | **PATCH** /v1/user-permissions/{permission_id} | Update User Permission Handler
*UsersApi* | [**get_me**](docs/UsersApi.md#get_me) | **GET** /v1/users/me | Get Me Handler
*UsersApi* | [**update_me**](docs/UsersApi.md#update_me) | **PATCH** /v1/users | Update Me Handler
*WorkflowsApi* | [**get_workflow**](docs/WorkflowsApi.md#get_workflow) | **GET** /v1/workflows/{workflow_id} | Get Workflow Handler
*WorkflowsApi* | [**list_workflows**](docs/WorkflowsApi.md#list_workflows) | **GET** /v1/workflows | List Workflows Handler
*WorkflowsApi* | [**workflow_action**](docs/WorkflowsApi.md#workflow_action) | **POST** /v1/workflows/{workflow_id} | Workflow Action Handler


## Documentation For Models

 - [BulkTagRequest](docs/BulkTagRequest.md)
 - [ChunkContentItem](docs/ChunkContentItem.md)
 - [ChunkLineageResponse](docs/ChunkLineageResponse.md)
 - [ChunkMetadataInput](docs/ChunkMetadataInput.md)
 - [ChunkMetadataOutput](docs/ChunkMetadataOutput.md)
 - [ChunkResponse](docs/ChunkResponse.md)
 - [ChunkSearchRequest](docs/ChunkSearchRequest.md)
 - [ChunkType](docs/ChunkType.md)
 - [ClearVersionContentsResponse](docs/ClearVersionContentsResponse.md)
 - [CreateChunkLineageRequest](docs/CreateChunkLineageRequest.md)
 - [CreateChunkRequest](docs/CreateChunkRequest.md)
 - [CreateDocumentRequest](docs/CreateDocumentRequest.md)
 - [CreateFolderRequest](docs/CreateFolderRequest.md)
 - [CreatePasswordUserRequest](docs/CreatePasswordUserRequest.md)
 - [CreatePermissionRequest](docs/CreatePermissionRequest.md)
 - [CreateSectionRequest](docs/CreateSectionRequest.md)
 - [CreateTagRequest](docs/CreateTagRequest.md)
 - [CreateTenantRequest](docs/CreateTenantRequest.md)
 - [CreateThreadMessageRequest](docs/CreateThreadMessageRequest.md)
 - [CreateThreadRequest](docs/CreateThreadRequest.md)
 - [DocumentOrigin](docs/DocumentOrigin.md)
 - [DocumentResponse](docs/DocumentResponse.md)
 - [DocumentType](docs/DocumentType.md)
 - [DocumentVersionMetadata](docs/DocumentVersionMetadata.md)
 - [DocumentVersionMetadataUpdate](docs/DocumentVersionMetadataUpdate.md)
 - [DocumentVersionResponse](docs/DocumentVersionResponse.md)
 - [EmailSentResponse](docs/EmailSentResponse.md)
 - [EmailVerificationRequest](docs/EmailVerificationRequest.md)
 - [EmbeddingModel](docs/EmbeddingModel.md)
 - [FolderResponse](docs/FolderResponse.md)
 - [FolderResponseOrDocumentResponse](docs/FolderResponseOrDocumentResponse.md)
 - [HTTPValidationError](docs/HTTPValidationError.md)
 - [HealthCheckResponse](docs/HealthCheckResponse.md)
 - [IdpType](docs/IdpType.md)
 - [IngestDocumentResponse](docs/IngestDocumentResponse.md)
 - [InviteResponse](docs/InviteResponse.md)
 - [InviteStatus](docs/InviteStatus.md)
 - [InviteUserRequest](docs/InviteUserRequest.md)
 - [LineageEdgeResponse](docs/LineageEdgeResponse.md)
 - [LineageGraphResponse](docs/LineageGraphResponse.md)
 - [LineageNodeResponse](docs/LineageNodeResponse.md)
 - [LocationInner](docs/LocationInner.md)
 - [MessageRole](docs/MessageRole.md)
 - [OAuth2Config](docs/OAuth2Config.md)
 - [PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator](docs/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.md)
 - [PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator](docs/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.md)
 - [PaginatedResponseDocumentResponse](docs/PaginatedResponseDocumentResponse.md)
 - [PaginatedResponseDocumentVersionResponse](docs/PaginatedResponseDocumentVersionResponse.md)
 - [PaginatedResponseFolderResponse](docs/PaginatedResponseFolderResponse.md)
 - [PaginatedResponseInviteResponse](docs/PaginatedResponseInviteResponse.md)
 - [PaginatedResponsePathPartResponse](docs/PaginatedResponsePathPartResponse.md)
 - [PaginatedResponsePermissionResponse](docs/PaginatedResponsePermissionResponse.md)
 - [PaginatedResponseTagResponse](docs/PaginatedResponseTagResponse.md)
 - [PaginatedResponseTenantResponse](docs/PaginatedResponseTenantResponse.md)
 - [PaginatedResponseTenantUserResponse](docs/PaginatedResponseTenantUserResponse.md)
 - [PaginatedResponseThreadMessageResponse](docs/PaginatedResponseThreadMessageResponse.md)
 - [PaginatedResponseThreadResponse](docs/PaginatedResponseThreadResponse.md)
 - [PaginatedResponseWorkflowSummaryResponse](docs/PaginatedResponseWorkflowSummaryResponse.md)
 - [PartType](docs/PartType.md)
 - [PasswordResetRequest](docs/PasswordResetRequest.md)
 - [PasswordResetWithTokenRequest](docs/PasswordResetWithTokenRequest.md)
 - [PathOrder](docs/PathOrder.md)
 - [PathPartResponse](docs/PathPartResponse.md)
 - [PathPartTagsResponse](docs/PathPartTagsResponse.md)
 - [PermissionCapability](docs/PermissionCapability.md)
 - [PermissionResponse](docs/PermissionResponse.md)
 - [PipelineState](docs/PipelineState.md)
 - [PipelineStatus](docs/PipelineStatus.md)
 - [Polygon](docs/Polygon.md)
 - [PolygonReference](docs/PolygonReference.md)
 - [RootResponse](docs/RootResponse.md)
 - [ScoredChunkResponse](docs/ScoredChunkResponse.md)
 - [SectionContentItem](docs/SectionContentItem.md)
 - [SectionContentItemOrChunkContentItem](docs/SectionContentItemOrChunkContentItem.md)
 - [SectionResponse](docs/SectionResponse.md)
 - [SignInRequest](docs/SignInRequest.md)
 - [TagResponse](docs/TagResponse.md)
 - [TenantResponse](docs/TenantResponse.md)
 - [TenantUserEditRequest](docs/TenantUserEditRequest.md)
 - [TenantUserResponse](docs/TenantUserResponse.md)
 - [TenantUserRole](docs/TenantUserRole.md)
 - [ThreadMessageResponse](docs/ThreadMessageResponse.md)
 - [ThreadResponse](docs/ThreadResponse.md)
 - [UpdateChunkContentRequest](docs/UpdateChunkContentRequest.md)
 - [UpdateChunkMetadataRequest](docs/UpdateChunkMetadataRequest.md)
 - [UpdateDocumentRequest](docs/UpdateDocumentRequest.md)
 - [UpdateFolderRequest](docs/UpdateFolderRequest.md)
 - [UpdatePermissionRequest](docs/UpdatePermissionRequest.md)
 - [UpdateSectionRequest](docs/UpdateSectionRequest.md)
 - [UpdateTagRequest](docs/UpdateTagRequest.md)
 - [UpdateTenantRequest](docs/UpdateTenantRequest.md)
 - [UpdateThreadRequest](docs/UpdateThreadRequest.md)
 - [UpdateUserRequest](docs/UpdateUserRequest.md)
 - [UserResponse](docs/UserResponse.md)
 - [ValidationError](docs/ValidationError.md)
 - [WorkflowAction](docs/WorkflowAction.md)
 - [WorkflowActionResponse](docs/WorkflowActionResponse.md)
 - [WorkflowDetailResponse](docs/WorkflowDetailResponse.md)
 - [WorkflowSummaryResponse](docs/WorkflowSummaryResponse.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization

Endpoints do not require authorization.


## Author