mstrio > project_objects > library

class mstrio.project_objects.library.Library(connection, project=None, project_id=None, project_name=None)

Bases: object

Representation of the state of the authenticated user’s Library. It contains the references to the documents, dashboards, and reports that have been shared to the user’s Library.

Parameters:
  • connection (Connection)

  • project (Project | str | None)

  • project_id (str | None)

  • project_name (str | None)

connection

Strategy One connection object returned by connection.Connection().

Type:

Connection

project_id

ID of the project that the Library is in.

Type:

str

user_id

ID of the authenticated user.

Type:

str

documents

List of documents in the Library.

Type:

list[Document]

dashboards

List of dashboards in the Library.

Type:

list[Dashboard]

contents

List of all contents (documents and dashboards) in the Library.

Type:

list[Document | Dashboard]

__init__(connection, project=None, project_id=None, project_name=None)

Initialize the Library object.

Parameters:
  • connection (Connection) – Strategy One connection object returned by connection.Connection().

  • project (Project | str, optional) – Project object or ID or name specifying the project. May be used instead of project_id or project_name.

  • project_id (str, optional) – Project ID

  • project_name (str, optional) – Project name

fetch()
list_library_shortcuts()

List all library shortcuts in the authenticated user’s library.

Returns:

list[LibraryShortcut] – List of Library items as LibraryShortcut objects.

Return type:

list[LibraryShortcut]

publish(contents)

Publishes dashboard or document to the authenticated user’s library.

contents: dashboards or documents to be published, can be

Dashboard/Document class object or ID

Parameters:

contents (list | Dashboard | Document | str)

unpublish(contents)

Unpublishes dashboard or document from the authenticated user’s library.

contents: dashboards or documents to be published, can be

Dashboard/Document class object or ID

Parameters:

contents (list | Dashboard | Document | str)

property agents
property contents
property dashboards
property documents
property reports