kappa_sdk.File#

class kappa_sdk.File(field_id, well_group_id, well_id, custom_workflow_id, file_id, name, file_type, folder_id, folder_name, labels, cluster_apis, document_dto_converter)[source]#

KA file object.

Presents a KA file.

Note

Should not be instantiated directly.

Attributes

File.file_id

Gets the id of the KA File.

File.folder_id

Gets the id of the folder where the KA File is located.

File.folder_name

Gets the name of the folder where the KA File is located.

File.labels

Gets the list of labels of the KA File.

File.name

Gets the name of the KA File.

File.type

Gets the type of the KA File.

File.well_group_id

Gets the well_group_id of the KA File.

Methods

File.add_labels(labels)

Add labels to this file

File.as_kw_document([parent_ipta_name])

Gets this File as a KW Document entity.

File.copy([new_name, field_id, well_id, ...])

Copy this file

File.delete()

Delete this file

File.download_content(file_location)

Downloads the content of the document to the specified location.

File.rename(name)

Rename this file

Parameters:
  • field_id (str)

  • well_group_id (str | None)

  • well_id (str | None)

  • custom_workflow_id (str | None)

  • file_id (str)

  • name (str)

  • file_type (FileType)

  • folder_id (str | None)

  • folder_name (str | None)

  • labels (List[str])

  • cluster_apis (ClusterAPIS)

  • document_dto_converter (DocumentDtoConverter)

__init__(field_id, well_group_id, well_id, custom_workflow_id, file_id, name, file_type, folder_id, folder_name, labels, cluster_apis, document_dto_converter)[source]#
Parameters:
  • field_id (str)

  • well_group_id (str | None)

  • well_id (str | None)

  • custom_workflow_id (str | None)

  • file_id (str)

  • name (str)

  • file_type (FileType)

  • folder_id (str | None)

  • folder_name (str | None)

  • labels (List[str])

  • cluster_apis (ClusterAPIS)

  • document_dto_converter (DocumentDtoConverter)

property file_id: str#

Gets the id of the KA File.

property name: str#

Gets the name of the KA File.

property well_group_id: str | None#

Gets the well_group_id of the KA File.

property type: str#

Gets the type of the KA File.

property folder_id: str | None#

Gets the id of the folder where the KA File is located.

property folder_name: str | None#

Gets the name of the folder where the KA File is located.

property labels: List[str]#

Gets the list of labels of the KA File.

as_kw_document(parent_ipta_name=None)[source]#

Gets this File as a KW Document entity.

Parameters:

parent_ipta_name (str | None) – The name of the parent ipta document if there is one

Return type:

Document

download_content(file_location)[source]#

Downloads the content of the document to the specified location.

Parameters:

file_location (New) – location where to download the file

Return type:

None

rename(name)[source]#

Rename this file

Parameters:

name (New) – New name of the file

Return type:

None

copy(new_name=None, field_id=None, well_id=None, well_group_id=None, user_task_id=None)[source]#

Copy this file

Parameters:
  • new_name (str | None)

  • field_id (str | None)

  • well_id (str | None)

  • well_group_id (str | None)

  • user_task_id (str | None)

Return type:

str

add_labels(labels)[source]#

Add labels to this file

Parameters:

labels (List[str])

Return type:

None

delete()[source]#

Delete this file

Return type:

None