Skip to main content

public-api

Project description

knowledge-stack

Public-facing API for external access

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 8779317
  • Package version: 0.9.2
  • Generator version: 7.16.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:

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:

import knowledge_stack

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import knowledge_stack

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import knowledge_stack
from knowledge_stack.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 = knowledge_stack.Configuration(
    host = "http://localhost:8000"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: HTTPBearer
configuration = knowledge_stack.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with knowledge_stack.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = knowledge_stack.AdminApi(api_client)
    req_organization_create = knowledge_stack.ReqOrganizationCreate() # ReqOrganizationCreate | 
    ks_uat = 'ks_uat_example' # str |  (optional)

    try:
        # Create a new organization
        api_response = api_instance.create_organization(req_organization_create, ks_uat=ks_uat)
        print("The response of AdminApi->create_organization:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AdminApi->create_organization: %s\n" % e)

Documentation for API Endpoints

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

Class Method HTTP request Description
AdminApi create_organization POST /api/v1/admin/organizations Create a new organization
AdminApi delete_organization DELETE /api/v1/admin/organizations/{organization_id} Delete organization
AdminApi get_organization_by_id GET /api/v1/admin/organizations/{organization_id} Get organization by ID
AdminApi list_organizations GET /api/v1/admin/organizations List organizations
AdminApi restore_organization POST /api/v1/admin/organizations/{organization_id}/restore Restore organization
AdminApi update_organization PUT /api/v1/admin/organizations/{organization_id} Update organization
AgentParticipantsApi create_agent_participant POST /api/v1/tenant/{tenant_id}/agents Create Agent Participant
AgentParticipantsApi delete_agent_participant DELETE /api/v1/tenant/{tenant_id}/agents/{participant_id} Delete Agent Participant Handler
AgentParticipantsApi get_agent_participant GET /api/v1/tenant/{tenant_id}/agents/{participant_id} Get Agent Participant Handler
AgentParticipantsApi list_agent_participants GET /api/v1/tenant/{tenant_id}/agents List Agent Participants Handler
AgentParticipantsApi update_agent_participant PATCH /api/v1/tenant/{tenant_id}/agents/{participant_id} Update Agent Participant Handler
AuthApi accept_invite POST /api/v1/auth/invite/accept Invite Handler
AuthApi create_default_tenant_with_user_admin POST /api/v1/auth/tenant/default Create default tenant with user admin
AuthApi create_ksidp_pw_user POST /api/v1/auth/ksidp/user/create_pw_user Create Ksidp Pw User Handler
AuthApi exchange_identity_token_for_user_access_token POST /api/v1/auth/token/uat Exchange identity token for user access token
AuthApi get_ks_thread_token_identity GET /api/v1/auth/token/thread Get thread token identity
AuthApi get_ksidp_user GET /api/v1/auth/ksidp/user Get Ksidp User Handler
AuthApi initiate_ksidp_flow POST /api/v1/auth/idp/ks/initiate Initiate KS IdP flow
AuthApi ksidp_oauth_callback GET /api/v1/auth/oauth/callback KS IdP OAuth callback
AuthApi ksidp_pw_user_signin POST /api/v1/auth/ksidp/user/signin Ksidp Pw User Signin Handler
AuthApi list_tenants_for_user GET /api/v1/auth/tenant List tenants for a user
AuthApi logout POST /api/v1/auth/logout Logout Handler
AuthApi refresh_ks_thread_token POST /api/v1/auth/token/thread/refresh Refresh thread token
AuthApi refresh_user_access_token POST /api/v1/auth/token/uat/refresh Refresh user access token
AuthApi verify_ksidp_user_email POST /api/v1/auth/ksidp/user/verify_email Verify Ksidp User Email Handler
ChunksApi get_chunk_content GET /api/v1/tenant/{tenant_id}/chunks/{chunk_id} Get Chunk
ChunksApi get_chunk_lineage GET /api/v1/tenant/{tenant_id}/chunks/{chunk_id}/lineage Get chunk lineage
ChunksApi list_chunks GET /api/v1/tenant/{tenant_id}/chunks List Chunks
ChunksApi update_chunk_validation PUT /api/v1/tenant/{tenant_id}/chunks/{chunk_id}/validation Update Chunk Validation
DocumentTagsApi list_document_tags GET /api/v1/tenant/{tenant_id}/documents/{document_id}/tags List Document Tags Endpoint
DocumentTagsApi update_document_tags PUT /api/v1/tenant/{tenant_id}/documents/{document_id}/tags Update Document Tags Endpoint
DocumentsApi create_document_version POST /api/v1/tenant/{tenant_id}/document_versions Create Document Version for a given document ID
DocumentsApi delete_document DELETE /api/v1/tenant/{tenant_id}/documents/{document_id} Delete Document by ID
DocumentsApi get_document_by_id GET /api/v1/tenant/{tenant_id}/documents/{document_id} Get Document by ID
DocumentsApi get_document_version GET /api/v1/tenant/{tenant_id}/document_versions/{document_version_id} Get Document Version by document version ID
DocumentsApi ingest_document POST /api/v1/tenant/{tenant_id}/folders/{folder_id}/documents/ingest Create Document
DocumentsApi list_document_versions GET /api/v1/tenant/{tenant_id}/document_versions List Document Versions for a given document ID
DocumentsApi list_documents GET /api/v1/tenant/{tenant_id}/documents List Documents
DocumentsApi move_document PATCH /api/v1/tenant/{tenant_id}/documents/{document_id}/folder Move Document to Different Folder
DocumentsApi restore_document POST /api/v1/tenant/{tenant_id}/documents/{document_id}/restore Restore Document by ID
DocumentsApi retry_ingest_document PUT /api/v1/tenant/{tenant_id}/documents/{document_id}/ingest Retry Ingest Document
DocumentsApi update_document PATCH /api/v1/tenant/{tenant_id}/documents/{document_id} Update Document by ID
FolderTagsApi list_folder_tags GET /api/v1/tenant/{tenant_id}/folders/{folder_id}/tags List Folder Tags Endpoint
FolderTagsApi update_folder_tags PUT /api/v1/tenant/{tenant_id}/folders/{folder_id}/tags Update Folder Tags Endpoint
FoldersApi create_folder POST /api/v1/tenant/{tenant_id}/folders Create Folder Endpoint
FoldersApi delete_folder DELETE /api/v1/tenant/{tenant_id}/folders/{folder_id} Delete Folder
FoldersApi get_folder GET /api/v1/tenant/{tenant_id}/folders/{folder_id} Get Folder Endpoint
FoldersApi list_folder_contents GET /api/v1/tenant/{tenant_id}/folders/contents List Folder Contents Endpoint
FoldersApi move_folder PATCH /api/v1/tenant/{tenant_id}/folders/{folder_id}/move Move Folder Endpoint
FoldersApi rename_folder PATCH /api/v1/tenant/{tenant_id}/folders/{folder_id}/rename Rename Folder Endpoint
FoldersApi restore_folder POST /api/v1/tenant/{tenant_id}/folders/{folder_id}/restore Restore Folder
FoldersApi update_folder_metadata PATCH /api/v1/tenant/{tenant_id}/folders/{folder_id}/metadata Update Folder Metadata Endpoint
InviteApi create_or_get_active_invite POST /api/v1/tenant/{tenant_id}/invite Create or get active invite
InviteApi delete_invite DELETE /api/v1/tenant/{tenant_id}/invite/{invite_id} Delete Invite
InviteApi get_tenant_invite GET /api/v1/tenant/{tenant_id}/invite/{invite_id} Get Invite
InviteApi list_invites GET /api/v1/tenant/{tenant_id}/invite List Invites
JobsApi get_job GET /api/v1/tenant/{tenant_id}/jobs/{job_id} Get Job details
JobsApi list_jobs GET /api/v1/tenant/{tenant_id}/jobs List Jobs
OrganizationApi create_tenant POST /api/v1/organization/{organization_id}/tenants Create a new tenant under the given organization
OrganizationApi delete_tenant_by_id DELETE /api/v1/organization/{organization_id}/tenants/{tenant_id} Delete tenant
OrganizationApi list_tenants GET /api/v1/organization/{organization_id}/tenants List tenants with optional filtering
OrganizationApi restore_tenant_by_id POST /api/v1/organization/{organization_id}/tenants/{tenant_id}/restore Restore tenant
QueryApi ask POST /api/v1/tenant/{tenant_id}/query/ask DEPRECATED: Use the new search endpoint instead
SearchApi search_chunks POST /api/v1/tenant/{tenant_id}/search/chunks Search chunks
TenantTagsApi create_tag POST /api/v1/tenant/{tenant_id}/tags Create a new tenant tag
TenantTagsApi delete_tag DELETE /api/v1/tenant/{tenant_id}/tags/{tag_id} Delete tenant tag
TenantTagsApi get_tag GET /api/v1/tenant/{tenant_id}/tags/{tag_id} Get tenant tag by ID
TenantTagsApi list_tags GET /api/v1/tenant/{tenant_id}/tags List tenant tags
TenantTagsApi restore_tag POST /api/v1/tenant/{tenant_id}/tags/{tag_id}/restore Restore tenant tag
TenantTagsApi update_tag PUT /api/v1/tenant/{tenant_id}/tags/{tag_id} Update tenant tag
TenantThreadsApi add_thread_participants POST /api/v1/tenant/{tenant_id}/threads/{thread_id}/participants Add participants to a thread
TenantThreadsApi add_thread_participants_0 POST /api/v1/tenant/{tenant_id}/threads/{thread_id}/participants Add participants to a thread
TenantThreadsApi create_thread POST /api/v1/tenant/{tenant_id}/threads Create a new tenant thread
TenantThreadsApi delete_thread DELETE /api/v1/tenant/{tenant_id}/threads/{thread_id} Delete a thread
TenantThreadsApi get_thread GET /api/v1/tenant/{tenant_id}/threads/{thread_id} Get thread by ID
TenantThreadsApi list_thread_participants GET /api/v1/tenant/{tenant_id}/threads/{thread_id}/participants List participants in a thread
TenantThreadsApi list_thread_participants_0 GET /api/v1/tenant/{tenant_id}/threads/{thread_id}/participants List participants in a thread
TenantThreadsApi list_threads GET /api/v1/tenant/{tenant_id}/threads List threads
TenantThreadsApi remove_thread_participant DELETE /api/v1/tenant/{tenant_id}/threads/{thread_id}/participants/{participant_id} Remove a participant from a thread
TenantThreadsApi remove_thread_participant_0 DELETE /api/v1/tenant/{tenant_id}/threads/{thread_id}/participants/{participant_id} Remove a participant from a thread
TenantThreadsApi resume_thread_agent_token POST /api/v1/tenant/{tenant_id}/threads/{thread_id}/agent-token Resume thread by refreshing agent thread token
ThreadTurnsApi create_thread_turn POST /api/v1/tenant/{tenant_id}/threads/{thread_id}/turns Create a single turn
ThreadTurnsApi create_thread_turns_bulk POST /api/v1/tenant/{tenant_id}/threads/{thread_id}/turns/bulk Create turns in bulk
ThreadTurnsApi list_thread_turns GET /api/v1/tenant/{tenant_id}/threads/{thread_id}/turns List thread turns
UserParticipantsApi create_user_participant POST /api/v1/tenant/{tenant_id}/users Create User Participant
UserParticipantsApi delete_user_participant DELETE /api/v1/tenant/{tenant_id}/users/{participant_id} Delete User Participant Handler
UserParticipantsApi get_user_participant GET /api/v1/tenant/{tenant_id}/users/{participant_id} Get User Participant Handler
UserParticipantsApi list_user_participants GET /api/v1/tenant/{tenant_id}/users List User Participants Handler
UserParticipantsApi update_user_participant PATCH /api/v1/tenant/{tenant_id}/users/{participant_id} Update User Participant Handler
DefaultApi get_tenant_by_id GET /api/v1/tenant/{tenant_id} Get tenant by ID
DefaultApi update_tenant_by_id PUT /api/v1/tenant/{tenant_id} Update tenant

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

HTTPBearer

  • Type: Bearer authentication

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

knowledge_stack-0.9.2.tar.gz (114.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

knowledge_stack-0.9.2-py3-none-any.whl (243.6 kB view details)

Uploaded Python 3

File details

Details for the file knowledge_stack-0.9.2.tar.gz.

File metadata

  • Download URL: knowledge_stack-0.9.2.tar.gz
  • Upload date:
  • Size: 114.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for knowledge_stack-0.9.2.tar.gz
Algorithm Hash digest
SHA256 96d1bef75c297e3f3e197edc27cf73ace9db19b77b1d6e966f20c139d2a04b9f
MD5 80ead9913b114a2dd8ff8584bcbb15fb
BLAKE2b-256 d965908c0b22eb100e13f355b727f105e712d313e6dcbc1933fd55a9606fc7a7

See more details on using hashes here.

File details

Details for the file knowledge_stack-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: knowledge_stack-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 243.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for knowledge_stack-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 91ea1e67f41ff14b549837f3f37555b368e7afba70276fc8bd1cee719c714502
MD5 58bf6773e19b5a77723d4a03e00ff9fc
BLAKE2b-256 e694fe1794945c6776c53135384d366c78b0b37912c6ddb788c26e9b9ef6b381

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page