class Morpheus::SetupInterface
There is no authentication required for this API.
Public Instance Methods
check(params={}, timeout=5)
click to toggle source
this should go away and just use
# 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
default_timeout()
click to toggle source
health checks use a relatively small timeout by default
# File lib/morpheus/api/setup_interface.rb, line 11 def default_timeout 5 end
get(params={})
click to toggle 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
hub_login(payload={})
click to toggle 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
hub_register(payload={})
click to toggle 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
init(payload={})
click to toggle source
you can only use this successfully one time on a fresh install.
# 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