mstrio.distribution_services.subscription package

Submodules

mstrio.distribution_services.subscription.base_subscription module

class mstrio.distribution_services.subscription.base_subscription.RecipientsTypes(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoUpperName

CONTACT = 'CONTACT'
CONTACT_GROUP = 'CONTACT_GROUP'
PERSONAL_ADDRESS = 'PERSONAL_ADDRESS'
UNSUPPORTED = 'UNSUPPORTED'
USER = 'USER'
USER_GROUP = 'USER_GROUP'
class mstrio.distribution_services.subscription.base_subscription.Subscription(connection: Connection, id: str | None = None, subscription_id: str | None = None, project_id: str | None = None, project_name: str | None = None)

Bases: EntityBase

Class representation of MicroStrategy Subscription object.

subscription_id

The ID of the Subscription

connection

The MicroStrategy connection object

project_id

The ID of the project the Subscription belongs to

add_recipient(recipients: list[dict] | dict | list[str] | str = None, recipient_id: str | None = None, recipient_type: str | None = None, recipient_include_type: str = 'TO')

Adds recipient to subscription. You can either specify id, type and include_type of single recipient, or just pass recipients list as a list of dictionaries.

Parameters:
  • recipients

    list of ids or dicts containing recipients, dict format: {“id”: recipient_id,

    ”type”: “CONTACT_GROUP” / “USER_GROUP” / “CONTACT” /

    ”USER” / “PERSONAL_ADDRESS” / “UNSUPPORTED”

    ”includeType”: “TO” / “CC” / “BCC”}

  • recipient_id – id of the recipient

  • recipient_type – type of the recipient

  • recipient_include_type – include type of the recipient one of the following: “TO” / “CC” / “BCC”, by default “TO”

alter(name: str | None = None, multiple_contents: bool | None = None, allow_delivery_changes: bool | None = None, allow_personalization_changes: bool | None = None, allow_unsubscribe: bool | None = None, send_now: bool = False, owner_id: str | None = None, schedules: str | list[str] | mstrio.distribution_services.schedule.schedule.Schedule | list[mstrio.distribution_services.schedule.schedule.Schedule] | None = None, contents: mstrio.distribution_services.subscription.content.Content | None = None, recipients: list[str] | list[dict] | None = None, delivery: mstrio.distribution_services.subscription.delivery.Delivery | dict | None = None, delivery_mode: str | None = None, custom_msg: str | None = None, delivery_expiration_date: str | None = None, delivery_expiration_timezone: str | None = None, contact_security: bool | None = None, filename: str | None = None, compress: bool | None = None, space_delimiter: str | None = None, email_subject: str | None = None, email_message: str | None = None, email_send_content_as: str | None = None, overwrite_older_version: bool | None = None, zip_filename: str | None = None, zip_password_protect: bool | None = None, zip_password: str | None = None, file_burst_sub_folder: str | None = None, printer_copies: int | None = None, printer_range_start: int | None = None, printer_range_end: int | None = None, printer_collated: bool | None = None, printer_orientation: str | None = None, printer_use_print_range: bool | None = None, cache_cache_type: str | None = None, cache_shortcut_cache_format: str | None = None, mobile_client_type: str | None = None, device_id: str | None = None, do_not_create_update_caches: bool | None = None, re_run_hl: bool | None = None, cache_library_cache_types: list[mstrio.distribution_services.subscription.delivery.LibraryCacheTypes | str] = None, cache_reuse_dataset_cache: bool = False, cache_is_all_library_users: bool = False, delivery_notification_enabled: bool = False, delivery_personal_notification_address_id: str | None = None)

Alter subscription.

Parameters:
  • name (str) – name of the subscription,

  • multiple_contents (bool, optional) – whether multiple contents are allowed

  • allow_delivery_changes (bool) – whether the recipients can change the delivery of the subscription,

  • allow_personalization_changes (bool) – whether the recipients can personalize the subscription,

  • allow_unsubscribe (bool) – whether the recipients can unsubscribe from the subscription,

  • send_now (bool) – indicates whether to execute the subscription immediately,

  • owner_id (str) – ID of the subscription owner, by default logged in user ID,

  • schedules (str | list[str] | Schedule | list[Schedule]) – Schedules IDs or Schedule objects,

  • contents (Content) – The content of the subscription.

  • recipients (list[str] | list[dict]) – list of recipients IDs or dicts,

  • delivery (Delivery, dict, optional) – delivery settings

  • delivery_mode (str, enum) – the subscription delivery mode [EMAIL, FILE, PRINTER, HISTORY_LIST, CACHE, MOBILE, FTP, SNAPSHOT, PERSONAL_VIEW, SHARED_LINK, UNSUPPORTED],

  • custom_msg (str, optional) – customized message displayed when Subscription has been successfully altered

  • delivery_expiration_date (str) – expiration date of the subscription, format should be yyyy-MM-dd,

  • delivery_expiration_timezone (str, optional) – expiration timezone of the subscription

  • contact_security (bool) – whether to use contact security for each contact group member,

  • filename (str) – the filename that will be delivered when the subscription is executed,

  • compress (bool) – whether to compress the file

  • space_delimiter (str) – space delimiter,

  • email_subject (str) – email subject associated with the subscription,

  • email_message (str) – email body of subscription,

  • email_send_content_as (str,enum) – [data, data_and_history_list, data_and_link_and_history_list, link_and_history_list],

  • overwrite_older_version (bool) – whether the current subscription will overwrite earlier versions of the same report or document in the history list,

  • zip_filename (str) – filename of the compressed content,

  • zip_password_protect (bool) – whether to password protect zip file,

  • zip_password (str) – optional password for the compressed file

  • file_burst_sub_folder (str) – burst sub folder,

  • printer_copies (int) – the number of copies that should be printed,

  • printer_range_start (int) – the number indicating the first report page that should be printed,

  • printer_range_end (int) – the number indicating the last report page that should be printed,

  • printer_collated (bool) – whether the printing should be collated,

  • printer_orientation (str,enum) – [ PORTRAIT, LANDSCAPE ]

  • printer_use_print_range (bool) – whether print range should be used,

  • cache_cache_type (str,enum) – [RESERVED, SHORTCUT, SHORTCUTWITHBOOKMARK]

  • cache_shortcut_cache_format (str,enum) – [RESERVED, JSON, BINARY, BOTH]

  • mobile_client_type (str,enum) – [PHONE, TABLET]

  • device_id (str) – the mobile target project,

  • do_not_create_update_caches (bool) – whether the current subscription will overwrite earlier versions of the same report or document in the history list,

  • re_run_hl (bool) – whether subscription will re-run against warehouse

  • cache_library_cache_types (list[LibraryCacheTypes | str], optional) – Set of library cache types, available types can be web, android, ios

  • cache_reuse_dataset_cache (bool) – Whether to reuse dataset cache

  • cache_is_all_library_users (bool) – Whether for all library users

  • delivery_notification_enabled (bool) – Whether notification is enabled, notification applies to cache

  • delivery_personal_notification_address_id (str, optional) – Notification details

available_bursting_attributes() dict

Get a list of available attributes for bursting feature.

available_recipients() list[dict]

List available recipients for subscription content.

delete(force: bool = False) bool

Delete a subscription. Returns True if deletion was successful.

Parameters:

force – If True, no additional prompt will be shown before deleting

execute()

Executes a subscription with given name or GUID for given project.

fetch(attr: str | None = None) None

Fetch the latest object’s state from the I-Server.

Note

This method can overwrite local changes made to the object.

Parameters:
  • attr (Optional[str]) – Attribute name to be fetched. If not specified

  • dictionary. (it will use all getters specified in _API_GETTERS) –

  • None. (Defaults to) –

Raises:

ValueError – If attr cannot be fetched.

classmethod from_dict(source: dict[str, Any], connection: Connection = None, project_id: str | None = None, project_name: str | None = None) Subscription

Initialize Subscription object from dictionary. Specify either project_id or project_name. When project_id is provided (not None), project_name is omitted

remove_recipient(recipients: list[str] | list[dict])

Removes recipient from given subscription in given project.

Parameters:

recipients

list of ids or dicts containing recipients, dict format: {“id”: recipient_id,

”type”: “CONTACT_GROUP” / “USER_GROUP” / “CONTACT” /

”USER” / “PERSONAL_ADDRESS” / “UNSUPPORTED”

”includeType”: “TO” / “CC” / “BCC”}

mstrio.distribution_services.subscription.cache_update_subscription module

class mstrio.distribution_services.subscription.cache_update_subscription.CacheUpdateSubscription(connection: Connection, id: str | None = None, subscription_id: str | None = None, project_id: str | None = None, project_name: str | None = None)

Bases: Subscription

Class representation of MicroStrategy Cache Update Subscription object.

alter(name: str | None = None, allow_delivery_changes: bool | None = None, allow_personalization_changes: bool | None = None, allow_unsubscribe: bool | None = None, send_now: bool | None = None, owner_id: str | None = None, schedules: str | list[str] | mstrio.distribution_services.schedule.schedule.Schedule | list[mstrio.distribution_services.schedule.schedule.Schedule] | None = None, contents: mstrio.distribution_services.subscription.content.Content | None = None, recipients: list[dict] | list[str] | None = None, delivery: mstrio.distribution_services.subscription.delivery.Delivery | dict | None = None, custom_msg: str | None = None, delivery_expiration_date: str | None = None, delivery_expiration_timezone: str | None = None, contact_security: bool = True, cache_cache_type: mstrio.distribution_services.subscription.delivery.CacheType | str | None = None, cache_shortcut_cache_format: mstrio.distribution_services.subscription.delivery.ShortcutCacheFormat | str | None = None, cache_library_cache_types: list[mstrio.distribution_services.subscription.delivery.LibraryCacheTypes | str] | None = None, cache_reuse_dataset_cache: bool = False, cache_is_all_library_users: bool = False, delivery_notification_enabled: bool = False, delivery_personal_notification_address_id: str | None = None)

Alter the subscription.

Parameters:
  • name (str) – name of the subscription,

  • allow_delivery_changes (bool, optional) – whether the recipients can change the delivery of the subscription,

  • allow_personalization_changes (bool, optional) – whether the recipients can personalize the subscription,

  • allow_unsubscribe (bool, optional) – whether the recipients can unsubscribe from the subscription,

  • send_now (bool, optional) – indicates whether to execute the subscription immediately,

  • owner_id (str, optional) – ID of the subscription owner, by default logged in user ID,

  • schedules (str | list[str] | Schedule | list[Schedule], optional) – Schedules IDs or Schedule objects,

  • contents (Content, optional) – The content settings.

  • recipients (list[str] | list[dict], optional) – list of recipients IDs or dicts,

  • delivery (Delivery | dict, optional) – delivery object or dict

  • delivery_expiration_date (str, optional) – expiration date of the subscription, format should be yyyy - MM - dd,

  • delivery_expiration_timezone (str, optional) – expiration timezone of the subscription

  • contact_security (bool) – whether to use contact security for each contact group member

  • cache_cache_type (CacheType | str, optional) – [RESERVED, SHORTCUT, SHORTCUTWITHBOOKMARK]

  • cache_shortcut_cache_format (ShortcutCacheFormat | str, optional) – [RESERVED, JSON, BINARY, BOTH]

  • cache_library_cache_types (list[LibraryCacheTypes | str], optional) – Set of library cache types, available types can be web, android, ios

  • cache_reuse_dataset_cache (bool) – Whether to reuse dataset cache

  • cache_is_all_library_users (bool) – Whether for all library users

  • delivery_notification_enabled (bool) – Whether notification is enabled, notification applies to cache

  • delivery_personal_notification_address_id (str, optional) – Notification details

classmethod create(connection: Connection, name: str, project_id: str | None = None, project_name: str | None = None, allow_delivery_changes: bool | None = None, allow_personalization_changes: bool | None = None, allow_unsubscribe: bool | None = None, send_now: bool | None = None, owner_id: str | None = None, schedules: str | list[str] | mstrio.distribution_services.schedule.schedule.Schedule | list[mstrio.distribution_services.schedule.schedule.Schedule] | None = None, contents: mstrio.distribution_services.subscription.content.Content | None = None, recipients: list[dict] | list[str] | None = None, delivery: mstrio.distribution_services.subscription.delivery.Delivery | dict | None = None, delivery_expiration_date: str | None = None, delivery_expiration_timezone: str | None = None, contact_security: bool = True, cache_cache_type: mstrio.distribution_services.subscription.delivery.CacheType | str | None = None, cache_shortcut_cache_format: mstrio.distribution_services.subscription.delivery.ShortcutCacheFormat | str | None = None, cache_library_cache_types: list[mstrio.distribution_services.subscription.delivery.LibraryCacheTypes | str] | None = None, cache_reuse_dataset_cache: bool = False, cache_is_all_library_users: bool = False, delivery_notification_enabled: bool = False, delivery_personal_notification_address_id: str | None = None) CacheUpdateSubscription

Creates a new cache update subscription.

Parameters:
  • connection (Connection) – a MicroStrategy connection object

  • name (str) – name of the subscription,

  • project_id (str, optional) – project ID,

  • project_name (str, optional) – project name,

  • allow_delivery_changes (bool, optional) – whether the recipients can change the delivery of the subscription,

  • allow_personalization_changes (bool, optional) – whether the recipients can personalize the subscription,

  • allow_unsubscribe (bool, optional) – whether the recipients can unsubscribe from the subscription,

  • send_now (bool, optional) – indicates whether to execute the subscription immediately,

  • owner_id (str, optional) – ID of the subscription owner, by default logged in user ID,

  • schedules (str | list[str] | Schedule | list[Schedule], optional) – Schedules IDs or Schedule objects,

  • contents (Content, optional) – The content settings.

  • recipients (list[str] | list[dict], optional) – list of recipients IDs or dicts,

  • delivery (Delivery | dict, optional) – delivery object or dict

  • delivery_expiration_date (str, optional) – expiration date of the subscription, format should be yyyy - MM - dd,

  • delivery_expiration_timezone (str, optional) – expiration timezone of the subscription, example value ‘Europe/London’

  • contact_security (bool) – whether to use contact security for each contact group member

  • cache_cache_type (CacheType | str, optional) – [RESERVED, SHORTCUT, SHORTCUTWITHBOOKMARK]

  • cache_shortcut_cache_format (ShortcutCacheFormat | str, optional) – [RESERVED, JSON, BINARY, BOTH]

  • cache_library_cache_types (list[LibraryCacheTypes | str], optional) – Set of library cache types, available types can be web, android, ios

  • cache_reuse_dataset_cache (bool) – Whether to reuse dataset cache

  • cache_is_all_library_users (bool) – Whether for all library users

  • delivery_notification_enabled (bool) – Whether notification is enabled, notification applies to cache

  • delivery_personal_notification_address_id (str, optional) – Notification details

mstrio.distribution_services.subscription.common module

class mstrio.distribution_services.subscription.common.RefreshPolicy(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoName

ADD = 'add'
DELETE = 'delete'
REPLACE = 'replace'
UPDATE = 'update'
UPSERT = 'upsert'

mstrio.distribution_services.subscription.content module

class mstrio.distribution_services.subscription.content.Content(id: str, type: Type, name: str | None = None, personalization: mstrio.distribution_services.subscription.content.Content.Properties | None = None, refresh_condition: mstrio.distribution_services.subscription.content.Content.RefreshCondition | None = None)

Bases: Dictable

Class representation of subscription content object.

id

Content identifier

type

Type of content

name

Name of content

personalization

Properties object which personalize content

refresh_condition

RefreshCondition object which sets refresh condition of the content

class Properties(format_mode: FormatMode = FormatMode.DEFAULT, view_mode: ViewMode = ViewMode.DEFAULT, format_type: FormatType = FormatType.PDF, export_to_pdf_settings: mstrio.distribution_services.subscription.content.Content.Properties.ExportToPdfSettings | None = None, delimiter: str | None = None, bursting: mstrio.distribution_services.subscription.content.Content.Properties.Bursting | None = None, prompt: mstrio.distribution_services.subscription.content.Content.Properties.Prompt | None = None, file_name: str | None = None, content_modes: list[str] | None = None, bookmark_ids: list[str] | None = None)

Bases: Dictable

Class representation of personalization properties

format_mode

Type that defines how much of the Report Services document, which has group by units, should be delivered

view_mode

Indicates the view mode that is supported by this format

format_type

Content format mode

export_to_pdf_settings

ExportToPdfSettings object which specifies pdf settings if format_type is set to PDF

delimiter

Format delimiter

bursting

Bursting settings object

prompt

Promp settings object

file_name

file name of content

class Bursting(slicing_attributes: list[str] | None = None, address_attribute_id: str | None = None, device_id: str | None = None, form_id: str | None = None)

Bases: Dictable

Bursting settings

slicing_attributes

The list of attributes to slice on

address_attribute_id

Attribute ID in the email burst feature

device_id

Device ID in the email burst feature

form_id

Form ID in the email burst feature

class ExportToPdfSettings(page_option: PageOption = PageOption.PAGE, page_size: PageSize = PageSize.LETTER, orientation: Orientation = Orientation.AUTOMATIC, page_detail_level=PageDetailLevel.OVERVIEW, include_header: bool = True, include_footer: bool = True, include_toc: bool = False, filter_summary: FilterSummary = FilterSummary.BAR, fit_to_page: bool = False, repeat_column_header: bool = False, grid_paging_mode: GridPagingMode = GridPagingMode.NONE)

Bases: Dictable

Export to PDF Settings

page_option

Specifies whether to export current page or all pages

page_size

Page size of the PDF file

orientation

Page orientation. If ‘auto’ is being used, the exporting engine might swap the width and the height of the page to optimize the export

page_detail_level

Specifies the detail level of page to be displayed

include_header

Specifies whether to include header

Specifies whether to include footer

include_toc

Specifies whether to include table of contents

filter_summary

Specifies the options of including filter summary in the exported PDF. If ‘NONE’ is being used, no filter summary will be displayed. If ‘BAR’ is being used, filter summary bar will be displayed on each page. If ‘PAGE’ is being used, filter summary page will be displayed at the end of each chapter. If ‘ALL’ is being used, both filter summary bar and page will be displayed.

fit_to_page

Specifies whether to fit grid to page

repeat_column_header

Specifies whether to repeat grid column header

grid_paging_mode

Specifies how grids should be paginated

class FilterSummary(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoUpperName

ALL = 'ALL'
BAR = 'BAR'
NONE = 'NONE'
PAGE = 'PAGE'
class GridPagingMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoName

ENLARGE = 'enlarge'
NONE = 'none'
class Orientation(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoName

AUTOMATIC = 'automatic'
LANDSCAPE = 'landscape'
PORTRAIT = 'portrait'
class PageDetailLevel(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoName

DETAILED_PAGES = 'detailed_pages'
OVERVIEW = 'overview'
OVERVIEW_AND_DETAILED_PAGES = 'overview_and_detailed_pages'
class PageOption(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoUpperName

ALL = 'ALL'
CURRENT = 'CURRENT'
DEFAULT = 'DEFAULT'
PAGE = 'PAGE'
class PageSize(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoName

A0 = 'a0'
A1 = 'a1'
A2 = 'a2'
A3 = 'a3'
A4 = 'a4'
A5 = 'a5'
B4 = 'b4'
B5 = 'b5'
EXECUTIVE = 'executive'
FOLIO = 'folio'
LEDGER = 'ledger'
LEGAL = 'legal'
LETTER = 'letter'
STATEMENT = 'statement'
UNSUPPORTED = 'unsupported'
class FormatMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoUpperName

ALL_PAGES = 'ALL_PAGES'
ALL_PAGES_SEPARATED = 'ALL_PAGES_SEPARATED'
CURRENT_LAYOUT = 'CURRENT_LAYOUT'
CURRENT_PAGE = 'CURRENT_PAGE'
CURRENT_WINDOW = 'CURRENT_WINDOW'
DEFAULT = 'DEFAULT'
class FormatType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoUpperName

CSV = 'CSV'
EDITABLE = 'EDITABLE'
EXCEL = 'EXCEL'
EXPORT_FLASH = 'EXPORT_FLASH'
HTML = 'HTML'
INTERACTIVE = 'INTERACTIVE'
JSON = 'JSON'
MSTR = 'MSTR'
PDF = 'PDF'
PHONE = 'PHONE'
PLAIN_TEXT = 'PLAIN_TEXT'
STREAMING = 'STREAMING'
SWF_HTML = 'SWF_HTML'
SWF_MHT = 'SWF_MHT'
TABLET = 'TABLET'
VIEW = 'VIEW'
class Prompt(enabled: bool, instance_id: str = None)

Bases: Dictable

class ViewMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoUpperName

BOTH = 'BOTH'
DEFAULT = 'DEFAULT'
GRAPH = 'GRAPH'
GRID = 'GRID'
NONINTERACTIVE = 'NONINTERACTIVE'
class RefreshCondition(tables: list[mstrio.distribution_services.subscription.content.Content.RefreshCondition.TableRefreshInfo], dataset_refresh_policy: mstrio.distribution_services.subscription.common.RefreshPolicy | None = None, filters: list[mstrio.distribution_services.subscription.content.Content.RefreshCondition.SubscriptionFilter] | None = None)

Bases: Dictable

Dataset refresh condition settings

tables

List of TableRefreshInfo objects

dataset_refresh_policy

Default refresh policy for all the tables in the dataset. The setting value must be provided if the tables setting value is not provided or empty.

filters

list of SubscriptionFilter objects

class SubscriptionFilter(type: str, expression)

Bases: Dictable

Subscription filter. The format of the subscription filters are

exactly the same as the view filters. Please refer to https://microstrategy.github.io/rest-api-docs/common-workflows /analytics/filter-data/filter-report-and-cube-instances /filter-report-and-cube-instances-using-view-filters /code-sample#multiple-filters-on-attribute-forms for detailed information. But it should be noted that subscription filters only support Filter on attribute forms and Multiple filters on attribute forms.

type

Filter type

expression

Metric limits

class TableRefreshInfo(id: str, refresh_policy: RefreshPolicy, alternate_source: mstrio.distribution_services.subscription.content.Content.RefreshCondition.TableRefreshInfo.AlternateSource | None = None)

Bases: Dictable

Table refresh settings. When the setting is absent in the

response or the array is empty, the datasetRefreshPolicy setting value must be provided and will be used as the refresh policy for all the tables, including the new added table after the scheduler is set up.

id

Table ID

refresh_policy

Table refresh policy

alternateSource

AlternateSource object

class AlternateSource(db_role_id: str | None = None, namespace: str | None = None, table_name: str | None = None, url: str | None = None)

Bases: Dictable

Alternate source

db_role_id

Database instance ID of alternate source

namespace

Database namespace of alternate source

table_name

Table name of alternate source

url

URL of alternate source

class Type(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoName

CUBE = 'cube'
DASHBOARD = 'dossier'
DOCUMENT = 'document'
DOSSIER = 'dossier'
REPORT = 'report'
UNSUPPORTED = 'unsupported'

mstrio.distribution_services.subscription.delivery module

class mstrio.distribution_services.subscription.delivery.CacheType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoName

RESERVED = 'reserved'
SHORTCUT = 'shortcut'
SHORTCUTWITHBOOKMARK = 'shortcut_and_bookmark'
class mstrio.distribution_services.subscription.delivery.ClientType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoUpperName

PHONE = 'PHONE'
TABLET = 'TABLET'
class mstrio.distribution_services.subscription.delivery.Delivery(mode='EMAIL', expiration: str = None, contact_security: bool | None = None, subject: str | None = None, message: str | None = None, filename: str | None = None, compress: bool = False, zip: mstrio.distribution_services.subscription.delivery.ZipSettings | None = None, password: str | None = None, password_protect: bool = False, space_delimiter: str | None = None, send_content_as: SendContentAs = SendContentAs.DATA, overwrite_older_version: bool = False, burst_sub_folder: str | None = None, copies: int | None = None, range_start: int | None = None, range_end: int | None = None, collated: bool = False, orientation: Orientation = 'PORTRAIT', use_print_range: bool = False, mobile_client_type: ClientType = 'PHONE', device_id: str | None = None, do_not_create_update_caches: bool = False, re_run_hl: bool = False, expiration_time_zone: str | None = None, email: mstrio.distribution_services.subscription.delivery.Delivery.Email | None = None, file: mstrio.distribution_services.subscription.delivery.Delivery.File | None = None, cache_type: mstrio.distribution_services.subscription.delivery.CacheType | str = CacheType.RESERVED, shortcut_cache_format: mstrio.distribution_services.subscription.delivery.ShortcutCacheFormat | str = ShortcutCacheFormat.RESERVED, library_cache_types: list[mstrio.distribution_services.subscription.delivery.LibraryCacheTypes | str] = None, reuse_dataset_cache: bool = False, is_all_library_users: bool = False, notification_enabled: bool = False, personal_notification_address_id: str | None = None)

Bases: DeliveryDictable

Delivery settings object

mode

The subscription delivery mode (i.e. email, file, printer, etc.)

expiration

Expiration date of the subscription, format should be yyyy-MM-dd

contact_security

Whether to use contact security for each contact group member

email

Email delivery properties object

file

File delivery properties object

printer

File delivery properties object

ftp

FTP delivery properties object

cache

Cache delivery properties

mobile

Mobile delivery properties object

history_list

HistoryList delivery properties

class Cache(cache_type: CacheType = CacheType.RESERVED, shortcut_cache_format: ShortcutCacheFormat = ShortcutCacheFormat.RESERVED, library_cache_types: list[mstrio.distribution_services.subscription.delivery.LibraryCacheTypes] | None = None, reuse_dataset_cache: bool = False, is_all_library_users: bool = False)

Bases: DeliveryDictable

Delivery properties for Cache subscriptions

cache_type

The cache type to use

shortcut_cache_format

The shortcut cache format to use

library_cache_types

Set of library cache types, available types can be web, android, ios

reuse_dataset_cache

Whether to reuse dataset cache

is_all_library_users

Whether for all library users

VALIDATION_DICT = {'is_all_library_users': [<class 'bool'>, False], 'library_cache_types': [<class 'list'>, False], 'reuse_dataset_cache': [<class 'bool'>, False]}
class DeliveryMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoUpperName

CACHE = 'CACHE'
EMAIL = 'EMAIL'
FILE = 'FILE'
FTP = 'FTP'
HISTORY_LIST = 'HISTORY_LIST'
MOBILE = 'MOBILE'
PERSONAL_VIEW = 'PERSONAL_VIEW'
PRINTER = 'PRINTER'
SNAPSHOT = 'SNAPSHOT'
UNSUPPORTED = 'UNSUPPORTED'
class Email(subject: str | None = None, message: str | None = None, filename: str | None = None, space_delimiter: str | None = None, send_content_as: mstrio.distribution_services.subscription.delivery.SendContentAs | None = None, overwrite_older_version: bool = False, zip: mstrio.distribution_services.subscription.delivery.ZipSettings | None = None)

Bases: DeliveryDictable

Delivery properties for Email subscriptions

subject

The email subject associated with the subscription

message

The email body of subscription

filename

The filename that will be delivered when the subscription is executed

space_delimiter

The space delimiter

send_content_as

Send subscribed content as one of [data, data_and_history_list, data_and_link_and_history_list, link_and_history_list]

overwrite_older_version

Whether the current subscription will overwrite earlier versions of the same report or document in the history list

zip

Optional compression settings object

VALIDATION_DICT = {'filename': [<class 'str'>, False], 'message': [<class 'str'>, False], 'overwrite_older_version': [<class 'bool'>, False], 'send_content_as': [<class 'str'>, False], 'space_delimiter': [<class 'str'>, False], 'subject': [<class 'str'>, True], 'zip': [<class 'mstrio.distribution_services.subscription.delivery.ZipSettings'>, False]}
validate()

Validate whether all obligatory properties of the Delivery object are present, whether all the properties present are of correct types and whether the message and subject do not exceed the character limits.

class File(filename: str | None = None, space_delimiter: str | None = None, burst_sub_folder: str | None = None, zip: mstrio.distribution_services.subscription.delivery.ZipSettings | None = None)

Bases: DeliveryDictable

Delivery properties for File subscriptions

filename

The filename that will be delivered when the subscription is executed

space_delimiter

The space delimiter

burst_sub_folder

The burst sub folder

zip

Optional compression settings object

VALIDATION_DICT = {'burst_sub_folder': [<class 'str'>, False], 'filename': [<class 'str'>, False], 'space_delimiter': [<class 'str'>, False], 'zip': [<class 'mstrio.distribution_services.subscription.delivery.ZipSettings'>, False]}
class Ftp(space_delimiter: str | None = None, filename: str | None = None, zip: mstrio.distribution_services.subscription.delivery.ZipSettings | None = None)

Bases: DeliveryDictable

Delivery properties for FTP subscriptions

filename

The filename that will be delivered when the subscription is executed

space_delimiter

The space delimiter

zip

Optional compression settings object

VALIDATION_DICT = {'filename': [<class 'str'>, False], 'space_delimiter': [<class 'str'>, False], 'zip': [<class 'mstrio.distribution_services.subscription.delivery.ZipSettings'>, False]}
class HistoryList(device_id: str | None = None, do_not_create_update_caches: bool = False, overwrite_older_version: bool = False, re_run_hl: bool = False)

Bases: DeliveryDictable

Delivery properties for History List subscriptions

device_id

The mobile target project

do_not_create_update_caches

Whether the subscription will use a existing cache

overwrite_older_version

Whether the current subscription will overwrite earlier versions of the same report or document in the history list

re_run_hl

Whether the subscription will re-run against warehouse

VALIDATION_DICT = {'device_id': [<class 'str'>, False], 'do_not_create_update_caches': [<class 'bool'>, False], 'overwrite_older_version': [<class 'bool'>, False], 're_run_hl': [<class 'bool'>, False]}
class Mobile(mobile_client_type: ClientType = 'PHONE', device_id: str | None = None, do_not_create_update_caches: bool = False, overwrite_older_version: bool = False, re_run_hl: bool = False)

Bases: DeliveryDictable

Delivery properties for Mobile subscriptions

mobile_client_type

The mobile client type

device_id

The mobile target project

do_not_create_update_caches

Whether the subscription will use a existing cache

overwrite_older_version

Whether the current subscription will overwrite earlier versions of the same report or document in the history list

re_run_hl

Whether the subscription will re-run against warehouse

VALIDATION_DICT = {'device_id': [<class 'str'>, False], 'do_not_create_update_caches': [<class 'bool'>, False], 'mobile_client_type': [<class 'str'>, False], 'overwrite_older_version': [<class 'bool'>, False], 're_run_hl': [<class 'bool'>, False]}
class Printer(copies: int | None = None, range_start: int | None = None, range_end: int | None = None, collated: bool = False, orientation: Orientation = 'PORTRAIT', use_print_range: bool = False)

Bases: DeliveryDictable

Delivery properties for Printer subscriptions

copies

The number of copies that should be printed

range_start

The number indicating the first report page that should be printed

range_end

The number indicating the last report page that should be printed

collated

Whether the printing should be collated or not

orientation

Whether orientation is portrait or landscape

use_print_range

Whether a print range should be used

VALIDATION_DICT = {'collated': [<class 'bool'>, False], 'copies': [<class 'int'>, False], 'orientation': [<class 'str'>, False], 'range_end': [<class 'int'>, False], 'range_start': [<class 'int'>, False], 'use_print_range': [<class 'bool'>, False]}
VALIDATION_DICT = {'cache': [<class 'mstrio.distribution_services.subscription.delivery.Delivery.Cache'>, False], 'contact_security': [<class 'bool'>, False], 'email': [<class 'mstrio.distribution_services.subscription.delivery.Delivery.Email'>, False], 'expiration': [<class 'str'>, False], 'expiration_time_zone': [<class 'str'>, False], 'file': [<class 'mstrio.distribution_services.subscription.delivery.Delivery.File'>, False], 'ftp': [<class 'mstrio.distribution_services.subscription.delivery.Delivery.Ftp'>, False], 'history_list': [<class 'mstrio.distribution_services.subscription.delivery.Delivery.HistoryList'>, False], 'mobile': [<class 'mstrio.distribution_services.subscription.delivery.Delivery.Mobile'>, False], 'mode': [<class 'str'>, True], 'printer': [<class 'mstrio.distribution_services.subscription.delivery.Delivery.Printer'>, False]}
change_mode(mode_name: str, mode_value) bool

Change mode of the Delivery object. Return True on success, False if mode_name was invalid.

classmethod from_dict(source, **kwargs)

Initialize Delivery object from dictionary.

class mstrio.distribution_services.subscription.delivery.DeliveryDictable

Bases: Dictable

VALIDATION_DICT = {}
classmethod from_dict(source, **kwargs)

Initialize Delivery object from dictionary.

validate()

Validate whether all obligatory properties of the Delivery object are present and whether all the properties present are of correct types.

class mstrio.distribution_services.subscription.delivery.LegacyCacheType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoUpperName

Available values when using environment with version 11.3.0100 or lower

BOOKMARK = 'BOOKMARK'
RESERVED = 'RESERVED'
SHORTCUT = 'SHORTCUT'
SHORTCUTWITHBOOKMARK = 'SHORTCUTWITHBOOKMARK'
class mstrio.distribution_services.subscription.delivery.LibraryCacheTypes(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoName

ANDROID = 'android'
ANDROID_AND_IOS = 'android_and_ios'
IOS = 'ios'
WEB = 'web'
class mstrio.distribution_services.subscription.delivery.Orientation(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoUpperName

LANDSCAPE = 'LANDSCAPE'
PORTRAIT = 'PORTRAIT'
class mstrio.distribution_services.subscription.delivery.SendContentAs(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoName

DATA = 'data'
DATA_AND_HISTORY_LIST = 'data_and_history_list'
class mstrio.distribution_services.subscription.delivery.ShortcutCacheFormat(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: AutoUpperName

BINARY = 'BINARY'
BOTH = 'BOTH'
JSON = 'JSON'
RESERVED = 'RESERVED'
class mstrio.distribution_services.subscription.delivery.ZipSettings(filename: str | None = None, password: str | None = None, password_protect: bool = False)

Bases: DeliveryDictable

Optional compression settings

filename

Filename of the compressed content

password

Optional password for the compressed file

password_protect

Whether to password protect file or not

VALIDATION_DICT = {'filename': [<class 'str'>, False], 'password': [<class 'str'>, False], 'password_protect': [<class 'bool'>, False]}

mstrio.distribution_services.subscription.dynamic_recipient_list module

class mstrio.distribution_services.subscription.dynamic_recipient_list.DynamicRecipientList(connection: Connection, id: str | None = None, name: str | None = None, project_id: str | None = None, project_name: str | None = None)

Bases: EntityBase, DeleteMixin

Python representation of MicroStrategy DynamicRecipientList object.

id

DynamicRecipientList’s ID

name

DynamicRecipientList’s name

description

DynamicRecipientList’s description

source_report_id

Id of the Report that is the source of the DynamicRecipientList

physical_address

Physical Address for the DynamicRecipientList

linked_user

Linked User for the DynamicRecipientList

device

Device for the DynamicRecipientList

recipient_name

Recipient Name for the DynamicRecipientList

notification_address

Notification Address for the DynamicRecipientList

notification_device

Notification Device for the DynamicRecipientList

personalization

Personalization for the DynamicRecipientList

class MappingField(attribute_id: str, attribute_form_id: str)

Bases: Dictable

Python representation of a Mapping Field.

attribute_id

ID of the mapped attribute

Type:

str

attribute_form_id

ID of the mapped attribute’s form

Type:

str

attribute_form_id: str
attribute_id: str
alter(name: str | None = None, source_report_id: str | None = None, physical_address: mstrio.distribution_services.subscription.dynamic_recipient_list.DynamicRecipientList.MappingField | None = None, linked_user: mstrio.distribution_services.subscription.dynamic_recipient_list.DynamicRecipientList.MappingField | None = None, device: mstrio.distribution_services.subscription.dynamic_recipient_list.DynamicRecipientList.MappingField | None = None, description: str | None = None, recipient_name: mstrio.distribution_services.subscription.dynamic_recipient_list.DynamicRecipientList.MappingField | None = None, notification_address: mstrio.distribution_services.subscription.dynamic_recipient_list.DynamicRecipientList.MappingField | None = None, notification_device: mstrio.distribution_services.subscription.dynamic_recipient_list.DynamicRecipientList.MappingField | None = None, personalization: mstrio.distribution_services.subscription.dynamic_recipient_list.DynamicRecipientList.MappingField | None = None) None

Alter a DynamicRecipientList’s specified properties

Note

If one alters the source_report_id, all existing Mapping Fields also need to be updated to reflect the new source report.

Parameters:
  • name (string, optional) – DynamicRecipientList’s name

  • source_report_id (string, optional) – ID of the Report that is the source of the DynamicRecipientList

  • physical_address (MappingField, optional) – Mapping Field representing the Physical Address for the DynamicRecipientList

  • linked_user (MappingField, optional) – Mapping Field representing the Linked User for the DynamicRecipientList

  • device (MappingField, optional) – Mapping Field representing the Device for the DynamicRecipientList

  • description (string, optional) – DynamicRecipientList’s description

  • recipient_name (MappingField, optional) – Mapping Field representing the Recipient Name for the DynamicRecipientList

  • notification_address (MappingField, optional) – Mapping Field representing the Notification Address for the DynamicRecipientList

  • notification_device (MappingField, optional) – Mapping Field representing the Notification Device for the DynamicRecipientList

  • personalization (MappingField, optional) – Mapping Field representing the Personalization for the DynamicRecipientList

classmethod create(connection: Connection, name: str, source_report_id: str, physical_address: MappingField, linked_user: MappingField, device: MappingField, project_id: str | None = None, project_name: str | None = None, description: str | None = None, recipient_name: mstrio.distribution_services.subscription.dynamic_recipient_list.DynamicRecipientList.MappingField | None = None, notification_address: mstrio.distribution_services.subscription.dynamic_recipient_list.DynamicRecipientList.MappingField | None = None, notification_device: mstrio.distribution_services.subscription.dynamic_recipient_list.DynamicRecipientList.MappingField | None = None, personalization: mstrio.distribution_services.subscription.dynamic_recipient_list.DynamicRecipientList.MappingField | None = None) DynamicRecipientList

Create a new DynamicRecipientList with specified properties.

Parameters:
  • name (string) – DynamicRecipientList’s name

  • source_report_id (string) – ID of the Report that is the source of the DynamicRecipientList

  • physical_address (MappingField) – Mapping Field representing the Physical Address for the DynamicRecipientList

  • linked_user (MappingField) – Mapping Field representing the Linked User for the DynamicRecipientList

  • device (MappingField) – Mapping Field representing the Device for the DynamicRecipientList

  • project_id (string, optional) – ID of the project in which the DynamicRecipientList is to be created, if not provided, ID will be taken from project_name, if neither is provided, project will be extracted from the connection

  • project_name (string, optional) – name of the project in which the DynamicRecipientList is to be created

  • description (string, optional) – DynamicRecipientList’s description

  • recipient_name (MappingField, optional) – Mapping Field representing the Recipient Name for the DynamicRecipientList

  • notification_address (MappingField, optional) – Mapping Field representing the Notification Address for the DynamicRecipientList

  • notification_device (MappingField, optional) – Mapping Field representing the Notification Device for the DynamicRecipientList

  • personalization (MappingField, optional) – Mapping Field representing the Personalization for the DynamicRecipientList

Returns:

DynamicRecipientList class object.

mstrio.distribution_services.subscription.dynamic_recipient_list.list_dynamic_recipient_lists(connection: Connection, project_id: str | None = None, project_name: str | None = None, to_dictionary: bool = False, limit: int | None = None, **filters) list[mstrio.distribution_services.subscription.dynamic_recipient_list.DynamicRecipientList] | list[dict]

Get list of Dynamic Recipient List objects or dicts with them.

Note

When project_id is specified, project_name is omitted. If neither is specified then project_id from connection object is taken.

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

  • project_id (str, optional) – ID of the project to list the metrics from

  • project_name (str, optional) – name of the project

  • to_dictionary (bool, optional) – If True returns list of dictionaries, by default (False) returns DynamicRecipientList objects

  • limit (integer, optional) – limit the number of elements returned. If None all object are returned

  • **filters – Available filter parameters: [‘name’, ‘id’, ‘description’, ‘source_report_id’, ‘physical_address’, ‘linked_user’, ‘device’]

Returns:

list with DynamicRecipientList objects or list of dictionaries

mstrio.distribution_services.subscription.email_subscription module

class mstrio.distribution_services.subscription.email_subscription.EmailSubscription(connection: Connection, id: str | None = None, subscription_id: str | None = None, project_id: str | None = None, project_name: str | None = None)

Bases: Subscription

Class representation of MicroStrategy Email Subscription object.

classmethod create(connection: Connection, name: str, project_id: str | None = None, project_name: str | None = None, allow_delivery_changes: bool | None = None, allow_personalization_changes: bool | None = None, allow_unsubscribe: bool = True, send_now: bool | None = None, owner_id: str | None = None, schedules: str | list[str] | mstrio.distribution_services.schedule.schedule.Schedule | list[mstrio.distribution_services.schedule.schedule.Schedule] | None = None, contents: mstrio.distribution_services.subscription.content.Content | None = None, recipients: list[str] | list[dict] = None, delivery_expiration_date: str | None = None, delivery_expiration_timezone: str | None = None, contact_security: bool | None = None, space_delimiter: str | None = None, email_subject: str | None = None, email_message: str | None = None, email_send_content_as: str = 'data', overwrite_older_version: bool = False, filename: str | None = None, compress: bool = False, zip_filename: str | None = None, zip_password_protect: bool | None = None, zip_password: str | None = None)

Creates a new email subscription.

Parameters:
  • connection (Connection) – a MicroStrategy connection object

  • name (str) – name of the subscription,

  • project_id (str, optional) – project ID,

  • project_name (str, optional) – project name,

  • allow_delivery_changes (bool, optional) – whether the recipients can change the delivery of the subscription,

  • allow_personalization_changes (bool, optional) – whether the recipients can personalize the subscription,

  • allow_unsubscribe (bool, optional) – whether the recipients can unsubscribe from the subscription,

  • send_now (bool, optional) – indicates whether to execute the subscription immediately,

  • owner_id (str, optional) – ID of the subscription owner, by default logged in user ID,

  • schedules (str | list[str] | Schedule | list[Schedule], optional) – Schedules IDs or Schedule objects,

  • contents (Content, optional) – The content settings.

  • recipients (list[str] | list[dict], optional) – list of recipients IDs or dicts,

  • delivery_expiration_date (str, optional) – expiration date of the subscription, format should be yyyy - MM - dd,

  • delivery_expiration_timezone (str, optional) – expiration timezone of the subscription, example value ‘Europe/London’

  • contact_security (bool) – whether to use contact security for each contact group member

  • filename (str, optional) – the filename that will be delivered when the subscription is executed,

  • compress (bool) – whether to compress the file

  • space_delimiter (str, optional) – space delimiter,

  • email_subject (str, optional) – email subject associated with the subscription,

  • email_message (str, optional) – email body of subscription,

  • email_send_content_as (str, enum) – [data, data_and_history_list, data_and_link_and_history_list, link_and_history_list],

  • overwrite_older_version (bool) – whether the current subscription will overwrite earlier versions of the same report or document in the history list,

  • zip_filename (str, optional) – filename of the compressed content,

  • zip_password_protect (bool, optional) – whether to password protect zip file,

  • zip_password (str, optional) – optional password for the compressed file

mstrio.distribution_services.subscription.file_subscription module

class mstrio.distribution_services.subscription.file_subscription.FileSubscription(connection: Connection, id: str | None = None, subscription_id: str | None = None, project_id: str | None = None, project_name: str | None = None)

Bases: Subscription

Class representation of MicroStrategy File Subscription object.

alter(name: str | None = None, filename: str | None = None, multiple_contents: bool | None = None, allow_delivery_changes: bool | None = None, allow_personalization_changes: bool | None = None, allow_unsubscribe: bool | None = None, send_now: bool | None = None, owner_id: str | None = None, schedules: str | list[str] | mstrio.distribution_services.schedule.schedule.Schedule | list[mstrio.distribution_services.schedule.schedule.Schedule] | None = None, recipients: list[dict] | list[str] | None = None, delivery: mstrio.distribution_services.subscription.delivery.Delivery | dict | None = None, custom_msg: str | None = None, delivery_expiration_date: str | None = None, delivery_expiration_timezone: str | None = None, contact_security: bool = True, zip_filename: str | None = None, zip_password_protect: bool | None = None, zip_password: str | None = None, file_burst_sub_folder: str | None = None, space_delimiter: str | None = None, delivery_notification_enabled: bool = False, delivery_personal_notification_address_id: str | None = None)

Alter the subscription. :param name: name of the subscription :type name: str, optional :param filename: the filename that will be delivered when

the subscription is executed

Parameters:
  • multiple_contents (bool, optional) – whether multiple contents are allowed

  • allow_delivery_changes (bool, optional) – whether the recipients can change the delivery of the subscription

  • allow_personalization_changes (bool, optional) – whether the recipients can personalize the subscription

  • allow_unsubscribe (bool, optional) – whether the recipients can unsubscribe from the subscription

  • send_now (bool, optional) – indicates whether to execute the subscription immediately

  • owner_id (str, optional) – ID of the subscription owner, by default logged in user ID

  • schedules (list[str] | str | Schedule | list[Schedule], optional) – Schedules IDs or Schedule objects

  • recipients (list[dict] | dict, optional) – list of recipients IDs or dicts

  • delivery (dict | Delivery, optional) – delivery object or dict

  • delivery_expiration_date (str, optional) – expiration date of the subscription, format should be yyyy - MM - dd

  • delivery_expiration_timezone (str, optional) – expiration timezone of the subscription

  • contact_security (bool) – whether to use contact security for each contact group member

  • zip_filename (str, optional) – filename of the compressed content

  • zip_password_protect (bool, optional) – whether to password protect zip file

  • zip_password (str, optional) – optional password for the compressed file

  • file_burst_sub_folder (str, optional) – burst sub folder

  • space_delimiter (str, optional) – space delimiter

  • delivery_notification_enabled (bool) – Whether notification is enabled, notification applies to cache

  • delivery_personal_notification_address_id (str, optional) – Notification details

classmethod create(connection: Connection, name: str, filename: str, project_id: str | None = None, project_name: str | None = None, multiple_contents: bool | None = False, allow_delivery_changes: bool | None = None, allow_personalization_changes: bool | None = None, allow_unsubscribe: bool | None = None, send_now: bool | None = None, owner_id: str | None = None, schedules: str | list[str] | mstrio.distribution_services.schedule.schedule.Schedule | list[mstrio.distribution_services.schedule.schedule.Schedule] | None = None, contents: mstrio.distribution_services.subscription.content.Content | None = None, recipients: list[dict] | list[str] | None = None, delivery: mstrio.distribution_services.subscription.delivery.Delivery | dict | None = None, delivery_expiration_date: str | None = None, delivery_expiration_timezone: str | None = None, contact_security: bool = True, zip_filename: str | None = None, zip_password_protect: bool | None = None, zip_password: str | None = None, file_burst_sub_folder: str | None = None, space_delimiter: str | None = None, delivery_notification_enabled: bool = False, delivery_personal_notification_address_id: str | None = None) FileSubscription

Creates a new file subscription. :param connection: a MicroStrategy connection object :type connection: Connection :param name: name of the subscription :type name: str :param filename: the filename that will be delivered when

the subscription is executed

Parameters:
  • project_id (str, optional) – project ID

  • project_name (str, optional) – project name

  • multiple_contents (bool, optional) – whether multiple contents are allowed

  • allow_delivery_changes (bool, optional) – whether the recipients can change the delivery of the subscription

  • allow_personalization_changes (bool, optional) – whether the recipients can personalize the subscription

  • allow_unsubscribe (bool, optional) – whether the recipients can unsubscribe from the subscription

  • send_now (bool, optional) – indicates whether to execute the subscription immediately

  • owner_id (str, optional) – ID of the subscription owner, by default logged in user ID

  • schedules (list[str] | str | Schedule | list[Schedule], optional) – Schedules IDs or Schedule objects

  • contents (Content, optional) – The content settings

  • recipients (list[dict] | dict, optional) – list of recipients IDs or dicts

  • delivery (dict | Delivery, optional) – delivery object or dict

  • delivery_expiration_date (string, optional) – expiration date of the subscription, format should be yyyy - MM - dd

  • delivery_expiration_timezone (str, optional) – expiration timezone of the subscription, example value ‘Europe/London’

  • contact_security (bool) – whether to use contact security for each contact group member

  • zip_filename (str, optional) – filename of the compressed content

  • zip_password_protect (bool, optional) – whether to password protect zip file

  • zip_password (str, optional) – optional password for the compressed file

  • file_burst_sub_folder (str, optional) – burst sub folder

  • space_delimiter (str, optional) – space delimiter

  • delivery_notification_enabled (bool) – Whether notification is enabled, notification applies to cache

  • delivery_personal_notification_address_id (str, optional) – Notification details

mstrio.distribution_services.subscription.ftp_subscription module

class mstrio.distribution_services.subscription.ftp_subscription.FTPSubscription(connection: Connection, id: str | None = None, subscription_id: str | None = None, project_id: str | None = None, project_name: str | None = None)

Bases: Subscription

Class representation of MicroStrategy FTP Subscription object.

alter(name: str | None = None, filename: str | None = None, multiple_contents: bool | None = None, allow_delivery_changes: bool | None = None, allow_personalization_changes: bool | None = None, allow_unsubscribe: bool | None = None, send_now: bool | None = None, owner_id: str | None = None, schedules: str | list[str] | mstrio.distribution_services.schedule.schedule.Schedule | list[mstrio.distribution_services.schedule.schedule.Schedule] | None = None, recipients: list[dict] | list[str] | None = None, delivery: mstrio.distribution_services.subscription.delivery.Delivery | dict | None = None, custom_msg: str | None = None, delivery_expiration_date: str | None = None, delivery_expiration_timezone: str | None = None, contact_security: bool = True, zip_filename: str | None = None, zip_password_protect: bool | None = None, zip_password: str | None = None, space_delimiter: str | None = None, delivery_notification_enabled: bool = False, delivery_personal_notification_address_id: str | None = None)

Alter the subscription. :param name: name of the subscription :type name: str, optional :param filename: the filename that will be delivered when

the subscription is executed

Parameters:
  • multiple_contents (bool, optional) – whether multiple contents are allowed

  • allow_delivery_changes (bool, optional) – whether the recipients can change the delivery of the subscription

  • allow_personalization_changes (bool, optional) – whether the recipients can personalize the subscription

  • allow_unsubscribe (bool, optional) – whether the recipients can unsubscribe from the subscription

  • send_now (bool, optional) – indicates whether to execute the subscription immediately

  • owner_id (str, optional) – ID of the subscription owner, by default logged in user ID

  • schedules (list[str] | str | Schedule | list[Schedule], optional) – Schedules IDs or Schedule objects

  • recipients (list[dict] | dict, optional) – list of recipients IDs or dicts

  • delivery (dict | Delivery, optional) – delivery object or dict

  • delivery_expiration_date (str, optional) – expiration date of the subscription, format should be yyyy - MM - dd

  • delivery_expiration_timezone (str, optional) – expiration timezone of the subscription

  • contact_security (bool) – whether to use contact security for each contact group member

  • zip_filename (str, optional) – filename of the compressed content

  • zip_password_protect (bool, optional) – whether to password protect zip file

  • zip_password (str, optional) – optional password for the compressed file

  • space_delimiter (str, optional) – space delimiter

  • delivery_notification_enabled (bool) – Whether notification is enabled, notification applies to cache

  • delivery_personal_notification_address_id (str, optional) – Notification details

classmethod create(connection: Connection, name: str, space_delimiter: str | None = ' ', filename: str | None = None, project_id: str | None = None, project_name: str | None = None, multiple_contents: bool | None = False, allow_delivery_changes: bool | None = None, allow_personalization_changes: bool | None = None, allow_unsubscribe: bool | None = None, send_now: bool | None = None, owner_id: str | None = None, schedules: str | list[str] | mstrio.distribution_services.schedule.schedule.Schedule | list[mstrio.distribution_services.schedule.schedule.Schedule] | None = None, contents: mstrio.distribution_services.subscription.content.Content | None = None, recipients: list[dict] | list[str] | None = None, delivery: mstrio.distribution_services.subscription.delivery.Delivery | dict | None = None, delivery_expiration_date: str | None = None, delivery_expiration_timezone: str | None = None, contact_security: bool = True, zip_filename: str | None = None, zip_password_protect: bool | None = None, zip_password: str | None = None, delivery_notification_enabled: bool = False, delivery_personal_notification_address_id: str | None = None) FTPSubscription

Creates a new FTP subscription. :param connection: a MicroStrategy connection object :type connection: Connection :param name: name of the subscription :type name: str :param space_delimiter: space delimiter, :type space_delimiter: str :param filename: the filename that will be delivered when

the subscription is executed

Parameters:
  • project_id (str, optional) – project ID

  • project_name (str, optional) – project name

  • multiple_contents (bool, optional) – whether multiple contents are allowed

  • allow_delivery_changes (bool, optional) – whether the recipients can change the delivery of the subscription

  • allow_personalization_changes (bool, optional) – whether the recipients can personalize the subscription

  • allow_unsubscribe (bool, optional) – whether the recipients can unsubscribe from the subscription

  • send_now (bool, optional) – indicates whether to execute the subscription immediately

  • owner_id (str, optional) – ID of the subscription owner, by default logged in user ID

  • schedules (list[str] | str | Schedule | list[Schedule], optional) – Schedules IDs or Schedule objects

  • contents (Content, optional) – The content settings

  • recipients (list[dict] | dict, optional) – list of recipients IDs or dicts

  • delivery (dict | Delivery, optional) – delivery object or dict

  • delivery_expiration_date (str, optional) – expiration date of the subscription, format should be yyyy - MM - dd

  • delivery_expiration_timezone (str, optional) – expiration timezone of the subscription, example value ‘Europe/London’

  • contact_security (bool) – whether to use contact security for each contact group member

  • zip_filename (str, optional) – filename of the compressed content

  • zip_password_protect (bool, optional) – whether to password protect zip file

  • zip_password (str, optional) – optional password for the compressed file

  • space_delimiter (str, optional) – space delimiter

  • delivery_notification_enabled (bool) – Whether notification is enabled, notification applies to cache

  • delivery_personal_notification_address_id (str, optional) – Notification details

mstrio.distribution_services.subscription.history_list_subscription module

class mstrio.distribution_services.subscription.history_list_subscription.HistoryListSubscription(connection: Connection, id: str | None = None, subscription_id: str | None = None, project_id: str | None = None, project_name: str | None = None)

Bases: Subscription

Class representation of MicroStrategy History List Subscription object.

alter(name: str | None = None, multiple_contents: bool | None = None, allow_delivery_changes: bool | None = None, allow_personalization_changes: bool | None = None, allow_unsubscribe: bool | None = None, send_now: bool | None = None, owner_id: str | None = None, schedules: str | list[str] | mstrio.distribution_services.schedule.schedule.Schedule | list[mstrio.distribution_services.schedule.schedule.Schedule] | None = None, recipients: list[dict] | list[str] | None = None, delivery: mstrio.distribution_services.subscription.delivery.Delivery | dict | None = None, custom_msg: str | None = None, delivery_expiration_date: str | None = None, delivery_expiration_timezone: str | None = None, contact_security: bool = True, do_not_create_update_caches: bool = True, overwrite_older_version: bool = False, re_run_hl: bool = True, delivery_notification_enabled: bool = False, delivery_personal_notification_address_id: str | None = None)

Alter the subscription. :param name: name of the subscription :type name: str, optional :param multiple_contents: whether multiple contents are

allowed

Parameters:
  • allow_delivery_changes (bool, optional) – whether the recipients can change the delivery of the subscription

  • allow_personalization_changes (bool, optional) – whether the recipients can personalize the subscription

  • allow_unsubscribe (bool, optional) – whether the recipients can unsubscribe from the subscription

  • send_now (bool, optional) – indicates whether to execute the subscription immediately

  • owner_id (str, optional) – ID of the subscription owner, by default logged in user ID

  • schedules (list[str] | str | Schedule | list[Schedule], optional) – Schedules IDs or Schedule objects

  • recipients (list[dict] | dict, optional) – list of recipients IDs or dicts

  • delivery (dict | Delivery, optional) – delivery object or dict

  • delivery_expiration_date (str, optional) – expiration date of the subscription, format should be yyyy - MM - dd

  • delivery_expiration_timezone (str, optional) – expiration timezone of the subscription

  • contact_security (bool) – whether to use contact security for each contact group member

  • do_not_create_update_caches (bool) – whether the current subscription will overwrite earlier versions of the same report or document cache in the history list

  • overwrite_older_version (bool) – whether the current subscription will overwrite earlier versions of the same report or document in the history list

  • re_run_hl (bool) – whether subscription will re-run against warehouse

  • delivery_notification_enabled (bool) – Whether notification is enabled, notification applies to cache

  • delivery_personal_notification_address_id (str, optional) – Notification details

classmethod create(connection: Connection, name: str, project_id: str | None = None, project_name: str | None = None, multiple_contents: bool | None = False, allow_delivery_changes: bool | None = None, allow_personalization_changes: bool | None = None, allow_unsubscribe: bool | None = None, send_now: bool | None = None, owner_id: str | None = None, schedules: str | list[str] | mstrio.distribution_services.schedule.schedule.Schedule | list[mstrio.distribution_services.schedule.schedule.Schedule] | None = None, contents: mstrio.distribution_services.subscription.content.Content | None = None, recipients: list[dict] | list[str] | None = None, delivery: mstrio.distribution_services.subscription.delivery.Delivery | dict | None = None, delivery_expiration_date: str | None = None, delivery_expiration_timezone: str | None = None, contact_security: bool = True, do_not_create_update_caches: bool = True, overwrite_older_version: bool = False, re_run_hl: bool = True, delivery_notification_enabled: bool = False, delivery_personal_notification_address_id: str | None = None) HistoryListSubscription

Creates a new history list subscription. :param connection: a MicroStrategy connection object :type connection: Connection :param name: name of the subscription :type name: str :param project_id: project ID :type project_id: str, optional :param project_name: project name :type project_name: str, optional :param multiple_contents: whether multiple contents are

allowed

Parameters:
  • allow_delivery_changes (bool, optional) – whether the recipients can change the delivery of the subscription

  • allow_personalization_changes (bool, optional) – whether the recipients can personalize the subscription

  • allow_unsubscribe (bool, optional) – whether the recipients can unsubscribe from the subscription

  • send_now (bool, optional) – indicates whether to execute the subscription immediately

  • owner_id (str, optional) – ID of the subscription owner, by default logged in user ID

  • schedules (list[str] | str | Schedule | list[Schedule], optional) – Schedules IDs or Schedule objects

  • contents (Content, optional) – The content settings

  • recipients (list[dict] | dict, optional) – list of recipients IDs or dicts

  • delivery (dict | Delivery, optional) – delivery object or dict

  • delivery_expiration_date (str, optional) – expiration date of the subscription, format should be yyyy - MM - dd

  • delivery_expiration_timezone (str, optional) – expiration timezone of the subscription, example value ‘Europe/London’

  • contact_security (bool) – whether to use contact security for each contact group member

  • do_not_create_update_caches (bool) – whether the current subscription will overwrite earlier versions of the same report or document cache in the history list

  • overwrite_older_version (bool) – whether the current subscription will overwrite earlier versions of the same report or document in the history list

  • re_run_hl (bool) – whether subscription will re-run against warehouse

  • delivery_notification_enabled (bool) – Whether notification is enabled, notification applies to cache

  • delivery_personal_notification_address_id (str, optional) – Notification details

mstrio.distribution_services.subscription.mobile_subscription module

class mstrio.distribution_services.subscription.mobile_subscription.MobileSubscription(connection: Connection, id: str | None = None, subscription_id: str | None = None, project_id: str | None = None, project_name: str | None = None)

Bases: Subscription

Class representation of MicroStrategy Mobile Subscription object.

alter(name: str | None = None, contents: mstrio.distribution_services.subscription.content.Content | None = None, multiple_contents: bool | None = None, allow_delivery_changes: bool | None = None, allow_personalization_changes: bool | None = None, allow_unsubscribe: bool | None = None, send_now: bool | None = None, owner_id: str | None = None, schedules: str | list[str] | mstrio.distribution_services.schedule.schedule.Schedule | list[mstrio.distribution_services.schedule.schedule.Schedule] | None = None, recipients: list[dict] | list[str] | None = None, delivery: mstrio.distribution_services.subscription.delivery.Delivery | dict | None = None, delivery_expiration_date: str | None = None, delivery_expiration_timezone: str | None = None, contact_security: bool = True, mobile_client_type: mstrio.distribution_services.subscription.delivery.ClientType | None = None, device_id: str | None = None, do_not_create_update_caches: bool = False, overwrite_older_version: bool = False, re_run_hl: bool = False, delivery_notification_enabled: bool = False, delivery_personal_notification_address_id: str | None = None, custom_msg: str | None = None)

Alter subscription. :param name: name of the subscription :type name: str :param multiple_contents: whether multiple contents are

allowed

Parameters:
  • allow_delivery_changes (bool, optional) – whether the recipients can change the delivery of the subscription

  • allow_personalization_changes (bool, optional) – whether the recipients can personalize the subscription

  • allow_unsubscribe (bool, optional) – whether the recipients can unsubscribe from the subscription

  • send_now (bool, optional) – indicates whether to execute the subscription immediately

  • owner_id (str, optional) – ID of the subscription owner, by default logged in user ID

  • schedules (list[str] | str | Schedule | list[Schedule], optional) – Schedules IDs or Schedule objects

  • contents (Content, optional) – The content settings

  • recipients (list[dict] | dict, optional) – list of recipients IDs or dicts

  • delivery (dict | Delivery, optional) – delivery object or dict

  • delivery_expiration_date (str, optional) – expiration date of the subscription, format should be yyyy - MM - dd

  • delivery_expiration_timezone (str, optional) – expiration timezone of the subscription, example value ‘Europe/London’

  • contact_security (bool) – whether to use contact security for each contact group member

  • mobile_client_type – The mobile client type

  • device_id – The mobile target project

  • do_not_create_update_caches (bool) – whether the current subscription will overwrite earlier versions of the same report or document cache in the history list

  • overwrite_older_version (bool) – whether the current subscription will overwrite earlier versions of the same report or document in the history list

  • re_run_hl (bool) – whether subscription will re-run against warehouse

  • delivery_notification_enabled (bool) – whether notification is enabled, notification applies to cache

  • delivery_personal_notification_address_id (str, optional) – notification details

  • custom_msg (str, optional) – customized message displayed when Subscription has been successfully altered

classmethod create(connection: Connection, name: str, project_id: str | None = None, project_name: str | None = None, multiple_contents: bool | None = False, allow_delivery_changes: bool | None = None, allow_personalization_changes: bool | None = None, allow_unsubscribe: bool | None = None, send_now: bool | None = None, owner_id: str | None = None, schedules: str | list[str] | mstrio.distribution_services.schedule.schedule.Schedule | list[mstrio.distribution_services.schedule.schedule.Schedule] | None = None, contents: mstrio.distribution_services.subscription.content.Content | None = None, recipients: list[dict] | list[str] | None = None, delivery: mstrio.distribution_services.subscription.delivery.Delivery | dict | None = None, delivery_expiration_date: str | None = None, delivery_expiration_timezone: str | None = None, contact_security: bool = True, mobile_client_type: ClientType = ClientType.PHONE, device_id: str | None = None, do_not_create_update_caches: bool = False, overwrite_older_version: bool = False, re_run_hl: bool = False, delivery_notification_enabled: bool = False, delivery_personal_notification_address_id: str | None = None) MobileSubscription

Creates a new mobile subscription. :param connection: a MicroStrategy connection object :type connection: Connection :param name: name of the subscription :type name: str :param project_id: project ID :type project_id: str, optional :param project_name: project name :type project_name: str, optional :param multiple_contents: whether multiple contents are

allowed

Parameters:
  • allow_delivery_changes (bool, optional) – whether the recipients can change the delivery of the subscription

  • allow_personalization_changes (bool, optional) – whether the recipients can personalize the subscription

  • allow_unsubscribe (bool, optional) – whether the recipients can unsubscribe from the subscription

  • send_now (bool, optional) – indicates whether to execute the subscription immediately

  • owner_id (str, optional) – ID of the subscription owner, by default logged in user ID

  • schedules (list[str] | str | Schedule | list[Schedule], optional) – Schedules IDs or Schedule objects

  • contents (Content, optional) – The content settings

  • recipients (list[dict] | dict, optional) – list of recipients IDs or dicts

  • delivery (dict | Delivery, optional) – delivery object or dict

  • delivery_expiration_date (str, optional) – expiration date of the subscription, format should be yyyy - MM - dd

  • delivery_expiration_timezone (str, optional) – expiration timezone of the subscription, example value ‘Europe/London’

  • contact_security (bool) – whether to use contact security for each contact group member

  • mobile_client_type – The mobile client type

  • device_id – The mobile target project

  • do_not_create_update_caches (bool) – whether the current subscription will overwrite earlier versions of the same report or document cache in the history list

  • overwrite_older_version (bool) – whether the current subscription will overwrite earlier versions of the same report or document in the history list

  • re_run_hl (bool) – whether subscription will re-run against warehouse

  • delivery_notification_enabled (bool) – whether notification is enabled, notification applies to cache

  • delivery_personal_notification_address_id (str, optional) – notification details

mstrio.distribution_services.subscription.subscription_manager module

class mstrio.distribution_services.subscription.subscription_manager.SubscriptionManager(connection: Connection, project_id: str | None = None, project_name: str | None = None)

Bases: object

Manage subscriptions.

available_bursting_attributes(content: dict | mstrio.distribution_services.subscription.content.Content)

Get a list of available attributes for bursting feature, for a given content.

Parameters:

content – content dictionary or Content object (from subscription.content)

available_recipients(content_id: str | None = None, content_type: str | None = None, content: mstrio.distribution_services.subscription.content.Content | None = None, delivery_type='EMAIL') list[dict]

List available recipients for a subscription contents. Specify either both content_id and content_type or just content object.

Parameters:
  • content_id – ID of the content

  • content_type – type of the content

  • content – Content object

  • delivery_type – The delivery of the subscription, available values are: [EMAIL, FILE, PRINTER, HISTORY_LIST, CACHE, MOBILE, FTP].

delete(subscriptions: list[mstrio.distribution_services.subscription.base_subscription.Subscription] | list[str], force=False) bool

Deletes all passed subscriptions. Returns True if successfully removed all subscriptions.

Parameters:
  • subscriptions (list[Subscription] | list[str]) – list of subscriptions to be deleted

  • force (bool, optional) – if True skips the prompt asking for confirmation before deleting subscriptions. False by default.

execute(subscriptions: list[mstrio.distribution_services.subscription.base_subscription.Subscription] | list[str])

Executes all passed subscriptions.

Parameters:

subscriptions – list of subscriptions to be executed

list_subscriptions(to_dictionary: bool = False, limit: int | None = None, last_run: bool = False, **filters)

Get all subscriptions as list of Subscription objects or dictionaries.

Optionally filter the subscriptions by specifying filters.

Parameters:
  • to_dictionary – If True returns a list of subscription dicts, otherwise returns a list of subscription objects

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

  • last_run – If True, adds the last time that the subscription ran.

  • **filters – Available filter parameters: [‘id’, ‘name’, ‘editable’, ‘allowDeliveryChanges’, ‘allowPersonalizationChanges’, ‘allowUnsubscribe’, ‘dateCreated’, ‘dateModified’, ‘owner’, ‘schedules’, ‘contents’, ‘recipients’, ‘delivery’]

mstrio.distribution_services.subscription.subscription_manager.dispatch_from_dict(source: dict, connection: Connection, project_id: str)

Returns the subscription type object from the provided source

Parameters:
  • source – dictionary of an object to return from the specified subscription

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

  • project_id – Project ID

mstrio.distribution_services.subscription.subscription_manager.get_subscription_type_from_delivery_mode(mode: DeliveryMode)

Returns the subscription type of the provided Delivery Mode.

Parameters:

mode – DeliveryMode object of which to get the subscription type

mstrio.distribution_services.subscription.subscription_manager.list_subscriptions(connection: Connection, project_id: str | None = None, project_name: str | None = None, to_dictionary: bool = False, limit: int | None = None, last_run: bool = False, **filters) list[mstrio.distribution_services.subscription.base_subscription.Subscription] | list[dict]

Get all subscriptions per project as list of Subscription objects or dictionaries.

Optionally filter the subscriptions by specifying filters. 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

  • project_id – Project ID

  • project_name – Project name

  • to_dictionary – If True returns a list of subscription dicts, otherwise (default) returns a list of subscription objects

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

  • last_run – If True, adds the last time that the subscription ran.

  • **filters – Available filter parameters: [‘id’, ‘multiple_contents’, ‘name’, ‘editable’, ‘allow_delivery_changes’ ‘allow_personalization_changes’, ‘allow_unsubscribe’, ‘date_created’, ‘date_modified’, ‘owner’, ‘delivery’]

mstrio.distribution_services.subscription.subscription_status module

class mstrio.distribution_services.subscription.subscription_status.StatusContent(name: str, node_name: str | None = None, error: mstrio.distribution_services.subscription.subscription_status.StatusError | None = None)

Bases: Dictable

Subscription status content

name

Content name

Type:

str

node_name

Node name

Type:

str

error

Error

Type:

StatusError

error: mstrio.distribution_services.subscription.subscription_status.StatusError | None = None
name: str
node_name: str | None = None
class mstrio.distribution_services.subscription.subscription_status.StatusDestination(address: str, destination: str, start: datetime, node_name: str, end: datetime.datetime | None = None, contents: list[mstrio.distribution_services.subscription.subscription_status.StatusContent] | None = None, error: mstrio.distribution_services.subscription.subscription_status.StatusError | None = None)

Bases: Dictable

Subscription status destination

address

Address

Type:

str

destination

Destination

Type:

str

start

Start time

Type:

datetime

end

End time

Type:

datetime

node_name

Node name

Type:

str

contents

Subscription contents

Type:

list[StatusContent]

error

Error

Type:

StatusError

address: str
contents: list[mstrio.distribution_services.subscription.subscription_status.StatusContent] | None = None
destination: str
end: datetime.datetime | None = None
error: mstrio.distribution_services.subscription.subscription_status.StatusError | None = None
node_name: str
start: datetime
class mstrio.distribution_services.subscription.subscription_status.StatusDetail(recipient: str, contents: list[mstrio.distribution_services.subscription.subscription_status.StatusContent], destinations: list[mstrio.distribution_services.subscription.subscription_status.StatusDestination], error: mstrio.distribution_services.subscription.subscription_status.StatusError | None = None)

Bases: Dictable

Subscription status detail

recipient

Recipient

Type:

str

contents

Subscription contents

Type:

list[StatusContent]

destinations

Destinations

Type:

list[StatusDestination]

error

Error

Type:

StatusError

contents: list[mstrio.distribution_services.subscription.subscription_status.StatusContent]
destinations: list[mstrio.distribution_services.subscription.subscription_status.StatusDestination]
error: mstrio.distribution_services.subscription.subscription_status.StatusError | None = None
recipient: str
class mstrio.distribution_services.subscription.subscription_status.StatusError(code: int, message: str)

Bases: Dictable

Subscription status error

code

Error code.

Type:

int

message

Error message.

Type:

str

code: int
message: str
class mstrio.distribution_services.subscription.subscription_status.SubscriptionStage(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Stage of the subscription

EXECUTING = 1
FINISHED = 2
INVALID = 0
class mstrio.distribution_services.subscription.subscription_status.SubscriptionState(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

State of the subscription

CANCELED = 3
FAIL = 2
INVALID = 0
SKIP = 5
SUCCESS = 1
TIMEOUT = 4
class mstrio.distribution_services.subscription.subscription_status.SubscriptionStatus(id: str, stage: SubscriptionStage, state: SubscriptionState, total: int, estimate: int, start: datetime, contents: list[mstrio.distribution_services.subscription.subscription_status.StatusContent], statuses: list[mstrio.distribution_services.subscription.subscription_status.StatusDetail], end: datetime.datetime | None = None, expiration: str | None = None)

Bases: Dictable

Subscription status

id

Subscription ID

Type:

str

stage

Stage of the subscription

Type:

SubscriptionStage

state

State of the subscription

Type:

SubscriptionState

total

Total number of statuses

Type:

int

estimate

Estimated time remaining in seconds

Type:

int

start

Subscription start time

Type:

datetime

end

Subscription end time

Type:

datetime

contents

Subscription contents

Type:

list[StatusContent]

statuses

Subscription detailed statuses

Type:

list[StatusDetail]

expiration

Subscription expiration time

Type:

str

contents: list[mstrio.distribution_services.subscription.subscription_status.StatusContent]
end: datetime.datetime | None = None
estimate: int
expiration: str | None = None
id: str
stage: SubscriptionStage
start: datetime
state: SubscriptionState
statuses: list[mstrio.distribution_services.subscription.subscription_status.StatusDetail]
total: int

Module contents