public class MattermostClient extends Object implements AutoCloseable, AuditsApi, AuthenticationApi, BrandApi, ChannelApi, ClusterApi, CommandsApi, ComplianceApi, ElasticsearchApi, EmojiApi, FilesApi, SystemApi, LdapApi, LogsApi, OAuthApi, OpenGraphApi, PluginApi, PostApi, PreferencesApi, ReactionApi, SamlApi, StatusApi, TeamApi, UserApi, WebhookApi, WebrtcApi
| Modifier and Type | Class and Description |
|---|---|
static class |
MattermostClient.MattermostClientBuilder |
| Modifier and Type | Field and Description |
|---|---|
protected static String |
API_URL_SUFFIX |
protected static String |
HEADER_AUTH |
protected static String |
HEADER_ETAG_CLIENT |
| Constructor and Description |
|---|
MattermostClient(String url) |
MattermostClient(String url,
Level logLevel)
Create new MattermosClient instance.
|
| Modifier and Type | Method and Description |
|---|---|
ApiResponse<ChannelMember> |
addChannelMember(String channelId,
String userId)
adds user to channel and return a channel memner.
|
ApiResponse<TeamMember> |
addTeamMember(String hash,
String dataToHash,
String inviteId)
adds user to a team and return a team member.
|
ApiResponse<TeamMember> |
addTeamMember(String teamId,
String userId,
String hash,
String dataToHash,
String inviteId)
Deprecated.
|
ApiResponse<TeamMember> |
addTeamMember(TeamMember teamMemberToAdd)
add user to a team and return a team member.
|
ApiResponse<TeamMemberList> |
addTeamMembers(String teamId,
String... userIds)
adds a number of users to a team and returns the team members.
|
ApiResponse<Boolean> |
attachDeviceId(String deviceId)
attaches a mobile device ID to the current session.
|
String |
authorizeOAuthApp(AuthorizeRequest authRequest)
will authorize an OAuth 2.0 client application to access a user's account and provide a
redirect link to follow.
|
ApiResponse<EmojiList> |
autocompleteEmoji(String name)
get a list of custom emoji that name starts with or matching provided name.
|
ApiResponse<UserAutocomplete> |
autocompleteUsers(String username,
String etag)
returns the users in the system based on search term.
|
ApiResponse<UserAutocomplete> |
autocompleteUsersInChannel(String teamId,
String channelId,
String username,
String etag)
returns the users in a channel based on search term.
|
ApiResponse<UserAutocomplete> |
autocompleteUsersInTeam(String teamId,
String username,
String etag)
returns the users on a team based on search term.
|
protected javax.ws.rs.client.Client |
buildClient() |
static MattermostClient.MattermostClientBuilder |
builder() |
boolean |
checkUserMfa(String loginId)
checks whether a user has MFA active on their account or not based on the provided login id.
|
void |
clearOAuthToken() |
void |
close() |
ApiResponse<Channel> |
convertChannelToPrivate(String channelId)
convert channel from public to private.
|
ApiResponse<Channel> |
createChannel(Channel channel)
creates a channel based on the provided channel object.
|
ApiResponse<Command> |
createCommand(Command cmd)
will create a new command if the user have the right permissions.
|
ApiResponse<Compliance> |
createComplianceReport(Compliance report)
creates a compliance report.
|
ApiResponse<Channel> |
createDirectChannel(String userId1,
String userId2)
creates a direct message channel based on the two user ids provided.
|
ApiResponse<Emoji> |
createEmoji(Emoji emoji,
Path imageFile)
will save an emoji to the server if the current user has permission to do so.
|
ApiResponse<Post> |
createEphemeralPost(String sendToUserId,
Post post)
creates an ephemeral post send to
targetUserId. |
ApiResponse<Channel> |
createGroupChannel(String... userIds)
creates a group message channel based on userIds provided.
|
ApiResponse<IncomingWebhook> |
createIncomingWebhook(IncomingWebhook hook)
creates an incoming webhook for a channel.
|
ApiResponse<OAuthApp> |
createOAuthApp(OAuthApp app)
will register a new OAuth 2.0 client application with Mattermost acting as an OAuth 2.0 service
provider.
|
ApiResponse<OutgoingWebhook> |
createOutgoingWebhook(OutgoingWebhook hook)
creates an outgoing webhook for a team or channel.
|
ApiResponse<Post> |
createPost(Post post)
creates a post based on the provided post object.
|
ApiResponse<Team> |
createTeam(Team team)
creates a team in the system based on the provided team object.
|
ApiResponse<User> |
createUser(User user)
creates a user in the system based on the provided user object.
|
ApiResponse<UserAccessToken> |
createUserAccessToken(String userId,
String description) |
ApiResponse<Boolean> |
databaseRecycle()
will recycle the connections.
|
ApiResponse<Boolean> |
deauthorizeOAuthApp(String appId)
will deauthorize an OAuth 2.0 client application from accessing a user's account.
|
ApiResponse<Boolean> |
deleteBrandImage()
delete the brand image for the system.
|
ApiResponse<Boolean> |
deleteChannel(String channelId)
deletes channel based on the provided channel id string.
|
ApiResponse<Boolean> |
deleteCommand(String commandId)
deletes a command based on the provided command id string.
|
ApiResponse<Boolean> |
deleteEmoji(String emojiId)
delete an custom emoji on the provided emoji id string.
|
ApiResponse<Boolean> |
deleteIncomingWebhook(String hookId)
deletes an Incoming Webhook given the hook id.
|
ApiResponse<Boolean> |
deleteOAuthApp(String appId)
deletes a registered OAuth 2.0 client application.
|
ApiResponse<Boolean> |
deleteOutgoingWebhook(String hookId)
delete the outgoing webhook on the system requested by hook id.
|
ApiResponse<Boolean> |
deletePost(String postId)
deletes a post from the provided post id string.
|
ApiResponse<Boolean> |
deletePreferences(String userId,
Preferences preferences)
deletes the user's preferences.
|
ApiResponse<Boolean> |
deleteProfileImage(String userId)
delete user profile image.
|
ApiResponse<Boolean> |
deleteReaction(Reaction reaction)
deletes reaction of a user in a post.
|
ApiResponse<Boolean> |
deleteSamlIdpCertificate()
deletes the SAML IDP certificate from the server and updates the config to not use it and
disable SAML.
|
ApiResponse<Boolean> |
deleteSamlPrivateCertificate()
deletes the SAML IDP certificate from the server and updates the config to not use it and
disable SAML.
|
ApiResponse<Boolean> |
deleteSamlPublicCertificate()
deletes the saml IDP certificate from the server and updates the config to not use it and
disable SAML.
|
ApiResponse<Boolean> |
deleteTeam(String teamId)
deletes the team softly (archive only, not permanent delete).
|
ApiResponse<Boolean> |
deleteTeam(String teamId,
boolean permanent)
deletes the team.
|
ApiResponse<Boolean> |
deleteUser(String userId)
deactivates a user in the system based on the provided user id string.
|
ApiResponse<Boolean> |
disablePlugin(String pluginId) |
ApiResponse<Boolean> |
disableUserAccessToken(String tokenId) |
protected ApiResponse<Void> |
doApiDelete(String url) |
protected <T> ApiResponse<T> |
doApiDelete(String url,
Class<T> responseType) |
protected ApiResponse<Void> |
doApiGet(String url,
String etag) |
protected <T> ApiResponse<T> |
doApiGet(String url,
String etag,
Class<T> responseType) |
protected <T> ApiResponse<T> |
doApiGet(String url,
String etag,
javax.ws.rs.core.GenericType<T> responseType) |
protected ApiResponse<Path> |
doApiGetFile(String url,
String etag) |
protected <U> ApiResponse<Void> |
doApiPost(String url,
U data) |
protected <T,U> ApiResponse<T> |
doApiPost(String url,
U data,
Class<T> responseType) |
protected <T,U> ApiResponse<T> |
doApiPost(String url,
U data,
javax.ws.rs.core.GenericType<T> responseType) |
protected ApiResponse<Void> |
doApiPostMultiPart(String url,
org.glassfish.jersey.media.multipart.MultiPart multiPart) |
protected <T> ApiResponse<T> |
doApiPostMultiPart(String url,
org.glassfish.jersey.media.multipart.MultiPart multiPart,
Class<T> responseType) |
protected <U> ApiResponse<Void> |
doApiPut(String url,
U data) |
protected <T,U> ApiResponse<T> |
doApiPut(String url,
U data,
Class<T> responseType) |
protected <U> ApiResponse<Void> |
doApiRequest(String method,
String url,
U data,
String etag) |
protected <T,U> ApiResponse<T> |
doApiRequest(String method,
String url,
U data,
String etag,
Class<T> responseType) |
protected <T,U> ApiResponse<T> |
doApiRequest(String method,
String url,
U data,
String etag,
javax.ws.rs.core.GenericType<T> responseType) |
ApiResponse<Object> |
downloadComplianceReport(String reportId)
returns a full compliance report as a file.
|
ApiResponse<Boolean> |
enablePlugin(String pluginId) |
ApiResponse<Boolean> |
enableUserAccessToken(String tokenId) |
ApiResponse<CommandResponse> |
executeCommand(String channelId,
String command)
executes a given command.
|
ApiResponse<MfaSecret> |
generateMfaSecret(String userId)
will generate a new MFA secret for a user and return it as a string and as a base64 encoded
image QR code.
|
ApiResponse<TeamList> |
getAllTeams(Pager pager,
String etag)
returns all teams based on permssions.
|
ApiResponse<AnalyticsRows> |
getAnalytics(AnalyticsCategory category,
String teamId) |
ApiResponse<Audits> |
getAudits(Pager pager,
String etag)
returns a list of audits for the whole system.
|
ApiResponse<List<OAuthApp>> |
getAuthorizedOAuthAppsForUser(String userId,
Pager pager)
gets a page of OAuth 2.0 client applications the user authorized to use access their account.
|
ApiResponse<Path> |
getBrandImage()
retrieves the previously uploaded brand image.
|
String |
getBrandImageRoute() |
String |
getCacheRoute() |
ApiResponse<Channel> |
getChannel(String channelId,
String etag)
returns a channel based on the provided channel id string.
|
ApiResponse<Channel> |
getChannelByName(String channelName,
String teamId,
String etag)
returns a channel based on the provided channel name and team id strings.
|
ApiResponse<Channel> |
getChannelByNameForTeamName(String channelName,
String teamName,
String etag)
returns a channel based on the provided channel name and team name strings.
|
String |
getChannelByNameForTeamNameRoute(String channelName,
String teamName) |
String |
getChannelByNameRoute(String channelName,
String teamId) |
ApiResponse<ChannelMember> |
getChannelMember(String channelId,
String userId,
String etag)
gets a channel memner.
|
String |
getChannelMemberRoute(String channelId,
String userId) |
ApiResponse<ChannelMembers> |
getChannelMembers(String channelId,
Pager pager,
String etag)
gets a page of channel members.
|
ApiResponse<ChannelMembers> |
getChannelMembersByIds(String channelId,
String... userIds)
gets the channel members in a channel for a list of user ids.
|
ApiResponse<ChannelMembers> |
getChannelMembersForUser(String userId,
String teamId,
String etag)
gets all the channel members for a user on a team.
|
String |
getChannelMembersRoute(String channelId) |
String |
getChannelRoute(String channelId) |
ApiResponse<ChannelList> |
getChannelsForTeamForUser(String teamId,
String userId,
String etag)
returns a list channels of on a team for user.
|
String |
getChannelsForTeamRoute(String teamId) |
String |
getChannelsRoute() |
ApiResponse<ChannelStats> |
getChannelStats(String channelId,
String etag)
returns statistics for a channel.
|
ApiResponse<ChannelUnread> |
getChannelUnread(String channelId,
String userId)
will return a ChannelUnread object that contains the number ofo unread messages and mentions
for a user.
|
String |
getClusterRoute() |
ApiResponse<ClusterInfo[]> |
getClusterStatus() |
String |
getCommandRoute(String commandId) |
String |
getCommandsRoute() |
ApiResponse<Compliance> |
getComplianceReport(String reportId)
returns a compliance report.
|
String |
getComplianceReportRoute(String reportId) |
ApiResponse<Compliances> |
getComplianceReports(Pager pager)
returns list of compliance reports.
|
String |
getComplianceReportsRoute() |
ApiResponse<Config> |
getConfig()
will retrieve the server config with some sanitized items.
|
String |
getConfigRoute() |
String |
getDatabaseRoute() |
ApiResponse<ChannelList> |
getDeletedChannels(String teamId,
Pager pager) |
String |
getElasticsearchRoute() |
ApiResponse<Emoji> |
getEmoji(String emojiId)
returns a custom emoji in the system on the provided emoji id string.
|
ApiResponse<Emoji> |
getEmojiByName(String emojiName)
get a custom emoji by name.
|
String |
getEmojiByNameRoute(String emojiName) |
ApiResponse<Path> |
getEmojiImage(String emojiId)
returns the emoji image.
|
ApiResponse<EmojiList> |
getEmojiList(Pager pager)
returns a list of custom emoji in the system.
|
String |
getEmojiRoute(String emojiId) |
String |
getEmojisRoute() |
ApiResponse<Path> |
getFile(String fileId)
Get a file content.
|
ApiResponse<FileInfo[]> |
getFileInfoForPost(String postId)
get a list of file info attached the post.
|
ApiResponse<FileInfo> |
getFileMetadata(String fileId)
Get a file metadata.
|
ApiResponse<Path> |
getFilePreview(String fileId)
Get a file preview.
|
String |
getFileRoute(String fileId) |
String |
getFilesRoute() |
ApiResponse<Path> |
getFileThumbnail(String fileId)
Get a file thumbnail.
|
ApiResponse<PostList> |
getFlaggedPostsForUser(String userId,
Pager pager)
returns flagges posts of a user based on user id string.
|
ApiResponse<PostList> |
getFlaggedPostsForUserInChannel(String userId,
String channelId,
Pager pager)
returns flagged posts in channel of a user based on user id string.
|
ApiResponse<PostList> |
getFlaggedPostsForUserInTeam(String userId,
String teamId,
Pager pager)
returns flagged posts in team of a user based on user id string.
|
ApiResponse<IncomingWebhook> |
getIncomingWebhook(String hookId,
String etag)
returns an Incoming webhook given the hook id.
|
String |
getIncomingWebhookRoute(String hookId) |
ApiResponse<IncomingWebhookList> |
getIncomingWebhooks(Pager pager,
String etag)
returns a page of incoming webhooks on the system.
|
ApiResponse<IncomingWebhookList> |
getIncomingWebhooksForTeam(String teamId,
Pager pager,
String etag)
returns a page of incoming webhooks for a team.
|
String |
getIncomingWebhooksRoute() |
ApiResponse<TeamInviteInfo> |
getInviteInfo(String inviteId)
get team info by invite id.
|
String |
getLdapRoute() |
String |
getLicenseRoute() |
ApiResponse<List<String>> |
getLogs(Pager pager)
page of logs as a string list.
|
ApiResponse<User> |
getMe(String etag)
returns the logged in user.
|
ApiResponse<OAuthApp> |
getOAuthApp(String appId)
gets a registered OAuth 2.0 client application with Mattermost acting as an OAuth 2.0 service
provider.
|
ApiResponse<OAuthApp> |
getOAuthAppInfo(String appId)
gets a sanitized version of a registered OAuth 2.0 client application with Mattermost acting as
an OAuth 2.0 service provider.
|
String |
getOAuthAppRoute(String appId) |
ApiResponse<List<OAuthApp>> |
getOAuthApps(Pager pager)
gets a page of registered OAuth 2.0 client applications with Mattermost acting as an OAuth 2.0
service provider.
|
String |
getOAuthAppsRoute() |
ApiResponse<Map<String,String>> |
getOldClientConfig(String etag)
will retrieve the parts of the server configuration needed by the client, formatted in the old
format.
|
ApiResponse<Map<String,String>> |
getOldClientLicense(String etag)
will retrieve the parts of the server license needed by the client, formatted in the old
format.
|
ApiResponse<net.bis5.opengraph.models.OpenGraph> |
getOpenGraphMetadata(String url)
Retrieve the OpenGraph metadata for provided url.
|
String |
getOpenGraphRoute() |
ApiResponse<OutgoingWebhook> |
getOutgoingWebhook(String hookId)
outgoing webhooks on the system requested by hook id.
|
String |
getOutgoingWebhookRoute(String hookId) |
ApiResponse<OutgoingWebhookList> |
getOutgoingWebhooks(Pager pager,
String etag)
returns a page of outgoing webhooks ont eh system.
|
ApiResponse<OutgoingWebhookList> |
getOutgoingWebhooksForChannel(String channelId,
Pager pager,
String etag)
returns a page of outgoing webhooks for a channel.
|
ApiResponse<OutgoingWebhookList> |
getOutgoingWebhooksForTeam(String teamId,
Pager pager,
String etag)
returns a page of outgoing webhooks for a team.
|
String |
getOutgoingWebhooksRoute() |
ApiResponse<Boolean> |
getPing()
will ping the server and to see if it is up and running.
|
ApiResponse<PostList> |
getPinnedPosts(String channelId,
String etag)
gets a list of pinned posts.
|
String |
getPluginRoute(String pluginId) |
ApiResponse<Plugins> |
getPlugins() |
String |
getPluginsRoute() |
ApiResponse<Post> |
getPost(String postId,
String etag)
gets a single post.
|
String |
getPostRoute(String postId) |
ApiResponse<PostList> |
getPostsAfter(String channelId,
String postId,
Pager pager,
String etag)
gets a page of posts that were posted after the post provided.
|
ApiResponse<PostList> |
getPostsBefore(String channelId,
String postId,
Pager pager,
String etag)
gets a page of posts that were posted before the post provided.
|
ApiResponse<PostList> |
getPostsForChannel(String channelId,
Pager pager,
String etag)
gets a page of posts with an array for ordering for a channel.
|
String |
getPostsRoute() |
ApiResponse<PostList> |
getPostsSince(String channelId,
long time)
gets posts created after a specified time as Unix time in milliseconds.
|
ApiResponse<PostList> |
getPostThread(String postId,
String etag)
gets a post with all the other posts in the same thread.
|
ApiResponse<Preference> |
getPreferenceByCategoryAndName(String userId,
PreferenceCategory category,
String preferenceName)
returns the user's preferences from the provided category and preference name string.
|
ApiResponse<Preferences> |
getPreferences(String userId)
returns the user's preferences.
|
ApiResponse<Preferences> |
getPreferencesByCategory(String userId,
PreferenceCategory category)
returns the user's preferences from the provided category string.
|
String |
getPreferencesRoute(String userId) |
ApiResponse<byte[]> |
getProfileImage(String userId,
String etag)
gets user's profile image.
|
ApiResponse<ChannelList> |
getPublicChannelsByIdsForTeam(String teamId,
String... channelIds)
returns a list of public channeld based on provided team id string.
|
ApiResponse<ChannelList> |
getPublicChannelsForTeam(String teamId,
Pager pager,
String etag)
returns a list of public channels based on the provided team id string.
|
ApiResponse<String> |
getPublicFileLink(String fileId)
Get a public link can be access without logging in to Mattermost.
|
ApiResponse<ReactionList> |
getReactions(String postId)
returns a list of reactions to a post.
|
String |
getReactionsRoute() |
ApiResponse<SamlCertificateStatus> |
getSamlCertificateStatus()
returns metadata for the SAML configuration.
|
ApiResponse<Path> |
getSamlMetadata()
returns metadata for the SAML configuration.
|
String |
getSamlRoute() |
ApiResponse<SessionList> |
getSessions(String userId,
String etag)
returns a list of sessions based on the provided user id string.
|
String |
getSystemRoute() |
ApiResponse<Team> |
getTeam(String teamId,
String etag)
returns a team based on the provided team id string.
|
String |
getTeamAutoCompleteCommandsRoute(String teamId) |
ApiResponse<Team> |
getTeamByName(String name,
String etag)
returns a team based on the provided team name string.
|
String |
getTeamByNameRoute(String teamName) |
ApiResponse<Path> |
getTeamIcon(String teamId)
Get the team icon image.
|
String |
getTeamIconRoute(String teamId) |
String |
getTeamImportRoute(String teamId) |
String |
getTeamInviteRoute(String inviteId) |
ApiResponse<TeamMember> |
getTeamMember(String teamId,
String userId,
String etag)
returns a team member based on the provided team and user id strings.
|
String |
getTeamMemberRoute(String teamId,
String userId) |
ApiResponse<TeamMemberList> |
getTeamMembers(String teamId,
Pager pager,
String etag)
returns team members based on the provided team id string.
|
ApiResponse<TeamMemberList> |
getTeamMembersByIds(String teamId,
String... userIds)
will return an array of team members based on the team id and a list of user ids provided.
|
ApiResponse<TeamMemberList> |
getTeamMembersForUser(String userId,
String etag)
returns the team member for a user.
|
String |
getTeamMembersRoute(String teamId) |
String |
getTeamRoute(String teamId) |
ApiResponse<TeamList> |
getTeamsForUser(String userId,
String etag)
returns a list of teams a user is on.
|
String |
getTeamsRoute() |
ApiResponse<TeamStats> |
getTeamStats(String teamId,
String etag)
returns a team stats based on the team id string.
|
String |
getTeamStatsRoute(String teamId) |
ApiResponse<TeamUnread> |
getTeamUnread(String teamId,
String userId)
will return a TeamUnread object that contains the amount of unread messages and mentions the
user has for the specified team.
|
ApiResponse<TeamUnreadList> |
getTeamUnreadForUser(String userId,
String teamIdToExclude)
will return a list with TeamUnread objects that contain the amount of unread messages and
mentions the current user has for the teams it belongs to.
|
String |
getTestEmailRoute() |
ApiResponse<User> |
getUser(String userId,
String etag)
returns a user based on the provided user id string.
|
ApiResponse<UserAccessToken> |
getUserAccessToken(String tokenId) |
ApiResponse<UserAccessTokenList> |
getUserAccessTokens(String userId,
Pager pager) |
ApiResponse<UserAccessTokenList> |
getUserAccessTokensAllUsers(Pager pager) |
ApiResponse<Audits> |
getUserAudits(String userId,
Pager pager,
String etag)
returns a list of audit based on the provided user id string.
|
ApiResponse<User> |
getUserByEmail(String email,
String etag)
returns a user based on the provided user email string.
|
String |
getUserByEmailRoute(String email) |
ApiResponse<User> |
getUserByUsername(String userName,
String etag)
returns a user based pn the provided user name string.
|
String |
getUserByUsernameRoute(String userName) |
String |
getUserProfileImageRoute(String userId) |
String |
getUserRoute(String userId) |
ApiResponse<UserList> |
getUsers(Pager pager,
String etag)
returns a page of users on the system.
|
ApiResponse<UserList> |
getUsersByIds(String... userIds)
returns a list of users based on the provided user ids.
|
ApiResponse<UserList> |
getUsersByUsernames(String... usernames)
returns a list of users based on the provided usernames.
|
String |
getUserSessionsRoute(String userId) |
ApiResponse<UserList> |
getUsersInChannel(String channelId,
UsersOrder.InChannel order,
Pager pager,
String etag)
returns a page of users on a team.
|
ApiResponse<UserList> |
getUsersInTeam(String teamId,
UsersOrder.InTeam order,
Pager pager,
String etag)
returns a page of users on a team.
|
ApiResponse<UserList> |
getUsersNotInChannel(String teamId,
String channelId,
Pager pager,
String etag)
returns a page of users on a team.
|
ApiResponse<UserList> |
getUsersNotInTeam(String teamId,
Pager pager,
String etag)
returns a page of users who are not in a team.
|
String |
getUsersRoute() |
ApiResponse<StatusList> |
getUsersStatusesByIds(String... userIds)
returns a list of users status based on the provided user ids.
|
ApiResponse<Status> |
getUserStatus(String userId,
String etag)
returns a user status based on the provided user id string.
|
String |
getUserStatusesRoute() |
String |
getUserStatusRoute(String userId) |
ApiResponse<UserList> |
getUsersWithoutTeam(Pager pager,
String etag)
returns a page of users on the system that aren't on any teams.
|
String |
getUserTokenRoute(String tokenId) |
String |
getUserTokensRoute() |
String |
getUserTokensRoute(String userId) |
ApiResponse<PluginManifest[]> |
getWebappPlugins() |
ApiResponse<WebrtcInfoResponse> |
getWebrtcToken()
returns a valid token, stun server and turn server with credentials to use with the Mattermost
WebRTC service.
|
ApiResponse<byte[]> |
importTeam(byte[] data,
int filesize,
String importFrom,
String fileName,
String teamId)
will import an exported team from other app into a existing team.
|
ApiResponse<Boolean> |
invalidateCaches()
will purge the cache and can affect the performance while is cleaning.
|
ApiResponse<Boolean> |
inviteUsersToTeam(String teamId,
Collection<String> userEmails)
invite users by email to the team.
|
ApiResponse<CommandList> |
listAutocompleteCommands(String teamId)
will retrieve a list of commands available in the team.
|
ApiResponse<CommandList> |
listCommands(String teamId,
boolean customOnly)
will retrieve a list of commands available in the team.
|
protected User |
login(LoginRequest param) |
User |
login(String loginId,
String password)
authenticates a user by login id, which can be username, email, or some sort of SSO identifier
based on server configuration, and a password.
|
User |
loginById(String id,
String password)
authenticates a user by user id and password.
|
User |
loginByLdap(String loginId,
String password)
authenticates a user by LDAP id and password.
|
User |
loginWithDevice(String loginId,
String password,
String deviceId)
authenticates a user by login id (username, email or some sort of SSO identifier based on
configuration), password and attaches a device id to the session.
|
ApiResponse<Boolean> |
logout()
terminates the current user's session.
|
protected ApiResponse<User> |
onLogin(ApiResponse<Void> loginResponse) |
protected ApiResponse<Boolean> |
onLogout(ApiResponse<Void> logoutResponse) |
ApiResponse<Channel> |
patchChannel(String channelId,
ChannelPatch patch)
partially updates a channel.
|
ApiResponse<Post> |
patchPost(String postId,
PostPatch patch)
partially updates a post.
|
ApiResponse<Team> |
patchTeam(String teamId,
TeamPatch patch)
partially updates a team.
|
ApiResponse<User> |
patchUser(String userId,
UserPatch patch)
partially updates a user in the system.
|
ApiResponse<Boolean> |
pinPost(String postId)
pin a post based on proviced post id string.
|
ApiResponse<Map<String,String>> |
postLog(Map<String,String> message)
This method is a convenience Web Service call so clients can log messages into the server-side
logs.
|
ApiResponse<Boolean> |
purgeElasticsearchIndexes()
deletes all Elasticsearch indexes.
|
ApiResponse<String> |
regenCommandToken(String commandId)
will create a new token if the user have the right permissions.
|
ApiResponse<OAuthApp> |
regenerateOAuthAppSecret(String appId)
regenerates the client secret for a registered OAuth 2.0 client application.
|
ApiResponse<OutgoingWebhook> |
regenOutgoingHookToken(String hookId)
regenerate the outgoing webhook token.
|
ApiResponse<Boolean> |
reloadConfig()
will reload the server configuration.
|
ApiResponse<Boolean> |
removeLicense() |
ApiResponse<Boolean> |
removePlugin(String pluginId) |
ApiResponse<Boolean> |
removeTeamIcon(String teamId)
Remove the team icon.
|
ApiResponse<Boolean> |
removeTeamMember(String teamId,
String userId)
will remove a user from a team.
|
ApiResponse<Boolean> |
removeUserFromChannel(String channelId,
String userId)
will delete the channel member object for a user, effectively removing the user from a channel.
|
ApiResponse<Boolean> |
resetPassword(String token,
String newPassword)
uses a recovery code to update reset a user's password.
|
ApiResponse<Channel> |
restoreChannel(String channelId) |
ApiResponse<Boolean> |
revokeAllActiveSessionForUser(String userId) |
ApiResponse<Boolean> |
revokeSession(String userId,
String sessionId)
revokes a user session based on the provided user id and session id strings.
|
ApiResponse<Boolean> |
revokeUserAccessToken(String tokenId) |
ApiResponse<Reaction> |
saveReaction(Reaction reaction)
saves an emoji reaction for a post.
|
ApiResponse<ChannelList> |
searchChannels(String teamId,
ChannelSearch search)
returns the channels on a team matching the provided search term.
|
ApiResponse<EmojiList> |
searchEmoji(SearchEmojiRequest searchRequest)
search custom emoji based on request.
|
ApiResponse<PostSearchResults> |
searchPosts(String teamId,
String terms,
boolean isOrSearch)
returns any posts with matching term string.
|
ApiResponse<TeamList> |
searchTeams(TeamSearch search)
returns teams matching the provided search term.
|
ApiResponse<UserAccessTokenList> |
searchTokens(String term) |
ApiResponse<UserList> |
searchUsers(UserSearch search)
returns a list of users based on some search criteria.
|
ApiResponse<Boolean> |
sendPasswordResetEmail(String email)
will send a link for password resetting to a user with the provided email.
|
ApiResponse<Boolean> |
sendVerificationEmail(String email)
will send an email to the user with the provided email addresses, if that user exists.
|
void |
setAccessToken(String token)
Set Personal Access Token that use to access Mattermost API to this client.
|
void |
setOAuthToken(String token) |
ApiResponse<Boolean> |
setProfileImage(String userId,
Path imageFilePath)
sets profile image of the user.
|
ApiResponse<Boolean> |
setTeamIcon(String teamId,
Path iconFilePath)
Set the team icon.
|
ApiResponse<SwitchAccountTypeResult> |
switchAccountType(SwitchRequest switchRequest)
changes a user's login type from one type to another.
|
ApiResponse<Boolean> |
syncLdap()
will force a sync with the configured LDAP server.
|
ApiResponse<TeamExists> |
teamExists(String name,
String etag)
returns true or false if the team exist or not.
|
ApiResponse<Boolean> |
testElasticsearchConfiguration()
test Elasticsearch configuration.
|
ApiResponse<Boolean> |
testEmail()
will attempt to connect to the configured SMTP server.
|
ApiResponse<Boolean> |
testLdap()
will attempt to connect to the configured LDAP server and return OK if configured correctly.
|
ApiResponse<Boolean> |
unpinPost(String postId)
unpin a post based on provided post id string.
|
ApiResponse<Channel> |
updateChannel(Channel channel)
update a channel based on the provided channel object.
|
ApiResponse<Boolean> |
updateChannelNotifyProps(String channelId,
String userId,
Map<String,String> props)
will update the notification properties on a channel for a user.
|
ApiResponse<Boolean> |
updateChannelRoles(String channelId,
String userId,
Role... roles)
will update the roles on a channel for a user.
|
ApiResponse<Command> |
updateCommand(Command cmd)
updates a command based on the provided Command object.
|
ApiResponse<Config> |
updateConfig(Config config)
will update the server configuration.
|
ApiResponse<IncomingWebhook> |
updateIncomingWebhook(IncomingWebhook hook)
updates an incoming webhook for a channel.
|
ApiResponse<OutgoingWebhook> |
updateOutgoingWebhook(OutgoingWebhook hook)
updates an outgoing webhook.
|
ApiResponse<Post> |
updatePost(String postId,
Post post)
updates a post based on the provided post object.
|
ApiResponse<Boolean> |
updatePreferences(String userId,
Preferences preferences)
saves the user's preferences.
|
ApiResponse<Team> |
updateTeam(Team team)
will update a team.
|
ApiResponse<Boolean> |
updateTeamMemberRoles(String teamId,
String userId,
Role... newRoles)
will update the roles on a team for a user.
|
ApiResponse<User> |
updateUser(User user)
updates a user in the system based on the provided user object.
|
ApiResponse<Boolean> |
updateUserActive(String userId,
boolean active)
updates status of a user whether active or not.
|
ApiResponse<Boolean> |
updateUserMfa(String userId,
String code,
boolean activate)
activates multi-factor authentication for a user if activate is true and a valid code is
provided.
|
ApiResponse<Boolean> |
updateUserPassword(String userId,
String currentPassword,
String newPassword)
updates a user's password.
|
ApiResponse<Boolean> |
updateUserRoles(String userId,
Role... roles)
updates a user's roles in the system.
|
ApiResponse<Status> |
updateUserStatus(String userId,
Status userStatus)
sets a user's status based on the provided user id string.
|
ApiResponse<Boolean> |
uploadBrandImage(Path dataFile)
sets the brand image for the system.
|
ApiResponse<FileUploadResult> |
uploadFile(String channelId,
Path... filePaths)
Upload a file to specified channel.
|
ApiResponse<Boolean> |
uploadLicenseFile(Path licenseFile) |
ApiResponse<PluginManifest> |
uploadPlugin(Path plugin,
boolean force) |
ApiResponse<Boolean> |
uploadSamlIdpCertificate(Path dataFile,
String fileName)
will upload an IDP certificate for SAML and set the config to use it.
|
ApiResponse<Boolean> |
uploadSamlPrivateCertificate(Path dataFile,
String fileName)
will upload a private key for SAML and set the config to use it.
|
ApiResponse<Boolean> |
uploadSamlPublicCertificate(Path dataFile,
String fileName)
will upload a public certificate for SAML and set the config to use it.
|
ApiResponse<Boolean> |
verifyUserEmail(String token)
will verify a user's email using the supplied token.
|
ApiResponse<ChannelViewResponse> |
viewChannel(String userId,
ChannelView view)
performs a view action for a user.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateGroupChannel, getChannel, getChannelByName, getChannelByNameForTeamName, getChannelMember, getChannelMembers, getChannelMembers, getChannelMembersByIds, getChannelMembersForUser, getChannelsForTeamForUser, getChannelStats, getDeletedChannels, getPinnedPosts, getPublicChannelsByIdsForTeam, getPublicChannelsForTeam, getPublicChannelsForTeam, updateChannelRoleslistCommandsgetComplianceReportsgetEmojiListgetAnalytics, getAnalytics, getAnalytics, getOldClientConfig, getOldClientLicensegetAuthorizedOAuthAppsForUser, getOAuthAppsuploadPlugingetFlaggedPostsForUser, getFlaggedPostsForUserInChannel, getFlaggedPostsForUserInTeam, getPost, getPostsAfter, getPostsAfter, getPostsBefore, getPostsBefore, getPostsForChannel, getPostsForChannel, getPostsSince, getPostsSince, getPostThread, searchPosts, updatePostgetUsersStatusesByIds, getUserStatusaddTeamMembers, getAllTeams, getAllTeams, getTeam, getTeamByName, getTeamMember, getTeamMembers, getTeamMembers, getTeamMembersByIds, getTeamMembersForUser, getTeamsForUser, getTeamStats, removeTeamMember, teamExists, updateTeamMemberRolesautocompleteUsers, autocompleteUsersInChannel, autocompleteUsersInTeam, getMe, getProfileImage, getSessions, getTeamUnreadForUser, getUser, getUserAccessTokens, getUserAccessTokensAllUsers, getUserAudits, getUserAudits, getUserByEmail, getUserByUsername, getUsers, getUsers, getUsersByIds, getUsersByUsernames, getUsersInChannel, getUsersInChannel, getUsersInChannel, getUsersInChannel, getUsersInTeam, getUsersInTeam, getUsersInTeam, getUsersInTeam, getUsersNotInChannel, getUsersNotInChannel, getUsersNotInTeam, getUsersNotInTeam, getUsersWithoutTeam, getUsersWithoutTeam, revokeSession, updateUserRolesgetIncomingWebhook, getIncomingWebhooks, getIncomingWebhooks, getIncomingWebhooksForTeam, getIncomingWebhooksForTeam, getOutgoingWebhooks, getOutgoingWebhooks, getOutgoingWebhooksForChannel, getOutgoingWebhooksForChannel, getOutgoingWebhooksForTeam, getOutgoingWebhooksForTeamprotected static final String API_URL_SUFFIX
protected static final String HEADER_ETAG_CLIENT
protected static final String HEADER_AUTH
public MattermostClient(String url)
public static MattermostClient.MattermostClientBuilder builder()
protected javax.ws.rs.client.Client buildClient()
public void close()
close in interface AutoCloseablepublic void setOAuthToken(String token)
public void clearOAuthToken()
public void setAccessToken(String token)
public String getUsersRoute()
public String getUserTokensRoute()
public String getTeamsRoute()
public String getChannelsRoute()
public String getChannelByNameForTeamNameRoute(String channelName, String teamName)
public String getPostsRoute()
public String getConfigRoute()
public String getLicenseRoute()
public String getFilesRoute()
public String getSystemRoute()
public String getTestEmailRoute()
public String getDatabaseRoute()
public String getCacheRoute()
public String getClusterRoute()
public String getIncomingWebhooksRoute()
public String getComplianceReportsRoute()
public String getOutgoingWebhooksRoute()
public String getUserStatusesRoute()
public String getSamlRoute()
public String getLdapRoute()
public String getBrandImageRoute()
public String getCommandsRoute()
public String getEmojisRoute()
public String getReactionsRoute()
public String getOAuthAppsRoute()
public String getElasticsearchRoute()
public String getPluginsRoute()
public String getOpenGraphRoute()
protected <T> ApiResponse<T> doApiGet(String url, String etag, Class<T> responseType)
protected <T> ApiResponse<T> doApiGet(String url, String etag, javax.ws.rs.core.GenericType<T> responseType)
protected ApiResponse<Void> doApiGet(String url, String etag)
protected <T,U> ApiResponse<T> doApiPost(String url, U data, Class<T> responseType)
protected <T,U> ApiResponse<T> doApiPost(String url, U data, javax.ws.rs.core.GenericType<T> responseType)
protected <U> ApiResponse<Void> doApiPost(String url, U data)
protected ApiResponse<Void> doApiPostMultiPart(String url, org.glassfish.jersey.media.multipart.MultiPart multiPart)
protected <T> ApiResponse<T> doApiPostMultiPart(String url, org.glassfish.jersey.media.multipart.MultiPart multiPart, Class<T> responseType)
protected <T,U> ApiResponse<T> doApiPut(String url, U data, Class<T> responseType)
protected <U> ApiResponse<Void> doApiPut(String url, U data)
protected <T> ApiResponse<T> doApiDelete(String url, Class<T> responseType)
protected ApiResponse<Void> doApiDelete(String url)
protected <T,U> ApiResponse<T> doApiRequest(String method, String url, U data, String etag, Class<T> responseType)
protected <T,U> ApiResponse<T> doApiRequest(String method, String url, U data, String etag, javax.ws.rs.core.GenericType<T> responseType)
protected <U> ApiResponse<Void> doApiRequest(String method, String url, U data, String etag)
protected ApiResponse<Path> doApiGetFile(String url, String etag) throws IOException
IOExceptionpublic User loginById(String id, String password)
AuthenticationApiloginById in interface AuthenticationApiprotected ApiResponse<User> onLogin(ApiResponse<Void> loginResponse)
protected User login(LoginRequest param)
public User login(String loginId, String password)
AuthenticationApilogin in interface AuthenticationApipublic User loginByLdap(String loginId, String password)
AuthenticationApiloginByLdap in interface AuthenticationApipublic User loginWithDevice(String loginId, String password, String deviceId)
AuthenticationApiloginWithDevice in interface AuthenticationApipublic ApiResponse<Boolean> logout()
AuthenticationApilogout in interface AuthenticationApiprotected ApiResponse<Boolean> onLogout(ApiResponse<Void> logoutResponse)
public ApiResponse<SwitchAccountTypeResult> switchAccountType(SwitchRequest switchRequest)
AuthenticationApiswitchAccountType in interface AuthenticationApipublic ApiResponse<User> createUser(User user)
UserApicreateUser in interface UserApipublic ApiResponse<User> getMe(String etag)
UserApipublic ApiResponse<User> getUser(String userId, String etag)
UserApipublic ApiResponse<User> getUserByUsername(String userName, String etag)
UserApigetUserByUsername in interface UserApipublic ApiResponse<User> getUserByEmail(String email, String etag)
UserApigetUserByEmail in interface UserApipublic ApiResponse<UserAutocomplete> autocompleteUsersInTeam(String teamId, String username, String etag)
UserApiautocompleteUsersInTeam in interface UserApipublic ApiResponse<UserAutocomplete> autocompleteUsersInChannel(String teamId, String channelId, String username, String etag)
UserApiautocompleteUsersInChannel in interface UserApipublic ApiResponse<UserAutocomplete> autocompleteUsers(String username, String etag)
UserApiautocompleteUsers in interface UserApipublic ApiResponse<byte[]> getProfileImage(String userId, String etag)
UserApigetProfileImage in interface UserApipublic ApiResponse<UserList> getUsers(Pager pager, String etag)
UserApipublic ApiResponse<UserList> getUsersInTeam(String teamId, UsersOrder.InTeam order, Pager pager, String etag)
UserApigetUsersInTeam in interface UserApipublic ApiResponse<UserList> getUsersNotInTeam(String teamId, Pager pager, String etag)
UserApigetUsersNotInTeam in interface UserApipublic ApiResponse<UserList> getUsersInChannel(String channelId, UsersOrder.InChannel order, Pager pager, String etag)
UserApigetUsersInChannel in interface UserApipublic ApiResponse<UserList> getUsersNotInChannel(String teamId, String channelId, Pager pager, String etag)
UserApigetUsersNotInChannel in interface UserApipublic ApiResponse<UserList> getUsersWithoutTeam(Pager pager, String etag)
UserApigetUsersWithoutTeam in interface UserApipublic ApiResponse<UserList> getUsersByIds(String... userIds)
UserApigetUsersByIds in interface UserApipublic ApiResponse<UserList> getUsersByUsernames(String... usernames)
UserApigetUsersByUsernames in interface UserApipublic ApiResponse<UserList> searchUsers(UserSearch search)
UserApisearchUsers in interface UserApipublic ApiResponse<User> updateUser(User user)
UserApiupdateUser in interface UserApipublic ApiResponse<User> patchUser(String userId, UserPatch patch)
UserApipublic ApiResponse<Boolean> updateUserMfa(String userId, String code, boolean activate)
UserApiupdateUserMfa in interface UserApipublic boolean checkUserMfa(String loginId)
UserApicheckUserMfa in interface UserApipublic ApiResponse<MfaSecret> generateMfaSecret(String userId)
UserApigenerateMfaSecret in interface UserApipublic ApiResponse<Boolean> updateUserPassword(String userId, String currentPassword, String newPassword)
UserApiupdateUserPassword in interface UserApipublic ApiResponse<Boolean> updateUserRoles(String userId, Role... roles)
UserApiupdateUserRoles in interface UserApipublic ApiResponse<Boolean> updateUserActive(String userId, boolean active)
UserApiupdateUserActive in interface UserApipublic ApiResponse<Boolean> deleteUser(String userId)
UserApideleteUser in interface UserApipublic ApiResponse<Boolean> sendPasswordResetEmail(String email)
UserApisendPasswordResetEmail in interface UserApipublic ApiResponse<Boolean> resetPassword(String token, String newPassword)
UserApiresetPassword in interface UserApipublic ApiResponse<SessionList> getSessions(String userId, String etag)
UserApigetSessions in interface UserApipublic ApiResponse<Boolean> revokeSession(String userId, String sessionId)
UserApirevokeSession in interface UserApipublic ApiResponse<Boolean> attachDeviceId(String deviceId)
UserApiattachDeviceId in interface UserApipublic ApiResponse<TeamUnreadList> getTeamUnreadForUser(String userId, String teamIdToExclude)
UserApigetTeamUnreadForUser in interface UserApipublic ApiResponse<Audits> getUserAudits(String userId, Pager pager, String etag)
UserApigetUserAudits in interface UserApipublic ApiResponse<Boolean> verifyUserEmail(String token)
UserApiverifyUserEmail in interface UserApipublic ApiResponse<Boolean> sendVerificationEmail(String email)
UserApisendVerificationEmail in interface UserApipublic ApiResponse<Boolean> setProfileImage(String userId, Path imageFilePath)
UserApisetProfileImage in interface UserApipublic ApiResponse<UserAccessToken> createUserAccessToken(String userId, String description)
createUserAccessToken in interface UserApipublic ApiResponse<UserAccessTokenList> getUserAccessTokens(String userId, Pager pager)
getUserAccessTokens in interface UserApipublic ApiResponse<UserAccessTokenList> getUserAccessTokensAllUsers(Pager pager)
getUserAccessTokensAllUsers in interface UserApipublic ApiResponse<Boolean> revokeUserAccessToken(String tokenId)
revokeUserAccessToken in interface UserApipublic ApiResponse<UserAccessToken> getUserAccessToken(String tokenId)
getUserAccessToken in interface UserApipublic ApiResponse<Boolean> disableUserAccessToken(String tokenId)
disableUserAccessToken in interface UserApipublic ApiResponse<Boolean> enableUserAccessToken(String tokenId)
enableUserAccessToken in interface UserApipublic ApiResponse<UserAccessTokenList> searchTokens(String term)
searchTokens in interface UserApipublic ApiResponse<Boolean> revokeAllActiveSessionForUser(String userId)
revokeAllActiveSessionForUser in interface UserApipublic ApiResponse<Boolean> deleteProfileImage(String userId)
UserApideleteProfileImage in interface UserApipublic ApiResponse<Team> createTeam(Team team)
TeamApicreateTeam in interface TeamApipublic ApiResponse<Team> getTeam(String teamId, String etag)
TeamApipublic ApiResponse<TeamList> getAllTeams(Pager pager, String etag)
TeamApigetAllTeams in interface TeamApipublic ApiResponse<Team> getTeamByName(String name, String etag)
TeamApigetTeamByName in interface TeamApipublic ApiResponse<TeamList> searchTeams(TeamSearch search)
TeamApisearchTeams in interface TeamApipublic ApiResponse<TeamExists> teamExists(String name, String etag)
TeamApiteamExists in interface TeamApipublic ApiResponse<TeamList> getTeamsForUser(String userId, String etag)
TeamApigetTeamsForUser in interface TeamApipublic ApiResponse<TeamMember> getTeamMember(String teamId, String userId, String etag)
TeamApigetTeamMember in interface TeamApipublic ApiResponse<Boolean> updateTeamMemberRoles(String teamId, String userId, Role... newRoles)
TeamApiupdateTeamMemberRoles in interface TeamApipublic ApiResponse<Team> updateTeam(Team team)
TeamApiupdateTeam in interface TeamApipublic ApiResponse<Team> patchTeam(String teamId, TeamPatch patch)
TeamApipublic ApiResponse<Boolean> deleteTeam(String teamId)
TeamApideleteTeam in interface TeamApiTeamApi.deleteTeam(String, boolean)public ApiResponse<Boolean> deleteTeam(String teamId, boolean permanent)
TeamApideleteTeam in interface TeamApipermanent - true: Permanently delete the team, to be used for compliance reasons
only.TeamApi.deleteTeam(String)public ApiResponse<TeamMemberList> getTeamMembers(String teamId, Pager pager, String etag)
TeamApigetTeamMembers in interface TeamApipublic ApiResponse<TeamMemberList> getTeamMembersForUser(String userId, String etag)
TeamApigetTeamMembersForUser in interface TeamApipublic ApiResponse<TeamMemberList> getTeamMembersByIds(String teamId, String... userIds)
TeamApigetTeamMembersByIds in interface TeamApipublic ApiResponse<TeamMember> addTeamMember(TeamMember teamMemberToAdd)
TeamApiaddTeamMember in interface TeamApi@Deprecated public ApiResponse<TeamMember> addTeamMember(String teamId, String userId, String hash, String dataToHash, String inviteId)
TeamApiaddTeamMember in interface TeamApipublic ApiResponse<TeamMember> addTeamMember(String hash, String dataToHash, String inviteId)
TeamApiaddTeamMember in interface TeamApipublic ApiResponse<TeamMemberList> addTeamMembers(String teamId, String... userIds)
TeamApiaddTeamMembers in interface TeamApipublic ApiResponse<Boolean> removeTeamMember(String teamId, String userId)
TeamApiremoveTeamMember in interface TeamApipublic ApiResponse<TeamStats> getTeamStats(String teamId, String etag)
TeamApigetTeamStats in interface TeamApipublic ApiResponse<Path> getTeamIcon(String teamId) throws IOException
TeamApigetTeamIcon in interface TeamApiIOExceptionpublic ApiResponse<Boolean> setTeamIcon(String teamId, Path iconFilePath)
TeamApisetTeamIcon in interface TeamApipublic ApiResponse<Boolean> removeTeamIcon(String teamId)
TeamApiremoveTeamIcon in interface TeamApipublic ApiResponse<TeamUnread> getTeamUnread(String teamId, String userId)
TeamApigetTeamUnread in interface TeamApipublic ApiResponse<byte[]> importTeam(byte[] data, int filesize, String importFrom, String fileName, String teamId)
TeamApiimportTeam in interface TeamApipublic ApiResponse<Boolean> inviteUsersToTeam(String teamId, Collection<String> userEmails)
TeamApiinviteUsersToTeam in interface TeamApipublic ApiResponse<TeamInviteInfo> getInviteInfo(String inviteId)
TeamApigetInviteInfo in interface TeamApipublic ApiResponse<Channel> createChannel(Channel channel)
ChannelApicreateChannel in interface ChannelApipublic ApiResponse<Channel> updateChannel(Channel channel)
ChannelApiupdateChannel in interface ChannelApipublic ApiResponse<Channel> patchChannel(String channelId, ChannelPatch patch)
ChannelApipatchChannel in interface ChannelApipublic ApiResponse<Channel> createDirectChannel(String userId1, String userId2)
ChannelApicreateDirectChannel in interface ChannelApipublic ApiResponse<Channel> createGroupChannel(String... userIds)
ChannelApicreateGroupChannel in interface ChannelApipublic ApiResponse<Channel> getChannel(String channelId, String etag)
ChannelApigetChannel in interface ChannelApipublic ApiResponse<ChannelStats> getChannelStats(String channelId, String etag)
ChannelApigetChannelStats in interface ChannelApipublic ApiResponse<PostList> getPinnedPosts(String channelId, String etag)
ChannelApigetPinnedPosts in interface ChannelApipublic ApiResponse<ChannelList> getPublicChannelsForTeam(String teamId, Pager pager, String etag)
ChannelApigetPublicChannelsForTeam in interface ChannelApipublic ApiResponse<ChannelList> getPublicChannelsByIdsForTeam(String teamId, String... channelIds)
ChannelApigetPublicChannelsByIdsForTeam in interface ChannelApipublic ApiResponse<ChannelList> getChannelsForTeamForUser(String teamId, String userId, String etag)
ChannelApigetChannelsForTeamForUser in interface ChannelApipublic ApiResponse<ChannelList> searchChannels(String teamId, ChannelSearch search)
ChannelApisearchChannels in interface ChannelApipublic ApiResponse<Boolean> deleteChannel(String channelId)
ChannelApideleteChannel in interface ChannelApipublic ApiResponse<Channel> getChannelByName(String channelName, String teamId, String etag)
ChannelApigetChannelByName in interface ChannelApipublic ApiResponse<Channel> getChannelByNameForTeamName(String channelName, String teamName, String etag)
ChannelApigetChannelByNameForTeamName in interface ChannelApipublic ApiResponse<ChannelMembers> getChannelMembers(String channelId, Pager pager, String etag)
ChannelApigetChannelMembers in interface ChannelApipublic ApiResponse<ChannelMembers> getChannelMembersByIds(String channelId, String... userIds)
ChannelApigetChannelMembersByIds in interface ChannelApipublic ApiResponse<ChannelMember> getChannelMember(String channelId, String userId, String etag)
ChannelApigetChannelMember in interface ChannelApipublic ApiResponse<ChannelMembers> getChannelMembersForUser(String userId, String teamId, String etag)
ChannelApigetChannelMembersForUser in interface ChannelApipublic ApiResponse<ChannelViewResponse> viewChannel(String userId, ChannelView view)
ChannelApiviewChannel in interface ChannelApipublic ApiResponse<ChannelUnread> getChannelUnread(String channelId, String userId)
ChannelApigetChannelUnread in interface ChannelApipublic ApiResponse<Boolean> updateChannelRoles(String channelId, String userId, Role... roles)
ChannelApiupdateChannelRoles in interface ChannelApipublic ApiResponse<Boolean> updateChannelNotifyProps(String channelId, String userId, Map<String,String> props)
ChannelApiupdateChannelNotifyProps in interface ChannelApipublic ApiResponse<ChannelMember> addChannelMember(String channelId, String userId)
ChannelApiaddChannelMember in interface ChannelApipublic ApiResponse<Boolean> removeUserFromChannel(String channelId, String userId)
ChannelApiremoveUserFromChannel in interface ChannelApipublic ApiResponse<Channel> restoreChannel(String channelId)
restoreChannel in interface ChannelApipublic ApiResponse<ChannelList> getDeletedChannels(String teamId, Pager pager)
getDeletedChannels in interface ChannelApipublic ApiResponse<Channel> convertChannelToPrivate(String channelId)
ChannelApiconvertChannelToPrivate in interface ChannelApipublic ApiResponse<Post> createPost(Post post)
PostApicreatePost in interface PostApipublic ApiResponse<Post> createEphemeralPost(String sendToUserId, Post post)
PostApitargetUserId.createEphemeralPost in interface PostApipublic ApiResponse<Post> updatePost(String postId, Post post)
PostApiupdatePost in interface PostApipublic ApiResponse<Post> patchPost(String postId, PostPatch patch)
PostApipublic ApiResponse<Boolean> pinPost(String postId)
PostApipublic ApiResponse<Boolean> unpinPost(String postId)
PostApipublic ApiResponse<Post> getPost(String postId, String etag)
PostApipublic ApiResponse<Boolean> deletePost(String postId)
PostApideletePost in interface PostApipublic ApiResponse<PostList> getPostThread(String postId, String etag)
PostApigetPostThread in interface PostApipublic ApiResponse<PostList> getPostsForChannel(String channelId, Pager pager, String etag)
PostApigetPostsForChannel in interface PostApipublic ApiResponse<PostList> getFlaggedPostsForUser(String userId, Pager pager)
PostApigetFlaggedPostsForUser in interface PostApipublic ApiResponse<PostList> getFlaggedPostsForUserInTeam(String userId, String teamId, Pager pager)
PostApigetFlaggedPostsForUserInTeam in interface PostApipublic ApiResponse<PostList> getFlaggedPostsForUserInChannel(String userId, String channelId, Pager pager)
PostApigetFlaggedPostsForUserInChannel in interface PostApipublic ApiResponse<PostList> getPostsSince(String channelId, long time)
PostApigetPostsSince in interface PostApipublic ApiResponse<PostList> getPostsAfter(String channelId, String postId, Pager pager, String etag)
PostApigetPostsAfter in interface PostApipublic ApiResponse<PostList> getPostsBefore(String channelId, String postId, Pager pager, String etag)
PostApigetPostsBefore in interface PostApipublic ApiResponse<PostSearchResults> searchPosts(String teamId, String terms, boolean isOrSearch)
PostApisearchPosts in interface PostApipublic ApiResponse<FileInfo[]> getFileInfoForPost(String postId)
PostApigetFileInfoForPost in interface PostApipublic ApiResponse<FileUploadResult> uploadFile(String channelId, Path... filePaths) throws IOException
FilesApiuploadFile in interface FilesApichannelId - channel id will be upload file to.filePaths - file path to upload.IOException - If an I/O error occurspublic ApiResponse<Path> getFile(String fileId) throws IOException
FilesApigetFile in interface FilesApifileId - the file id to getIOException - If an I/O error occurspublic ApiResponse<Path> getFileThumbnail(String fileId) throws IOException
FilesApigetFileThumbnail in interface FilesApifileId - the file id to get thumbnailIOException - If an I/O error occurspublic ApiResponse<Path> getFilePreview(String fileId) throws IOException
FilesApigetFilePreview in interface FilesApifileId - the file id to get previewIOException - If an I/O error occurspublic ApiResponse<String> getPublicFileLink(String fileId)
FilesApigetPublicFileLink in interface FilesApifileId - the file id to get public linkpublic ApiResponse<FileInfo> getFileMetadata(String fileId)
FilesApigetFileMetadata in interface FilesApifileId - the file id to get metadatapublic ApiResponse<Boolean> getPing()
SystemApipublic ApiResponse<Boolean> testEmail()
SystemApipublic ApiResponse<Config> getConfig()
SystemApipublic ApiResponse<Boolean> reloadConfig()
SystemApireloadConfig in interface SystemApipublic ApiResponse<Map<String,String>> getOldClientConfig(String etag)
SystemApigetOldClientConfig in interface SystemApipublic ApiResponse<Map<String,String>> getOldClientLicense(String etag)
SystemApigetOldClientLicense in interface SystemApipublic ApiResponse<Boolean> databaseRecycle()
SystemApidatabaseRecycle in interface SystemApipublic ApiResponse<Boolean> invalidateCaches()
SystemApiinvalidateCaches in interface SystemApipublic ApiResponse<Config> updateConfig(Config config)
SystemApiupdateConfig in interface SystemApipublic ApiResponse<AnalyticsRows> getAnalytics(AnalyticsCategory category, String teamId)
getAnalytics in interface SystemApipublic ApiResponse<Boolean> uploadLicenseFile(Path licenseFile)
uploadLicenseFile in interface SystemApipublic ApiResponse<Boolean> removeLicense()
removeLicense in interface SystemApipublic ApiResponse<IncomingWebhook> createIncomingWebhook(IncomingWebhook hook)
WebhookApicreateIncomingWebhook in interface WebhookApipublic ApiResponse<IncomingWebhook> updateIncomingWebhook(IncomingWebhook hook)
WebhookApiupdateIncomingWebhook in interface WebhookApipublic ApiResponse<IncomingWebhookList> getIncomingWebhooks(Pager pager, String etag)
WebhookApigetIncomingWebhooks in interface WebhookApipublic ApiResponse<IncomingWebhookList> getIncomingWebhooksForTeam(String teamId, Pager pager, String etag)
WebhookApigetIncomingWebhooksForTeam in interface WebhookApipublic ApiResponse<IncomingWebhook> getIncomingWebhook(String hookId, String etag)
WebhookApigetIncomingWebhook in interface WebhookApipublic ApiResponse<Boolean> deleteIncomingWebhook(String hookId)
WebhookApideleteIncomingWebhook in interface WebhookApipublic ApiResponse<OutgoingWebhook> createOutgoingWebhook(OutgoingWebhook hook)
WebhookApicreateOutgoingWebhook in interface WebhookApipublic ApiResponse<OutgoingWebhook> updateOutgoingWebhook(OutgoingWebhook hook)
WebhookApiupdateOutgoingWebhook in interface WebhookApipublic ApiResponse<OutgoingWebhookList> getOutgoingWebhooks(Pager pager, String etag)
WebhookApigetOutgoingWebhooks in interface WebhookApipublic ApiResponse<OutgoingWebhook> getOutgoingWebhook(String hookId)
WebhookApigetOutgoingWebhook in interface WebhookApipublic ApiResponse<OutgoingWebhookList> getOutgoingWebhooksForChannel(String channelId, Pager pager, String etag)
WebhookApigetOutgoingWebhooksForChannel in interface WebhookApipublic ApiResponse<OutgoingWebhookList> getOutgoingWebhooksForTeam(String teamId, Pager pager, String etag)
WebhookApigetOutgoingWebhooksForTeam in interface WebhookApipublic ApiResponse<OutgoingWebhook> regenOutgoingHookToken(String hookId)
WebhookApiregenOutgoingHookToken in interface WebhookApipublic ApiResponse<Boolean> deleteOutgoingWebhook(String hookId)
WebhookApideleteOutgoingWebhook in interface WebhookApipublic ApiResponse<Preferences> getPreferences(String userId)
PreferencesApigetPreferences in interface PreferencesApipublic ApiResponse<Boolean> updatePreferences(String userId, Preferences preferences)
PreferencesApiupdatePreferences in interface PreferencesApipublic ApiResponse<Boolean> deletePreferences(String userId, Preferences preferences)
PreferencesApideletePreferences in interface PreferencesApipublic ApiResponse<Preferences> getPreferencesByCategory(String userId, PreferenceCategory category)
PreferencesApigetPreferencesByCategory in interface PreferencesApipublic ApiResponse<Preference> getPreferenceByCategoryAndName(String userId, PreferenceCategory category, String preferenceName)
PreferencesApigetPreferenceByCategoryAndName in interface PreferencesApipublic ApiResponse<Path> getSamlMetadata() throws IOException
SamlApigetSamlMetadata in interface SamlApiIOExceptionpublic ApiResponse<Boolean> uploadSamlIdpCertificate(Path dataFile, String fileName)
SamlApiuploadSamlIdpCertificate in interface SamlApipublic ApiResponse<Boolean> uploadSamlPublicCertificate(Path dataFile, String fileName)
SamlApiuploadSamlPublicCertificate in interface SamlApipublic ApiResponse<Boolean> uploadSamlPrivateCertificate(Path dataFile, String fileName)
SamlApiuploadSamlPrivateCertificate in interface SamlApipublic ApiResponse<Boolean> deleteSamlIdpCertificate()
SamlApideleteSamlIdpCertificate in interface SamlApipublic ApiResponse<Boolean> deleteSamlPublicCertificate()
SamlApideleteSamlPublicCertificate in interface SamlApipublic ApiResponse<Boolean> deleteSamlPrivateCertificate()
SamlApideleteSamlPrivateCertificate in interface SamlApipublic ApiResponse<SamlCertificateStatus> getSamlCertificateStatus()
SamlApigetSamlCertificateStatus in interface SamlApipublic ApiResponse<Compliance> createComplianceReport(Compliance report)
ComplianceApicreateComplianceReport in interface ComplianceApipublic ApiResponse<Compliances> getComplianceReports(Pager pager)
ComplianceApigetComplianceReports in interface ComplianceApipublic ApiResponse<Compliance> getComplianceReport(String reportId)
ComplianceApigetComplianceReport in interface ComplianceApipublic ApiResponse<Object> downloadComplianceReport(String reportId)
ComplianceApidownloadComplianceReport in interface ComplianceApipublic ApiResponse<ClusterInfo[]> getClusterStatus()
getClusterStatus in interface ClusterApipublic ApiResponse<Boolean> syncLdap()
LdapApipublic ApiResponse<Boolean> testLdap()
LdapApipublic ApiResponse<Audits> getAudits(Pager pager, String etag)
AuditsApipublic ApiResponse<Path> getBrandImage() throws IOException
BrandApigetBrandImage in interface BrandApiIOExceptionpublic ApiResponse<Boolean> uploadBrandImage(Path dataFile)
BrandApiuploadBrandImage in interface BrandApipublic ApiResponse<Boolean> deleteBrandImage()
BrandApideleteBrandImage in interface BrandApipublic ApiResponse<List<String>> getLogs(Pager pager)
LogsApipublic ApiResponse<Map<String,String>> postLog(Map<String,String> message)
LogsApipublic ApiResponse<OAuthApp> createOAuthApp(OAuthApp app)
OAuthApicreateOAuthApp in interface OAuthApipublic ApiResponse<List<OAuthApp>> getOAuthApps(Pager pager)
OAuthApigetOAuthApps in interface OAuthApipublic ApiResponse<OAuthApp> getOAuthApp(String appId)
OAuthApigetOAuthApp in interface OAuthApipublic ApiResponse<OAuthApp> getOAuthAppInfo(String appId)
OAuthApigetOAuthAppInfo in interface OAuthApipublic ApiResponse<Boolean> deleteOAuthApp(String appId)
OAuthApideleteOAuthApp in interface OAuthApipublic ApiResponse<OAuthApp> regenerateOAuthAppSecret(String appId)
OAuthApiregenerateOAuthAppSecret in interface OAuthApipublic ApiResponse<List<OAuthApp>> getAuthorizedOAuthAppsForUser(String userId, Pager pager)
OAuthApigetAuthorizedOAuthAppsForUser in interface OAuthApipublic String authorizeOAuthApp(AuthorizeRequest authRequest)
OAuthApiauthorizeOAuthApp in interface OAuthApipublic ApiResponse<Boolean> deauthorizeOAuthApp(String appId)
OAuthApideauthorizeOAuthApp in interface OAuthApipublic ApiResponse<Command> createCommand(Command cmd)
CommandsApicreateCommand in interface CommandsApipublic ApiResponse<Command> updateCommand(Command cmd)
CommandsApiupdateCommand in interface CommandsApipublic ApiResponse<Boolean> deleteCommand(String commandId)
CommandsApideleteCommand in interface CommandsApipublic ApiResponse<CommandList> listCommands(String teamId, boolean customOnly)
CommandsApilistCommands in interface CommandsApipublic ApiResponse<CommandResponse> executeCommand(String channelId, String command)
CommandsApiexecuteCommand in interface CommandsApipublic ApiResponse<CommandList> listAutocompleteCommands(String teamId)
CommandsApilistAutocompleteCommands in interface CommandsApipublic ApiResponse<String> regenCommandToken(String commandId)
CommandsApiregenCommandToken in interface CommandsApipublic ApiResponse<Status> getUserStatus(String userId, String etag)
StatusApigetUserStatus in interface StatusApipublic ApiResponse<StatusList> getUsersStatusesByIds(String... userIds)
StatusApigetUsersStatusesByIds in interface StatusApipublic ApiResponse<Status> updateUserStatus(String userId, Status userStatus)
StatusApiupdateUserStatus in interface StatusApipublic ApiResponse<WebrtcInfoResponse> getWebrtcToken()
WebrtcApigetWebrtcToken in interface WebrtcApipublic ApiResponse<Emoji> createEmoji(Emoji emoji, Path imageFile)
EmojiApicreateEmoji in interface EmojiApipublic ApiResponse<EmojiList> getEmojiList(Pager pager)
EmojiApigetEmojiList in interface EmojiApipager - add in Mattermost Server 4.1, in older version, ignore.public ApiResponse<Boolean> deleteEmoji(String emojiId)
EmojiApideleteEmoji in interface EmojiApipublic ApiResponse<Emoji> getEmoji(String emojiId)
EmojiApipublic ApiResponse<Path> getEmojiImage(String emojiId) throws IOException
EmojiApigetEmojiImage in interface EmojiApiIOExceptionpublic ApiResponse<Emoji> getEmojiByName(String emojiName)
EmojiApigetEmojiByName in interface EmojiApipublic ApiResponse<EmojiList> searchEmoji(SearchEmojiRequest searchRequest)
EmojiApisearchEmoji in interface EmojiApipublic ApiResponse<EmojiList> autocompleteEmoji(String name)
EmojiApiautocompleteEmoji in interface EmojiApipublic ApiResponse<Reaction> saveReaction(Reaction reaction)
ReactionApisaveReaction in interface ReactionApipublic ApiResponse<ReactionList> getReactions(String postId)
ReactionApigetReactions in interface ReactionApipublic ApiResponse<Boolean> deleteReaction(Reaction reaction)
ReactionApideleteReaction in interface ReactionApipublic ApiResponse<Boolean> testElasticsearchConfiguration()
ElasticsearchApitestElasticsearchConfiguration in interface ElasticsearchApipublic ApiResponse<Boolean> purgeElasticsearchIndexes()
ElasticsearchApipurgeElasticsearchIndexes in interface ElasticsearchApipublic ApiResponse<PluginManifest> uploadPlugin(Path plugin, boolean force)
uploadPlugin in interface PluginApipublic ApiResponse<Plugins> getPlugins()
getPlugins in interface PluginApipublic ApiResponse<Boolean> removePlugin(String pluginId)
removePlugin in interface PluginApipublic ApiResponse<Boolean> enablePlugin(String pluginId)
enablePlugin in interface PluginApipublic ApiResponse<Boolean> disablePlugin(String pluginId)
disablePlugin in interface PluginApipublic ApiResponse<PluginManifest[]> getWebappPlugins()
getWebappPlugins in interface PluginApipublic ApiResponse<net.bis5.opengraph.models.OpenGraph> getOpenGraphMetadata(String url)
OpenGraphApigetOpenGraphMetadata in interface OpenGraphApiCopyright © 2019. All rights reserved.