Back to bricks list
Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version

SpaceService

Attributes
AUTH_API_KEY_HEADER_PREFIX: strAUTH_HEADER_KEY: strUSER_ID_HEADER_KEY: str
Functions
__INIT__

Constructor of the SpaceService

access_token : Optional
if access token is provided, it is used to authenticate. Otherwise the current user is used for authentication
ADD_OR_REPLACE_TAGS_ON_OBJECT

Add or replace tags on a folder object in space. The tags are created if they don't exist. If a tag with the same key exists, it is replaced by the new tag.

entity_id : str
id of the object (folder, scenario, document, note, resource...)
tags : List
list of tags to add or replace
Return type : List
ADD_TAGS_TO_OBJECT

Add tags to a folder object in space. The tags are created if they don't exist. It does not replace tags with the same key (use add_or_replace_tags_on_object for that).

entity_id : str
id of the object (folder, scenario, document, note, resource...)
tags : List
list of tags to add
Return type : List
CHECK_2_FA

Check the credential of an email/password by calling space and return true if ok

credentials : UserCredentials2Fa
Return type : UserSpace
CHECK_API_KEY
api_key : str
Return type : bool
CHECK_CREDENTIALS

Check the credential of an email/password by calling space, with 2Fa if needed

credentials : UserCredentialsDTO
for_login : bool - True
Return type : ExternalCheckCredentialResponse
CREATE_CHILD_FOLDER

Create a child folder in the lab space.

parent_id : str
id of the parent folder
Folder : ExternalSpaceCreateFolder
folder information
Return type : ExternalSpaceFolder
CREATE_ROOT_FOLDER

Create a root folder in the lab space. The root folder will be shared to the current user and mark as created by the current user.

Folder : ExternalSpaceCreateFolder
folder information
Return type : ExternalSpaceFolder
DELETE_NOTE
folder_id : str
note_id : str
DELETE_SCENARIO
folder_id : str
scenario_id : str
DELETE_TAGS_ON_OBJECT

Delete tags on a folder object in space.

entity_id : str
id of the object (folder, scenario, document, note, resource...)
tags : List
list of tags to delete
GET_ALL_LAB_ROOT_FOLDERS

Get all the folder trees (from root) accessible by the lab

Return type : ExternalSpaceFolders
GET_ALL_LAB_USERS

Get all the users of the lab

Return type : List
GET_LAB_ROOT_FOLDER

Get the root folder tree information. The folder must be accessible by the lab.

id_ : str
id of the root folder
Return type : ExternalSpaceFolder
GET_MODIFICATIONS
old_content : RichTextDTO
new_content : RichTextDTO
old_modifications : Optional
Return type : RichTextModificationsDTO
GET_UNDO_CONTENT
content : RichTextDTO
modifications : RichTextModificationsDTO
modification_id : str
Return type : RichTextDTO
GET_USER_INFO

Get the information of a user. The user must be in the same space as the lab.

user_id : str
id of the user
Return type : UserFullDTO
REGISTER_LAB_START

Call the space api to mark the lab as started

lab_config : LabConfigModelDTO
Return type : bool
SAVE_NOTE
folder_id : str
note : SaveNoteToSpaceDTO
file_paths : List
SAVE_SCENARIO
folder_id : str
save_scenario_dto : SaveScenarioToSpaceDTO
SEND_MAIL

Send a mail to a list of users. To send a custom mail, use the template 'generic' and provide mail content in the data.

send_mail_dto : SpaceSendMailToUsersDTO
mail information
Return type : Response
SEND_MAIL_TO_MAILS

Send a mail to a list of mails. To send a custom mail, use the template 'generic' and provide mail content in the data.

send_mail_to_mails_dto : SpaceSendMailToMailsDTO
mail information
Return type : Response
SHARE_RESOURCE

Share a resource in a folder in space. Only the resource link is shared, not the resource itself. After this, the resource is available in the space folder if this lab is up and running.

folder_id : str
resource_dto : ShareResourceWithSpaceDTO
_description_
SHARE_ROOT_FOLDER

Share a root folder with a group

root_folder_id : str
id of the root folder
group_id : str
id of the group
UPDATE_FOLDER

Update a folder in the lab space.

folder_id : str
id of the folder
Folder : ExternalSpaceCreateFolder
folder information
Return type : ExternalSpaceFolder
UPDATE_NOTE_FOLDER
current_folder_id : str
note_id : str
new_folder_id : str
UPDATE_SCENARIO_FOLDER
current_folder_id : str
scenario_id : str
new_folder_id : str
CREATE_WITH_ACCESS_TOKEN - @staticmethod

Return a new instance of the SpaceService that use the access token for authentication

Return type : SpaceService
GET_INSTANCE - @staticmethod

Return a new instance of the SpaceService that use the current user for authentication

Return type : SpaceService