mstrio.object_management package

Subpackages

Submodules

mstrio.object_management.folder module

class mstrio.object_management.folder.Folder(connection: Connection, id: str, name: Optional[str] = None)

Bases: Entity, CopyMixin, MoveMixin, DeleteMixin

Object representation of MicroStrategy Folder object.

connection

MSTR Connection object

id

ID of the folder

name

name of the folder

description

description of the folder

type

the type of the folder (based on EnumDSSXMLObjectTypes)

subtype

the subtype of the folder (based on EnumDSSXMLObjectSubTypes)

date_created

the date/time at which the folder was first saved into the metadata

date_modified

the date/time at which the folder was last saved into the metadata

version

the version number this folder is currently carrying

acl

an array of access control entry objects

owner

User object, the owner of the object

acg

access rights, EnumDSSXMLAccessRightFlags

ext_type

object extended type, EnumDSSExtendedType

ancestors

list of ancestor folders

abbreviation

folder’s abbreviation

hidden

specifies whether the folder is hidden

icon_path

folder icon path

view_media

view media settings

certified_info

CertifiedInfo object, certification status, time of certification, and information about the certifier (currently only for document and report)

contents

contents of folder

alter(name: Optional[str] = None, description: Optional[str] = None) None

Alter the folder properties.

Parameters:
  • name – folder name

  • description – folder description

classmethod create(connection: Connection, name: str, parent: str, description: Optional[str] = None) Folder

Create a new folder in a folder selected within connection object by providing its name, id of parent folder and optionally description.

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

  • name (str) – name of a new folder.

  • parent (str) – id of a parent folder in which new folder will be created.

  • description (str, optional) – optional description of a new folder.

Returns:

newly created folder

get_contents(to_dictionary: bool = False, **filters) list

Get contents of folder. It can contains other folders or different kinds of objects.

Parameters:
  • to_dictionary (bool, optional) – If True returns dicts, by default (False) returns objects.

  • **filters – Available filter parameters: [‘id’, ‘name’, ‘description’, ‘date_created’, ‘date_modified’, ‘acg’]

Returns:

Contents as Python objects (when to_dictionary is False (default value)) or contents as dictionaries otherwise.

mstrio.object_management.folder.get_my_personal_objects_contents(connection: Connection, project_id: Optional[str] = None, project_name: Optional[str] = None, to_dictionary: bool = False) list

Get contents of My Personal Objects folder in a specific project.

Specify either project_id or project_name. When project_id is provided (not None), project_name is omitted.

Note

When project_id is None and project_name is None, then its value is overwritten by project_id from connection object.

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

  • project_id (string, optional) – project ID

  • project_name (string, optional) – project name

  • to_dictionary (bool, optional) – If True returns dicts, by default (False) returns objects.

Returns:

list of objects or list of dictionaries

mstrio.object_management.folder.get_predefined_folder_contents(connection: Connection, folder_type: PredefinedFolders, project_id: Optional[str] = None, project_name: Optional[str] = None, to_dictionary: bool = False, limit: Optional[int] = None, **filters) list

Get contents of a pre-defined MicroStrategy folder in a specific project. Available values for folder_type are stored in enum PredefinedFolders.

Specify either project_id or project_name. When project_id is provided (not None), project_name is omitted.

Note

When project_id is None and project_name is None, then its value is overwritten by project_id from connection object.

Note

When project_id is None, then its value is overwritten by project_id from connection object.

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

  • folder_type (enum) – pre-defined folder type. Available values are stored in enum PredefinedFolders.

  • project_id (string, optional) – project ID

  • project_name (string, optional) – project name

  • to_dictionary (bool, optional) – If True returns dicts, by default (False) returns objects.

  • limit (int) – limit the number of elements returned. If None (default), all objects are returned.

  • **filters – Available filter parameters: [‘id’, ‘name’, ‘description’, ‘date_created’, ‘date_modified’, ‘acg’]

Returns:

list of objects or list of dictionaries

mstrio.object_management.folder.list_folders(connection: Connection, project_id: Optional[str] = None, project_name: Optional[str] = None, to_dictionary: bool = False, limit: Optional[int] = None, **filters) list['Folder'] | list[dict]

Get a list of folders - either all folders in a specific project or all folders that are outside of projects, called configuration-level folders. The list of configuration-level folders includes folders such as users, user groups, databases, etc. which are not project-specific. If you pass a project_id or project_name, you get folders in that project; if not, then you get configuration-level folders.

Specify either project_id or project_name. When project_id is provided (not None), project_name is omitted.

Note

Id of project is not taken directly from Connection object, so you have to specify it explicitly.

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

  • project_id (string, optional) – project ID

  • project_name (string, optional) – project name

  • to_dictionary (bool, optional) – If True returns dicts, by default (False) returns objects.

  • limit (int) – limit the number of elements returned. If None (default), all objects are returned.

  • **filters – Available filter parameters: [‘id’, ‘name’, ‘description’, ‘date_created’, ‘date_modified’, ‘acg’]

Returns:

list of Folder objects or list of dictionaries

mstrio.object_management.object module

class mstrio.object_management.object.Object(connection: Connection, type: ObjectTypes, id: str)

Bases: Entity, ACLMixin, CertifyMixin, CopyMixin, MoveMixin, DeleteMixin

Class representing a general type object using attributes common for

all available objects.

name

name of the object

id

object ID

description

Description of the object

abbreviation

Object abbreviation

version

Object version ID

ancestors

List of ancestor folders

type

Object type. Enum

subtype

Object subtype

ext_type

Object extended type.

date_created

Creation time, “yyyy-MM-dd HH:mm:ss” in UTC

date_modified

Last modification time, “yyyy-MM-dd HH:mm:ss” in UTC

owner

User object that is the owner

icon_path

Object icon path

view_media

View media settings

acg

Access rights (See EnumDSSXMLAccessRightFlags for possible values)

acl

Object access control list

hidden

Specifies whether the object is hidden

certified_info

Certification status, time of certification, and information about the certifier (currently only for document and report)

project_id

project ID

target_info

target information, only applicable to Shortcut objects

alter(name: Optional[str] = None, description: Optional[str] = None, abbreviation: Optional[str] = None) None

Alter the object properties.

Parameters:
  • name – object name

  • description – object description

  • abbreviation – abbreviation

mstrio.object_management.object.list_objects(connection: Connection, object_type: ObjectTypes, name: Optional[str] = None, project_id: Optional[str] = None, project_name: Optional[str] = None, domain: mstrio.object_management.search_enums.SearchDomain | int = SearchDomain.CONFIGURATION, search_pattern: mstrio.object_management.search_enums.SearchPattern | int = SearchPattern.CONTAINS, to_dictionary: bool = False, limit: int = None, **filters) list['Object'] | list[dict]

Get list of objects or dicts. Optionally filter the objects by specifying filters.

Specify either project_id or project_name. When project_id is provided (not None), project_name is omitted.

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

  • object_type – Object type. Possible values can be found in EnumDSSXMLObjectTypes

  • name (string, optional) – value the search pattern is set to, which will be applied to the names of objects being searched

  • project_id – ID of the project for which the objects are to be listed

  • project_name – project name

  • domain – domain where the search will be performed, such as Local or Project, possible values are defined in EnumDSSXMLSearchDomain

  • search_pattern (SearchPattern enum or int, optional) – pattern to search for, such as Begin With or Exactly. Possible values are available in ENUM mstrio.object_management.SearchPattern. Default value is CONTAINS (4).

  • to_dictionary – If True returns dict, by default (False) returns Objects.

  • limit – limit the number of elements returned. If None (default), all objects are returned.

  • **filters – Available filter parameters: [‘id’, ‘name’, ‘description’, ‘date_created’, ‘date_modified’, ‘acg’]

Examples

>>> list_objects(connection, object_type=ObjectTypes.USER)

mstrio.object_management.predefined_folders module

class mstrio.object_management.predefined_folders.PredefinedFolders(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Enumeration constants used to specify names of pre-defined folders. Values are specified according to EnumDSSXMLFolderNames.

AUTO_STYLES = 57
BLACK_LISTED = 1000
CONFIGURE_DB_ROLES = 73
CONFIGURE_MONITORS = 58
CONFIGURE_SERVER_DEFINITIONS = 59
DBMS = 76
DB_CONNECTIONS = 81
DB_LOGINS = 82
DEVICES = 88
EVENTS = 72
LOCALES = 74
MY_DOSSIERS = 96
MY_SHARED_DOSSIERS = 97
PALETTES = 94
PROFILE_ANSWERS = 21
PROFILE_FAVORITES = 22
PROFILE_OBJECTS = 19
PROFILE_OTHER = 23
PROFILE_REPORTS = 20
PROFILE_SEGMENTS = 92
PROJECTS = 77
PROPERTY_SETS = 75
PUBLIC_CONSOLIDATIONS = 2
PUBLIC_CUSTOM_GROUPS = 3
PUBLIC_FILTERS = 4
PUBLIC_METRICS = 5
PUBLIC_OBJECTS = 1
PUBLIC_PROMPTS = 6
PUBLIC_REPORTS = 7
PUBLIC_SEARCHES = 8
PUBLIC_TEMPLATES = 9
ROOT = 39
SCHEDULE_OBJECTS = 84
SCHEDULE_TRIGGERS = 85
SCHEMA_ARITHMETIC_OPERATORS = 49
SCHEMA_ATTRIBUTES = 26
SCHEMA_ATTRIBUTE_FORMS = 25
SCHEMA_BASIC_FUNCTIONS = 41
SCHEMA_COLUMNS = 27
SCHEMA_COMPARISON_FOR_RANK_OPERATORS = 51
SCHEMA_COMPARISON_OPERATORS = 50
SCHEMA_DATA_EXPLORER = 28
SCHEMA_DATE_AND_TIME_FUNCTIONS = 42
SCHEMA_FACTS = 29
SCHEMA_FINANCIAL_FUNCTIONS = 54
SCHEMA_FUNCTIONS = 30
SCHEMA_FUNCTIONS_NESTED = 40
SCHEMA_HIERARCHIES = 31
SCHEMA_INTERNAL_FUNCTIONS = 43
SCHEMA_LOGICAL_OPERATORS = 52
SCHEMA_MATH_FUNCTIONS = 55
SCHEMA_NULL_ZERO_FUNCTIONS = 44
SCHEMA_OBJECTS = 24
SCHEMA_OLAP_FUNCTIONS = 45
SCHEMA_OPERATORS = 48
SCHEMA_PARTITION_FILTERS = 32
SCHEMA_PARTITION_MAPPINGS = 33
SCHEMA_PLUG_IN_PACKAGES = 53
SCHEMA_RANK_AND_N_TILE_FUNCTIONS = 46
SCHEMA_STATISTICAL_FUNCTIONS = 56
SCHEMA_STRING_FUNCTIONS = 47
SCHEMA_SUBTOTALS = 34
SCHEMA_TABLES = 35
SCHEMA_TRANSFORMATIONS = 38
SCHEMA_TRANSFORMATION_ATTRIBUTES = 37
SCHEMA_WAREHOUSE_TABLES = 36
SECURITY_ROLES = 80
SYSTEM_DIMENSION = 91
SYSTEM_DRILL_MAP = 68
SYSTEM_DUMMY_PARTITION_TABLES = 70
SYSTEM_MD_SECURITY_FILTERS = 69
SYSTEM_OBJECTS = 61
SYSTEM_PARSER_FOLDER = 64
SYSTEM_PROPERTY_SETS = 63
SYSTEM_SCHEMA_FOLDER = 65
SYSTEM_SYSTEM_HIERARCHY = 67
SYSTEM_SYSTEM_PROMPTS = 71
SYSTEM_WAREHOUSE_CATALOG = 66
TABLE_SOURCES = 86
TEMPLATE_ANALYSIS = 93
TEMPLATE_CONSOLIDATIONS = 11
TEMPLATE_CUSTOM_GROUPS = 12
TEMPLATE_DASHBOARDS = 90
TEMPLATE_DOCUMENTS = 60
TEMPLATE_FILTERS = 13
TEMPLATE_METRICS = 14
TEMPLATE_OBJECTS = 10
TEMPLATE_PROMPTS = 15
TEMPLATE_REPORTS = 16
TEMPLATE_SEARCHES = 17
TEMPLATE_TEMPLATES = 18
THEMES = 95
TRANSMITTERS = 89
USERS = 78
USER_GROUPS = 79
VERSION_UPDATE_HISTORY = 87

mstrio.object_management.search_enums module

class mstrio.object_management.search_enums.CertifiedStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Enumeration that represents what can be passed in the certified_status attribute of the IServer quick search command.

ALL = 'ALL'
CERTIFIED_ONLY = 'CERTIFIED_ONLY'
NOT_CERTIFIED_ONLY = 'NOT_CERTIFIED_ONLY'
OFF = 'OFF'
class mstrio.object_management.search_enums.SearchDomain(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

Enumeration constants used to specify the search domains. More details can be found in EnumDSSXMLSearchDomain in a browser.

CONFIGURATION = 4
CONFIGURATION_AND_ALL_PROJECTS = 5
LOCAL = 1
PROJECT = 2
REPOSITORY = 3
class mstrio.object_management.search_enums.SearchPattern(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

Enumeration constants used to specify searchType used to control BI Search. More details can be found in EnumDSSXMLSearchTypes in a browser.

BEGIN_WITH = 1
BEGIN_WITH_PHRASE = 3
CONTAINS = 4
CONTAINS_ANY_WORD = 0
END_WITH = 5
EXACTLY = 2
class mstrio.object_management.search_enums.SearchResultsFormat(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Enumeration constants used to specify the format to return from search functions.

LIST = 'LIST'
TREE = 'TREE'

mstrio.object_management.search_operations module

class mstrio.object_management.search_operations.SearchObject(connection: Connection, id: str)

Bases: Entity, CopyMixin, MoveMixin

Search object describing criteria that specify a search for objects.

connection

A MicroStrategy connection object

id

Object ID

name

Object name

description

Object description

abbreviation

Object abbreviation

type

Object type

subtype

Object subtype

ext_type

Object extended type

date_created

Creation time, DateTime object

date_modified

Last modification time, DateTime object

version

Version ID

owner

Owner ID and name

icon_path

Object icon path

view_media

View media settings

ancestors

List of ancestor folders

acg

Access rights (See EnumDSSXMLAccessRightFlags for possible values)

acl

Object access control list

mstrio.object_management.search_operations.find_objects_with_id(connection: Connection, object_id: str, projects: Optional[Union[list[mstrio.server.project.Project], list[str]]] = None, to_dictionary=False) list[dict[str, Union[dict, Type[mstrio.utils.entity.Entity]]]]

Find object by its ID only, without knowing project ID and object type. The search is performed by iterating over projects and trying to retrieve the objects with different type.

Limitation:
  • Only object types supported by mstrio, i.g. present in

    mstrio.types.ObjecTypes enum, are used.

  • Configuration object are also not searched.

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

  • object_id (str) – ID of an object.

  • projects (list[Project] | list[str], optional) – List of projects where to perform the search. By default, if no project are provides, the search is performed on all loaded projects.

  • to_dictionary (bool, optional) – If True returns dicts, by default (False) returns objects.

Returns:

{

‘project_id’: <str>, ‘object_data’: <dict or object>

}

Return type:

Returns list of dict with the following structure

Perform a full metadata search and return results.

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

  • project (string) – Project object or ID

  • name (string) – Value the search pattern is set to, which will be applied to the names of object types being searched. For example, search for all report objects (type) whose name begins with (patter) B (name).

  • pattern (integer or enum class object) – Pattern to search for, such as Begin With or Exactly. Possible values are available in ENUM mstrio.object_management.SearchPattern. Default value is CONTAINS (4).

  • domain (integer or enum class object) – Domain where the search will be performed, such as Local or Project. Possible values are available in ENUM mstrio.object_management.SearchDomain. Default value is PROJECT (2).

  • root (string, optional) – Folder ID of the root folder where the search will be performed.

  • objects (object_types(enum class object or integer or list of enum class) – or integers): Type(s) of object(s) to be searched, such as Folder, Attribute or User. Possible values available in ENUMs mstrio.types.ObjectTypes and mstrio.types.ObjectSubTypes

  • uses_object_id (string) – Constrain the search to only return objects which use the given object.

  • uses_object_type (string) – Constrain the search to only return objects which use the given object. Possible values available in ENUMs mstrio.types.ObjectTypes

  • uses_recursive (boolean) – Control the Intelligence server to also find objects that use the given objects indirectly. Default value is false.

  • uses_one_of (boolean) – Control the Intelligence server to also find objects that use one of or all of given objects indirectly. Default value is false.

  • used_by_object_id (string) – Constrain the search to only return objects which are used by the given object.

  • used_by_object_type (string) – Constrain the search to only return objects which are used by the given object. Possible values available in ENUM mstrio.types.ObjectTypes

  • used_by_recursive (boolean, optional) – Control the Intelligence server to also find objects that are used by the given objects indirectly. Default value is false.

  • used_by_one_of (boolean) – Control the Intelligence server to also find objects that are used by one of or all of given objects indirectly. Default value is false.

  • results_format (SearchResultsFormat) – either a list or a tree format

  • to_dictionary (bool) – If False returns objects, by default (True) returns dictionaries.

  • limit (int) – limit the number of elements returned. If None (default), all objects are returned.

  • offset (int) – Starting point within the collection of returned results. Used to control paging behavior. Default is 0.

  • **filters – Available filter parameters: [‘id’, ‘name’, ‘description’, ‘date_created’, ‘date_modified’, ‘acg’]

Returns:

list of objects or list of dictionaries

mstrio.object_management.search_operations.get_search_results(connection: Connection, search_id: str, project: Optional[Union[Project, str]] = None, results_format: SearchResultsFormat = SearchResultsFormat.LIST, limit: Optional[int] = None, offset: Optional[int] = None, to_dictionary: bool = False, **filters)

Retrieve the results of a full metadata search previously stored in an instance in IServer memory, may be obtained by start_full_search.

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

  • search_id (str) – Search ID (identifies the results of a previous search stored in IServer memory)

  • project (string) – Project object or ID

  • results_format (SearchResultsFormat) – either a list or a tree format

  • to_dictionary (bool) – If True returns dicts, by default (False) returns objects.

  • limit (int) – limit the number of elements returned. If None (default), all objects are returned.

  • offset (int) – Starting point within the collection of returned results. Used to control paging behavior. Default is 0.

  • **filters – Available filter parameters: [‘id’, ‘name’, ‘description’, ‘date_created’, ‘date_modified’, ‘acg’]

Returns:

list of objects or list of dictionaries

mstrio.object_management.search_operations.get_search_suggestions(connection: Connection, project: Optional[Union[Project, str]] = None, key: Optional[str] = None, max_results: int = 4, cross_cluster: Optional[bool] = None) list[str]

Request search suggestions from the server.

Parameters:
  • connection (object) – MicroStrategy REST API connection object

  • project (string, optional) – Project object or ID

  • key (string, optional) – value the search pattern is set to, which will be applied to the names of suggestions being searched

  • max_results (int, optional) – maximum number of items returned for a single request. Used to control paging behavior. Default value is -1 for no limit.

  • cross_cluster (bool, optional) – perform search in all unique projects across the cluster, this parameter only takes effect for I-Server with cluster nodes. Default value is None

Returns:

list of search suggestions

Use the stored results of the Quick Search engine to return

search results and display them as a list. The Quick Search engine periodically indexes the metadata and stores the results in memory, making Quick Search very fast but with results that may not be the most recent.

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

  • project (string) – Project object or ID

  • name (string) – Value the search pattern is set to, which will be applied to the names of object types being searched. For example, search for all report objects (type) whose name begins with (patter) B (name).

  • root (string, optional) – Folder ID of the root folder where the search will be performed.

  • pattern (integer or enum class object) – Pattern to search for, such as Begin With or Exactly. Possible values are available in ENUM mstrio.object_management.SearchPattern. Default value is CONTAINS (4).

  • objects (object_types(enum class object or integer or list of enum class) – or integers): Type(s) of object(s) to be searched, such as Folder, Attribute or User. Possible values available in ENUMs mstrio.types.ObjectTypes and mstrio.types.ObjectSubTypes

  • get_ancestors (bool) – Specifies whether to return the list of ancestors for each object

  • certified_status (CertifiedStatus) – Defines a search criteria based on the certified status of the object, possible values available in CertifiedStatus enum

  • cross_cluster (bool) – Perform search in all unique projects across the cluster,this parameter only takes affect for I-Server with cluster nodes.

  • hidden (bool) – Filter the result based on the ‘hidden’ field of objects. If not passed, no filtering is applied.

  • limit (int) – limit the number of elements returned. If None (default), all objects are returned.

  • offset (int) – Starting point within the collection of returned results. Used to control paging behavior. Default is 0.

  • to_dictionary (bool) – If True returns dicts, by default (False) returns objects.

Returns:

list of objects or list of dictionaries

mstrio.object_management.search_operations.quick_search_from_object(connection: Connection, project: mstrio.server.project.Project | str, search_object: mstrio.object_management.search_operations.SearchObject | str, include_ancestors: bool = False, include_acl: bool = False, subtypes: Optional[Union[ObjectSubTypes, list[mstrio.types.ObjectSubTypes], int, list[int]]] = None, limit: Optional[int] = None, offset: Optional[int] = None, to_dictionary: bool = True)

Perform a quick search based on a predefined Search Object. Use an existing search object for Quick Search engine to return search results and display them as a list.

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

  • project (string) – Project object or ID

  • search_object (SearchObject) – Search object ID to retrieve result from

  • include_ancestors (bool) – Specifies whether to return the list of ancestors for each object

  • include_acl (bool) – Specifies whether to return the list of ACL for each object

  • subtypes (list, int) – This parameter is used to filter the objects in the result to include only the ones whose “subtype” is included in the values of this parameter

  • limit (int) – limit the number of elements returned. If None (default), all objects are returned.

  • offset (int) – Starting point within the collection of returned results. Used to control paging behavior. Default is 0.

  • to_dictionary (bool) – If True returns dicts, by default (False) returns objects.

Returns:

list of objects or list of dictionaries

Search the metadata for objects in a specific project that match specific search criteria, and save the results in IServer memory.

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

  • project (string) – Project object or ID

  • objects (object_types(enum class object or integer or list of enum class) – or integers): Type(s) of object(s) to be searched, such as Folder, Attribute or User. Possible values available in ENUMs mstrio.types.ObjectTypes and mstrio.types.ObjectSubTypes

  • name (string) – Value the search pattern is set to, which will be applied to the names of object types being searched. For example, search for all report objects (type) whose name begins with (patter) B (name).

  • pattern (integer or enum class object) – Pattern to search for, such as Begin With or Exactly. Possible values are available in ENUM mstrio.object_management.SearchPattern. Default value is CONTAINS (4).

  • domain (integer or enum class object) – Domain where the search will be performed, such as Local or Project. Possible values are available in ENUM mstrio.object_management.SearchDomain. Default value is PROJECT (2).

  • root (string, optional) – Folder ID of the root folder where the search will be performed.

  • uses_object_id (string) – Constrain the search to only return objects which use the given object.

  • uses_object_type (int, ObjectTypes) – Constrain the search to only return objects which use the given object. Possible values available in ENUMs mstrio.types.ObjectTypes

  • uses_recursive (boolean) – Control the Intelligence server to also find objects that use the given objects indirectly. Default value is false.

  • uses_one_of (boolean) – Control the Intelligence server to also find objects that use one of or all of given objects indirectly. Default value is false.

  • used_by_object_id (string) – Constrain the search to only return objects which are used by the given object.

  • used_by_object_type (int, ObjectTypes) – Constrain the search to only return objects which are used by the given object. Possible values available in ENUM mstrio.types.ObjectTypes

  • used_by_recursive (boolean, optional) – Control the Intelligence server to also find objects that are used by the given objects indirectly. Default value is false.

  • used_by_one_of (boolean) – Control the Intelligence server to also find objects that are used by one of or all of given objects indirectly. Default value is false.

Returns:

dictionary consisting of id (Search ID) and total items number

mstrio.object_management.shortcut module

class mstrio.object_management.shortcut.Shortcut(connection: Connection, id: str, project_id: str = None, project_name: str = None, shortcut_info_flag: mstrio.object_management.shortcut.ShortcutInfoFlags | int = ShortcutInfoFlags.DssDossierShortcutInfoTOC)

Bases: Entity, CopyMixin, MoveMixin

T

alias of TypeVar(‘T’)

classmethod from_dict(source: dict[str, Any], connection: Connection) T

Instantiate a Shortcut from a dict source.

class mstrio.object_management.shortcut.ShortcutInfoFlags(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntFlag

DssDossierShortcutInfoBookmark = 2
DssDossierShortcutInfoDefault = 0
DssDossierShortcutInfoTOC = 1
mstrio.object_management.shortcut.get_shortcuts(connection: Connection, shortcut_ids: list[str], project_id: str = None, project_name: str = None, shortcut_info_flag: mstrio.object_management.shortcut.ShortcutInfoFlags | int = ShortcutInfoFlags.DssDossierShortcutInfoDefault, to_dictionary: bool = False, limit: Optional[int] = None, **filters) list[dict] | list[mstrio.object_management.shortcut.Shortcut]
Retrieve information about specific published shortcuts

in specific project.

Specify either project_id or project_name. When project_id is provided (not None), project_name is omitted.

Note

When project_id is None and project_name is None, then its value is overwritten by project_id from connection object.

Args:

shortcut_ids: ids of target shortcuts project_id: id of project that the shortcuts are in project_name: Project name shortcut_info_flag: a single ShortcutInfoFlags that describes what

exact info are to be fetched

to_dictionary: parameter describing output format limit (int): limit the number of elements returned. If None (default),

all objects are returned.

Return:
list of dictionaries or Shortcut objects,

depending on to_dictionary parameter

Module contents