Skip to content

Latest commit

 

History

History
1844 lines (1315 loc) · 69.5 KB

File metadata and controls

1844 lines (1315 loc) · 69.5 KB

everos_cloud.KnowledgeApi

All URIs are relative to https://api.evermind.ai

Method HTTP request Description
create_category POST /api/v2/knowledge_bases/{kb_id}/categories Create a category
create_document POST /api/v2/knowledge_bases/{kb_id}/documents Upload a document
create_knowledge_base POST /api/v2/knowledge_bases Create a knowledge base
delete_category DELETE /api/v2/knowledge_bases/{kb_id}/categories/{category_id} Delete a category
delete_document DELETE /api/v2/knowledge_bases/{kb_id}/documents/{doc_id} Delete a document
delete_knowledge_base DELETE /api/v2/knowledge_bases/{kb_id} Delete a knowledge base
get_document GET /api/v2/knowledge_bases/{kb_id}/documents/{doc_id} Get a document
get_knowledge_base GET /api/v2/knowledge_bases/{kb_id} Get a knowledge base
get_topic GET /api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics/{topic_id} Get a topic
list_categories GET /api/v2/knowledge_bases/{kb_id}/categories List categories
list_documents GET /api/v2/knowledge_bases/{kb_id}/documents List documents
list_knowledge_bases GET /api/v2/knowledge_bases List knowledge bases
list_topics GET /api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics List a document's topics
list_topics_by_tags GET /api/v2/knowledge_bases/{kb_id}/topics List topics by tag
query_related_tags POST /api/v2/knowledge_bases/{kb_id}/tags Count tag usage
replace_document PUT /api/v2/knowledge_bases/{kb_id}/documents/{doc_id} Replace a document
replace_topic_tags POST /api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics/{topic_id}/tag/replace Replace a topic's tags
search_knowledge POST /api/v2/knowledge_bases/{kb_id}/search Search a knowledge base
update_category PATCH /api/v2/knowledge_bases/{kb_id}/categories/{category_id} Update a category
update_document PATCH /api/v2/knowledge_bases/{kb_id}/documents/{doc_id} Update a document
update_knowledge_base PATCH /api/v2/knowledge_bases/{kb_id} Update a knowledge base

create_category

SuccessEnvelopeCategoryData create_category(kb_id, category_create_body)

Create a category

Add a category to this knowledge base's taxonomy. Categories are what a document is filed under: on ingest each document is classified into one of them, unless the caller pins category_id on the upload. The category's description is not decoration — it is what the classifier matches a document against.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.category_create_body import CategoryCreateBody
from everos_cloud.models.success_envelope_category_data import SuccessEnvelopeCategoryData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 
    category_create_body = everos_cloud.CategoryCreateBody() # CategoryCreateBody | 

    try:
        # Create a category
        api_response = api_instance.create_category(kb_id, category_create_body)
        print("The response of KnowledgeApi->create_category:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->create_category: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str
category_create_body CategoryCreateBody

Return type

SuccessEnvelopeCategoryData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_document

SuccessEnvelopeDocIngestData create_document(kb_id, doc_ingest_body)

Upload a document

Upload a document for ingest. Ingest is asynchronous at the gateway: it answers 202 with status "queued" and a task_id, and the document id is minted downstream. Poll GET /api/v2/tasks/{task_id}, then resolve the id from GET .../documents. Ingest is only truly complete once that document reports topic_count greater than 0. - content is one content object: inline text, or a file already uploaded through POST /api/v2/object/sign and referenced by its object key as the content's uri. - category_id is optional — omit it to let the server classify the document into this base's taxonomy.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.doc_ingest_body import DocIngestBody
from everos_cloud.models.success_envelope_doc_ingest_data import SuccessEnvelopeDocIngestData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 
    doc_ingest_body = everos_cloud.DocIngestBody() # DocIngestBody | 

    try:
        # Upload a document
        api_response = api_instance.create_document(kb_id, doc_ingest_body)
        print("The response of KnowledgeApi->create_document:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->create_document: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str
doc_ingest_body DocIngestBody

Return type

SuccessEnvelopeDocIngestData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
202 Accepted for asynchronous ingest. The body carries `status` and `task_id` only; `id` is absent (minted downstream) — resolve it from GET .../documents. -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_knowledge_base

SuccessEnvelopeKbData create_knowledge_base(kb_create_input)

Create a knowledge base

Create a knowledge base — a searchable document library with its own category taxonomy. The returned id is the kb_id every other knowledge operation takes.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.kb_create_input import KbCreateInput
from everos_cloud.models.success_envelope_kb_data import SuccessEnvelopeKbData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_create_input = everos_cloud.KbCreateInput() # KbCreateInput | 

    try:
        # Create a knowledge base
        api_response = api_instance.create_knowledge_base(kb_create_input)
        print("The response of KnowledgeApi->create_knowledge_base:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->create_knowledge_base: %s\n" % e)

Parameters

Name Type Description Notes
kb_create_input KbCreateInput

Return type

SuccessEnvelopeKbData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_category

SuccessEnvelopeCategoryDeleteData delete_category(kb_id, category_id)

Delete a category

Delete a category from this knowledge base's taxonomy. Its documents are NOT deleted: they, and their topics, are reassigned to uncategorized first, then the category is soft-deleted. Idempotent: deleting one that is already gone returns deleted: false rather than 404.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.success_envelope_category_delete_data import SuccessEnvelopeCategoryDeleteData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 
    category_id = 'category_id_example' # str | 

    try:
        # Delete a category
        api_response = api_instance.delete_category(kb_id, category_id)
        print("The response of KnowledgeApi->delete_category:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->delete_category: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str
category_id str

Return type

SuccessEnvelopeCategoryDeleteData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_document

SuccessEnvelopeDocDeleteData delete_document(kb_id, doc_id)

Delete a document

Soft-delete a document. Its topics and their search-index entries are removed with it, so nothing of the document stays searchable. Idempotent — deleting one that is already gone returns deleted: false rather than 404.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.success_envelope_doc_delete_data import SuccessEnvelopeDocDeleteData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 
    doc_id = 'doc_id_example' # str | 

    try:
        # Delete a document
        api_response = api_instance.delete_document(kb_id, doc_id)
        print("The response of KnowledgeApi->delete_document:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->delete_document: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str
doc_id str

Return type

SuccessEnvelopeDocDeleteData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_knowledge_base

SuccessEnvelopeKbDeleteData delete_knowledge_base(kb_id)

Delete a knowledge base

Delete a knowledge base and everything under it. Every document — with its topics, search-index entries and stored objects — and every category are soft-deleted first, then the base itself. Idempotent: deleting a base that is already gone returns deleted: false rather than 404.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.success_envelope_kb_delete_data import SuccessEnvelopeKbDeleteData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 

    try:
        # Delete a knowledge base
        api_response = api_instance.delete_knowledge_base(kb_id)
        print("The response of KnowledgeApi->delete_knowledge_base:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->delete_knowledge_base: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str

Return type

SuccessEnvelopeKbDeleteData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_document

SuccessEnvelopeDocData get_document(kb_id, doc_id)

Get a document

Read one document's metadata, including how many topics were extracted from it. topic_count greater than 0 is also the authoritative signal that an async ingest finished. The text itself lives in those topics; list them with GET .../documents/{doc_id}/topics.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.success_envelope_doc_data import SuccessEnvelopeDocData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 
    doc_id = 'doc_id_example' # str | 

    try:
        # Get a document
        api_response = api_instance.get_document(kb_id, doc_id)
        print("The response of KnowledgeApi->get_document:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->get_document: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str
doc_id str

Return type

SuccessEnvelopeDocData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_knowledge_base

SuccessEnvelopeKbData get_knowledge_base(kb_id)

Get a knowledge base

Read one knowledge base's metadata, including its document count.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.success_envelope_kb_data import SuccessEnvelopeKbData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 

    try:
        # Get a knowledge base
        api_response = api_instance.get_knowledge_base(kb_id)
        print("The response of KnowledgeApi->get_knowledge_base:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->get_knowledge_base: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str

Return type

SuccessEnvelopeKbData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_topic

SuccessEnvelopeTopicDetailData get_topic(kb_id, doc_id, topic_id)

Get a topic

Read one topic's full content. Storage is transparent to the caller: content held inline and content held in object storage are returned the same way.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.success_envelope_topic_detail_data import SuccessEnvelopeTopicDetailData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 
    doc_id = 'doc_id_example' # str | 
    topic_id = 'topic_id_example' # str | 

    try:
        # Get a topic
        api_response = api_instance.get_topic(kb_id, doc_id, topic_id)
        print("The response of KnowledgeApi->get_topic:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->get_topic: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str
doc_id str
topic_id str

Return type

SuccessEnvelopeTopicDetailData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
404 Topic absent or not owned by the path kb/document -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_categories

SuccessEnvelopeCategoryListData list_categories(kb_id)

List categories

List this knowledge base's categories — both the ones created here and the tenant-global presets — each with the number of documents filed under it.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.success_envelope_category_list_data import SuccessEnvelopeCategoryListData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 

    try:
        # List categories
        api_response = api_instance.list_categories(kb_id)
        print("The response of KnowledgeApi->list_categories:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->list_categories: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str

Return type

SuccessEnvelopeCategoryListData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_documents

SuccessEnvelopeDocListData list_documents(kb_id, category_id=category_id, page=page, page_size=page_size)

List documents

Paginated list of the documents in a knowledge base, each with its category and topic count. Filterable by category.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.success_envelope_doc_list_data import SuccessEnvelopeDocListData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 
    category_id = 'category_id_example' # str |  (optional)
    page = 1 # int |  (optional) (default to 1)
    page_size = 20 # int |  (optional) (default to 20)

    try:
        # List documents
        api_response = api_instance.list_documents(kb_id, category_id=category_id, page=page, page_size=page_size)
        print("The response of KnowledgeApi->list_documents:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->list_documents: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str
category_id str [optional]
page int [optional] [default to 1]
page_size int [optional] [default to 20]

Return type

SuccessEnvelopeDocListData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_knowledge_bases

SuccessEnvelopeKbListData list_knowledge_bases(page=page, page_size=page_size, owner_id=owner_id)

List knowledge bases

Paginated list of the account's knowledge bases, each with its document count.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.success_envelope_kb_list_data import SuccessEnvelopeKbListData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    page = 1 # int |  (optional) (default to 1)
    page_size = 20 # int |  (optional) (default to 20)
    owner_id = 'owner_id_example' # str |  (optional)

    try:
        # List knowledge bases
        api_response = api_instance.list_knowledge_bases(page=page, page_size=page_size, owner_id=owner_id)
        print("The response of KnowledgeApi->list_knowledge_bases:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->list_knowledge_bases: %s\n" % e)

Parameters

Name Type Description Notes
page int [optional] [default to 1]
page_size int [optional] [default to 20]
owner_id str [optional]

Return type

SuccessEnvelopeKbListData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_topics

SuccessEnvelopeTopicListData list_topics(kb_id, doc_id, include=include)

List a document's topics

List a document's topic tree — the sections an LLM extracted from it. The list is flat and already in depth-first order; build the tree from each item's parent_id. - It includes one synthetic document-root item (type "root"), so it returns exactly one more item than the document's topic_count, which counts real topics only. - Bodies are omitted by default. Ask for content in include to hydrate every item — that can enlarge the response by orders of magnitude.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.success_envelope_topic_list_data import SuccessEnvelopeTopicListData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 
    doc_id = 'doc_id_example' # str | 
    include = ['include_example'] # List[Optional[str]] | Extra fields to hydrate, e.g. `include=content` for full bodies (optional)

    try:
        # List a document's topics
        api_response = api_instance.list_topics(kb_id, doc_id, include=include)
        print("The response of KnowledgeApi->list_topics:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->list_topics: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str
doc_id str
include List[Optional[str]] Extra fields to hydrate, e.g. `include=content` for full bodies [optional]

Return type

SuccessEnvelopeTopicListData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_topics_by_tags

SuccessEnvelopeTopicFilterListData list_topics_by_tags(kb_id, tag_ids, page=page, page_size=page_size)

List topics by tag

List the topics that carry every one of the given tags. This is a hard filter, not a ranking: a topic is returned only if it has all of the tags you asked for, and total counts every match before paging.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.success_envelope_topic_filter_list_data import SuccessEnvelopeTopicFilterListData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | The knowledge base to search within.
    tag_ids = ['tag_ids_example'] # List[str] | Hard filter: a topic is returned only if it carries EVERY one of these tag ids. Use `boost_tag_ids` on the search endpoint instead to reweight without excluding anything.
    page = 1 # int | 1-based page number. (optional) (default to 1)
    page_size = 20 # int | Items per page, 1 to 100 (default 20). (optional) (default to 20)

    try:
        # List topics by tag
        api_response = api_instance.list_topics_by_tags(kb_id, tag_ids, page=page, page_size=page_size)
        print("The response of KnowledgeApi->list_topics_by_tags:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->list_topics_by_tags: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str The knowledge base to search within.
tag_ids List[str] Hard filter: a topic is returned only if it carries EVERY one of these tag ids. Use `boost_tag_ids` on the search endpoint instead to reweight without excluding anything.
page int 1-based page number. [optional] [default to 1]
page_size int Items per page, 1 to 100 (default 20). [optional] [default to 20]

Return type

SuccessEnvelopeTopicFilterListData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

query_related_tags

SuccessEnvelopeRelatedTagUsageListData query_related_tags(kb_id, related_tag_usage_body)

Count tag usage

Count how many documents use each of the given tags, within one knowledge base. Send the tag ids you are interested in. The response returns those actually in use, sorted by id, each with a count of the distinct documents carrying it. Counts are read across several queries rather than from one snapshot, so a tag added or removed at that exact moment may be counted either way.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.related_tag_usage_body import RelatedTagUsageBody
from everos_cloud.models.success_envelope_related_tag_usage_list_data import SuccessEnvelopeRelatedTagUsageListData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 
    related_tag_usage_body = everos_cloud.RelatedTagUsageBody() # RelatedTagUsageBody | 

    try:
        # Count tag usage
        api_response = api_instance.query_related_tags(kb_id, related_tag_usage_body)
        print("The response of KnowledgeApi->query_related_tags:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->query_related_tags: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str
related_tag_usage_body RelatedTagUsageBody

Return type

SuccessEnvelopeRelatedTagUsageListData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

replace_document

SuccessEnvelopeDocIngestData replace_document(kb_id, doc_id, doc_ingest_body)

Replace a document

Re-ingest content under an existing document id. Same asynchronous contract as upload — 202 with status and task_id — and idempotent per document id: the same replace applied twice leaves the same state. As with upload, completion is authoritative from GET .../documents/{doc_id} reporting topic_count greater than 0.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.doc_ingest_body import DocIngestBody
from everos_cloud.models.success_envelope_doc_ingest_data import SuccessEnvelopeDocIngestData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 
    doc_id = 'doc_id_example' # str | 
    doc_ingest_body = everos_cloud.DocIngestBody() # DocIngestBody | 

    try:
        # Replace a document
        api_response = api_instance.replace_document(kb_id, doc_id, doc_ingest_body)
        print("The response of KnowledgeApi->replace_document:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->replace_document: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str
doc_id str
doc_ingest_body DocIngestBody

Return type

SuccessEnvelopeDocIngestData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
202 Accepted for asynchronous re-ingest of this document id. The body carries `status` and `task_id` only. -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

replace_topic_tags

SuccessEnvelopeTopicTagWriteData replace_topic_tags(kb_id, doc_id, topic_id, topic_tag_replace_body)

Replace a topic's tags

Replace a topic's entire tag set with the ids you send. version is the tag version you expect the topic to be at. The write is rejected if it has moved on, so a concurrent update cannot be silently lost. - Duplicate ids collapse, and the first 50 distinct ids are stored. Sending 51–100 still succeeds — the response reports what was dropped. - Sending the set a topic already carries is a no-op and does not advance the version.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.success_envelope_topic_tag_write_data import SuccessEnvelopeTopicTagWriteData
from everos_cloud.models.topic_tag_replace_body import TopicTagReplaceBody
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 
    doc_id = 'doc_id_example' # str | 
    topic_id = 'topic_id_example' # str | 
    topic_tag_replace_body = everos_cloud.TopicTagReplaceBody() # TopicTagReplaceBody | 

    try:
        # Replace a topic's tags
        api_response = api_instance.replace_topic_tags(kb_id, doc_id, topic_id, topic_tag_replace_body)
        print("The response of KnowledgeApi->replace_topic_tags:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->replace_topic_tags: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str
doc_id str
topic_id str
topic_tag_replace_body TopicTagReplaceBody

Return type

SuccessEnvelopeTopicTagWriteData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
404 Topic absent or not owned by the path kb/document -
409 Stale topic tag version (atomic zero-write conflict) -
500 Storage or search projection failure. Mongo may already contain the snapshot; replay the same snapshot to converge. -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

search_knowledge

SuccessEnvelopeKbSearchData search_knowledge(kb_id, search_body)

Search a knowledge base

Search within one knowledge base, by keyword, vector or hybrid retrieval. The unit of retrieval is the topic, not the document: each hit carries its parent document's title and summary, so rendering a result needs no second call. Topic bodies are omitted by default — ask for content in include to inline them, or drill down with GET .../documents/{doc_id}/topics/{topic_id}.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.search_body import SearchBody
from everos_cloud.models.success_envelope_kb_search_data import SuccessEnvelopeKbSearchData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 
    search_body = everos_cloud.SearchBody() # SearchBody | 

    try:
        # Search a knowledge base
        api_response = api_instance.search_knowledge(kb_id, search_body)
        print("The response of KnowledgeApi->search_knowledge:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->search_knowledge: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str
search_body SearchBody

Return type

SuccessEnvelopeKbSearchData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_category

SuccessEnvelopeCategoryData update_category(kb_id, category_id, category_patch_body)

Update a category

Rename a category or edit its description. Documents filed under it are not re-classified; they keep pointing at the same category id. Tenant-global preset categories are read-only.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.category_patch_body import CategoryPatchBody
from everos_cloud.models.success_envelope_category_data import SuccessEnvelopeCategoryData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 
    category_id = 'category_id_example' # str | 
    category_patch_body = everos_cloud.CategoryPatchBody() # CategoryPatchBody | 

    try:
        # Update a category
        api_response = api_instance.update_category(kb_id, category_id, category_patch_body)
        print("The response of KnowledgeApi->update_category:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->update_category: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str
category_id str
category_patch_body CategoryPatchBody

Return type

SuccessEnvelopeCategoryData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_document

SuccessEnvelopeDocPatchData update_document(kb_id, doc_id, doc_patch_body)

Update a document

Patch a document's metadata — its title, or the category it is filed under. Content is not editable here: re-ingest with PUT .../documents/{doc_id} to change it. The response lists which fields actually changed.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.doc_patch_body import DocPatchBody
from everos_cloud.models.success_envelope_doc_patch_data import SuccessEnvelopeDocPatchData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 
    doc_id = 'doc_id_example' # str | 
    doc_patch_body = everos_cloud.DocPatchBody() # DocPatchBody | 

    try:
        # Update a document
        api_response = api_instance.update_document(kb_id, doc_id, doc_patch_body)
        print("The response of KnowledgeApi->update_document:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->update_document: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str
doc_id str
doc_patch_body DocPatchBody

Return type

SuccessEnvelopeDocPatchData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_knowledge_base

SuccessEnvelopeKbData update_knowledge_base(kb_id, kb_patch_body)

Update a knowledge base

Patch a knowledge base's name or description. Metadata only — it does not touch the documents inside it.

Example

  • Bearer Authentication (BearerAuth):
import everos_cloud
from everos_cloud.models.kb_patch_body import KbPatchBody
from everos_cloud.models.success_envelope_kb_data import SuccessEnvelopeKbData
from everos_cloud.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.evermind.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = everos_cloud.Configuration(
    host = "https://api.evermind.ai"
)

# 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: BearerAuth
configuration = everos_cloud.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with everos_cloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = everos_cloud.KnowledgeApi(api_client)
    kb_id = 'kb_id_example' # str | 
    kb_patch_body = everos_cloud.KbPatchBody() # KbPatchBody | 

    try:
        # Update a knowledge base
        api_response = api_instance.update_knowledge_base(kb_id, kb_patch_body)
        print("The response of KnowledgeApi->update_knowledge_base:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KnowledgeApi->update_knowledge_base: %s\n" % e)

Parameters

Name Type Description Notes
kb_id str
kb_patch_body KbPatchBody

Return type

SuccessEnvelopeKbData

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -
401 Missing or invalid bearer token. -
403 Authenticated but not permitted — either rejected by the auth service, or the account's memory API version does not match the interface version implied by the path (a v1 account calling an /api/v2 route). -
429 Rate limit or quota exceeded. -
503 The gateway could not reach the authentication service. Transient — retry with backoff. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]