Skip to content

view

Module to interact with Views.

This module contains class to interact with Views in Studio.

Typical usage example:

```python
view = package.get_view(SKILL_ID)
view.delete()
```

View

Bases: ContentNode

View object to interact with view specific studio endpoints.

permissions class-attribute instance-attribute

permissions = Field(alias='permissions')

tenant_id class-attribute instance-attribute

tenant_id = Field(alias='tenantId')

id instance-attribute

id

Id of studio content node.

key instance-attribute

key

Key of studio content node.

name class-attribute instance-attribute

name = Field(alias='name')

root_node_key class-attribute instance-attribute

root_node_key = Field(alias='rootNodeKey')

base class-attribute instance-attribute

base = Field(alias='base')

asset_type class-attribute instance-attribute

asset_type = Field(alias='assetType')

node_type class-attribute instance-attribute

node_type = Field(alias='nodeType')

parent_node_key class-attribute instance-attribute

parent_node_key = Field(alias='parentNodeKey')

parent_node_id class-attribute instance-attribute

parent_node_id = Field(alias='parentNodeId')

invalid_content class-attribute instance-attribute

invalid_content = Field(alias='invalidContent')

serialized_content instance-attribute

serialized_content

Serialized content of content node.

serialization_type class-attribute instance-attribute

serialization_type = Field(alias='serializationType')

draft_id class-attribute instance-attribute

draft_id = Field(alias='draftId')

working_draft_id class-attribute instance-attribute

working_draft_id = Field(alias='workingDraftId')

activated_draft_id class-attribute instance-attribute

activated_draft_id = Field(alias='activatedDraftId')

show_in_viewer_mode class-attribute instance-attribute

show_in_viewer_mode = Field(alias='showInViewerMode')

public_available class-attribute instance-attribute

public_available = Field(alias='publicAvailable')

embeddable class-attribute instance-attribute

embeddable = Field(alias='embeddable')

root_node_id class-attribute instance-attribute

root_node_id = Field(alias='rootNodeId')

order class-attribute instance-attribute

order = Field(alias='order')

source class-attribute instance-attribute

source = Field(alias='source')

asset_metadata_transport class-attribute instance-attribute

asset_metadata_transport = Field(
    alias="assetMetadataTransport"
)

space_id instance-attribute

space_id

Id of space where content node is located.

change_date class-attribute instance-attribute

change_date = Field(alias='changeDate')

created_by_id class-attribute instance-attribute

created_by_id = Field(alias='createdById')

creation_date class-attribute instance-attribute

creation_date = Field(alias='creationDate')

created_by_name class-attribute instance-attribute

created_by_name = Field(alias='createdByName')

updated_by class-attribute instance-attribute

updated_by = Field(alias='updatedBy')

root class-attribute instance-attribute

root = Field(alias='root')

asset class-attribute instance-attribute

asset = Field(alias='asset')

object_id class-attribute instance-attribute

object_id = Field(alias='objectId')

root_with_key instance-attribute

root_with_key

identifier class-attribute instance-attribute

identifier = Field(alias='identifier')

client class-attribute instance-attribute

client = Field(..., exclude=True)

from_transport classmethod

from_transport(client, content_node_transport)

Creates high-level content node object from given ContentNodeTransport.

Parameters:

  • client (Client) –

    Client to use to make API calls for given content node.

  • content_node_transport (ContentNodeTransport) –

    ContentNodeTransport object containing properties of content node.

Returns:

  • ContentNode

    A ContentNode object with properties from transport and given client.

sync

sync()

Syncs content node properties with EMS.

delete

delete()

Deletes content node.

is_package staticmethod

is_package(content_node_transport)

Returns whether content node transport is package.

Parameters:

Returns:

  • bool

    Boolean if transport is package.

is_folder staticmethod

is_folder(content_node_transport)

Returns whether content node transport is package.

Parameters:

Returns:

  • bool

    Boolean if transport is folder.

is_analysis staticmethod

is_analysis(content_node_transport)

Returns whether content node transport is analysis.

Parameters:

Returns:

  • bool

    Boolean if transport is analysis.

is_knowledge_model staticmethod

is_knowledge_model(content_node_transport)

Returns whether content node transport is knowledge model.

Parameters:

Returns:

  • bool

    Boolean if transport is knowledge model.

is_action_flow staticmethod

is_action_flow(content_node_transport)

Returns whether content node transport is action flow.

Parameters:

Returns:

  • bool

    Boolean if transport is action flow.

is_view staticmethod

is_view(content_node_transport)

Returns whether content node transport is view.

Parameters:

Returns:

  • bool

    Boolean if transport is view.

is_simulation staticmethod

is_simulation(content_node_transport)

Returns whether content node transport is simulation.

Parameters:

Returns:

  • bool

    Boolean if transport is simulation.

is_skill staticmethod

is_skill(content_node_transport)

Returns whether content node transport is skill.

Parameters:

Returns:

  • bool

    Boolean if transport is skill.

update

update(**kwargs)

Pushes local changes of views serialized_content attribute to EMS.

This only pushes changes made to serialized_content. Other attributes of the view will not be updated. Therefore, any changes have to be made by adjusting serialized_content.