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
Gets the id of the KA
File.Gets the id of the folder where the KA
Fileis located.Gets the name of the folder where the KA
Fileis located.Gets the list of labels of the KA
File.Gets the name of the KA
File.Gets the type of the KA
File.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])File.copy([new_name, field_id, well_id, ...])Copy this file
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)
- as_kw_document(parent_ipta_name=None)[source]#
Gets this
Fileas a KWDocumententity.- Parameters:
parent_ipta_name (str | None) – The name of the parent ipta document if there is one
- Return type:
- 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