public class MattermostClient extends Object implements AutoCloseable, AuditsApi, AuthenticationApi, BrandApi, ChannelApi, ClusterApi, CommandsApi, ComplianceApi, EmojiApi, GeneralApi, LdapApi, LogsApi, OAuthApi, PostApi, PreferencesApi, ReactionApi, SamlApi, StatusApi, TeamApi, UserApi, WebhookApi, WebrtcApi
| 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.
API Change on Mattermost 4.0
|
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<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() |
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> |
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<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<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> |
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> |
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.
|
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 <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<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<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<Object> |
getBrandImage()
retrieves the previously uploaded brand image.
|
String |
getBrandRoute() |
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<List<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) |
ApiResponse<Emoji> |
getEmoji(String emojiId)
returns a custom emoji in the system on the provided emoji id string.
|
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() |
String |
getFileRoute(String fileId) |
String |
getFilesRoute() |
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() |
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<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.
|
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<List<Reaction>> |
getReactions(String postId)
returns a list of reactions to a post.
|
String |
getReactionsRoute() |
ApiResponse<SamlCertificateStatus> |
getSamlCertificateStatus()
returns metadata for the SAML configuration.
|
ApiResponse<String> |
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) |
String |
getTeamImportRoute(String teamId) |
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<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 |
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.
|
ApiResponse<UserList> |
getUsersInChannel(String channelId,
Pager pager,
String etag)
returns a page of users on a team.
|
ApiResponse<UserList> |
getUsersInTeam(String teamId,
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<List<Status>> |
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.
|
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<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> |
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> |
revokeSession(String userId,
String sessionId)
revokes a user session based on the provided user id and session id strings.
|
protected Object |
samlFileToMultipart(Path dataFile,
String dataFileName) |
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<PostList> |
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<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<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> |
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.
|
boolean |
uploadBrandImage(Path dataFile)
sets the brand image for the system.
|
boolean |
uploadSamlIdpCertificate(Path dataFile,
String fileName)
will upload an IDP certificate for SAML and set the config to use it.
|
boolean |
uploadSamlPrivateCertificate(Path dataFile,
String fileName)
will upload a private key for SAML and set the config to use it.
|
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, updateChannelRoleslistCommandsgetComplianceReportsgetEmojiListgetOldClientConfig, getOldClientLicensegetAuthorizedOAuthAppsForUser, getOAuthAppsgetFlaggedPostsForUser, 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, getUserAudits, getUserAudits, getUserByEmail, getUserByUsername, getUsers, getUsers, getUsersByIds, getUsersByUsernames, getUsersInChannel, getUsersInChannel, 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)
protected javax.ws.rs.client.Client buildClient()
public void close()
throws Exception
close in interface AutoCloseableExceptionpublic void setOAuthToken(String token)
public void clearOAuthToken()
public void setAccessToken(String token)
public String getUsersRoute()
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 getBrandRoute()
public String getCommandsRoute()
public String getEmojisRoute()
public String getReactionsRoute()
public String getOAuthAppsRoute()
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)
public User loginById(String id, String password)
loginById in interface AuthenticationApiprotected ApiResponse<User> onLogin(ApiResponse<Void> loginResponse)
protected User login(LoginRequest param)
public User login(String loginId, String password)
login in interface AuthenticationApipublic User loginByLdap(String loginId, String password)
loginByLdap in interface AuthenticationApipublic User loginWithDevice(String loginId, String password, String deviceId)
loginWithDevice in interface AuthenticationApipublic ApiResponse<Boolean> logout()
logout in interface AuthenticationApiprotected ApiResponse<Boolean> onLogout(ApiResponse<Void> logoutResponse)
public ApiResponse<SwitchAccountTypeResult> switchAccountType(SwitchRequest switchRequest)
switchAccountType in interface AuthenticationApipublic ApiResponse<User> createUser(User user)
createUser in interface UserApipublic ApiResponse<User> getMe(String etag)
public ApiResponse<User> getUser(String userId, String etag)
public ApiResponse<User> getUserByUsername(String userName, String etag)
getUserByUsername in interface UserApipublic ApiResponse<User> getUserByEmail(String email, String etag)
getUserByEmail in interface UserApipublic ApiResponse<UserAutocomplete> autocompleteUsersInTeam(String teamId, String username, String etag)
autocompleteUsersInTeam in interface UserApipublic ApiResponse<UserAutocomplete> autocompleteUsersInChannel(String teamId, String channelId, String username, String etag)
autocompleteUsersInChannel in interface UserApipublic ApiResponse<UserAutocomplete> autocompleteUsers(String username, String etag)
autocompleteUsers in interface UserApipublic ApiResponse<byte[]> getProfileImage(String userId, String etag)
getProfileImage in interface UserApipublic ApiResponse<UserList> getUsers(Pager pager, String etag)
public ApiResponse<UserList> getUsersInTeam(String teamId, Pager pager, String etag)
getUsersInTeam in interface UserApipublic ApiResponse<UserList> getUsersNotInTeam(String teamId, Pager pager, String etag)
getUsersNotInTeam in interface UserApipublic ApiResponse<UserList> getUsersInChannel(String channelId, Pager pager, String etag)
getUsersInChannel in interface UserApipublic ApiResponse<UserList> getUsersNotInChannel(String teamId, String channelId, Pager pager, String etag)
getUsersNotInChannel in interface UserApipublic ApiResponse<UserList> getUsersWithoutTeam(Pager pager, String etag)
getUsersWithoutTeam in interface UserApipublic ApiResponse<UserList> getUsersByIds(String... userIds)
getUsersByIds in interface UserApipublic ApiResponse<UserList> getUsersByUsernames(String... usernames)
getUsersByUsernames in interface UserApipublic ApiResponse<UserList> searchUsers(UserSearch search)
searchUsers in interface UserApipublic ApiResponse<User> updateUser(User user)
updateUser in interface UserApipublic ApiResponse<User> patchUser(String userId, UserPatch patch)
public ApiResponse<Boolean> updateUserMfa(String userId, String code, boolean activate)
updateUserMfa in interface UserApipublic boolean checkUserMfa(String loginId)
checkUserMfa in interface UserApipublic ApiResponse<MfaSecret> generateMfaSecret(String userId)
generateMfaSecret in interface UserApipublic ApiResponse<Boolean> updateUserPassword(String userId, String currentPassword, String newPassword)
updateUserPassword in interface UserApipublic ApiResponse<Boolean> updateUserRoles(String userId, Role... roles)
updateUserRoles in interface UserApipublic ApiResponse<Boolean> updateUserActive(String userId, boolean active)
updateUserActive in interface UserApipublic ApiResponse<Boolean> deleteUser(String userId)
deleteUser in interface UserApipublic ApiResponse<Boolean> sendPasswordResetEmail(String email)
sendPasswordResetEmail in interface UserApipublic ApiResponse<Boolean> resetPassword(String token, String newPassword)
resetPassword in interface UserApipublic ApiResponse<SessionList> getSessions(String userId, String etag)
getSessions in interface UserApipublic ApiResponse<Boolean> revokeSession(String userId, String sessionId)
revokeSession in interface UserApipublic ApiResponse<Boolean> attachDeviceId(String deviceId)
attachDeviceId in interface UserApipublic ApiResponse<TeamUnreadList> getTeamUnreadForUser(String userId, String teamIdToExclude)
getTeamUnreadForUser in interface UserApipublic ApiResponse<Audits> getUserAudits(String userId, Pager pager, String etag)
getUserAudits in interface UserApipublic ApiResponse<Boolean> verifyUserEmail(String token)
verifyUserEmail in interface UserApipublic ApiResponse<Boolean> sendVerificationEmail(String email)
sendVerificationEmail in interface UserApipublic ApiResponse<Boolean> setProfileImage(String userId, Path imageFilePath)
setProfileImage in interface UserApipublic ApiResponse<Team> createTeam(Team team)
createTeam in interface TeamApipublic ApiResponse<Team> getTeam(String teamId, String etag)
public ApiResponse<TeamList> getAllTeams(Pager pager, String etag)
getAllTeams in interface TeamApipublic ApiResponse<Team> getTeamByName(String name, String etag)
getTeamByName in interface TeamApipublic ApiResponse<TeamList> searchTeams(TeamSearch search)
searchTeams in interface TeamApipublic ApiResponse<TeamExists> teamExists(String name, String etag)
teamExists in interface TeamApipublic ApiResponse<TeamList> getTeamsForUser(String userId, String etag)
getTeamsForUser in interface TeamApipublic ApiResponse<TeamMember> getTeamMember(String teamId, String userId, String etag)
getTeamMember in interface TeamApipublic ApiResponse<Boolean> updateTeamMemberRoles(String teamId, String userId, Role... newRoles)
updateTeamMemberRoles in interface TeamApipublic ApiResponse<Team> updateTeam(Team team)
updateTeam in interface TeamApipublic ApiResponse<Team> patchTeam(String teamId, TeamPatch patch)
public ApiResponse<Boolean> deleteTeam(String teamId)
deleteTeam in interface TeamApideleteTeam(String, boolean)public ApiResponse<Boolean> deleteTeam(String teamId, boolean permanent)
deleteTeam in interface TeamApipermanent - true: Permanently delete the team, to be used for compliance reasons
only.deleteTeam(String)public ApiResponse<TeamMemberList> getTeamMembers(String teamId, Pager pager, String etag)
getTeamMembers in interface TeamApipublic ApiResponse<TeamMemberList> getTeamMembersForUser(String userId, String etag)
getTeamMembersForUser in interface TeamApipublic ApiResponse<TeamMemberList> getTeamMembersByIds(String teamId, String... userIds)
getTeamMembersByIds in interface TeamApipublic ApiResponse<TeamMember> addTeamMember(TeamMember teamMemberToAdd)
addTeamMember in interface TeamApi@Deprecated public ApiResponse<TeamMember> addTeamMember(String teamId, String userId, String hash, String dataToHash, String inviteId)
addTeamMember in interface TeamApipublic ApiResponse<TeamMember> addTeamMember(String hash, String dataToHash, String inviteId)
addTeamMember in interface TeamApipublic ApiResponse<TeamMemberList> addTeamMembers(String teamId, String... userIds)
addTeamMembers in interface TeamApipublic ApiResponse<Boolean> removeTeamMember(String teamId, String userId)
removeTeamMember in interface TeamApipublic ApiResponse<TeamStats> getTeamStats(String teamId, String etag)
getTeamStats in interface TeamApipublic ApiResponse<TeamUnread> getTeamUnread(String teamId, String userId)
getTeamUnread in interface TeamApipublic ApiResponse<byte[]> importTeam(byte[] data, int filesize, String importFrom, String fileName, String teamId)
importTeam in interface TeamApipublic ApiResponse<Boolean> inviteUsersToTeam(String teamId, Collection<String> userEmails)
inviteUsersToTeam in interface TeamApipublic ApiResponse<Channel> createChannel(Channel channel)
createChannel in interface ChannelApipublic ApiResponse<Channel> updateChannel(Channel channel)
updateChannel in interface ChannelApipublic ApiResponse<Channel> patchChannel(String channelId, ChannelPatch patch)
patchChannel in interface ChannelApipublic ApiResponse<Channel> createDirectChannel(String userId1, String userId2)
createDirectChannel in interface ChannelApipublic ApiResponse<Channel> createGroupChannel(String... userIds)
createGroupChannel in interface ChannelApipublic ApiResponse<Channel> getChannel(String channelId, String etag)
getChannel in interface ChannelApipublic ApiResponse<ChannelStats> getChannelStats(String channelId, String etag)
getChannelStats in interface ChannelApipublic ApiResponse<PostList> getPinnedPosts(String channelId, String etag)
getPinnedPosts in interface ChannelApipublic ApiResponse<ChannelList> getPublicChannelsForTeam(String teamId, Pager pager, String etag)
getPublicChannelsForTeam in interface ChannelApipublic ApiResponse<ChannelList> getPublicChannelsByIdsForTeam(String teamId, String... channelIds)
getPublicChannelsByIdsForTeam in interface ChannelApipublic ApiResponse<ChannelList> getChannelsForTeamForUser(String teamId, String userId, String etag)
getChannelsForTeamForUser in interface ChannelApipublic ApiResponse<ChannelList> searchChannels(String teamId, ChannelSearch search)
searchChannels in interface ChannelApipublic ApiResponse<Boolean> deleteChannel(String channelId)
deleteChannel in interface ChannelApipublic ApiResponse<Channel> getChannelByName(String channelName, String teamId, String etag)
getChannelByName in interface ChannelApipublic ApiResponse<Channel> getChannelByNameForTeamName(String channelName, String teamName, String etag)
getChannelByNameForTeamName in interface ChannelApipublic ApiResponse<ChannelMembers> getChannelMembers(String channelId, Pager pager, String etag)
getChannelMembers in interface ChannelApipublic ApiResponse<ChannelMembers> getChannelMembersByIds(String channelId, String... userIds)
getChannelMembersByIds in interface ChannelApipublic ApiResponse<ChannelMember> getChannelMember(String channelId, String userId, String etag)
getChannelMember in interface ChannelApipublic ApiResponse<ChannelMembers> getChannelMembersForUser(String userId, String teamId, String etag)
getChannelMembersForUser in interface ChannelApipublic ApiResponse<ChannelViewResponse> viewChannel(String userId, ChannelView view)
viewChannel in interface ChannelApipublic ApiResponse<ChannelUnread> getChannelUnread(String channelId, String userId)
getChannelUnread in interface ChannelApipublic ApiResponse<Boolean> updateChannelRoles(String channelId, String userId, Role... roles)
updateChannelRoles in interface ChannelApipublic ApiResponse<Boolean> updateChannelNotifyProps(String channelId, String userId, Map<String,String> props)
updateChannelNotifyProps in interface ChannelApipublic ApiResponse<ChannelMember> addChannelMember(String channelId, String userId)
addChannelMember in interface ChannelApipublic ApiResponse<Boolean> removeUserFromChannel(String channelId, String userId)
removeUserFromChannel in interface ChannelApipublic ApiResponse<Channel> restoreChannel(String channelId)
restoreChannel in interface ChannelApipublic ApiResponse<ChannelList> getDeletedChannels(String teamId, Pager pager)
getDeletedChannels in interface ChannelApipublic ApiResponse<Post> createPost(Post post)
createPost in interface PostApipublic ApiResponse<Post> updatePost(String postId, Post post)
updatePost in interface PostApipublic ApiResponse<Post> patchPost(String postId, PostPatch patch)
public ApiResponse<Boolean> pinPost(String postId)
public ApiResponse<Boolean> unpinPost(String postId)
public ApiResponse<Post> getPost(String postId, String etag)
public ApiResponse<Boolean> deletePost(String postId)
deletePost in interface PostApipublic ApiResponse<PostList> getPostThread(String postId, String etag)
getPostThread in interface PostApipublic ApiResponse<PostList> getPostsForChannel(String channelId, Pager pager, String etag)
getPostsForChannel in interface PostApipublic ApiResponse<PostList> getFlaggedPostsForUser(String userId, Pager pager)
getFlaggedPostsForUser in interface PostApipublic ApiResponse<PostList> getFlaggedPostsForUserInTeam(String userId, String teamId, Pager pager)
getFlaggedPostsForUserInTeam in interface PostApipublic ApiResponse<PostList> getFlaggedPostsForUserInChannel(String userId, String channelId, Pager pager)
getFlaggedPostsForUserInChannel in interface PostApipublic ApiResponse<PostList> getPostsSince(String channelId, long time)
getPostsSince in interface PostApipublic ApiResponse<PostList> getPostsAfter(String channelId, String postId, Pager pager, String etag)
getPostsAfter in interface PostApipublic ApiResponse<PostList> getPostsBefore(String channelId, String postId, Pager pager, String etag)
getPostsBefore in interface PostApipublic ApiResponse<PostList> searchPosts(String teamId, String terms, boolean isOrSearch)
searchPosts in interface PostApipublic ApiResponse<Boolean> getPing()
getPing in interface GeneralApipublic ApiResponse<Boolean> testEmail()
testEmail in interface GeneralApipublic ApiResponse<Config> getConfig()
getConfig in interface GeneralApipublic ApiResponse<Boolean> reloadConfig()
reloadConfig in interface GeneralApipublic ApiResponse<Map<String,String>> getOldClientConfig(String etag)
getOldClientConfig in interface GeneralApipublic ApiResponse<Map<String,String>> getOldClientLicense(String etag)
getOldClientLicense in interface GeneralApipublic ApiResponse<Boolean> databaseRecycle()
databaseRecycle in interface GeneralApipublic ApiResponse<Boolean> invalidateCaches()
invalidateCaches in interface GeneralApipublic ApiResponse<Config> updateConfig(Config config)
updateConfig in interface GeneralApipublic ApiResponse<IncomingWebhook> createIncomingWebhook(IncomingWebhook hook)
createIncomingWebhook in interface WebhookApipublic ApiResponse<IncomingWebhook> updateIncomingWebhook(IncomingWebhook hook)
updateIncomingWebhook in interface WebhookApipublic ApiResponse<IncomingWebhookList> getIncomingWebhooks(Pager pager, String etag)
getIncomingWebhooks in interface WebhookApipublic ApiResponse<IncomingWebhookList> getIncomingWebhooksForTeam(String teamId, Pager pager, String etag)
getIncomingWebhooksForTeam in interface WebhookApipublic ApiResponse<IncomingWebhook> getIncomingWebhook(String hookId, String etag)
getIncomingWebhook in interface WebhookApipublic ApiResponse<Boolean> deleteIncomingWebhook(String hookId)
deleteIncomingWebhook in interface WebhookApipublic ApiResponse<OutgoingWebhook> createOutgoingWebhook(OutgoingWebhook hook)
createOutgoingWebhook in interface WebhookApipublic ApiResponse<OutgoingWebhook> updateOutgoingWebhook(OutgoingWebhook hook)
updateOutgoingWebhook in interface WebhookApipublic ApiResponse<OutgoingWebhookList> getOutgoingWebhooks(Pager pager, String etag)
getOutgoingWebhooks in interface WebhookApipublic ApiResponse<OutgoingWebhook> getOutgoingWebhook(String hookId)
getOutgoingWebhook in interface WebhookApipublic ApiResponse<OutgoingWebhookList> getOutgoingWebhooksForChannel(String channelId, Pager pager, String etag)
getOutgoingWebhooksForChannel in interface WebhookApipublic ApiResponse<OutgoingWebhookList> getOutgoingWebhooksForTeam(String teamId, Pager pager, String etag)
getOutgoingWebhooksForTeam in interface WebhookApipublic ApiResponse<OutgoingWebhook> regenOutgoingHookToken(String hookId)
regenOutgoingHookToken in interface WebhookApipublic ApiResponse<Boolean> deleteOutgoingWebhook(String hookId)
deleteOutgoingWebhook in interface WebhookApipublic ApiResponse<Preferences> getPreferences(String userId)
getPreferences in interface PreferencesApipublic ApiResponse<Boolean> updatePreferences(String userId, Preferences preferences)
updatePreferences in interface PreferencesApipublic ApiResponse<Boolean> deletePreferences(String userId, Preferences preferences)
deletePreferences in interface PreferencesApipublic ApiResponse<Preferences> getPreferencesByCategory(String userId, PreferenceCategory category)
getPreferencesByCategory in interface PreferencesApipublic ApiResponse<Preference> getPreferenceByCategoryAndName(String userId, PreferenceCategory category, String preferenceName)
getPreferenceByCategoryAndName in interface PreferencesApipublic ApiResponse<String> getSamlMetadata()
getSamlMetadata in interface SamlApipublic boolean uploadSamlIdpCertificate(Path dataFile, String fileName)
uploadSamlIdpCertificate in interface SamlApipublic boolean uploadSamlPublicCertificate(Path dataFile, String fileName)
uploadSamlPublicCertificate in interface SamlApipublic boolean uploadSamlPrivateCertificate(Path dataFile, String fileName)
uploadSamlPrivateCertificate in interface SamlApipublic ApiResponse<Boolean> deleteSamlIdpCertificate()
deleteSamlIdpCertificate in interface SamlApipublic ApiResponse<Boolean> deleteSamlPublicCertificate()
deleteSamlPublicCertificate in interface SamlApipublic ApiResponse<Boolean> deleteSamlPrivateCertificate()
deleteSamlPrivateCertificate in interface SamlApipublic ApiResponse<SamlCertificateStatus> getSamlCertificateStatus()
getSamlCertificateStatus in interface SamlApipublic ApiResponse<Compliance> createComplianceReport(Compliance report)
createComplianceReport in interface ComplianceApipublic ApiResponse<Compliances> getComplianceReports(Pager pager)
getComplianceReports in interface ComplianceApipublic ApiResponse<Compliance> getComplianceReport(String reportId)
getComplianceReport in interface ComplianceApipublic ApiResponse<Object> downloadComplianceReport(String reportId)
downloadComplianceReport in interface ComplianceApipublic ApiResponse<List<ClusterInfo>> getClusterStatus()
getClusterStatus in interface ClusterApipublic ApiResponse<Boolean> syncLdap()
public ApiResponse<Boolean> testLdap()
public ApiResponse<Audits> getAudits(Pager pager, String etag)
public ApiResponse<Object> getBrandImage()
getBrandImage in interface BrandApipublic boolean uploadBrandImage(Path dataFile)
uploadBrandImage in interface BrandApipublic ApiResponse<List<String>> getLogs(Pager pager)
public ApiResponse<Map<String,String>> postLog(Map<String,String> message)
public ApiResponse<OAuthApp> createOAuthApp(OAuthApp app)
createOAuthApp in interface OAuthApipublic ApiResponse<List<OAuthApp>> getOAuthApps(Pager pager)
getOAuthApps in interface OAuthApipublic ApiResponse<OAuthApp> getOAuthApp(String appId)
getOAuthApp in interface OAuthApipublic ApiResponse<OAuthApp> getOAuthAppInfo(String appId)
getOAuthAppInfo in interface OAuthApipublic ApiResponse<Boolean> deleteOAuthApp(String appId)
deleteOAuthApp in interface OAuthApipublic ApiResponse<OAuthApp> regenerateOAuthAppSecret(String appId)
regenerateOAuthAppSecret in interface OAuthApipublic ApiResponse<List<OAuthApp>> getAuthorizedOAuthAppsForUser(String userId, Pager pager)
getAuthorizedOAuthAppsForUser in interface OAuthApipublic String authorizeOAuthApp(AuthorizeRequest authRequest)
authorizeOAuthApp in interface OAuthApipublic ApiResponse<Boolean> deauthorizeOAuthApp(String appId)
deauthorizeOAuthApp in interface OAuthApipublic ApiResponse<Command> createCommand(Command cmd)
createCommand in interface CommandsApipublic ApiResponse<Command> updateCommand(Command cmd)
updateCommand in interface CommandsApipublic ApiResponse<Boolean> deleteCommand(String commandId)
deleteCommand in interface CommandsApipublic ApiResponse<CommandList> listCommands(String teamId, boolean customOnly)
listCommands in interface CommandsApipublic ApiResponse<CommandResponse> executeCommand(String channelId, String command)
executeCommand in interface CommandsApipublic ApiResponse<CommandList> listAutocompleteCommands(String teamId)
listAutocompleteCommands in interface CommandsApipublic ApiResponse<String> regenCommandToken(String commandId)
regenCommandToken in interface CommandsApipublic ApiResponse<Status> getUserStatus(String userId, String etag)
getUserStatus in interface StatusApipublic ApiResponse<List<Status>> getUsersStatusesByIds(String... userIds)
getUsersStatusesByIds in interface StatusApipublic ApiResponse<Status> updateUserStatus(String userId, Status userStatus)
updateUserStatus in interface StatusApipublic ApiResponse<WebrtcInfoResponse> getWebrtcToken()
getWebrtcToken in interface WebrtcApipublic ApiResponse<Emoji> createEmoji(Emoji emoji, Path imageFile)
createEmoji in interface EmojiApipublic ApiResponse<EmojiList> getEmojiList(Pager pager)
getEmojiList in interface EmojiApipager - add in Mattermost Server 4.1, in older version, ignore.public ApiResponse<Boolean> deleteEmoji(String emojiId)
deleteEmoji in interface EmojiApipublic ApiResponse<Emoji> getEmoji(String emojiId)
public ApiResponse<Path> getEmojiImage(String emojiId) throws IOException
getEmojiImage in interface EmojiApiIOExceptionpublic ApiResponse<Reaction> saveReaction(Reaction reaction)
saveReaction in interface ReactionApipublic ApiResponse<List<Reaction>> getReactions(String postId)
getReactions in interface ReactionApipublic ApiResponse<Boolean> deleteReaction(Reaction reaction)
deleteReaction in interface ReactionApiCopyright © 2019. All rights reserved.