Mattermost
The Mattermost connector facilitates communication and collaboration by automating messaging actions within the Swimlane Turbine platform.
Mattermost is an open-source, self-hosted messaging platform that enables secure team collaboration. The Mattermost connector for Swimlane Turbine allows users to automate communication workflows, manage posts, and monitor message threads within the platform. By integrating with Mattermost, Swimlane Turbine users can streamline incident response, enhance team coordination, and rapidly disseminate information across channels without manual intervention. This connector empowers security teams to act swiftly, ensuring that critical updates and alerts are communicated effectively in real-time.
Mattermost is a secure collaboration platform for accelerating mission-critical collaborative work. The platform is built to meet the custom needs of technical and operational teams in rigorous and complex environments, including government, defense, and critical infrastructure. Mattermost gives organizations full control over their data with self-hosted and private deployment options and access to the source code.
With Mattermost you can:
- Connect and collaborate - Stay connected with your team via 1:1 and group messages, voice calls, and screensharing.
- Build repeatable processes - Build and configure repeatable processes with workflow automation to achieve specific and predictable outcomes.
- Customize your preferences - Match the way you work by adjusting your notification settings, changing your theme, or updating your profile settings.
Prerequisites
To utilize the Mattermost connector for Turbine, ensure you have the following:
- Mattermost Credentials for authentication with these parameters:
- URL: The base URL of your Mattermost server.
- Login ID: Your Mattermost user login ID.
- Password: Your Mattermost account password.
Capabilities
Mattermost Connector provides the following capabilities:
- Create a Post
- Get a Thread
- Get Unread Messages
Notes
Configurations
Mattermost Authentication
Authenticates using Mattermost Credentials.
Configuration Parameters
Parameter | Description | Type | Required |
|---|---|---|---|
url | A URL to the target host. | string | Required |
login_id | Username or Login ID | string | Required |
password | Password | string | Required |
verify_ssl | Verify SSL certificate | boolean | Optional |
http_proxy | A proxy to route requests through. | string | Optional |
Actions
Create a Post
Creates a new post in a specified Mattermost channel, with options to comment on another post if root ID is provided. Requires create_post permission.
Endpoint
- URL: /api/v4/posts
- Method: POST
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
parameters.set_online | boolean | Optional | Set User Status as Online or not. |
channel_id | string | Optional | The Channel ID to post in. |
message | string | Optional | The Message Contents formatted with Markdown. |
root_id | string | Optional | The Post ID to comment on. |
file_ids | array | Optional | List of file IDs associated with Post. |
props | object | Optional | General JSON Property Bag for the Post. |
metadata | object | Optional | JSON Object for Post Metadata. |
metadata.priority | object | Optional | Object containing post's Priority Properties. |
metadata.priority.priority | string | Optional | Priority Label empty important or urgent. |
metadata.priority.requested_ack | boolean | Optional | Request for Acknowledgements if true. |
Input Example
{"parameters":{"set_online":true},"channel_id":"string","message":"string","root_id":"string","file_ids":["string"],"props":{},"metadata":{"priority":{"priority":"string","requested_ack":true}}}
Output
Parameter | Type | Description |
|---|---|---|
status_code | number | HTTP status code of the response |
reason | string | Response reason phrase |
id | string | Unique identifier |
create_at | number | Output field: create_at |
update_at | number | Output field: update_at |
edit_at | number | Output field: edit_at |
delete_at | number | Output field: delete_at |
is_pinned | boolean | Output field: is_pinned |
user_id | string | Unique identifier |
channel_id | string | Unique identifier |
root_id | string | Unique identifier |
original_id | string | Unique identifier |
message | string | Response message |
type | string | Type of the resource |
props | object | Output field: props |
hashtags | string | Output field: hashtags |
pending_post_id | string | Unique identifier |
remote_id | string | Unique identifier |
reply_count | number | Count value |
last_reply_at | number | Output field: last_reply_at |
participants | object | Output field: participants |
metadata | object | Response data |
Output Example
{"status_code":201,"response_headers":{"Date":"Fri, 04 Oct 2024 07:46:04 GMT","Content-Type":"application/json","Content-Length":"414","Connection":"keep-alive","Permissions-Policy":"","Referrer-Policy":"no-referrer","Vary":"Accept-Encoding","X-Content-Type-Options":"nosniff","X-Ratelimit-Limit":"101","X-Ratelimit-Remaining":"100","X-Ratelimit-Reset":"1","X-Request-Id":"wzx7ft8j1fro9m5ctupma74cuw","X-Version-Id":"10.0.0.10671348655.6317a4edf33bb5635a68d4d05279afac.true","Strict-Transport-Securit...
Get a Thread
Retrieves a specific post and its associated thread in Mattermost, requiring appropriate permissions based on channel privacy settings.
Endpoint
- URL: /api/v4/posts/{{post_id}}/thread
- Method: GET
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
path_parameters.post_id | string | Required | ID of a Post in the Thread. |
parameters.perPage | number | Optional | Number of Posts per Page. |
parameters.fromPost | string | Optional | Post ID to return next Page. |
parameters.fromCreateAt | number | Optional | Timestamp to return next Page. |
parameters.direction | string | Optional | Direction to return Posts up or down. |
parameters.skipFetchThreads | boolean | Optional | Skip fetching Threads or not. |
parameters.collapsedThreads | boolean | Optional | Client uses CRT or not. |
parameters.collapsedThreadsExtended | boolean | Optional | Return associated Users in Response. |
Input Example
{"path_parameters":{"post_id":"string"},"parameters":{"perPage":123,"fromPost":"string","fromCreateAt":123,"direction":"string","skipFetchThreads":true,"collapsedThreads":true,"collapsedThreadsExtended":true}}
Output
Parameter | Type | Description |
|---|---|---|
status_code | number | HTTP status code of the response |
reason | string | Response reason phrase |
order | array | Output field: order |
posts | object | Output field: posts |
posts.1sd7saa47inaufjmm6is9troxh | object | Output field: posts.1sd7saa47inaufjmm6is9troxh |
posts.1sd7saa47inaufjmm6is9troxh.id | string | Unique identifier |
posts.1sd7saa47inaufjmm6is9troxh.create_at | number | Output field: posts.1sd7saa47inaufjmm6is9troxh.create_at |
posts.1sd7saa47inaufjmm6is9troxh.update_at | number | Output field: posts.1sd7saa47inaufjmm6is9troxh.update_at |
posts.1sd7saa47inaufjmm6is9troxh.edit_at | number | Output field: posts.1sd7saa47inaufjmm6is9troxh.edit_at |
posts.1sd7saa47inaufjmm6is9troxh.delete_at | number | Output field: posts.1sd7saa47inaufjmm6is9troxh.delete_at |
posts.1sd7saa47inaufjmm6is9troxh.is_pinned | boolean | Output field: posts.1sd7saa47inaufjmm6is9troxh.is_pinned |
posts.1sd7saa47inaufjmm6is9troxh.user_id | string | Unique identifier |
posts.1sd7saa47inaufjmm6is9troxh.channel_id | string | Unique identifier |
posts.1sd7saa47inaufjmm6is9troxh.root_id | string | Unique identifier |
posts.1sd7saa47inaufjmm6is9troxh.original_id | string | Unique identifier |
posts.1sd7saa47inaufjmm6is9troxh.message | string | Response message |
posts.1sd7saa47inaufjmm6is9troxh.type | string | Type of the resource |
posts.1sd7saa47inaufjmm6is9troxh.props | object | Output field: posts.1sd7saa47inaufjmm6is9troxh.props |
posts.1sd7saa47inaufjmm6is9troxh.hashtags | string | Output field: posts.1sd7saa47inaufjmm6is9troxh.hashtags |
posts.1sd7saa47inaufjmm6is9troxh.pending_post_id | string | Unique identifier |
posts.1sd7saa47inaufjmm6is9troxh.remote_id | string | Unique identifier |
posts.1sd7saa47inaufjmm6is9troxh.reply_count | number | Count value |
posts.1sd7saa47inaufjmm6is9troxh.last_reply_at | number | Output field: posts.1sd7saa47inaufjmm6is9troxh.last_reply_at |
posts.1sd7saa47inaufjmm6is9troxh.participants | object | Output field: posts.1sd7saa47inaufjmm6is9troxh.participants |
posts.1sd7saa47inaufjmm6is9troxh.metadata | object | Response data |
Output Example
{"status_code":200,"response_headers":{"Date":"Fri, 04 Oct 2024 07:39:38 GMT","Content-Type":"application/json","Content-Length":"397","Connection":"keep-alive","Content-Encoding":"gzip","Etag":"10.0.0.1sd7saa47inaufjmm6is9troxh.zc8zgm3qujn9xdrtytyriukijh.1728022061916","Expires":"0","Permissions-Policy":"","Referrer-Policy":"no-referrer","Vary":"Accept-Encoding","X-Content-Type-Options":"nosniff","X-Ratelimit-Limit":"101","X-Ratelimit-Remaining":"100","X-Ratelimit-Reset":"1","X-Request-Id":"pio...
Get Unread Messages
Retrieves the count of unread messages and mentions in a specific channel for a user on Mattermost, given appropriate permissions.
Endpoint
- URL: /api/v4/users/{{user_id}}/channels/{{channel_id}}/unread
- Method: GET
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
path_parameters.user_id | string | Required | Unique Identifier for the User. |
path_parameters.channel_id | string | Required | Unique Identifier for the Channel. |
Input Example
{"path_parameters":{"user_id":"string","channel_id":"string"}}
Output
Parameter | Type | Description |
|---|---|---|
status_code | number | HTTP status code of the response |
reason | string | Response reason phrase |
response_text | string | Output field: response_text |
Output Example
{"status_code":200,"response_headers":{"Date":"Fri, 04 Oct 2024 07:47:10 GMT","Content-Type":"text/html","Transfer-Encoding":"chunked","Connection":"keep-alive","Cache-Control":"no-cache, max-age=31556926, public","Content-Security-Policy":"frame-ancestors 'self' teams.microsoft.com; script-src 'self' cdn.rudderlabs.com","Permissions-Policy":"","Referrer-Policy":"no-referrer","X-Content-Type-Options":"nosniff","X-Frame-Options":"SAMEORIGIN","X-Ratelimit-Limit":"101","X-Ratelimit-Remaining":"100"...
Response Headers
Header | Description | Example |
|---|---|---|
Accept-Ranges | HTTP response header: Accept-Ranges | bytes |
Cache-Control | Directives for caching mechanisms | no-cache, max-age=31556926, public |
CF-Cache-Status | HTTP response header: CF-Cache-Status | DYNAMIC |
CF-RAY | HTTP response header: CF-RAY | 8cd384ee9eda79f2-HYD |
Connection | HTTP response header: Connection | keep-alive |
Content-Encoding | HTTP response header: Content-Encoding | gzip |
Content-Length | The length of the response body in bytes | 397 |
Content-Security-Policy | HTTP response header: Content-Security-Policy | frame-ancestors 'self' teams.microsoft.com; script-src 'self' cdn.rudderlabs.com |
Content-Type | The media type of the resource | application/json |
Date | The date and time at which the message was originated | Fri, 04 Oct 2024 07:46:04 GMT |
Etag | An identifier for a specific version of a resource | 10.0.0.1sd7saa47inaufjmm6is9troxh.zc8zgm3qujn9xdrtytyriukijh.1728022061916 |
Expires | The date/time after which the response is considered stale | 0 |
Permissions-Policy | HTTP response header: Permissions-Policy | ο»Ώ |
Referrer-Policy | HTTP response header: Referrer-Policy | no-referrer |
Server | Information about the software used by the origin server | cloudflare |
Strict-Transport-Security | HTTP response header: Strict-Transport-Security | max-age=31536000; includeSubDomains |
Transfer-Encoding | HTTP response header: Transfer-Encoding | chunked |
Vary | HTTP response header: Vary | Accept-Encoding |
X-Content-Type-Options | HTTP response header: X-Content-Type-Options | nosniff |
X-Frame-Options | HTTP response header: X-Frame-Options | SAMEORIGIN |
X-Ratelimit-Limit | The number of requests allowed in the current rate limit window | 101 |
X-Ratelimit-Remaining | The number of requests remaining in the current rate limit window | 100 |
X-Ratelimit-Reset | The time at which the current rate limit window resets | 1 |
X-Request-Id | A unique identifier for the request | r9ers3i8yfdbfj5rq1j53homdo |
X-Version-Id | HTTP response header: X-Version-Id | 10.0.0.10671348655.6317a4edf33bb5635a68d4d05279afac.true |