Endpoints

Authentication

class mattermostautodriver.endpoints.authentication.Authentication(client)[source]

Bases: Base

migrate_auth_to_ldap(options=None)[source]

Migrate user accounts authentication type to LDAP.

from: The current authentication type for the matched users. match_field: Foreign user field name to match. force:

Read in Mattermost API docs (authentication - MigrateAuthToLdap)

migrate_auth_to_saml(options=None)[source]

Migrate user accounts authentication type to SAML.

from: The current authentication type for the matched users. matches: Users map. auto:

Read in Mattermost API docs (authentication - MigrateAuthToSaml)

Base

class mattermostautodriver.endpoints.base.Base(client)[source]

Bases: object

Bleve

class mattermostautodriver.endpoints.bleve.Bleve(client)[source]

Bases: Base

purge_bleve_indexes()[source]

Purge all Bleve indexes Read in Mattermost API docs (bleve - PurgeBleveIndexes)

Bookmarks

class mattermostautodriver.endpoints.bookmarks.Bookmarks(client)[source]

Bases: Base

list_channel_bookmarks_for_channel(channel_id, params=None)[source]

Get channel bookmarks for Channel

channel_id: Channel GUID bookmarks_since: Timestamp to filter the bookmarks with. If set, the endpoint returns bookmarks that have been added, updated or deleted since its value

Read in Mattermost API docs (bookmarks - ListChannelBookmarksForChannel)

create_channel_bookmark(channel_id, options)[source]

Create channel bookmark

channel_id: Channel GUID file_id: The ID of the file associated with the channel bookmark. Required for bookmarks of type ‘file’ display_name: The name of the channel bookmark link_url: The URL associated with the channel bookmark. Required for bookmarks of type ‘link’ image_url: The URL of the image associated with the channel bookmark. Optional, only applies for bookmarks of type ‘link’ emoji: The emoji of the channel bookmark type: * link for channel bookmarks that reference a link. link_url is requied * file for channel bookmarks that reference a file. file_id is required

Read in Mattermost API docs (bookmarks - CreateChannelBookmark)

update_channel_bookmark(channel_id, bookmark_id, options)[source]

Update channel bookmark

channel_id: Channel GUID bookmark_id: Bookmark GUID file_id: The ID of the file associated with the channel bookmark. Required for bookmarks of type ‘file’ display_name: The name of the channel bookmark sort_order: The order of the channel bookmark link_url: The URL associated with the channel bookmark. Required for type bookmarks of type ‘link’ image_url: The URL of the image associated with the channel bookmark emoji: The emoji of the channel bookmark type: * link for channel bookmarks that reference a link. link_url is requied * file for channel bookmarks that reference a file. file_id is required

Read in Mattermost API docs (bookmarks - UpdateChannelBookmark)

delete_channel_bookmark(channel_id, bookmark_id)[source]

Delete channel bookmark

channel_id: Channel GUID bookmark_id: Bookmark GUID

Read in Mattermost API docs (bookmarks - DeleteChannelBookmark)

update_channel_bookmark_sort_order(channel_id, bookmark_id, options=None)[source]

Update channel bookmark’s order

channel_id: Channel GUID bookmark_id: Bookmark GUID

Read in Mattermost API docs (bookmarks - UpdateChannelBookmarkSortOrder)

Bots

class mattermostautodriver.endpoints.bots.Bots(client)[source]

Bases: Base

convert_user_to_bot(user_id)[source]

Convert a user into a bot

user_id: User GUID

Read in Mattermost API docs (bots - ConvertUserToBot)

create_bot(options)[source]

Create a bot

username: display_name: description:

Read in Mattermost API docs (bots - CreateBot)

get_bots(params=None)[source]

Get bots

page: The page to select. per_page: The number of users per page. include_deleted: If deleted bots should be returned. only_orphaned: When true, only orphaned bots will be returned. A bot is considered orphaned if its owner has been deactivated.

Read in Mattermost API docs (bots - GetBots)

patch_bot(bot_user_id, options)[source]

Patch a bot

bot_user_id: Bot user ID username: display_name: description:

Read in Mattermost API docs (bots - PatchBot)

get_bot(bot_user_id, params=None)[source]

Get a bot

bot_user_id: Bot user ID include_deleted: If deleted bots should be returned.

Read in Mattermost API docs (bots - GetBot)

disable_bot(bot_user_id)[source]

Disable a bot

bot_user_id: Bot user ID

Read in Mattermost API docs (bots - DisableBot)

enable_bot(bot_user_id)[source]

Enable a bot

bot_user_id: Bot user ID

Read in Mattermost API docs (bots - EnableBot)

assign_bot(bot_user_id, user_id)[source]

Assign a bot to a user

bot_user_id: Bot user ID user_id: The user ID to assign the bot to.

Read in Mattermost API docs (bots - AssignBot)

get_bot_icon_image(bot_user_id)[source]

Get bot’s LHS icon

bot_user_id: Bot user ID

Read in Mattermost API docs (bots - GetBotIconImage)

set_bot_icon_image(bot_user_id, files, data=None)[source]

Set bot’s LHS icon image

bot_user_id: Bot user ID image: SVG icon image to be uploaded

Read in Mattermost API docs (bots - SetBotIconImage)

delete_bot_icon_image(bot_user_id)[source]

Delete bot’s LHS icon image

bot_user_id: Bot user ID

Read in Mattermost API docs (bots - DeleteBotIconImage)

convert_bot_to_user(bot_user_id, options)[source]

Convert a bot into a user

bot_user_id: Bot user ID email: username: password: first_name: last_name: nickname: locale: position: props: notify_props:

Read in Mattermost API docs (bots - ConvertBotToUser)

Brand

class mattermostautodriver.endpoints.brand.Brand(client)[source]

Bases: Base

get_brand_image()[source]

Get brand image Read in Mattermost API docs (brand - GetBrandImage)

upload_brand_image(files, data=None)[source]

Upload brand image

image: The image to be uploaded

Read in Mattermost API docs (brand - UploadBrandImage)

delete_brand_image()[source]

Delete current brand image Read in Mattermost API docs (brand - DeleteBrandImage)

Channels

class mattermostautodriver.endpoints.channels.Channels(client)[source]

Bases: Base

get_all_channels(params=None)[source]

Get a list of all channels

not_associated_to_group: A group id to exclude channels that are associated with that group via GroupChannel records. This can also be left blank with not_associated_to_group=. page: The page to select. per_page: The number of channels per page. exclude_default_channels: Whether to exclude default channels (ex Town Square, Off-Topic) from the results. include_deleted: Include channels that have been archived. This correlates to the DeleteAt flag being set in the database. include_total_count: Appends a total count of returned channels inside the response object - ex: { "channels": [], "total_count" : 0 }. exclude_policy_constrained: If set to true, channels which are part of a data retention policy will be excluded. The sysconsole_read_compliance permission is required to use this parameter. Minimum server version: 5.35

Read in Mattermost API docs (channels - GetAllChannels)

create_channel(options)[source]

Create a channel

team_id: The team ID of the team to create the channel on name: The unique handle for the channel, will be present in the channel URL display_name: The non-unique UI name for the channel purpose: A short description of the purpose of the channel header: Markdown-formatted text to display in the header of the channel type: ‘O’ for a public channel, ‘P’ for a private channel

Read in Mattermost API docs (channels - CreateChannel)

create_direct_channel(options)[source]

Create a direct message channel Read in Mattermost API docs (channels - CreateDirectChannel)

create_group_channel(options)[source]

Create a group message channel Read in Mattermost API docs (channels - CreateGroupChannel)

search_all_channels(options)[source]

Search all private and open type channels across all teams

term: The string to search in the channel name, display name, and purpose. not_associated_to_group: A group id to exclude channels that are associated to that group via GroupChannel records. exclude_default_channels: Exclude default channels from the results by setting this parameter to true. team_ids: Filters results to channels belonging to the given team ids

Minimum server version: 5.26

group_constrained: Filters results to only return channels constrained to a group

Minimum server version: 5.26

exclude_group_constrained: Filters results to exclude channels constrained to a group

Minimum server version: 5.26

public: Filters results to only return Public / Open channels, can be used in conjunction with private to return both public and private channels

Minimum server version: 5.26

private: Filters results to only return Private channels, can be used in conjunction with public to return both private and public channels

Minimum server version: 5.26

deleted: Filters results to only return deleted / archived channels

Minimum server version: 5.26

page: The page number to return, if paginated. If this parameter is not present with the per_page parameter then the results will be returned un-paged. per_page: The number of entries to return per page, if paginated. If this parameter is not present with the page parameter then the results will be returned un-paged. exclude_policy_constrained: If set to true, only channels which do not have a granular retention policy assigned to them will be returned. The sysconsole_read_compliance_data_retention permission is required to use this parameter. Minimum server version: 5.35

include_search_by_id: If set to true, returns channels where given search ‘term’ matches channel ID. Minimum server version: 5.35

Read in Mattermost API docs (channels - SearchAllChannels)

search_group_channels(options)[source]

Search Group Channels

term: The search term to match against the members’ usernames of the group channels

Read in Mattermost API docs (channels - SearchGroupChannels)

get_public_channels_by_ids_for_team(team_id, options)[source]

Get a list of channels by ids

team_id: Team GUID

Read in Mattermost API docs (channels - GetPublicChannelsByIdsForTeam)

get_channel_members_timezones(channel_id)[source]

Get timezones in a channel

channel_id: Channel GUID

Read in Mattermost API docs (channels - GetChannelMembersTimezones)

get_channel(channel_id)[source]

Get a channel

channel_id: Channel GUID

Read in Mattermost API docs (channels - GetChannel)

update_channel(channel_id, options)[source]

Update a channel

channel_id: Channel GUID id: The channel’s id, not updatable name: The unique handle for the channel, will be present in the channel URL display_name: The non-unique UI name for the channel purpose: A short description of the purpose of the channel header: Markdown-formatted text to display in the header of the channel

Read in Mattermost API docs (channels - UpdateChannel)

delete_channel(channel_id)[source]

Delete a channel

channel_id: Channel GUID

Read in Mattermost API docs (channels - DeleteChannel)

patch_channel(channel_id, options)[source]

Patch a channel

channel_id: Channel GUID name: The unique handle for the channel, will be present in the channel URL display_name: The non-unique UI name for the channel purpose: A short description of the purpose of the channel header: Markdown-formatted text to display in the header of the channel

Read in Mattermost API docs (channels - PatchChannel)

update_channel_privacy(channel_id, options)[source]

Update channel’s privacy

channel_id: Channel GUID privacy: Channel privacy setting: ‘O’ for a public channel, ‘P’ for a private channel

Read in Mattermost API docs (channels - UpdateChannelPrivacy)

restore_channel(channel_id)[source]

Restore a channel

channel_id: Channel GUID

Read in Mattermost API docs (channels - RestoreChannel)

move_channel(channel_id, options)[source]

Move a channel

channel_id: Channel GUID team_id: force: Remove members those are not member of target team before moving the channel.

Read in Mattermost API docs (channels - MoveChannel)

get_channel_stats(channel_id)[source]

Get channel statistics

channel_id: Channel GUID

Read in Mattermost API docs (channels - GetChannelStats)

get_pinned_posts(channel_id)[source]

Get a channel’s pinned posts

channel_id: Channel GUID

Read in Mattermost API docs (channels - GetPinnedPosts)

get_public_channels_for_team(team_id, params=None)[source]

Get public channels

team_id: Team GUID page: The page to select. per_page: The number of public channels per page.

Read in Mattermost API docs (channels - GetPublicChannelsForTeam)

get_private_channels_for_team(team_id, params=None)[source]

Get private channels

team_id: Team GUID page: The page to select. per_page: The number of private channels per page.

Read in Mattermost API docs (channels - GetPrivateChannelsForTeam)

get_deleted_channels_for_team(team_id, params=None)[source]

Get deleted channels

team_id: Team GUID page: The page to select. per_page: The number of public channels per page.

Read in Mattermost API docs (channels - GetDeletedChannelsForTeam)

autocomplete_channels_for_team(team_id, params=None)[source]

Autocomplete channels

team_id: Team GUID name: Name or display name

Read in Mattermost API docs (channels - AutocompleteChannelsForTeam)

Autocomplete channels for search

team_id: Team GUID name: Name or display name

Read in Mattermost API docs (channels - AutocompleteChannelsForTeamForSearch)

search_channels(team_id, options)[source]

Search channels

team_id: Team GUID term: The search term to match against the name or display name of channels

Read in Mattermost API docs (channels - SearchChannels)

search_archived_channels(team_id, options)[source]

Search archived channels

team_id: Team GUID term: The search term to match against the name or display name of archived channels

Read in Mattermost API docs (channels - SearchArchivedChannels)

get_channel_by_name(team_id, channel_name, params=None)[source]

Get a channel by name

team_id: Team GUID channel_name: Channel Name include_deleted: Defines if deleted channels should be returned or not (Mattermost Server 5.26.0+)

Read in Mattermost API docs (channels - GetChannelByName)

get_channel_by_name_for_team_name(team_name, channel_name, params=None)[source]

Get a channel by name and team name

team_name: Team Name channel_name: Channel Name include_deleted: Defines if deleted channels should be returned or not (Mattermost Server 5.26.0+)

Read in Mattermost API docs (channels - GetChannelByNameForTeamName)

get_channel_members(channel_id, params=None)[source]

Get channel members

channel_id: Channel GUID page: The page to select. per_page: The number of members per page.

Read in Mattermost API docs (channels - GetChannelMembers)

add_channel_member(channel_id, options)[source]

Add user(s) to channel

channel_id: The channel ID user_id: The ID of user to add into the channel, for backwards compatibility. user_ids: The IDs of users to add into the channel, required if ‘user_id’ doess not exist. post_root_id: The ID of root post where link to add channel member originates

Read in Mattermost API docs (channels - AddChannelMember)

get_channel_members_by_ids(channel_id, options)[source]

Get channel members by ids

channel_id: Channel GUID

Read in Mattermost API docs (channels - GetChannelMembersByIds)

get_channel_member(channel_id, user_id)[source]

Get channel member

channel_id: Channel GUID user_id: User GUID

Read in Mattermost API docs (channels - GetChannelMember)

remove_user_from_channel(channel_id, user_id)[source]

Remove user from channel

channel_id: Channel GUID user_id: User GUID

Read in Mattermost API docs (channels - RemoveUserFromChannel)

update_channel_roles(channel_id, user_id, options)[source]

Update channel roles

channel_id: Channel GUID user_id: User GUID roles:

Read in Mattermost API docs (channels - UpdateChannelRoles)

update_channel_member_scheme_roles(channel_id, user_id, options)[source]

Update the scheme-derived roles of a channel member.

channel_id: Channel GUID user_id: User GUID scheme_admin: scheme_user:

Read in Mattermost API docs (channels - UpdateChannelMemberSchemeRoles)

update_channel_notify_props(channel_id, user_id, options)[source]

Update channel notifications

channel_id: Channel GUID user_id: User GUID

Read in Mattermost API docs (channels - UpdateChannelNotifyProps)

view_channel(user_id, options)[source]

View channel

user_id: User ID to perform the view action for channel_id: The channel ID that is being viewed. Use a blank string to indicate that all channels have lost focus. prev_channel_id: The channel ID of the previous channel, used when switching channels. Providing this ID will cause push notifications to clear on the channel being switched to.

Read in Mattermost API docs (channels - ViewChannel)

get_channel_members_for_user(user_id, team_id)[source]

Get channel memberships and roles for a user

user_id: User GUID team_id: Team GUID

Read in Mattermost API docs (channels - GetChannelMembersForUser)

get_channels_for_team_for_user(user_id, team_id, params=None)[source]

Get channels for user

user_id: User GUID team_id: Team GUID include_deleted: Defines if deleted channels should be returned or not last_delete_at: Filters the deleted channels by this time in epoch format. Does not have any effect if include_deleted is set to false.

Read in Mattermost API docs (channels - GetChannelsForTeamForUser)

get_channels_for_user(user_id, params=None)[source]

Get all channels from all teams

user_id: The ID of the user. This can also be “me” which will point to the current user. last_delete_at: Filters the deleted channels by this time in epoch format. Does not have any effect if include_deleted is set to false. include_deleted: Defines if deleted channels should be returned or not

Read in Mattermost API docs (channels - GetChannelsForUser)

get_channel_unread(user_id, channel_id)[source]

Get unread messages

user_id: User GUID channel_id: Channel GUID

Read in Mattermost API docs (channels - GetChannelUnread)

update_channel_scheme(channel_id, options)[source]

Set a channel’s scheme

channel_id: Channel GUID scheme_id: The ID of the scheme.

Read in Mattermost API docs (channels - UpdateChannelScheme)

channel_members_minus_group_members(channel_id, params=None)[source]

Channel members minus group members.

channel_id: Channel GUID group_ids: A comma-separated list of group ids. page: The page to select. per_page: The number of users per page.

Read in Mattermost API docs (channels - ChannelMembersMinusGroupMembers)

get_channel_member_counts_by_group(channel_id, params=None)[source]

Channel members counts for each group that has atleast one member in the channel

channel_id: Channel GUID include_timezones: Defines if member timezone counts should be returned or not

Read in Mattermost API docs (channels - GetChannelMemberCountsByGroup)

get_channel_moderations(channel_id)[source]

Get information about channel’s moderation.

channel_id: Channel GUID

Read in Mattermost API docs (channels - GetChannelModerations)

patch_channel_moderations(channel_id, options)[source]

Update a channel’s moderation settings.

channel_id: Channel GUID

Read in Mattermost API docs (channels - PatchChannelModerations)

get_sidebar_categories_for_team_for_user(team_id, user_id)[source]

Get user’s sidebar categories

team_id: Team GUID user_id: User GUID

Read in Mattermost API docs (channels - GetSidebarCategoriesForTeamForUser)

create_sidebar_category_for_team_for_user(team_id, user_id, options)[source]

Create user’s sidebar category

team_id: Team GUID user_id: User GUID

Read in Mattermost API docs (channels - CreateSidebarCategoryForTeamForUser)

update_sidebar_categories_for_team_for_user(team_id, user_id, options)[source]

Update user’s sidebar categories

team_id: Team GUID user_id: User GUID

Read in Mattermost API docs (channels - UpdateSidebarCategoriesForTeamForUser)

get_sidebar_category_order_for_team_for_user(team_id, user_id)[source]

Get user’s sidebar category order

team_id: Team GUID user_id: User GUID

Read in Mattermost API docs (channels - GetSidebarCategoryOrderForTeamForUser)

update_sidebar_category_order_for_team_for_user(team_id, user_id, options)[source]

Update user’s sidebar category order

team_id: Team GUID user_id: User GUID

Read in Mattermost API docs (channels - UpdateSidebarCategoryOrderForTeamForUser)

get_sidebar_category_for_team_for_user(team_id, user_id, category_id)[source]

Get sidebar category

team_id: Team GUID user_id: User GUID category_id: Category GUID

Read in Mattermost API docs (channels - GetSidebarCategoryForTeamForUser)

update_sidebar_category_for_team_for_user(team_id, user_id, category_id, options)[source]

Update sidebar category

team_id: Team GUID user_id: User GUID category_id: Category GUID

Read in Mattermost API docs (channels - UpdateSidebarCategoryForTeamForUser)

remove_sidebar_category_for_team_for_user(team_id, user_id, category_id)[source]

Delete sidebar category

team_id: Team GUID user_id: User GUID category_id: Category GUID

Read in Mattermost API docs (channels - RemoveSidebarCategoryForTeamForUser)

Cloud

class mattermostautodriver.endpoints.cloud.Cloud(client)[source]

Bases: Base

get_cloud_limits()[source]

Get cloud workspace limits Read in Mattermost API docs (cloud - GetCloudLimits)

get_cloud_products()[source]

Get cloud products Read in Mattermost API docs (cloud - GetCloudProducts)

create_customer_payment()[source]

Create a customer setup payment intent Read in Mattermost API docs (cloud - CreateCustomerPayment)

confirm_customer_payment(data=None)[source]

Completes the payment setup intent

stripe_setup_intent_id:

Read in Mattermost API docs (cloud - ConfirmCustomerPayment)

get_cloud_customer()[source]

Get cloud customer Read in Mattermost API docs (cloud - GetCloudCustomer)

update_cloud_customer(options)[source]

Update cloud customer

name: email: contact_first_name: contact_last_name: num_employees:

Read in Mattermost API docs (cloud - UpdateCloudCustomer)

update_cloud_customer_address(options)[source]

Update cloud customer address Read in Mattermost API docs (cloud - UpdateCloudCustomerAddress)

get_subscription()[source]

Get cloud subscription Read in Mattermost API docs (cloud - GetSubscription)

get_endpoint_for_installation_information()[source]

GET endpoint for Installation information Read in Mattermost API docs (cloud - GetEndpointForInstallationInformation)

get_invoices_for_subscription()[source]

Get cloud subscription invoices Read in Mattermost API docs (cloud - GetInvoicesForSubscription)

get_invoice_for_subscription_as_pdf(invoice_id)[source]

Get cloud invoice PDF

invoice_id: Invoice ID

Read in Mattermost API docs (cloud - GetInvoiceForSubscriptionAsPdf)

post_endpoint_for_cws_webhooks()[source]

POST endpoint for CWS Webhooks Read in Mattermost API docs (cloud - PostEndpointForCwsWebhooks)

Cluster

class mattermostautodriver.endpoints.cluster.Cluster(client)[source]

Bases: Base

get_cluster_status()[source]

Get cluster status Read in Mattermost API docs (cluster - GetClusterStatus)

Commands

class mattermostautodriver.endpoints.commands.Commands(client)[source]

Bases: Base

create_command(options)[source]

Create a command

team_id: Team ID to where the command should be created method: 'P' for post request, 'G' for get request trigger: Activation word to trigger the command url: The URL that the command will make the request

Read in Mattermost API docs (commands - CreateCommand)

list_commands(params=None)[source]

List commands for a team

team_id: The team id. custom_only: To get only the custom commands. If set to false will get the custom if the user have access plus the system commands, otherwise just the system commands.

Read in Mattermost API docs (commands - ListCommands)

list_autocomplete_commands(team_id)[source]

List autocomplete commands

team_id: Team GUID

Read in Mattermost API docs (commands - ListAutocompleteCommands)

list_command_autocomplete_suggestions(team_id, params=None)[source]

List commands’ autocomplete data

team_id: Team GUID user_input: String inputted by the user.

Read in Mattermost API docs (commands - ListCommandAutocompleteSuggestions)

get_command_by_id(command_id)[source]

Get a command

command_id: ID of the command to get

Read in Mattermost API docs (commands - GetCommandById)

update_command(command_id, options)[source]

Update a command

command_id: ID of the command to update

Read in Mattermost API docs (commands - UpdateCommand)

delete_command(command_id)[source]

Delete a command

command_id: ID of the command to delete

Read in Mattermost API docs (commands - DeleteCommand)

move_command(command_id, options)[source]

Move a command

command_id: ID of the command to move team_id: Destination teamId

Read in Mattermost API docs (commands - MoveCommand)

regen_command_token(command_id)[source]

Generate a new token

command_id: ID of the command to generate the new token

Read in Mattermost API docs (commands - RegenCommandToken)

execute_command(options)[source]

Execute a command

channel_id: Channel Id where the command will execute command: The slash command to execute, including parameters. Eg, '/echo bounces around the room'

Read in Mattermost API docs (commands - ExecuteCommand)

Compliance

class mattermostautodriver.endpoints.compliance.Compliance(client)[source]

Bases: Base

create_compliance_report()[source]

Create report Read in Mattermost API docs (compliance - CreateComplianceReport)

get_compliance_reports(params=None)[source]

Get reports

page: The page to select. per_page: The number of reports per page.

Read in Mattermost API docs (compliance - GetComplianceReports)

get_compliance_report(report_id)[source]

Get a report

report_id: Compliance report GUID

Read in Mattermost API docs (compliance - GetComplianceReport)

download_compliance_report(report_id)[source]

Download a report

report_id: Compliance report GUID

Read in Mattermost API docs (compliance - DownloadComplianceReport)

Data Retention

class mattermostautodriver.endpoints.data_retention.DataRetention(client)[source]

Bases: Base

get_team_policies_for_user(user_id, params=None)[source]

Get the policies which are applied to a user’s teams

user_id: The ID of the user. This can also be “me” which will point to the current user. page: The page to select. per_page: The number of policies per page.

Read in Mattermost API docs (data_retention - GetTeamPoliciesForUser)

get_channel_policies_for_user(user_id, params=None)[source]

Get the policies which are applied to a user’s channels

user_id: The ID of the user. This can also be “me” which will point to the current user. page: The page to select. per_page: The number of policies per page.

Read in Mattermost API docs (data_retention - GetChannelPoliciesForUser)

get_data_retention_policy()[source]

Get the global data retention policy Read in Mattermost API docs (data_retention - GetDataRetentionPolicy)

get_data_retention_policies_count()[source]

Get the number of granular data retention policies Read in Mattermost API docs (data_retention - GetDataRetentionPoliciesCount)

get_data_retention_policies(params=None)[source]

Get the granular data retention policies

page: The page to select. per_page: The number of policies per page.

Read in Mattermost API docs (data_retention - GetDataRetentionPolicies)

create_data_retention_policy(options)[source]

Create a new granular data retention policy Read in Mattermost API docs (data_retention - CreateDataRetentionPolicy)

get_data_retention_policy_by_id(policy_id)[source]

Get a granular data retention policy

policy_id: The ID of the granular retention policy.

Read in Mattermost API docs (data_retention - GetDataRetentionPolicyByID)

patch_data_retention_policy(policy_id, options)[source]

Patch a granular data retention policy

policy_id: The ID of the granular retention policy.

Read in Mattermost API docs (data_retention - PatchDataRetentionPolicy)

delete_data_retention_policy(policy_id)[source]

Delete a granular data retention policy

policy_id: The ID of the granular retention policy.

Read in Mattermost API docs (data_retention - DeleteDataRetentionPolicy)

get_teams_for_retention_policy(policy_id, params=None)[source]

Get the teams for a granular data retention policy

policy_id: The ID of the granular retention policy. page: The page to select. per_page: The number of teams per page.

Read in Mattermost API docs (data_retention - GetTeamsForRetentionPolicy)

add_teams_to_retention_policy(policy_id, options)[source]

Add teams to a granular data retention policy

policy_id: The ID of the granular retention policy.

Read in Mattermost API docs (data_retention - AddTeamsToRetentionPolicy)

remove_teams_from_retention_policy(policy_id, params)[source]

Delete teams from a granular data retention policy

policy_id: The ID of the granular retention policy.

Read in Mattermost API docs (data_retention - RemoveTeamsFromRetentionPolicy)

search_teams_for_retention_policy(policy_id, options)[source]

Search for the teams in a granular data retention policy

policy_id: The ID of the granular retention policy. term: The search term to match against the name or display name of teams

Read in Mattermost API docs (data_retention - SearchTeamsForRetentionPolicy)

get_channels_for_retention_policy(policy_id, params=None)[source]

Get the channels for a granular data retention policy

policy_id: The ID of the granular retention policy. page: The page to select. per_page: The number of channels per page.

Read in Mattermost API docs (data_retention - GetChannelsForRetentionPolicy)

add_channels_to_retention_policy(policy_id, options)[source]

Add channels to a granular data retention policy

policy_id: The ID of the granular retention policy.

Read in Mattermost API docs (data_retention - AddChannelsToRetentionPolicy)

remove_channels_from_retention_policy(policy_id, params)[source]

Delete channels from a granular data retention policy

policy_id: The ID of the granular retention policy.

Read in Mattermost API docs (data_retention - RemoveChannelsFromRetentionPolicy)

search_channels_for_retention_policy(policy_id, options)[source]

Search for the channels in a granular data retention policy

policy_id: The ID of the granular retention policy. term: The string to search in the channel name, display name, and purpose. team_ids: Filters results to channels belonging to the given team ids

public: Filters results to only return Public / Open channels, can be used in conjunction with private to return both public and private channels

private: Filters results to only return Private channels, can be used in conjunction with public to return both private and public channels

deleted: Filters results to only return deleted / archived channels

Read in Mattermost API docs (data_retention - SearchChannelsForRetentionPolicy)

Elasticsearch

class mattermostautodriver.endpoints.elasticsearch.Elasticsearch(client)[source]

Bases: Base

test_elasticsearch()[source]

Test Elasticsearch configuration Read in Mattermost API docs (elasticsearch - TestElasticsearch)

purge_elasticsearch_indexes()[source]

Purge all Elasticsearch indexes Read in Mattermost API docs (elasticsearch - PurgeElasticsearchIndexes)

Emoji

class mattermostautodriver.endpoints.emoji.Emoji(client)[source]

Bases: Base

create_emoji(files, data=None)[source]

Create a custom emoji

image: A file to be uploaded emoji: A JSON object containing a name field with the name of the emoji and a creator_id field with the id of the authenticated user.

Read in Mattermost API docs (emoji - CreateEmoji)

get_emoji_list(params=None)[source]

Get a list of custom emoji

page: The page to select. per_page: The number of emojis per page. sort: Either blank for no sorting or “name” to sort by emoji names. Minimum server version for sorting is 4.7.

Read in Mattermost API docs (emoji - GetEmojiList)

get_emoji(emoji_id)[source]

Get a custom emoji

emoji_id: Emoji GUID

Read in Mattermost API docs (emoji - GetEmoji)

delete_emoji(emoji_id)[source]

Delete a custom emoji

emoji_id: Emoji GUID

Read in Mattermost API docs (emoji - DeleteEmoji)

get_emoji_by_name(emoji_name)[source]

Get a custom emoji by name

emoji_name: Emoji name

Read in Mattermost API docs (emoji - GetEmojiByName)

get_emoji_image(emoji_id)[source]

Get custom emoji image

emoji_id: Emoji GUID

Read in Mattermost API docs (emoji - GetEmojiImage)

search_emoji(options)[source]

Search custom emoji

term: The term to match against the emoji name. prefix_only: Set to only search for names starting with the search term.

Read in Mattermost API docs (emoji - SearchEmoji)

autocomplete_emoji(params=None)[source]

Autocomplete custom emoji

name: The emoji name to search.

Read in Mattermost API docs (emoji - AutocompleteEmoji)

get_emojis_by_names(options)[source]

Get custom emojis by name Read in Mattermost API docs (emoji - GetEmojisByNames)

Exports

class mattermostautodriver.endpoints.exports.Exports(client)[source]

Bases: Base

list_exports()[source]

List export files Read in Mattermost API docs (exports - ListExports)

download_export(export_name)[source]

Download an export file

export_name: The name of the export file to download

Read in Mattermost API docs (exports - DownloadExport)

delete_export(export_name)[source]

Delete an export file

export_name: The name of the export file to delete

Read in Mattermost API docs (exports - DeleteExport)

Files

class mattermostautodriver.endpoints.files.Files(client)[source]

Bases: Base

upload_file(files, data=None)[source]

Upload a file

files: A file to be uploaded channel_id: The ID of the channel that this file will be uploaded to client_ids: A unique identifier for the file that will be returned in the response

Read in Mattermost API docs (files - UploadFile)

get_file(file_id)[source]

Get a file

file_id: The ID of the file to get

Read in Mattermost API docs (files - GetFile)

get_file_thumbnail(file_id)[source]

Get a file’s thumbnail

file_id: The ID of the file to get

Read in Mattermost API docs (files - GetFileThumbnail)

get_file_preview(file_id)[source]

Get a file’s preview

file_id: The ID of the file to get

Read in Mattermost API docs (files - GetFilePreview)

Get a public file link

file_id: The ID of the file to get a link for

Read in Mattermost API docs (files - GetFileLink)

get_file_info(file_id)[source]

Get metadata for a file

file_id: The ID of the file info to get

Read in Mattermost API docs (files - GetFileInfo)

get_file_public(file_id, params=None)[source]

Get a public file

file_id: The ID of the file to get h: File hash

Read in Mattermost API docs (files - GetFilePublic)

search_files(team_id, data)[source]

Search files in a team

team_id: Team GUID terms: The search terms as inputed by the user. To search for files from a user include from:someusername, using a user’s username. To search in a specific channel include in:somechannel, using the channel name (not the display name). To search for specific extensions included ext:extension. is_or_search: Set to true if an Or search should be performed vs an And search. time_zone_offset: Offset from UTC of user timezone for date searches. include_deleted_channels: Set to true if deleted channels should be included in the search. (archived channels) page: The page to select. (Only works with Elasticsearch) per_page: The number of posts per page. (Only works with Elasticsearch)

Read in Mattermost API docs (files - SearchFiles)

Filtering

class mattermostautodriver.endpoints.filtering.Filtering(client)[source]

Bases: Base

get_ip_filters()[source]

Get all IP filters Read in Mattermost API docs (filtering - GetIPFilters)

apply_ip_filters(options)[source]

Get all IP filters Read in Mattermost API docs (filtering - ApplyIPFilters)

my_ip()[source]

Get all IP filters Read in Mattermost API docs (filtering - MyIP)

Groups

class mattermostautodriver.endpoints.groups.Groups(client)[source]

Bases: Base

Delete a link for LDAP group

remote_id: Group GUID

Read in Mattermost API docs (groups - UnlinkLdapGroup)

get_groups(params=None)[source]

Get groups

page: The page to select. per_page: The number of groups per page. q: String to pattern match the name and display_name field. Will return all groups whose name and display_name field match any of the text. include_member_count: Boolean which adds the member_count attribute to each group JSON object not_associated_to_team: Team GUID which is used to return all the groups not associated to this team not_associated_to_channel: Group GUID which is used to return all the groups not associated to this channel since: Only return groups that have been modified since the given Unix timestamp (in milliseconds). All modified groups, including deleted and created groups, will be returned. Minimum server version: 5.24

filter_allow_reference: Boolean which filters the group entries with the allow_reference attribute set.

Read in Mattermost API docs (groups - GetGroups)

create_group(options)[source]

Create a custom group

group: Group object to create. user_ids: The user ids of the group members to add.

Read in Mattermost API docs (groups - CreateGroup)

get_group(group_id)[source]

Get a group

group_id: Group GUID

Read in Mattermost API docs (groups - GetGroup)

delete_group(group_id)[source]

Deletes a custom group

group_id: The ID of the group.

Read in Mattermost API docs (groups - DeleteGroup)

patch_group(group_id, options)[source]

Patch a group

group_id: Group GUID name: display_name: description:

Read in Mattermost API docs (groups - PatchGroup)

restore_group(group_id)[source]

Restore a previously deleted group.

group_id: Group GUID

Read in Mattermost API docs (groups - RestoreGroup)

Link a team to a group

group_id: Group GUID team_id: Team GUID

Read in Mattermost API docs (groups - LinkGroupSyncableForTeam)

Delete a link from a team to a group

group_id: Group GUID team_id: Team GUID

Read in Mattermost API docs (groups - UnlinkGroupSyncableForTeam)

Link a channel to a group

group_id: Group GUID channel_id: Channel GUID

Read in Mattermost API docs (groups - LinkGroupSyncableForChannel)

Delete a link from a channel to a group

group_id: Group GUID channel_id: Channel GUID

Read in Mattermost API docs (groups - UnlinkGroupSyncableForChannel)

get_group_syncable_for_team_id(group_id, team_id)[source]

Get GroupSyncable from Team ID

group_id: Group GUID team_id: Team GUID

Read in Mattermost API docs (groups - GetGroupSyncableForTeamId)

get_group_syncable_for_channel_id(group_id, channel_id)[source]

Get GroupSyncable from channel ID

group_id: Group GUID channel_id: Channel GUID

Read in Mattermost API docs (groups - GetGroupSyncableForChannelId)

get_group_syncables_teams(group_id)[source]

Get group teams

group_id: Group GUID

Read in Mattermost API docs (groups - GetGroupSyncablesTeams)

get_group_syncables_channels(group_id)[source]

Get group channels

group_id: Group GUID

Read in Mattermost API docs (groups - GetGroupSyncablesChannels)

patch_group_syncable_for_team(group_id, team_id, options)[source]

Patch a GroupSyncable associated to Team

group_id: Group GUID team_id: Team GUID auto_add:

Read in Mattermost API docs (groups - PatchGroupSyncableForTeam)

patch_group_syncable_for_channel(group_id, channel_id, options)[source]

Patch a GroupSyncable associated to Channel

group_id: Group GUID channel_id: Channel GUID auto_add:

Read in Mattermost API docs (groups - PatchGroupSyncableForChannel)

get_group_users(group_id, params=None)[source]

Get group users

group_id: Group GUID page: The page to select. per_page: The number of groups per page.

Read in Mattermost API docs (groups - GetGroupUsers)

delete_group_members(group_id, params)[source]

Removes members from a custom group

group_id: The ID of the group to delete. user_ids:

Read in Mattermost API docs (groups - DeleteGroupMembers)

add_group_members(group_id, options)[source]

Adds members to a custom group

group_id: The ID of the group. user_ids:

Read in Mattermost API docs (groups - AddGroupMembers)

get_group_stats(group_id)[source]

Get group stats

group_id: Group GUID

Read in Mattermost API docs (groups - GetGroupStats)

get_groups_by_channel(channel_id, params=None)[source]

Get channel groups

channel_id: Channel GUID page: The page to select. per_page: The number of groups per page. filter_allow_reference: Boolean which filters the group entries with the allow_reference attribute set.

Read in Mattermost API docs (groups - GetGroupsByChannel)

get_groups_by_team(team_id, params=None)[source]

Get team groups

team_id: Team GUID page: The page to select. per_page: The number of groups per page. filter_allow_reference: Boolean which filters in the group entries with the allow_reference attribute set.

Read in Mattermost API docs (groups - GetGroupsByTeam)

get_groups_associated_to_channels_by_team(team_id, params=None)[source]

Get team groups by channels

team_id: Team GUID page: The page to select. per_page: The number of groups per page. filter_allow_reference: Boolean which filters in the group entries with the allow_reference attribute set. paginate: Boolean to determine whether the pagination should be applied or not

Read in Mattermost API docs (groups - GetGroupsAssociatedToChannelsByTeam)

get_groups_by_user_id(user_id)[source]

Get groups for a userId

user_id: User GUID

Read in Mattermost API docs (groups - GetGroupsByUserId)

Imports

class mattermostautodriver.endpoints.imports.Imports(client)[source]

Bases: Base

list_imports()[source]

List import files Read in Mattermost API docs (imports - ListImports)

Integration Actions

class mattermostautodriver.endpoints.integration_actions.IntegrationActions(client)[source]

Bases: Base

open_interactive_dialog(options)[source]

Open a dialog

trigger_id: Trigger ID provided by other action url: The URL to send the submitted dialog payload to dialog: Post object to create

Read in Mattermost API docs (integration_actions - OpenInteractiveDialog)

submit_interactive_dialog(options)[source]

Submit a dialog

url: The URL to send the submitted dialog payload to channel_id: Channel ID the user submitted the dialog from team_id: Team ID the user submitted the dialog from submission: String map where keys are element names and values are the element input values callback_id: Callback ID sent when the dialog was opened state: State sent when the dialog was opened cancelled: Set to true if the dialog was cancelled

Read in Mattermost API docs (integration_actions - SubmitInteractiveDialog)

Internal

class mattermostautodriver.endpoints.internal.Internal(client)[source]

Bases: Base

create_playbook_run_from_dialog(options=None)[source]

Create a new playbook run from dialog

type: url: callback_id: Callback ID provided by the integration. state: Stringified JSON with the post_id and the client_id. user_id: ID of the user who submitted the dialog. channel_id: ID of the channel the user was in when submitting the dialog. team_id: ID of the team the user was on when submitting the dialog. submission: Map of the dialog fields to their values cancelled: If the dialog was cancelled.

Read in Mattermost API docs (Internal - createPlaybookRunFromDialog)

get_checklist_autocomplete(params=None)[source]

Get autocomplete data for /playbook check

channel_ID: ID of the channel the user is in.

Read in Mattermost API docs (Internal - getChecklistAutocomplete)

end_playbook_run_dialog(id)[source]

End a playbook run from dialog

id: ID of the playbook run to end.

Read in Mattermost API docs (Internal - endPlaybookRunDialog)

next_stage_dialog(id, options=None)[source]

Go to next stage from dialog

id: The PlaybookRun ID state: String representation of the zero-based index of the stage to go to.

Read in Mattermost API docs (Internal - nextStageDialog)

Ip

class mattermostautodriver.endpoints.ip.Ip(client)[source]

Bases: Base

get_ip_filters()[source]

Get all IP filters Read in Mattermost API docs (ip - GetIPFilters)

apply_ip_filters(options)[source]

Get all IP filters Read in Mattermost API docs (ip - ApplyIPFilters)

my_ip()[source]

Get all IP filters Read in Mattermost API docs (ip - MyIP)

Jobs

class mattermostautodriver.endpoints.jobs.Jobs(client)[source]

Bases: Base

get_jobs(params=None)[source]

Get the jobs.

page: The page to select. per_page: The number of jobs per page. job_type: The type of jobs to fetch. status: The status of jobs to fetch.

Read in Mattermost API docs (jobs - GetJobs)

create_job(options)[source]

Create a new job.

type: The type of job to create data: An object containing any additional data required for this job type

Read in Mattermost API docs (jobs - CreateJob)

get_job(job_id)[source]

Get a job.

job_id: Job GUID

Read in Mattermost API docs (jobs - GetJob)

download_job(job_id)[source]

Download the results of a job.

job_id: Job GUID

Read in Mattermost API docs (jobs - DownloadJob)

cancel_job(job_id)[source]

Cancel a job.

job_id: Job GUID

Read in Mattermost API docs (jobs - CancelJob)

get_jobs_by_type(type, params=None)[source]

Get the jobs of the given type.

type: Job type page: The page to select. per_page: The number of jobs per page.

Read in Mattermost API docs (jobs - GetJobsByType)

update_job_status(job_id, options)[source]

Update the status of a job

job_id: Job GUID status: The status you want to set force: Set this to true to bypass status restrictions

Read in Mattermost API docs (jobs - UpdateJobStatus)

Ldap

class mattermostautodriver.endpoints.ldap.Ldap(client)[source]

Bases: Base

get_ldap_groups(params=None)[source]

Returns a list of LDAP groups

q: Search term page: The page to select. per_page: The number of users per page. per page.

Read in Mattermost API docs (ldap - GetLdapGroups)

Link a LDAP group

remote_id: Group GUID

Read in Mattermost API docs (ldap - LinkLdapGroup)

Logs

class mattermostautodriver.endpoints.logs.Logs(client)[source]

Bases: Base

download_system_logs()[source]

Download system logs Read in Mattermost API docs (logs - DownloadSystemLogs)

Migrate

class mattermostautodriver.endpoints.migrate.Migrate(client)[source]

Bases: Base

migrate_auth_to_ldap(options=None)[source]

Migrate user accounts authentication type to LDAP.

from: The current authentication type for the matched users. match_field: Foreign user field name to match. force:

Read in Mattermost API docs (migrate - MigrateAuthToLdap)

migrate_auth_to_saml(options=None)[source]

Migrate user accounts authentication type to SAML.

from: The current authentication type for the matched users. matches: Users map. auto:

Read in Mattermost API docs (migrate - MigrateAuthToSaml)

Oauth

class mattermostautodriver.endpoints.oauth.Oauth(client)[source]

Bases: Base

list_outgoing_o_auth_connections(params=None)[source]

List all connections

team_id: Current Team ID in integrations backstage

Read in Mattermost API docs (oauth - ListOutgoingOAuthConnections)

create_outgoing_o_auth_connection(options=None)[source]

Create a connection Read in Mattermost API docs (oauth - CreateOutgoingOAuthConnection)

get_outgoing_o_auth_connection(params=None)[source]

Get a connection

team_id: Current Team ID in integrations backstage

Read in Mattermost API docs (oauth - GetOutgoingOAuthConnection)

update_outgoing_o_auth_connection(options=None)[source]

Update a connection Read in Mattermost API docs (oauth - UpdateOutgoingOAuthConnection)

delete_outgoing_o_auth_connection()[source]

Delete a connection Read in Mattermost API docs (oauth - DeleteOutgoingOAuthConnection)

validate_outgoing_o_auth_connection(options=None)[source]

Validate a connection configuration Read in Mattermost API docs (oauth - ValidateOutgoingOAuthConnection)

Outgoing Connections

class mattermostautodriver.endpoints.outgoing_connections.OutgoingConnections(client)[source]

Bases: Base

list_outgoing_o_auth_connections(params=None)[source]

List all connections

team_id: Current Team ID in integrations backstage

Read in Mattermost API docs (outgoing_connections - ListOutgoingOAuthConnections)

create_outgoing_o_auth_connection(options=None)[source]

Create a connection Read in Mattermost API docs (outgoing_connections - CreateOutgoingOAuthConnection)

get_outgoing_o_auth_connection(params=None)[source]

Get a connection

team_id: Current Team ID in integrations backstage

Read in Mattermost API docs (outgoing_connections - GetOutgoingOAuthConnection)

update_outgoing_o_auth_connection(options=None)[source]

Update a connection Read in Mattermost API docs (outgoing_connections - UpdateOutgoingOAuthConnection)

delete_outgoing_o_auth_connection()[source]

Delete a connection Read in Mattermost API docs (outgoing_connections - DeleteOutgoingOAuthConnection)

validate_outgoing_o_auth_connection(options=None)[source]

Validate a connection configuration Read in Mattermost API docs (outgoing_connections - ValidateOutgoingOAuthConnection)

Outgoing Oauth Connections

class mattermostautodriver.endpoints.outgoing_oauth_connections.OutgoingOauthConnections(client)[source]

Bases: Base

list_outgoing_o_auth_connections(params=None)[source]

List all connections

team_id: Current Team ID in integrations backstage

Read in Mattermost API docs (outgoing_oauth_connections - ListOutgoingOAuthConnections)

create_outgoing_o_auth_connection(options=None)[source]

Create a connection Read in Mattermost API docs (outgoing_oauth_connections - CreateOutgoingOAuthConnection)

get_outgoing_o_auth_connection(params=None)[source]

Get a connection

team_id: Current Team ID in integrations backstage

Read in Mattermost API docs (outgoing_oauth_connections - GetOutgoingOAuthConnection)

update_outgoing_o_auth_connection(options=None)[source]

Update a connection Read in Mattermost API docs (outgoing_oauth_connections - UpdateOutgoingOAuthConnection)

delete_outgoing_o_auth_connection()[source]

Delete a connection Read in Mattermost API docs (outgoing_oauth_connections - DeleteOutgoingOAuthConnection)

validate_outgoing_o_auth_connection(options=None)[source]

Validate a connection configuration Read in Mattermost API docs (outgoing_oauth_connections - ValidateOutgoingOAuthConnection)

Permissions

class mattermostautodriver.endpoints.permissions.Permissions(client)[source]

Bases: Base

get_ancillary_permissions_post(options)[source]

Return all system console subsection ancillary permissions Read in Mattermost API docs (permissions - GetAncillaryPermissionsPost)

Playbookautofollows

class mattermostautodriver.endpoints.playbookautofollows.PlaybookAutofollows(client)[source]

Bases: Base

get_auto_follows(id)[source]

Get the list of followers’ user IDs of a playbook

id: ID of the playbook to retrieve followers from.

Read in Mattermost API docs (PlaybookAutofollows - getAutoFollows)

Playbookruns

class mattermostautodriver.endpoints.playbookruns.PlaybookRuns(client)[source]

Bases: Base

list_playbook_runs(params=None)[source]

List all playbook runs

team_id: ID of the team to filter by. page: Zero-based index of the page to request. per_page: Number of playbook runs to return per page. sort: Field to sort the returned playbook runs by. direction: Direction (ascending or descending) followed by the sorting of the playbook runs. statuses: The returned list will contain only the playbook runs with the specified statuses. owner_user_id: The returned list will contain only the playbook runs commanded by this user. Specify “me” for current user. participant_id: The returned list will contain only the playbook runs for which the given user is a participant. Specify “me” for current user. search_term: The returned list will contain only the playbook runs whose name contains the search term.

Read in Mattermost API docs (PlaybookRuns - listPlaybookRuns)

create_playbook_run_from_post(options=None)[source]

Create a new playbook run

name: The name of the playbook run. description: The description of the playbook run. owner_user_id: The identifier of the user who is commanding the playbook run. team_id: The identifier of the team where the playbook run’s channel is in. post_id: If the playbook run was created from a post, this field contains the identifier of such post. If not, this field is empty. playbook_id: The identifier of the playbook with from which this playbook run was created.

Read in Mattermost API docs (PlaybookRuns - createPlaybookRunFromPost)

get_owners(params=None)[source]

Get all owners

team_id: ID of the team to filter by.

Read in Mattermost API docs (PlaybookRuns - getOwners)

get_channels(params=None)[source]

Get playbook run channels

team_id: ID of the team to filter by. sort: Field to sort the returned channels by, according to their playbook run. direction: Direction (ascending or descending) followed by the sorting of the playbook runs associated to the channels. status: The returned list will contain only the channels whose playbook run has this status. owner_user_id: The returned list will contain only the channels whose playbook run is commanded by this user. search_term: The returned list will contain only the channels associated to a playbook run whose name contains the search term. participant_id: The returned list will contain only the channels associated to a playbook run for which the given user is a participant.

Read in Mattermost API docs (PlaybookRuns - getChannels)

get_playbook_run_by_channel_id(channel_id)[source]

Find playbook run by channel ID

channel_id: ID of the channel associated to the playbook run to retrieve.

Read in Mattermost API docs (PlaybookRuns - getPlaybookRunByChannelId)

get_playbook_run(id)[source]

Get a playbook run

id: ID of the playbook run to retrieve.

Read in Mattermost API docs (PlaybookRuns - getPlaybookRun)

update_playbook_run(id, options=None)[source]

Update a playbook run

id: ID of the playbook run to retrieve. active_stage: Zero-based index of the stage that will be made active.

Read in Mattermost API docs (PlaybookRuns - updatePlaybookRun)

get_playbook_run_metadata(id)[source]

Get playbook run metadata

id: ID of the playbook run whose metadata will be retrieved.

Read in Mattermost API docs (PlaybookRuns - getPlaybookRunMetadata)

end_playbook_run(id)[source]

End a playbook run

id: ID of the playbook run to end.

Read in Mattermost API docs (PlaybookRuns - endPlaybookRun)

restart_playbook_run(id)[source]

Restart a playbook run

id: ID of the playbook run to restart.

Read in Mattermost API docs (PlaybookRuns - restartPlaybookRun)

status(id, options=None)[source]

Update a playbook run’s status

id: ID of the playbook run to update. message: The status update message. reminder: The number of seconds until the system will send a reminder to the owner to update the status. No reminder will be scheduled if reminder is 0 or omitted.

Read in Mattermost API docs (PlaybookRuns - status)

finish(id)[source]

Finish a playbook

id: ID of the playbook run to finish.

Read in Mattermost API docs (PlaybookRuns - finish)

change_owner(id, options=None)[source]

Update playbook run owner

id: ID of the playbook run whose owner will be changed. owner_id: The user ID of the new owner.

Read in Mattermost API docs (PlaybookRuns - changeOwner)

add_checklist_item(id, checklist, options=None)[source]

Add an item to a playbook run’s checklist

id: ID of the playbook run whose checklist will be modified. checklist: Zero-based index of the checklist to modify. title: The title of the checklist item. state: The state of the checklist item. An empty string means that the item is not done. state_modified: The timestamp for the latest modification of the item’s state, formatted as the number of milliseconds since the Unix epoch. It equals 0 if the item was never modified. assignee_id: The identifier of the user that has been assigned to complete this item. If the item has no assignee, this is an empty string. assignee_modified: The timestamp for the latest modification of the item’s assignee, formatted as the number of milliseconds since the Unix epoch. It equals 0 if the item never got an assignee. command: The slash command associated with this item. If the item has no slash command associated, this is an empty string command_last_run: The timestamp for the latest execution of the item’s command, formatted as the number of milliseconds since the Unix epoch. It equals 0 if the command was never executed. description: A detailed description of the checklist item, formatted with Markdown.

Read in Mattermost API docs (PlaybookRuns - addChecklistItem)

reoder_checklist_item(id, checklist, options=None)[source]

Reorder an item in a playbook run’s checklist

id: ID of the playbook run whose checklist will be modified. checklist: Zero-based index of the checklist to modify. item_num: Zero-based index of the item to reorder. new_location: Zero-based index of the new place to move the item to.

Read in Mattermost API docs (PlaybookRuns - reoderChecklistItem)

item_rename(id, checklist, item, options=None)[source]

Update an item of a playbook run’s checklist

id: ID of the playbook run whose checklist will be modified. checklist: Zero-based index of the checklist to modify. item: Zero-based index of the item to modify. title: The new title of the item. command: The new slash command of the item.

Read in Mattermost API docs (PlaybookRuns - itemRename)

item_delete(id, checklist, item)[source]

Delete an item of a playbook run’s checklist

id: ID of the playbook run whose checklist will be modified. checklist: Zero-based index of the checklist to modify. item: Zero-based index of the item to modify.

Read in Mattermost API docs (PlaybookRuns - itemDelete)

item_set_state(id, checklist, item, options=None)[source]

Update the state of an item

id: ID of the playbook run whose checklist will be modified. checklist: Zero-based index of the checklist to modify. item: Zero-based index of the item to modify. new_state: The new state of the item.

Read in Mattermost API docs (PlaybookRuns - itemSetState)

item_set_assignee(id, checklist, item, options=None)[source]

Update the assignee of an item

id: ID of the playbook run whose item will get a new assignee. checklist: Zero-based index of the checklist whose item will get a new assignee. item: Zero-based index of the item that will get a new assignee. assignee_id: The user ID of the new assignee of the item.

Read in Mattermost API docs (PlaybookRuns - itemSetAssignee)

item_run(id, checklist, item)[source]

Run an item’s slash command

id: ID of the playbook run whose item will be executed. checklist: Zero-based index of the checklist whose item will be executed. item: Zero-based index of the item whose slash command will be executed.

Read in Mattermost API docs (PlaybookRuns - itemRun)

Playbooks

class mattermostautodriver.endpoints.playbooks.Playbooks(client)[source]

Bases: Base

get_playbooks(params=None)[source]

List all playbooks

team_id: ID of the team to filter by. page: Zero-based index of the page to request. per_page: Number of playbooks to return per page. sort: Field to sort the returned playbooks by title, number of stages or total number of steps. direction: Direction (ascending or descending) followed by the sorting of the playbooks. with_archived: Includes archived playbooks in the result.

Read in Mattermost API docs (Playbooks - getPlaybooks)

create_playbook(options=None)[source]

Create a playbook

title: The title of the playbook. description: The description of the playbook. team_id: The identifier of the team where the playbook is in. create_public_playbook_run: A boolean indicating whether the playbook runs created from this playbook should be public or private. public: A boolean indicating whether the playbook is licensed as public or private. Required ‘true’ for free tier. checklists: The stages defined by this playbook. member_ids: The identifiers of all the users that are members of this playbook. broadcast_channel_ids: The IDs of the channels where all the status updates will be broadcasted. The team of the broadcast channel must be the same as the playbook’s team. invited_user_ids: A list with the IDs of the members to be automatically invited to the playbook run’s channel as soon as the playbook run is created. invite_users_enabled: Boolean that indicates whether the members declared in invited_user_ids will be automatically invited. default_owner_id: User ID of the member that will be automatically assigned as owner as soon as the playbook run is created. If the member is not part of the playbook run’s channel or is not included in the invited_user_ids list, they will be automatically invited to the channel. default_owner_enabled: Boolean that indicates whether the member declared in default_owner_id will be automatically assigned as owner. announcement_channel_id: ID of the channel where the playbook run will be automatically announced as soon as the playbook run is created. announcement_channel_enabled: Boolean that indicates whether the playbook run creation will be announced in the channel declared in announcement_channel_id. webhook_on_creation_url: An absolute URL where a POST request will be sent as soon as the playbook run is created. The allowed protocols are HTTP and HTTPS. webhook_on_creation_enabled: Boolean that indicates whether the webhook declared in webhook_on_creation_url will be automatically sent. webhook_on_status_update_url: An absolute URL where a POST request will be sent as soon as the playbook run’s status is updated. The allowed protocols are HTTP and HTTPS. webhook_on_status_update_enabled: Boolean that indicates whether the webhook declared in webhook_on_status_update_url will be automatically sent.

Read in Mattermost API docs (Playbooks - createPlaybook)

get_playbook(id)[source]

Get a playbook

id: ID of the playbook to retrieve.

Read in Mattermost API docs (Playbooks - getPlaybook)

update_playbook(id, options=None)[source]

Update a playbook

id: ID of the playbook to update.

Read in Mattermost API docs (Playbooks - updatePlaybook)

delete_playbook(id)[source]

Delete a playbook

id: ID of the playbook to delete.

Read in Mattermost API docs (Playbooks - deletePlaybook)

Plugins

class mattermostautodriver.endpoints.plugins.Plugins(client)[source]

Bases: Base

upload_plugin(files, data=None)[source]

Upload plugin

plugin: The plugin image to be uploaded force: Set to ‘true’ to overwrite a previously installed plugin with the same ID, if any

Read in Mattermost API docs (plugins - UploadPlugin)

get_plugins()[source]

Get plugins Read in Mattermost API docs (plugins - GetPlugins)

install_plugin_from_url()[source]

Install plugin from url Read in Mattermost API docs (plugins - InstallPluginFromUrl)

remove_plugin(plugin_id)[source]

Remove plugin

plugin_id: Id of the plugin to be removed

Read in Mattermost API docs (plugins - RemovePlugin)

enable_plugin(plugin_id)[source]

Enable plugin

plugin_id: Id of the plugin to be enabled

Read in Mattermost API docs (plugins - EnablePlugin)

disable_plugin(plugin_id)[source]

Disable plugin

plugin_id: Id of the plugin to be disabled

Read in Mattermost API docs (plugins - DisablePlugin)

get_webapp_plugins()[source]

Get webapp plugins Read in Mattermost API docs (plugins - GetWebappPlugins)

get_plugin_statuses()[source]

Get plugins status Read in Mattermost API docs (plugins - GetPluginStatuses)

install_marketplace_plugin(options)[source]

Installs a marketplace plugin

id: The ID of the plugin to install. version: The version of the plugin to install.

Read in Mattermost API docs (plugins - InstallMarketplacePlugin)

get_marketplace_plugins(params=None)[source]

Gets all the marketplace plugins

page: Page number to be fetched. (not yet implemented) per_page: Number of item per page. (not yet implemented) filter: Set to filter plugins by ID, name, or description. server_version: Set to filter minimum plugin server version. (not yet implemented) local_only: Set true to only retrieve local plugins.

Read in Mattermost API docs (plugins - GetMarketplacePlugins)

get_marketplace_visited_by_admin()[source]

Get if the Plugin Marketplace has been visited by at least an admin. Read in Mattermost API docs (plugins - GetMarketplaceVisitedByAdmin)

Posts

class mattermostautodriver.endpoints.posts.Posts(client)[source]

Bases: Base

create_post(options)[source]

Create a post

channel_id: The channel ID to post in message: The message contents, can be formatted with Markdown root_id: The post ID to comment on file_ids: A list of file IDs to associate with the post. Note that posts are limited to 5 files maximum. Please use additional posts for more files. props: A general JSON property bag to attach to the post metadata: A JSON object to add post metadata, e.g the post’s priority

Read in Mattermost API docs (posts - CreatePost)

create_post_ephemeral(options)[source]

Create a ephemeral post

user_id: The target user id for the ephemeral post post: Post object to create

Read in Mattermost API docs (posts - CreatePostEphemeral)

get_post(post_id, params=None)[source]

Get a post

post_id: ID of the post to get include_deleted: Defines if result should include deleted posts, must have ‘manage_system’ (admin) permission.

Read in Mattermost API docs (posts - GetPost)

delete_post(post_id)[source]

Delete a post

post_id: ID of the post to delete

Read in Mattermost API docs (posts - DeletePost)

update_post(post_id, options)[source]

Update a post

post_id: ID of the post to update id: ID of the post to update is_pinned: Set to true to pin the post to the channel it is in message: The message text of the post has_reactions: Set to true if the post has reactions to it props: A general JSON property bag to attach to the post

Read in Mattermost API docs (posts - UpdatePost)

set_post_unread(user_id, post_id)[source]

Mark as unread from a post.

user_id: User GUID post_id: Post GUID

Read in Mattermost API docs (posts - SetPostUnread)

patch_post(post_id, options)[source]

Patch a post

post_id: Post GUID is_pinned: Set to true to pin the post to the channel it is in message: The message text of the post file_ids: The list of files attached to this post has_reactions: Set to true if the post has reactions to it props: A general JSON property bag to attach to the post

Read in Mattermost API docs (posts - PatchPost)

get_post_thread(post_id, params=None)[source]

Get a thread

post_id: ID of a post in the thread perPage: The number of posts per page fromPost: The post_id to return the next page of posts from fromCreateAt: The create_at timestamp to return the next page of posts from direction: The direction to return the posts. Either up or down. skipFetchThreads: Whether to skip fetching threads or not collapsedThreads: Whether the client uses CRT or not collapsedThreadsExtended: Whether to return the associated users as part of the response or not

Read in Mattermost API docs (posts - GetPostThread)

get_flagged_posts_for_user(user_id, params=None)[source]

Get a list of flagged posts

user_id: ID of the user team_id: Team ID channel_id: Channel ID page: The page to select per_page: The number of posts per page

Read in Mattermost API docs (posts - GetFlaggedPostsForUser)

get_file_infos_for_post(post_id, params=None)[source]

Get file info for post

post_id: ID of the post include_deleted: Defines if result should include deleted posts, must have ‘manage_system’ (admin) permission.

Read in Mattermost API docs (posts - GetFileInfosForPost)

get_posts_for_channel(channel_id, params=None)[source]

Get posts for a channel

channel_id: The channel ID to get the posts for page: The page to select per_page: The number of posts per page since: Provide a non-zero value in Unix time milliseconds to select posts modified after that time before: A post id to select the posts that came before this one after: A post id to select the posts that came after this one include_deleted: Whether to include deleted posts or not. Must have system admin permissions.

Read in Mattermost API docs (posts - GetPostsForChannel)

get_posts_around_last_unread(user_id, channel_id, params=None)[source]

Get posts around oldest unread

user_id: ID of the user channel_id: The channel ID to get the posts for limit_before: Number of posts before the oldest unread posts. Maximum is 200 posts if limit is set greater than that. limit_after: Number of posts after and including the oldest unread post. Maximum is 200 posts if limit is set greater than that. skipFetchThreads: Whether to skip fetching threads or not collapsedThreads: Whether the client uses CRT or not collapsedThreadsExtended: Whether to return the associated users as part of the response or not

Read in Mattermost API docs (posts - GetPostsAroundLastUnread)

search_posts(team_id, options)[source]

Search for team posts

team_id: Team GUID terms: The search terms as inputed by the user. To search for posts from a user include from:someusername, using a user’s username. To search in a specific channel include in:somechannel, using the channel name (not the display name). is_or_search: Set to true if an Or search should be performed vs an And search. time_zone_offset: Offset from UTC of user timezone for date searches. include_deleted_channels: Set to true if deleted channels should be included in the search. (archived channels) page: The page to select. (Only works with Elasticsearch) per_page: The number of posts per page. (Only works with Elasticsearch)

Read in Mattermost API docs (posts - SearchPosts)

pin_post(post_id)[source]

Pin a post to the channel

post_id: Post GUID

Read in Mattermost API docs (posts - PinPost)

unpin_post(post_id)[source]

Unpin a post to the channel

post_id: Post GUID

Read in Mattermost API docs (posts - UnpinPost)

do_post_action(post_id, action_id)[source]

Perform a post action

post_id: Post GUID action_id: Action GUID

Read in Mattermost API docs (posts - DoPostAction)

get_posts_by_ids(options)[source]

Get posts by a list of ids Read in Mattermost API docs (posts - getPostsByIds)

set_post_reminder(user_id, post_id, options)[source]

Set a post reminder

user_id: User GUID post_id: Post GUID target_time: Target time for the reminder

Read in Mattermost API docs (posts - SetPostReminder)

save_acknowledgement_for_post(user_id, post_id)[source]

Acknowledge a post

user_id: User GUID post_id: Post GUID

Read in Mattermost API docs (posts - SaveAcknowledgementForPost)

delete_acknowledgement_for_post(user_id, post_id)[source]

Delete a post acknowledgement

user_id: User GUID post_id: Post GUID

Read in Mattermost API docs (posts - DeleteAcknowledgementForPost)

move_thread(post_id, options)[source]

Move a post (and any posts within that post’s thread)

post_id: The identifier of the post to move channel_id: The channel identifier of where the post/thread is to be moved

Read in Mattermost API docs (posts - MoveThread)

Preferences

class mattermostautodriver.endpoints.preferences.Preferences(client)[source]

Bases: Base

get_preferences(user_id)[source]

Get the user’s preferences

user_id: User GUID

Read in Mattermost API docs (preferences - GetPreferences)

update_preferences(user_id, options)[source]

Save the user’s preferences

user_id: User GUID

Read in Mattermost API docs (preferences - UpdatePreferences)

delete_preferences(user_id, options)[source]

Delete user’s preferences

user_id: User GUID

Read in Mattermost API docs (preferences - DeletePreferences)

get_preferences_by_category(user_id, category)[source]

List a user’s preferences by category

user_id: User GUID category: The category of a group of preferences

Read in Mattermost API docs (preferences - GetPreferencesByCategory)

get_preferences_by_category_by_name(user_id, category, preference_name)[source]

Get a specific user preference

user_id: User GUID category: The category of a group of preferences preference_name: The name of the preference

Read in Mattermost API docs (preferences - GetPreferencesByCategoryByName)

Reactions

class mattermostautodriver.endpoints.reactions.Reactions(client)[source]

Bases: Base

save_reaction(options)[source]

Create a reaction Read in Mattermost API docs (reactions - SaveReaction)

get_reactions(post_id)[source]

Get a list of reactions to a post

post_id: ID of a post

Read in Mattermost API docs (reactions - GetReactions)

delete_reaction(user_id, post_id, emoji_name)[source]

Remove a reaction from a post

user_id: ID of the user post_id: ID of the post emoji_name: emoji name

Read in Mattermost API docs (reactions - DeleteReaction)

get_bulk_reactions(options)[source]

Bulk get the reaction for posts Read in Mattermost API docs (reactions - GetBulkReactions)

Remote Clusters

class mattermostautodriver.endpoints.remote_clusters.RemoteClusters(client)[source]

Bases: Base

get_remote_clusters(params=None)[source]

Get a list of remote clusters.

page: The page to select per_page: The number of remote clusters per page exclude_offline: Exclude offline remote clusters in_channel: Select remote clusters in channel not_in_channel: Select remote clusters not in this channel only_confirmed: Select only remote clusters already confirmed only_plugins: Select only remote clusters that belong to a plugin exclude_plugins: Select only remote clusters that don’t belong to a plugin

Read in Mattermost API docs (remote_clusters - GetRemoteClusters)

create_remote_cluster(options=None)[source]

Create a new remote cluster.

name: display_name: password: The password to use in the invite code. If empty, the server will generate one and it will be part of the response

Read in Mattermost API docs (remote_clusters - CreateRemoteCluster)

get_remote_cluster(remote_id)[source]

Get a remote cluster.

remote_id: Remote Cluster GUID

Read in Mattermost API docs (remote_clusters - GetRemoteCluster)

patch_remote_cluster(remote_id, options=None)[source]

Patch a remote cluster.

remote_id: Remote Cluster GUID display_name: default_team_id: The team where channels from invites are created

Read in Mattermost API docs (remote_clusters - PatchRemoteCluster)

delete_remote_cluster(remote_id)[source]

Delete a remote cluster.

remote_id: Remote Cluster GUID

Read in Mattermost API docs (remote_clusters - DeleteRemoteCluster)

generate_remote_cluster_invite(options=None)[source]

Generate invite code.

password: The password to encrypt the invite code with.

Read in Mattermost API docs (remote_clusters - GenerateRemoteClusterInvite)

accept_remote_cluster_invite(options=None)[source]

Accept a remote cluster invite code.

invite: name: display_name: password: The password to decrypt the invite code.

Read in Mattermost API docs (remote_clusters - AcceptRemoteClusterInvite)

Reports

class mattermostautodriver.endpoints.reports.Reports(client)[source]

Bases: Base

start_batch_users_export()[source]

Starts a job to export the users to a report file. Read in Mattermost API docs (reports - StartBatchUsersExport)

Roles

class mattermostautodriver.endpoints.roles.Roles(client)[source]

Bases: Base

get_all_roles()[source]

Get a list of all the roles Read in Mattermost API docs (roles - GetAllRoles)

get_role(role_id)[source]

Get a role

role_id: Role GUID

Read in Mattermost API docs (roles - GetRole)

get_role_by_name(role_name)[source]

Get a role

role_name: Role Name

Read in Mattermost API docs (roles - GetRoleByName)

patch_role(role_id, options)[source]

Patch a role

role_id: Role GUID permissions: The permissions the role should grant.

Read in Mattermost API docs (roles - PatchRole)

get_roles_by_names(options)[source]

Get a list of roles by name Read in Mattermost API docs (roles - GetRolesByNames)

Root

class mattermostautodriver.endpoints.root.Root(client)[source]

Bases: Base

acknowledge_notification()[source]

Acknowledge receiving of a notification Read in Mattermost API docs (root - AcknowledgeNotification)

Saml

class mattermostautodriver.endpoints.saml.SAML(client)[source]

Bases: Base

migrate_auth_to_saml(options=None)[source]

Migrate user accounts authentication type to SAML.

from: The current authentication type for the matched users. matches: Users map. auto:

Read in Mattermost API docs (SAML - MigrateAuthToSaml)

get_saml_metadata()[source]

Get metadata Read in Mattermost API docs (SAML - GetSamlMetadata)

get_saml_metadata_from_idp(options=None)[source]

Get metadata from Identity Provider

saml_metadata_url: The URL from which to retrieve the SAML IDP data.

Read in Mattermost API docs (SAML - GetSamlMetadataFromIdp)

upload_saml_idp_certificate(files, data=None)[source]

Upload IDP certificate

certificate: The IDP certificate file

Read in Mattermost API docs (SAML - UploadSamlIdpCertificate)

delete_saml_idp_certificate()[source]

Remove IDP certificate Read in Mattermost API docs (SAML - DeleteSamlIdpCertificate)

upload_saml_public_certificate(files, data=None)[source]

Upload public certificate

certificate: The public certificate file

Read in Mattermost API docs (SAML - UploadSamlPublicCertificate)

delete_saml_public_certificate()[source]

Remove public certificate Read in Mattermost API docs (SAML - DeleteSamlPublicCertificate)

upload_saml_private_certificate(files, data=None)[source]

Upload private key

certificate: The private key file

Read in Mattermost API docs (SAML - UploadSamlPrivateCertificate)

delete_saml_private_certificate()[source]

Remove private key Read in Mattermost API docs (SAML - DeleteSamlPrivateCertificate)

get_saml_certificate_status()[source]

Get certificate status Read in Mattermost API docs (SAML - GetSamlCertificateStatus)

reset_saml_auth_data_to_email(options=None)[source]

Reset AuthData to Email

include_deleted: Whether to include deleted users. dry_run: If set to true, the number of users who would be affected is returned. user_ids: If set to a non-empty array, then users whose IDs are not in the array will be excluded.

Read in Mattermost API docs (SAML - ResetSamlAuthDataToEmail)

Schemes

class mattermostautodriver.endpoints.schemes.Schemes(client)[source]

Bases: Base

get_schemes(params=None)[source]

Get the schemes.

scope: Limit the results returned to the provided scope, either team or channel. page: The page to select. per_page: The number of schemes per page.

Read in Mattermost API docs (schemes - GetSchemes)

create_scheme(options)[source]

Create a scheme

name: The name of the scheme description: The description of the scheme scope: The scope of the scheme (“team” or “channel”)

Read in Mattermost API docs (schemes - CreateScheme)

get_scheme(scheme_id)[source]

Get a scheme

scheme_id: Scheme GUID

Read in Mattermost API docs (schemes - GetScheme)

delete_scheme(scheme_id)[source]

Delete a scheme

scheme_id: ID of the scheme to delete

Read in Mattermost API docs (schemes - DeleteScheme)

patch_scheme(scheme_id, options)[source]

Patch a scheme

scheme_id: Scheme GUID name: The human readable name of the scheme description: The description of the scheme

Read in Mattermost API docs (schemes - PatchScheme)

get_teams_for_scheme(scheme_id, params=None)[source]

Get a page of teams which use this scheme.

scheme_id: Scheme GUID page: The page to select. per_page: The number of teams per page.

Read in Mattermost API docs (schemes - GetTeamsForScheme)

get_channels_for_scheme(scheme_id, params=None)[source]

Get a page of channels which use this scheme.

scheme_id: Scheme GUID page: The page to select. per_page: The number of channels per page.

Read in Mattermost API docs (schemes - GetChannelsForScheme)

Search

class mattermostautodriver.endpoints.search.Search(client)[source]

Bases: Base

search_files(team_id, data)[source]

Search files in a team

team_id: Team GUID terms: The search terms as inputed by the user. To search for files from a user include from:someusername, using a user’s username. To search in a specific channel include in:somechannel, using the channel name (not the display name). To search for specific extensions included ext:extension. is_or_search: Set to true if an Or search should be performed vs an And search. time_zone_offset: Offset from UTC of user timezone for date searches. include_deleted_channels: Set to true if deleted channels should be included in the search. (archived channels) page: The page to select. (Only works with Elasticsearch) per_page: The number of posts per page. (Only works with Elasticsearch)

Read in Mattermost API docs (search - SearchFiles)

Shared Channels

class mattermostautodriver.endpoints.shared_channels.SharedChannels(client)[source]

Bases: Base

get_all_shared_channels(team_id, params=None)[source]

Get all shared channels for team.

team_id: Team Id page: The page to select. per_page: The number of sharedchannels per page.

Read in Mattermost API docs (shared_channels - GetAllSharedChannels)

get_shared_channel_remotes_by_remote_cluster(remote_id, params=None)[source]

Get shared channel remotes by remote cluster.

remote_id: The remote cluster GUID exclude_home: Show only those Shared channel remotes that were shared with this server exclude_remote: Show only those Shared channel remotes that were shared from this server page: The page to select per_page: The number of shared channels per page

Read in Mattermost API docs (shared_channels - GetSharedChannelRemotesByRemoteCluster)

get_remote_cluster_info(remote_id)[source]

Get remote cluster info by ID for user.

remote_id: Remote Cluster GUID

Read in Mattermost API docs (shared_channels - GetRemoteClusterInfo)

invite_remote_cluster_to_channel(remote_id, channel_id)[source]

Invites a remote cluster to a channel.

remote_id: The remote cluster GUID channel_id: The channel GUID to invite the remote cluster to

Read in Mattermost API docs (shared_channels - InviteRemoteClusterToChannel)

uninvite_remote_cluster_to_channel(remote_id, channel_id)[source]

Uninvites a remote cluster to a channel.

remote_id: The remote cluster GUID channel_id: The channel GUID to uninvite the remote cluster to

Read in Mattermost API docs (shared_channels - UninviteRemoteClusterToChannel)

Status

class mattermostautodriver.endpoints.status.Status(client)[source]

Bases: Base

get_user_status(user_id)[source]

Get user status

user_id: User ID

Read in Mattermost API docs (status - GetUserStatus)

update_user_status(user_id, options)[source]

Update user status

user_id: User ID user_id: User ID status: User status, can be online, away, offline and dnd dnd_end_time: Time in epoch seconds at which a dnd status would be unset.

Read in Mattermost API docs (status - UpdateUserStatus)

get_users_statuses_by_ids(options)[source]

Get user statuses by id Read in Mattermost API docs (status - GetUsersStatusesByIds)

update_user_custom_status(user_id, options)[source]

Update user custom status

user_id: User ID emoji: Any emoji text: Any custom status text duration: Duration of custom status, can be thirty_minutes, one_hour, four_hours, today, this_week or date_and_time expires_at: The time at which custom status should be expired. It should be in ISO format.

Read in Mattermost API docs (status - UpdateUserCustomStatus)

unset_user_custom_status(user_id)[source]

Unsets user custom status

user_id: User ID

Read in Mattermost API docs (status - UnsetUserCustomStatus)

remove_recent_custom_status(user_id, params)[source]

Delete user’s recent custom status

user_id: User ID emoji: Any emoji text: Any custom status text duration: Duration of custom status, can be thirty_minutes, one_hour, four_hours, today, this_week or date_and_time expires_at: The time at which custom status should be expired. It should be in ISO format.

Read in Mattermost API docs (status - RemoveRecentCustomStatus)

post_user_recent_custom_status_delete(user_id, options)[source]

Delete user’s recent custom status

user_id: User ID emoji: Any emoji text: Any custom status text duration: Duration of custom status, can be thirty_minutes, one_hour, four_hours, today, this_week or date_and_time expires_at: The time at which custom status should be expired. It should be in ISO format.

Read in Mattermost API docs (status - PostUserRecentCustomStatusDelete)

System

class mattermostautodriver.endpoints.system.System(client)[source]

Bases: Base

get_supported_timezone()[source]

Retrieve a list of supported timezones Read in Mattermost API docs (system - GetSupportedTimezone)

get_ping(params=None)[source]

Check system health

get_server_status: Check the status of the database and file storage as well device_id: Check whether this device id can receive push notifications use_rest_semantics: Returns 200 status code even if the server status is unhealthy.

Read in Mattermost API docs (system - GetPing)

get_notices(teamId, params=None)[source]

Get notices for logged in user in specified team

teamId: ID of the team clientVersion: Version of the client (desktop/mobile/web) that issues the request locale: Client locale client: Client type (web/mobile-ios/mobile-android/desktop)

Read in Mattermost API docs (system - GetNotices)

mark_notices_viewed(options)[source]

Update notices as ‘viewed’ Read in Mattermost API docs (system - MarkNoticesViewed)

database_recycle()[source]

Recycle database connections Read in Mattermost API docs (system - DatabaseRecycle)

test_email(options)[source]

Send a test email Read in Mattermost API docs (system - TestEmail)

test_site_url(options)[source]

Checks the validity of a Site URL

site_url: The Site URL to test

Read in Mattermost API docs (system - TestSiteURL)

test_s3_connection(options)[source]

Test AWS S3 connection Read in Mattermost API docs (system - TestS3Connection)

get_config()[source]

Get configuration Read in Mattermost API docs (system - GetConfig)

update_config(options)[source]

Update configuration Read in Mattermost API docs (system - UpdateConfig)

reload_config()[source]

Reload configuration Read in Mattermost API docs (system - ReloadConfig)

get_client_config(params=None)[source]

Get client configuration

format: Must be old, other formats not implemented yet

Read in Mattermost API docs (system - GetClientConfig)

get_environment_config()[source]

Get configuration made through environment variables Read in Mattermost API docs (system - GetEnvironmentConfig)

patch_config(options)[source]

Patch configuration Read in Mattermost API docs (system - PatchConfig)

upload_license_file(files, data=None)[source]

Upload license file

license: The license to be uploaded

Read in Mattermost API docs (system - UploadLicenseFile)

remove_license_file()[source]

Remove license file Read in Mattermost API docs (system - RemoveLicenseFile)

get_client_license(params=None)[source]

Get client license

format: Must be old, other formats not implemented yet

Read in Mattermost API docs (system - GetClientLicense)

Request the license renewal link Read in Mattermost API docs (system - RequestLicenseRenewalLink)

request_trial_license(options)[source]

Request and install a trial license for your server

users: Number of users requested (20% extra is going to be added)

Read in Mattermost API docs (system - RequestTrialLicense)

get_prev_trial_license()[source]

Get last trial license used Read in Mattermost API docs (system - GetPrevTrialLicense)

get_audits(params=None)[source]

Get audits

page: The page to select. per_page: The number of audits per page.

Read in Mattermost API docs (system - GetAudits)

invalidate_caches()[source]

Invalidate all the caches Read in Mattermost API docs (system - InvalidateCaches)

get_logs(params=None)[source]

Get logs

page: The page to select. logs_per_page: The number of logs per page. There is a maximum limit of 10000 logs per page.

Read in Mattermost API docs (system - GetLogs)

post_log(options)[source]

Add log message

level: The error level, ERROR or DEBUG message: Message to send to the server logs

Read in Mattermost API docs (system - PostLog)

get_analytics_old(params=None)[source]

Get analytics

name: Possible values are “standard”, “bot_post_counts_day”, “post_counts_day”, “user_counts_with_posts_day” or “extra_counts” team_id: The team ID to filter the data by

Read in Mattermost API docs (system - GetAnalyticsOld)

set_server_busy()[source]

Set the server busy (high load) flag Read in Mattermost API docs (system - SetServerBusy)

get_server_busy_expires()[source]

Get server busy expiry time. Read in Mattermost API docs (system - GetServerBusyExpires)

clear_server_busy()[source]

Clears the server busy (high load) flag Read in Mattermost API docs (system - ClearServerBusy)

get_redirect_location(params=None)[source]

Get redirect location

url: Url to check

Read in Mattermost API docs (system - GetRedirectLocation)

get_image_by_url()[source]

Get an image by url Read in Mattermost API docs (system - GetImageByUrl)

upgrade_to_enterprise()[source]

Executes an inplace upgrade from Team Edition to Enterprise Edition Read in Mattermost API docs (system - UpgradeToEnterprise)

upgrade_to_enterprise_status()[source]

Get the current status for the inplace upgrade from Team Edition to Enterprise Edition Read in Mattermost API docs (system - UpgradeToEnterpriseStatus)

restart_server()[source]

Restart the system after an upgrade from Team Edition to Enterprise Edition Read in Mattermost API docs (system - RestartServer)

check_integrity()[source]

Perform a database integrity check Read in Mattermost API docs (system - CheckIntegrity)

generate_support_packet(params=None)[source]

Download a zip file which contains helpful and useful information for troubleshooting your mattermost instance.

basic_server_logs: Specifies whether the server should include or exclude log files. Default value is true.

Minimum server version: 9.8.0

plugin_packets: Specifies plugin identifiers whose content should be included in the Support Packet.

Minimum server version: 9.8.0

Read in Mattermost API docs (system - GenerateSupportPacket)

update_marketplace_visited_by_admin(options)[source]

Stores that the Plugin Marketplace has been visited by at least an admin. Read in Mattermost API docs (system - UpdateMarketplaceVisitedByAdmin)

Teams

class mattermostautodriver.endpoints.teams.Teams(client)[source]

Bases: Base

create_team(options)[source]

Create a team

name: Unique handler for a team, will be present in the team URL display_name: Non-unique UI name for the team type: 'O' for open, 'I' for invite only

Read in Mattermost API docs (teams - CreateTeam)

get_all_teams(params=None)[source]

Get teams

page: The page to select. per_page: The number of teams per page. include_total_count: Appends a total count of returned teams inside the response object - ex: { "teams": [], "total_count" : 0 }. exclude_policy_constrained: If set to true, teams which are part of a data retention policy will be excluded. The sysconsole_read_compliance permission is required to use this parameter. Minimum server version: 5.35

Read in Mattermost API docs (teams - GetAllTeams)

get_team(team_id)[source]

Get a team

team_id: Team GUID

Read in Mattermost API docs (teams - GetTeam)

update_team(team_id, options)[source]

Update a team

team_id: Team GUID id: display_name: description: company_name: allowed_domains: invite_id: allow_open_invite:

Read in Mattermost API docs (teams - UpdateTeam)

soft_delete_team(team_id)[source]

Delete a team

team_id: Team GUID

Read in Mattermost API docs (teams - SoftDeleteTeam)

patch_team(team_id, options)[source]

Patch a team

team_id: Team GUID display_name: description: company_name: invite_id: allow_open_invite:

Read in Mattermost API docs (teams - PatchTeam)

update_team_privacy(team_id, options)[source]

Update teams’s privacy

team_id: Team GUID privacy: Team privacy setting: ‘O’ for a public (open) team, ‘I’ for a private (invitation only) team

Read in Mattermost API docs (teams - UpdateTeamPrivacy)

restore_team(team_id)[source]

Restore a team

team_id: Team GUID

Read in Mattermost API docs (teams - RestoreTeam)

get_team_by_name(name)[source]

Get a team by name

name: Team Name

Read in Mattermost API docs (teams - GetTeamByName)

search_teams(options)[source]

Search teams

term: The search term to match against the name or display name of teams page: The page number to return, if paginated. If this parameter is not present with the per_page parameter then the results will be returned un-paged. per_page: The number of entries to return per page, if paginated. If this parameter is not present with the page parameter then the results will be returned un-paged. allow_open_invite: Filters results to teams where allow_open_invite is set to true or false, excludes group constrained channels if this filter option is passed. If this filter option is not passed then the query will remain unchanged. Minimum server version: 5.28

group_constrained: Filters results to teams where group_constrained is set to true or false, returns the union of results when used with allow_open_invite If the filter option is not passed then the query will remain unchanged. Minimum server version: 5.28

exclude_policy_constrained: If set to true, only teams which do not have a granular retention policy assigned to them will be returned. The sysconsole_read_compliance_data_retention permission is required to use this parameter. Minimum server version: 5.35

Read in Mattermost API docs (teams - SearchTeams)

team_exists(name)[source]

Check if team exists

name: Team Name

Read in Mattermost API docs (teams - TeamExists)

get_teams_for_user(user_id)[source]

Get a user’s teams

user_id: User GUID

Read in Mattermost API docs (teams - GetTeamsForUser)

get_team_members(team_id, params=None)[source]

Get team members

team_id: Team GUID page: The page to select. per_page: The number of users per page. sort: To sort by Username, set to ‘Username’, otherwise sort is by ‘UserID’ exclude_deleted_users: Excludes deleted users from the results

Read in Mattermost API docs (teams - GetTeamMembers)

add_team_member(team_id, options)[source]

Add user to team

team_id: Team GUID team_id: user_id:

Read in Mattermost API docs (teams - AddTeamMember)

add_team_member_from_invite()[source]

Add user to team from invite Read in Mattermost API docs (teams - AddTeamMemberFromInvite)

add_team_members(team_id, options)[source]

Add multiple users to team

team_id: Team GUID

Read in Mattermost API docs (teams - AddTeamMembers)

get_team_members_for_user(user_id)[source]

Get team members for a user

user_id: User GUID

Read in Mattermost API docs (teams - GetTeamMembersForUser)

get_team_member(team_id, user_id)[source]

Get a team member

team_id: Team GUID user_id: User GUID

Read in Mattermost API docs (teams - GetTeamMember)

remove_team_member(team_id, user_id)[source]

Remove user from team

team_id: Team GUID user_id: User GUID

Read in Mattermost API docs (teams - RemoveTeamMember)

get_team_members_by_ids(team_id, options)[source]

Get team members by ids

team_id: Team GUID

Read in Mattermost API docs (teams - GetTeamMembersByIds)

get_team_stats(team_id)[source]

Get a team stats

team_id: Team GUID

Read in Mattermost API docs (teams - GetTeamStats)

regenerate_team_invite_id(team_id)[source]

Regenerate the Invite ID from a Team

team_id: Team GUID

Read in Mattermost API docs (teams - RegenerateTeamInviteId)

get_team_icon(team_id)[source]

Get the team icon

team_id: Team GUID

Read in Mattermost API docs (teams - GetTeamIcon)

set_team_icon(team_id, files, data=None)[source]

Sets the team icon

team_id: Team GUID image: The image to be uploaded

Read in Mattermost API docs (teams - SetTeamIcon)

remove_team_icon(team_id)[source]

Remove the team icon

team_id: Team GUID

Read in Mattermost API docs (teams - RemoveTeamIcon)

update_team_member_roles(team_id, user_id, options)[source]

Update a team member roles

team_id: Team GUID user_id: User GUID roles:

Read in Mattermost API docs (teams - UpdateTeamMemberRoles)

update_team_member_scheme_roles(team_id, user_id, options)[source]

Update the scheme-derived roles of a team member.

team_id: Team GUID user_id: User GUID scheme_admin: scheme_user:

Read in Mattermost API docs (teams - UpdateTeamMemberSchemeRoles)

get_teams_unread_for_user(user_id, params=None)[source]

Get team unreads for a user

user_id: User GUID exclude_team: Optional team id to be excluded from the results include_collapsed_threads: Boolean to determine whether the collapsed threads should be included or not

Read in Mattermost API docs (teams - GetTeamsUnreadForUser)

get_team_unread(user_id, team_id)[source]

Get unreads for a team

user_id: User GUID team_id: Team GUID

Read in Mattermost API docs (teams - GetTeamUnread)

invite_users_to_team(team_id, options)[source]

Invite users to the team by email

team_id: Team GUID

Read in Mattermost API docs (teams - InviteUsersToTeam)

invite_guests_to_team(team_id, options)[source]

Invite guests to the team by email

team_id: Team GUID emails: List of emails channels: List of channel ids message: Message to include in the invite

Read in Mattermost API docs (teams - InviteGuestsToTeam)

invalidate_email_invites()[source]

Invalidate active email invitations Read in Mattermost API docs (teams - InvalidateEmailInvites)

import_team(team_id, files, data=None)[source]

Import a Team from other application

team_id: Team GUID file: A file to be uploaded in zip format. filesize: The size of the zip file to be imported. importFrom: String that defines from which application the team was exported to be imported into Mattermost.

Read in Mattermost API docs (teams - ImportTeam)

get_team_invite_info(invite_id)[source]

Get invite info for a team

invite_id: Invite id for a team

Read in Mattermost API docs (teams - GetTeamInviteInfo)

update_team_scheme(team_id, options)[source]

Set a team’s scheme

team_id: Team GUID scheme_id: The ID of the scheme.

Read in Mattermost API docs (teams - UpdateTeamScheme)

team_members_minus_group_members(team_id, params=None)[source]

Team members minus group members.

team_id: Team GUID group_ids: A comma-separated list of group ids. page: The page to select. per_page: The number of users per page.

Read in Mattermost API docs (teams - TeamMembersMinusGroupMembers)

search_files(team_id, data)[source]

Search files in a team

team_id: Team GUID terms: The search terms as inputed by the user. To search for files from a user include from:someusername, using a user’s username. To search in a specific channel include in:somechannel, using the channel name (not the display name). To search for specific extensions included ext:extension. is_or_search: Set to true if an Or search should be performed vs an And search. time_zone_offset: Offset from UTC of user timezone for date searches. include_deleted_channels: Set to true if deleted channels should be included in the search. (archived channels) page: The page to select. (Only works with Elasticsearch) per_page: The number of posts per page. (Only works with Elasticsearch)

Read in Mattermost API docs (teams - SearchFiles)

Terms Of Service

class mattermostautodriver.endpoints.terms_of_service.TermsOfService(client)[source]

Bases: Base

register_terms_of_service_action(user_id, options)[source]

Records user action when they accept or decline custom terms of service

user_id: User GUID serviceTermsId: terms of service ID on which the user is acting on accepted: true or false, indicates whether the user accepted or rejected the terms of service.

Read in Mattermost API docs (terms_of_service - RegisterTermsOfServiceAction)

get_user_terms_of_service(user_id)[source]

Fetches user’s latest terms of service action if the latest action was for acceptance.

user_id: User GUID

Read in Mattermost API docs (terms_of_service - GetUserTermsOfService)

get_terms_of_service()[source]

Get latest terms of service Read in Mattermost API docs (terms_of_service - GetTermsOfService)

create_terms_of_service()[source]

Creates a new terms of service Read in Mattermost API docs (terms_of_service - CreateTermsOfService)

Threads

class mattermostautodriver.endpoints.threads.Threads(client)[source]

Bases: Base

get_user_threads(user_id, team_id, params=None)[source]

Get all threads that user is following

user_id: The ID of the user. This can also be “me” which will point to the current user. team_id: The ID of the team in which the thread is. since: Since filters the threads based on their LastUpdateAt timestamp. deleted: Deleted will specify that even deleted threads should be returned (For mobile sync). extended: Extended will enrich the response with participant details. page: Page specifies which part of the results to return, by per_page. per_page: The size of the returned chunk of results. totalsOnly: Setting this to true will only return the total counts. threadsOnly: Setting this to true will only return threads.

Read in Mattermost API docs (threads - GetUserThreads)

get_thread_mention_counts_by_channel(user_id, team_id)[source]

Get all unread mention counts from followed threads, per-channel

user_id: The ID of the user. This can also be “me” which will point to the current user. team_id: The ID of the team in which the thread is.

Read in Mattermost API docs (threads - GetThreadMentionCountsByChannel)

update_threads_read_for_user(user_id, team_id)[source]

Mark all threads that user is following as read

user_id: The ID of the user. This can also be “me” which will point to the current user. team_id: The ID of the team in which the thread is.

Read in Mattermost API docs (threads - UpdateThreadsReadForUser)

update_thread_read_for_user(user_id, team_id, thread_id, timestamp)[source]

Mark a thread that user is following read state to the timestamp

user_id: The ID of the user. This can also be “me” which will point to the current user. team_id: The ID of the team in which the thread is. thread_id: The ID of the thread to update timestamp: The timestamp to which the thread’s “last read” state will be reset.

Read in Mattermost API docs (threads - UpdateThreadReadForUser)

set_thread_unread_by_post_id(user_id, team_id, thread_id, post_id)[source]

Mark a thread that user is following as unread based on a post id

user_id: The ID of the user. This can also be “me” which will point to the current user. team_id: The ID of the team in which the thread is. thread_id: The ID of the thread to update post_id: The ID of a post belonging to the thread to mark as unread.

Read in Mattermost API docs (threads - SetThreadUnreadByPostId)

start_following_thread(user_id, team_id, thread_id)[source]

Start following a thread

user_id: The ID of the user. This can also be “me” which will point to the current user. team_id: The ID of the team in which the thread is. thread_id: The ID of the thread to follow

Read in Mattermost API docs (threads - StartFollowingThread)

stop_following_thread(user_id, team_id, thread_id)[source]

Stop following a thread

user_id: The ID of the user. This can also be “me” which will point to the current user. team_id: The ID of the team in which the thread is. thread_id: The ID of the thread to update

Read in Mattermost API docs (threads - StopFollowingThread)

get_user_thread(user_id, team_id, thread_id)[source]

Get a thread followed by the user

user_id: The ID of the user. This can also be “me” which will point to the current user. team_id: The ID of the team in which the thread is. thread_id: The ID of the thread to follow

Read in Mattermost API docs (threads - GetUserThread)

Timeline

class mattermostautodriver.endpoints.timeline.Timeline(client)[source]

Bases: Base

remove_timeline_event(id, event_id)[source]

Remove a timeline event from the playbook run

id: ID of the playbook run whose timeline event will be modified. event_id: ID of the timeline event to be deleted

Read in Mattermost API docs (Timeline - removeTimelineEvent)

Uploads

class mattermostautodriver.endpoints.uploads.Uploads(client)[source]

Bases: Base

create_upload(options)[source]

Create an upload

channel_id: The ID of the channel to upload to. filename: The name of the file to upload. file_size: The size of the file to upload in bytes.

Read in Mattermost API docs (uploads - CreateUpload)

get_upload(upload_id)[source]

Get an upload session

upload_id: The ID of the upload session to get.

Read in Mattermost API docs (uploads - GetUpload)

upload_data(upload_id, files, options=None)[source]

Perform a file upload

upload_id: The ID of the upload session the data belongs to.

Read in Mattermost API docs (uploads - UploadData)

Usage

class mattermostautodriver.endpoints.usage.Usage(client)[source]

Bases: Base

get_posts_usage()[source]

Get current usage of posts Read in Mattermost API docs (usage - GetPostsUsage)

get_storage_usage()[source]

Get the total file storage usage for the instance in bytes. Read in Mattermost API docs (usage - GetStorageUsage)

Users

class mattermostautodriver.endpoints.users.Users(client)[source]

Bases: Base

login(options)[source]

Login to Mattermost server

id: login_id: token: device_id: ldap_only: password: The password used for email authentication.

Read in Mattermost API docs (users - Login)

login_by_cws_token(options)[source]

Auto-Login to Mattermost server using CWS token

login_id: cws_token:

Read in Mattermost API docs (users - LoginByCwsToken)

logout()[source]

Logout from the Mattermost server Read in Mattermost API docs (users - Logout)

create_user(options)[source]

Create a user

email: username: first_name: last_name: nickname: position: timezone: auth_data: Service-specific authentication data, such as email address. auth_service: The authentication service, one of “email”, “gitlab”, “ldap”, “saml”, “office365”, “google”, and “”. password: The password used for email authentication. locale: props: notify_props:

Read in Mattermost API docs (users - CreateUser)

get_users(params=None)[source]

Get users

page: The page to select. per_page: The number of users per page. in_team: The ID of the team to get users for. not_in_team: The ID of the team to exclude users for. Must not be used with “in_team” query parameter. in_channel: The ID of the channel to get users for. not_in_channel: The ID of the channel to exclude users for. Must be used with “in_channel” query parameter. in_group: The ID of the group to get users for. Must have manage_system permission. group_constrained: When used with not_in_channel or not_in_team, returns only the users that are allowed to join the channel or team based on its group constrains. without_team: Whether or not to list users that are not on any team. This option takes precendence over in_team, in_channel, and not_in_channel. active: Whether or not to list only users that are active. This option cannot be used along with the inactive option. inactive: Whether or not to list only users that are deactivated. This option cannot be used along with the active option. role: Returns users that have this role. sort: Sort is only available in conjunction with certain options below. The paging parameter is also always available.

##### in_team Can be “”, “last_activity_at” or “create_at”. When left blank, sorting is done by username. Note that when “last_activity_at” is specified, an additional “last_activity_at” field will be returned in the response packet. Minimum server version: 4.0 ##### in_channel Can be “”, “status”. When left blank, sorting is done by username. status will sort by User’s current status (Online, Away, DND, Offline), then by Username. Minimum server version: 4.7 ##### in_group Can be “”, “display_name”. When left blank, sorting is done by username. display_name will sort alphabetically by user’s display name. Minimum server version: 7.7

roles: Comma separated string used to filter users based on any of the specified system roles

Example: ?roles=system_admin,system_user will return users that are either system admins or system users

Minimum server version: 5.26

channel_roles: Comma separated string used to filter users based on any of the specified channel roles, can only be used in conjunction with in_channel

Example: ?in_channel=4eb6axxw7fg3je5iyasnfudc5y&channel_roles=channel_user will return users that are only channel users and not admins or guests

Minimum server version: 5.26

team_roles: Comma separated string used to filter users based on any of the specified team roles, can only be used in conjunction with in_team

Example: ?in_team=4eb6axxw7fg3je5iyasnfudc5y&team_roles=team_user will return users that are only team users and not admins or guests

Minimum server version: 5.26

Read in Mattermost API docs (users - GetUsers)

permanent_delete_all_users()[source]

Permanent delete all users Read in Mattermost API docs (users - PermanentDeleteAllUsers)

get_users_by_ids(options)[source]

Get users by ids Read in Mattermost API docs (users - GetUsersByIds)

get_users_by_group_channel_ids(options)[source]

Get users by group channels ids Read in Mattermost API docs (users - GetUsersByGroupChannelIds)

get_users_by_usernames(options)[source]

Get users by usernames Read in Mattermost API docs (users - GetUsersByUsernames)

search_users(options)[source]

Search users

term: The term to match against username, full name, nickname and email team_id: If provided, only search users on this team not_in_team_id: If provided, only search users not on this team in_channel_id: If provided, only search users in this channel not_in_channel_id: If provided, only search users not in this channel. Must specifiy team_id when using this option in_group_id: If provided, only search users in this group. Must have manage_system permission. group_constrained: When used with not_in_channel_id or not_in_team_id, returns only the users that are allowed to join the channel or team based on its group constrains. allow_inactive: When true, include deactivated users in the results without_team: Set this to true if you would like to search for users that are not on a team. This option takes precendence over team_id, in_channel_id, and not_in_channel_id. limit: The maximum number of users to return in the results

Available as of server version 5.6. Defaults to ``100`` if not provided or on an earlier server version.

Read in Mattermost API docs (users - SearchUsers)

autocomplete_users(params=None)[source]

Autocomplete users

team_id: Team ID channel_id: Channel ID name: Username, nickname first name or last name limit: The maximum number of users to return in each subresult

Available as of server version 5.6. Defaults to ``100`` if not provided or on an earlier server version.

Read in Mattermost API docs (users - AutocompleteUsers)

get_known_users()[source]

Get user IDs of known users Read in Mattermost API docs (users - GetKnownUsers)

get_total_users_stats()[source]

Get total count of users in the system Read in Mattermost API docs (users - GetTotalUsersStats)

get_total_users_stats_filtered(params=None)[source]

Get total count of users in the system matching the specified filters

in_team: The ID of the team to get user stats for. in_channel: The ID of the channel to get user stats for. include_deleted: If deleted accounts should be included in the count. include_bots: If bot accounts should be included in the count. roles: Comma separated string used to filter users based on any of the specified system roles

Example: ?roles=system_admin,system_user will include users that are either system admins or system users

channel_roles: Comma separated string used to filter users based on any of the specified channel roles, can only be used in conjunction with in_channel

Example: ?in_channel=4eb6axxw7fg3je5iyasnfudc5y&channel_roles=channel_user will include users that are only channel users and not admins or guests

team_roles: Comma separated string used to filter users based on any of the specified team roles, can only be used in conjunction with in_team

Example: ?in_team=4eb6axxw7fg3je5iyasnfudc5y&team_roles=team_user will include users that are only team users and not admins or guests

Read in Mattermost API docs (users - GetTotalUsersStatsFiltered)

get_user(user_id)[source]

Get a user

user_id: User GUID. This can also be “me” which will point to the current user.

Read in Mattermost API docs (users - GetUser)

update_user(user_id, options)[source]

Update a user

user_id: User GUID id: email: username: first_name: last_name: nickname: locale: position: timezone: props: notify_props:

Read in Mattermost API docs (users - UpdateUser)

delete_user(user_id)[source]

Deactivate a user account.

user_id: User GUID

Read in Mattermost API docs (users - DeleteUser)

patch_user(user_id, options)[source]

Patch a user

user_id: User GUID email: username: first_name: last_name: nickname: locale: position: timezone: props: notify_props:

Read in Mattermost API docs (users - PatchUser)

update_user_roles(user_id, options)[source]

Update a user’s roles

user_id: User GUID roles:

Read in Mattermost API docs (users - UpdateUserRoles)

update_user_active(user_id, options)[source]

Update user active status

user_id: User GUID active:

Read in Mattermost API docs (users - UpdateUserActive)

get_profile_image(user_id, params=None)[source]

Get user’s profile image

user_id: User GUID _: Not used by the server. Clients can pass in the last picture update time of the user to potentially take advantage of caching

Read in Mattermost API docs (users - GetProfileImage)

set_profile_image(user_id, files, data=None)[source]

Set user’s profile image

user_id: User GUID image: The image to be uploaded

Read in Mattermost API docs (users - SetProfileImage)

set_default_profile_image(user_id)[source]

Delete user’s profile image

user_id: User GUID

Read in Mattermost API docs (users - SetDefaultProfileImage)

get_default_profile_image(user_id)[source]

Return user’s default (generated) profile image

user_id: User GUID

Read in Mattermost API docs (users - GetDefaultProfileImage)

get_user_by_username(username)[source]

Get a user by username

username: Username

Read in Mattermost API docs (users - GetUserByUsername)

reset_password(options)[source]

Reset password

code: The recovery code new_password: The new password for the user

Read in Mattermost API docs (users - ResetPassword)

update_user_mfa(user_id, options)[source]

Update a user’s MFA

user_id: User GUID activate: Use true to activate, false to deactivate code: The code produced by your MFA client. Required if activate is true

Read in Mattermost API docs (users - UpdateUserMfa)

generate_mfa_secret(user_id)[source]

Generate MFA secret

user_id: User GUID

Read in Mattermost API docs (users - GenerateMfaSecret)

demote_user_to_guest(user_id)[source]

Demote a user to a guest

user_id: User GUID

Read in Mattermost API docs (users - DemoteUserToGuest)

promote_guest_to_user(user_id)[source]

Promote a guest to user

user_id: User GUID

Read in Mattermost API docs (users - PromoteGuestToUser)

convert_user_to_bot(user_id)[source]

Convert a user into a bot

user_id: User GUID

Read in Mattermost API docs (users - ConvertUserToBot)

check_user_mfa(options)[source]

Check MFA

login_id: The email or username used to login

Read in Mattermost API docs (users - CheckUserMfa)

update_user_password(user_id, options)[source]

Update a user’s password

user_id: User GUID current_password: The current password for the user new_password: The new password for the user

Read in Mattermost API docs (users - UpdateUserPassword)

send_password_reset_email(options)[source]

Send password reset email

email: The email of the user

Read in Mattermost API docs (users - SendPasswordResetEmail)

get_user_by_email(email)[source]

Get a user by email

email: User Email

Read in Mattermost API docs (users - GetUserByEmail)

get_sessions(user_id)[source]

Get user’s sessions

user_id: User GUID

Read in Mattermost API docs (users - GetSessions)

revoke_session(user_id, options)[source]

Revoke a user session

user_id: User GUID session_id: The session GUID to revoke.

Read in Mattermost API docs (users - RevokeSession)

revoke_all_sessions(user_id)[source]

Revoke all active sessions for a user

user_id: User GUID

Read in Mattermost API docs (users - RevokeAllSessions)

attach_device_id(options)[source]

Attach mobile device

device_id: Mobile device id. For Android prefix the id with android: and Apple with apple:

Read in Mattermost API docs (users - AttachDeviceId)

get_user_audits(user_id)[source]

Get user’s audits

user_id: User GUID

Read in Mattermost API docs (users - GetUserAudits)

verify_user_email_without_token(user_id)[source]

Verify user email by ID

user_id: User GUID

Read in Mattermost API docs (users - VerifyUserEmailWithoutToken)

verify_user_email(options)[source]

Verify user email

token: The token given to validate the email

Read in Mattermost API docs (users - VerifyUserEmail)

send_verification_email(options)[source]

Send verification email

email: Email of a user

Read in Mattermost API docs (users - SendVerificationEmail)

switch_account_type(options)[source]

Switch login method

current_service: The service the user currently uses to login new_service: The service the user will use to login email: The email of the user password: The password used with the current service mfa_code: The MFA code of the current service ldap_id: The LDAP/AD id of the user

Read in Mattermost API docs (users - SwitchAccountType)

create_user_access_token(user_id, options)[source]

Create a user access token

user_id: User GUID description: A description of the token usage

Read in Mattermost API docs (users - CreateUserAccessToken)

get_user_access_tokens_for_user(user_id, params=None)[source]

Get user access tokens

user_id: User GUID page: The page to select. per_page: The number of tokens per page.

Read in Mattermost API docs (users - GetUserAccessTokensForUser)

get_user_access_tokens(params=None)[source]

Get user access tokens

page: The page to select. per_page: The number of tokens per page.

Read in Mattermost API docs (users - GetUserAccessTokens)

revoke_user_access_token(options)[source]

Revoke a user access token

token_id: The user access token GUID to revoke

Read in Mattermost API docs (users - RevokeUserAccessToken)

get_user_access_token(token_id)[source]

Get a user access token

token_id: User access token GUID

Read in Mattermost API docs (users - GetUserAccessToken)

disable_user_access_token(options)[source]

Disable personal access token

token_id: The personal access token GUID to disable

Read in Mattermost API docs (users - DisableUserAccessToken)

enable_user_access_token(options)[source]

Enable personal access token

token_id: The personal access token GUID to enable

Read in Mattermost API docs (users - EnableUserAccessToken)

search_user_access_tokens(options)[source]

Search tokens

term: The search term to match against the token id, user id or username.

Read in Mattermost API docs (users - SearchUserAccessTokens)

update_user_auth(user_id, options)[source]

Update a user’s authentication method

user_id: User GUID

Read in Mattermost API docs (users - UpdateUserAuth)

register_terms_of_service_action(user_id, options)[source]

Records user action when they accept or decline custom terms of service

user_id: User GUID serviceTermsId: terms of service ID on which the user is acting on accepted: true or false, indicates whether the user accepted or rejected the terms of service.

Read in Mattermost API docs (users - RegisterTermsOfServiceAction)

get_user_terms_of_service(user_id)[source]

Fetches user’s latest terms of service action if the latest action was for acceptance.

user_id: User GUID

Read in Mattermost API docs (users - GetUserTermsOfService)

revoke_sessions_from_all_users()[source]

Revoke all sessions from all users. Read in Mattermost API docs (users - RevokeSessionsFromAllUsers)

publish_user_typing(user_id, options=None)[source]

Publish a user typing websocket event.

user_id: User GUID channel_id: The id of the channel to which to direct the typing event. parent_id: The optional id of the root post of the thread to which the user is replying. If unset, the typing event is directed at the entire channel.

Read in Mattermost API docs (users - PublishUserTyping)

get_uploads_for_user(user_id)[source]

Get uploads for a user

user_id: The ID of the user. This can also be “me” which will point to the current user.

Read in Mattermost API docs (users - GetUploadsForUser)

get_channel_members_with_team_data_for_user(user_id, params=None)[source]

Get all channel members from all teams for a user

user_id: The ID of the user. This can also be “me” which will point to the current user. page: Page specifies which part of the results to return, by perPage. per_page: The size of the returned chunk of results.

Read in Mattermost API docs (users - GetChannelMembersWithTeamDataForUser)

migrate_auth_to_ldap(options=None)[source]

Migrate user accounts authentication type to LDAP.

from: The current authentication type for the matched users. match_field: Foreign user field name to match. force:

Read in Mattermost API docs (users - MigrateAuthToLdap)

migrate_auth_to_saml(options=None)[source]

Migrate user accounts authentication type to SAML.

from: The current authentication type for the matched users. matches: Users map. auto:

Read in Mattermost API docs (users - MigrateAuthToSaml)

get_users_with_invalid_emails(params=None)[source]

Get users with invalid emails

page: The page to select. per_page: The number of users per page.

Read in Mattermost API docs (users - GetUsersWithInvalidEmails)

convert_bot_to_user(bot_user_id, options)[source]

Convert a bot into a user

bot_user_id: Bot user ID email: username: password: first_name: last_name: nickname: locale: position: props: notify_props:

Read in Mattermost API docs (users - ConvertBotToUser)

get_users_for_reporting(params=None)[source]

Get a list of paged and sorted users for admin reporting purposes

sort_column: The column to sort the users by. Must be one of (“CreateAt”, “Username”, “FirstName”, “LastName”, “Nickname”, “Email”) or the API will return an error. direction: The direction in which to accept paging values from. Will return values ahead of the cursor if “up”, and below the cursor if “down”. Default is “down”. sort_direction: The sorting direction. Must be one of (“asc”, “desc”). Will default to ‘asc’ if not specified or the input is invalid. page_size: The maximum number of users to return. from_column_value: The value of the sorted column corresponding to the cursor to read from. Should be blank for the first page asked for. from_id: The value of the user id corresponding to the cursor to read from. Should be blank for the first page asked for. date_range: The date range of the post statistics to display. Must be one of (“last30days”, “previousmonth”, “last6months”, “alltime”). Will default to ‘alltime’ if the input is not valid. role_filter: Filter users by their role. team_filter: Filter users by a specified team ID. has_no_team: If true, show only users that have no team. Will ignore provided “team_filter” if true. hide_active: If true, show only users that are inactive. Cannot be used at the same time as “hide_inactive” hide_inactive: If true, show only users that are active. Cannot be used at the same time as “hide_active” search_term: A filtering search term that allows filtering by Username, FirstName, LastName, Nickname or Email

Read in Mattermost API docs (users - GetUsersForReporting)

get_user_count_for_reporting(params=None)[source]

Gets the full count of users that match the filter.

role_filter: Filter users by their role. team_filter: Filter users by a specified team ID. has_no_team: If true, show only users that have no team. Will ignore provided “team_filter” if true. hide_active: If true, show only users that are inactive. Cannot be used at the same time as “hide_inactive” hide_inactive: If true, show only users that are active. Cannot be used at the same time as “hide_active” search_term: A filtering search term that allows filtering by Username, FirstName, LastName, Nickname or Email

Read in Mattermost API docs (users - GetUserCountForReporting)

get_server_limits()[source]

Gets the server limits for the server Read in Mattermost API docs (users - GetServerLimits)

Webhooks

class mattermostautodriver.endpoints.webhooks.Webhooks(client)[source]

Bases: Base

create_incoming_webhook(options)[source]

Create an incoming webhook

channel_id: The ID of a public channel or private group that receives the webhook payloads. user_id: The ID of the owner of the webhook if different than the requester. Required for [local mode](https://docs.mattermost.com/administration/mmctl-cli-tool.html#local-mode). display_name: The display name for this incoming webhook description: The description for this incoming webhook username: The username this incoming webhook will post as. icon_url: The profile picture this incoming webhook will use when posting.

Read in Mattermost API docs (webhooks - CreateIncomingWebhook)

get_incoming_webhooks(params=None)[source]

List incoming webhooks

page: The page to select. per_page: The number of hooks per page. team_id: The ID of the team to get hooks for. include_total_count: Appends a total count of returned hooks inside the response object - ex: { "incoming_webhooks": [], "total_count": 0 }.

Read in Mattermost API docs (webhooks - GetIncomingWebhooks)

get_incoming_webhook(hook_id)[source]

Get an incoming webhook

hook_id: Incoming Webhook GUID

Read in Mattermost API docs (webhooks - GetIncomingWebhook)

delete_incoming_webhook(hook_id)[source]

Delete an incoming webhook

hook_id: Incoming webhook GUID

Read in Mattermost API docs (webhooks - DeleteIncomingWebhook)

update_incoming_webhook(hook_id, options)[source]

Update an incoming webhook

hook_id: Incoming Webhook GUID id: Incoming webhook GUID channel_id: The ID of a public channel or private group that receives the webhook payloads. display_name: The display name for this incoming webhook description: The description for this incoming webhook username: The username this incoming webhook will post as. icon_url: The profile picture this incoming webhook will use when posting.

Read in Mattermost API docs (webhooks - UpdateIncomingWebhook)

create_outgoing_webhook(options)[source]

Create an outgoing webhook

team_id: The ID of the team that the webhook watchs channel_id: The ID of a public channel that the webhook watchs creator_id: The ID of the owner of the webhook if different than the requester. Required in [local mode](https://docs.mattermost.com/administration/mmctl-cli-tool.html#local-mode). description: The description for this outgoing webhook display_name: The display name for this outgoing webhook trigger_words: List of words for the webhook to trigger on trigger_when: When to trigger the webhook, 0 when a trigger word is present at all and 1 if the message starts with a trigger word callback_urls: The URLs to POST the payloads to when the webhook is triggered content_type: The format to POST the data in, either application/json or application/x-www-form-urlencoded

Read in Mattermost API docs (webhooks - CreateOutgoingWebhook)

get_outgoing_webhooks(params=None)[source]

List outgoing webhooks

page: The page to select. per_page: The number of hooks per page. team_id: The ID of the team to get hooks for. channel_id: The ID of the channel to get hooks for.

Read in Mattermost API docs (webhooks - GetOutgoingWebhooks)

get_outgoing_webhook(hook_id)[source]

Get an outgoing webhook

hook_id: Outgoing webhook GUID

Read in Mattermost API docs (webhooks - GetOutgoingWebhook)

delete_outgoing_webhook(hook_id)[source]

Delete an outgoing webhook

hook_id: Outgoing webhook GUID

Read in Mattermost API docs (webhooks - DeleteOutgoingWebhook)

update_outgoing_webhook(hook_id, options)[source]

Update an outgoing webhook

hook_id: outgoing Webhook GUID id: Outgoing webhook GUID channel_id: The ID of a public channel or private group that receives the webhook payloads. display_name: The display name for this incoming webhook description: The description for this incoming webhook

Read in Mattermost API docs (webhooks - UpdateOutgoingWebhook)

regen_outgoing_hook_token(hook_id)[source]

Regenerate the token for the outgoing webhook.

hook_id: Outgoing webhook GUID

Read in Mattermost API docs (webhooks - RegenOutgoingHookToken)