Module: Mattermost::Endpoint::System

Included in:
Mattermost::Endpoint
Defined in:
lib/mattermost/endpoint/system.rb

Instance Method Summary collapse

Instance Method Details

#add_log_message(level, message) ⇒ Object



60
61
62
63
64
65
# File 'lib/mattermost/endpoint/system.rb', line 60

def add_log_message(level, message)
	post("/logs", :body => {
		:level => level,
		:message => message
	}.to_json)
end

#get_analytics(team_id, name = 'standard') ⇒ Object



71
72
73
74
75
76
77
# File 'lib/mattermost/endpoint/system.rb', line 71

def get_analytics(team_id, name = 'standard')
	url = "/analytics/old?name=#{name}"
	if team_id != nil
		url = "#{url}&team_id=#{team_id}"
	end
	get(url)
end

#get_audits(max = 60) ⇒ Object



48
49
50
# File 'lib/mattermost/endpoint/system.rb', line 48

def get_audits(max = 60)
	get("/audits?per_page=#{max}")
end

#get_client_configurationObject



31
32
33
# File 'lib/mattermost/endpoint/system.rb', line 31

def get_client_configuration
	get("/config/client?format=old")
end

#get_client_licenseObject



44
45
46
# File 'lib/mattermost/endpoint/system.rb', line 44

def get_client_license
	get("/license/client?format=old")
end

#get_configurationObject



19
20
21
# File 'lib/mattermost/endpoint/system.rb', line 19

def get_configuration
	get("/config")
end

#get_logs(max = 60) ⇒ Object



56
57
58
# File 'lib/mattermost/endpoint/system.rb', line 56

def get_logs(max = 60)
	get("/logs?per_page=#{max}")
end

#get_webrtc_tokenObject



67
68
69
# File 'lib/mattermost/endpoint/system.rb', line 67

def get_webrtc_token
	get("/webrtc/token")
end

#invalidate_server_cachesObject



52
53
54
# File 'lib/mattermost/endpoint/system.rb', line 52

def invalidate_server_caches
	post("/caches/invalidate")
end

#pingObject



7
8
9
# File 'lib/mattermost/endpoint/system.rb', line 7

def ping
	get("/system/ping")
end

#recycle_database_connectionsObject



11
12
13
# File 'lib/mattermost/endpoint/system.rb', line 11

def recycle_database_connections
	post("/database/recycle")
end

#reload_configurationObject



27
28
29
# File 'lib/mattermost/endpoint/system.rb', line 27

def reload_configuration
	post("/config/reload")
end

#remove_license_fileObject



40
41
42
# File 'lib/mattermost/endpoint/system.rb', line 40

def remove_license_file
	delete("/license")
end

#send_test_emailObject



15
16
17
# File 'lib/mattermost/endpoint/system.rb', line 15

def send_test_email
	post("/email/test")
end

#update_configuration(config) ⇒ Object



23
24
25
# File 'lib/mattermost/endpoint/system.rb', line 23

def update_configuration(config)
	put("/config", :body => config.to_json)
end

#upload_license_file(file_name) ⇒ Object

Raises:

  • (NotImplementedError)


35
36
37
38
# File 'lib/mattermost/endpoint/system.rb', line 35

def upload_license_file(file_name)
	#post("/license", license)
	raise NotImplementedError
end