class Morpheus::SetupInterface
There is no authentication required for this API.
Public Instance Methods
Source
# File lib/morpheus/api/setup_interface.rb, line 23 def check(params={}, timeout=5) headers = {params: params} # use access token if authenticated headers[:authorization] = "Bearer #{@access_token}" if @access_token execute(method: :get, url: "/api/setup/check", headers: headers, timeout: timeout) end
this should go away and just use
Source
# File lib/morpheus/api/setup_interface.rb, line 11 def default_timeout 5 end
health checks use a relatively small timeout by default
Source
# File lib/morpheus/api/setup_interface.rb, line 15 def get(params={}) headers = {params: params} # use access token if authenticated headers[:authorization] = "Bearer #{@access_token}" if @access_token execute(method: :get, url: "/api/setup", headers: headers) end
Source
# File lib/morpheus/api/setup_interface.rb, line 41 def hub_login(payload={}) headers = { 'Content-Type' => 'application/json' } execute(method: :post, url: "/api/setup/hub-login", headers: headers, payload: payload.to_json) end
Source
# File lib/morpheus/api/setup_interface.rb, line 36 def hub_register(payload={}) headers = { 'Content-Type' => 'application/json' } execute(method: :post, url: "/api/setup/hub-register", headers: headers, payload: payload.to_json) end
Source
# File lib/morpheus/api/setup_interface.rb, line 31 def init(payload={}) headers = { 'Content-Type' => 'application/json' } execute(method: :post, url: "/api/setup/init", headers: headers, payload: payload.to_json) end
you can only use this successfully one time on a fresh install.