CHANGELOG

11.11.0

Code

  • Backwards incompatible: Endpoints using HTTP methods other than GET/HEAD now expose their query parameters too. Previously the endpoint generator only extracted query parameters for GET/HEAD requests, silently dropping them for e.g. POST endpoints, which made it impossible to use the affected parameters at all. 21 operations gain new arguments, such as set_online/silent on posts.create_post, permanent on teams.soft_delete_team and t/iid on users.create_user. Query parameters that the API specification marks as required become required positional arguments placed before the request payload, changing the signature of the outgoing OAuth connection methods (create/update/validate/delete_outgoing_o_auth_connection gain a leading team_id), ldap.test_ldap_diagnostics (test), teams.add_team_member_from_invite (token) and plugins.install_plugin_from_url (plugin_download_url). Update positional calls to these methods accordingly.

  • Backwards incompatible: Parameter defaults from the API specification are no longer baked into the generated method signatures and transmitted with every request. In OpenAPI a default documents the value the server applies when a parameter is omitted, so optional parameters now default to None and are left out of the request entirely, letting the server-side default take effect (previously e.g. users.get_users() always sent page=0&per_page=60 explicitly). The documented server-side defaults are noted in the method docstrings instead. Parameters that the specification marks as required while also carrying a default are now required positional arguments; the server rejects requests without them with HTTP 400, so their previous optional appearance was cosmetic: limit on the access control policy listings (which also moved before the optional after - update positional calls) only worked because the driver silently sent the specification’s value, group_ids on teams.team_members_minus_group_members / channels.channel_members_minus_group_members sent an empty string the server always rejected, making the methods unusable without passing it explicitly, and new_state on playbook_runs.item_set_state sent an empty string.

  • Endpoints declaring a JSON request body now send an empty object ({}) when all their optional body parameters are left out, instead of sending no body at all. Several endpoints (e.g. saml.reset_saml_auth_data_to_email) reject a bodiless request with HTTP 400.

  • Fix regenerating endpoints overwriting endpoints/_base.py and dropping the FileType definition, which made all endpoint modules fail to import. This broke the 11.10.0 and 11.10.1 packages published to PyPI, which have been yanked. This release is the first working package since 11.9.0 and contains every change listed here.

  • Automatically retry requests that fail due to rate limiting or transient errors. HTTP 429 responses are retried for all requests, honoring the Retry-After / X-RateLimit-Reset headers in their delay-seconds, HTTP-date and unix timestamp forms. Connection errors and 502/503/504 responses are only retried for idempotent requests (GET, PUT, DELETE, HEAD) to avoid e.g. duplicating posted messages. Behavior is controlled by the new driver options max_retries (default 3, 0 disables retrying) and retry_max_sleep (default 30 seconds, caps a single wait between retries). Requests carrying files or a streaming request body are never retried automatically, as their content is consumed when the request is first sent.

  • Backwards incompatible: HTTP 429 responses now raise the new TooManyRequests exception, which exposes the server provided wait time as its retry_after attribute. Previously a 429 raised UnknownMattermostError or InvalidMattermostError depending on the response body.

Documentation

  • Document the automatic retry behavior and the TooManyRequests exception.

  • Remove duplicated parameter entries from the docstrings of methods that accept the same value in more than one request location (files.upload_file, status.update_user_status, teams.add_team_member and channels.convert_group_message_to_channel).

Maintenance

  • Fix websocket heartbeat task leak on reconnect (@lizakoch)

  • Add a pytest based test suite for the HTTP client and run it on pull requests in CI.

  • Guard against publishing an unusable package: the test suite now imports every module and constructs the drivers, pull requests and the release workflow run it against the built wheel, and the automated release check verifies the regenerated package before tagging it.

11.8.1

Code

  • Backwards incompatible: Remove the deprecated dictionary-based Driver and AsyncDriver classes along with the underlying endpoints_old interface and its generator (bin/generate_endpoints_ast_deprecated.py). Driver and AsyncDriver are no longer importable from mattermostautodriver. Use TypedDriver / AsyncTypedDriver with explicit keyword arguments instead. See the migration docs.

Documentation

  • Rewrite the API migration page to document the removal of the dictionary-based interface (previously the “API Deprecation” page).

Warning

The dictionary-based Driver / AsyncDriver interface, deprecated since 10.8.2, has been removed in version 11.8.1. Because this project follows the Mattermost server version rather than semantic versioning, this backwards-incompatible removal is not signalled by the version number. Code still using Driver, AsyncDriver or the options= dictionary argument must switch to TypedDriver / AsyncTypedDriver with explicit arguments.

10.12.0

Code

  • Add MattermostError base exception class

  • Add ÌnvalidMattermostError for mattermost errors returning invalid error format

  • Add UnknownMattermostError for unknown status codes

  • Add status_code, request_id, error_id and is_oauth_error parameters to all exceptions (except for InvalidMattermostError)

10.8.2

Code

  • Remove deprecated basepath connection argument (backwards incompatible change)

Documentation

  • Examples of a sync and async client have been added to the documentation

Maintenance

  • API breaking changes - A new endpoint interface is now in place that exposes individual API arguments. See the API deprecation docs for more information.

Warning

Starting with version 10.8.2 this project now follows releases of the official Mattermost server. This changelog will also no longer document API changes as those are available as part of release notes of the Mattermost project.

This changelog will therefore only include changes that concern this project and the wrapping code.

2.3.0

Code

  • driver.disconnect() no longer errors if not connected or initialized

  • Add jobs.update_job_status

  • New endpoints Logs and RemoteClusters

  • Rename permissions.get_ancillary_permissions to permissions.get_ancillary_permissions_post

  • Add shared_channels.get_shared_channel_remotes_by_remote_cluster

  • Add shared_channels.invite_remote_cluster_to_channel

  • Add shared_channels.uninvite_remote_cluster_to_channel

  • New attribute default_team_id in remote_clusters.patch_remote_cluster

  • New attribute include_total_count in webhooks.get_incoming_webhoooks

  • New attribute timezone in users.update_user and users.patch_user

  • New attribute position in users.patch_user

  • Rename attribute pageSize to per_page in threads.get_user_threads and users.get_users

  • Add files.search_files and search.search_files

  • Add system.test_notification

  • Rename users.attach_device_id to users.attach_device_extra_props

  • Fix trailing slash in URL used in timeline.remove_timeline_event

  • New endpoints Metrics and Scheduled Post

Documentation

  • Update channels.add_channel_member

  • Update channels.search_all_channels - document exclude_remote

  • Update jobs.get_jobs

  • Update remote_clusters.accept_remote_cluster_invite - add default_team_id

  • Update remote_clusters.create_remote_cluster - add default_team_id

  • Update remote_clusters.get_remote_clusters - document included_deleted

  • Update schemes.create_scheme - document display_name

  • Update shared_channels.get_shared_channel_remotes_by_remote_cluster - document include_unconfirmed, exclude_confirmed, include_deleted

  • Add Metrics automodule

  • Add Scheduled Post automodule

Maintenance

  • Pin httpx to 0.28.0 to address removed argument - see issue #15

  • Tolerate but warn about missing tags in mattermost documentation

2.2.0

Code

  • Add params argument to system.generate_support_packet

  • Rename users.get_user_limits to users.get_server_limits

Documentation

  • Update descriptions and remove mention of limit of 200 users per page

2.1.0

Code

  • New endpoints Bookmarks, OutgoingConnections, OutgoingOauthConnections and Reports

  • Modified oauth.Oauth endpoints extensively

  • Renamed posts.save_acknowledgement_for_post to posts.delete_acknowledgement_for_post

  • Add posts.move_thread

  • Add option use_rest_semantics to system.get_ping

  • Remove system.get_warn_metrics_status

  • Remove system.send_warn_metric_ack

  • Remove system.send_trial_license_warn_metric_ack

  • Add users.get_users_for_reporting

  • Add users.get_user_count_for_reporting

  • Add users.get_user_limits

Documentation

  • Minor typos corrected and slight reformatting

2.0.0

Code

  • Remove non-standard “TRACE” debug level in httpx code

  • Fix logging output when passing debug=True to Driver()

  • Include API cnanges as of 2023-12-01

  • Add cloud.get_endpoint_for_installation_information

  • Add emoji.get_emojis_by_names

  • Add groups.restore_group

  • Add users.get_users_with_invalid_emails

  • Fix URL of commands.list_command_autocomplete_suggestions

  • Fix URL of files.get_file_public

  • Remove insights and opengraph endpoints

  • New endpoints filtering and ip

  • threads.set_thread_unread_by_post_id now uses POST

Documentation

  • Updated README API clone instructions. API is now part of main mattermost repository.

Maintenance

  • Rename GitHub Actions for clarity

  • Force upgrade of pip in sphinx build GitHub Action - fixes docutils incompatibility resolution

1.3.0

Release 1.2.3 and 1.2.4 should have been made under a new minor digit. This release addresses this mistake.

Code

  • Minor refactor to avoid using basepath in hook calls

  • Fix missing /api/v4 in websocket handcrafted URL

Maintenance

  • Update GitHub Actions to resolve deprecation warnings

  • Fix GitHub Action Python 3.10 related failures

  • Add possiblity to manually release to PyPi

1.2.4

Code

  • Include playbook API interface changes as of 2023-05-31

  • Remove basepath to accomodate API changes due to the inclusion of playbook endpoints

  • Endpoint root paths now include the full API path

Documentation

  • Hide table of contents from index page

Maintenance

  • GitHub action renamed to clarify purpose and action taken

  • Restart CHANGELOG.md to reflect mattermostautodriver changes and releases

  • Add Python 3.11 to list of supported versions

1.2.3

Code

  • Include playbook API interface changes as of 2023-03-21

  • Fix syntax problem in install_requires

Maintenance

  • Update deployment python version in GitHub action

1.2.2

Code

  • Endpoints updated to reflect Mattermost API status as of 2022-10-11

  • Logout API endpoint renamed - endpoint is logout() not logout_user()

  • Thread-specific API endpoints are now available

  • Mattermost API documentation is now linked from method docstrings

  • The dependency inflection was pinned to at least version 0.5.1

Documentation

  • Documentation was reworked to include links to Mattermost API docs

Maintenance

  • Missing operationId is now fatal when converting

1.2.1

Code

  • Only documentation changes occurred in this release.

Documentation

  • Several style formatting changes

  • Sphinx now specifies english as documentation language

Maintenance

  • Fix indentation alignment issues

  • Reduce number of line breaks around titles

1.2.0

Code

  • Only documentation changes occurred in this release

Documentation

  • Several style formatting changes

  • Sphinx now specifies english as documentation language

Maintenance

  • Update API according to upload semantics

  • Add files attribute to any API call involving uploads

  • Update command as swagget2openapi isn’t always available

  • Update API spec as of 2022-08-25

  • Update location of call_webhook

1.1.5

  • Don’t check hostname when using ssl.CERT_NONE

  • Update endpoints docs

1.1.4

  • Re-fix __new__ signature

1.1.3

  • Fix __new__ signature

1.1.2

  • Fix version require

1.1.1

  • Change auth method

  • Fixing commas in README

1.1.0

  • Re-add call_webhook previous webhooks.call_webhook

  • Add get_last_trial_license endpoint

  • Replace hardcoded property endpoints with dynamic ones

  • Add doc about (re)generating API spec

  • Update API spec to latest

  • Use CamelCase for class names in API

  • Add black and inflection to dependencies

  • Use CamelCase for class names

1.0.0

  • Clarify relation to mattermostdriver

  • Rename driver to mattermostautodriver

  • Bump version to 8.0.0 due to many API renames and backwards incompatibility

  • Add self-generated endpoints

  • Use pyproject.toml as black config

  • Add helper script to generate updated endpoints

  • Format all files with black in a single invocation

  • Use lowecase names for modules

  • Avoid adding f-strings when containing no attributes

  • Remove unused logging configuration

  • Implement OpenAPI conversion using Python AST