Class: Nimbus::V4::ServicesController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/mno_enterprise/nimbus/v4/services_controller.rb

Instance Method Summary collapse

Instance Method Details

#schemaObject

GET nimbus/v4/service/schema Return the API



7
8
9
10
11
# File 'app/controllers/mno_enterprise/nimbus/v4/services_controller.rb', line 7

def schema
  render 'schema_dev', formats: [:json] if Rails.env.test? || Rails.env.development?
  render 'schema_uat', formats: [:json] if Rails.env.uat?
  render 'schema', formats: [:json] if Rails.env.production?
end

#statusObject

GET nimbus/v4/service/status Return service status



15
16
17
18
# File 'app/controllers/mno_enterprise/nimbus/v4/services_controller.rb', line 15

def status
  @start_time = Time.now
  render json: {data: {available: true, response_time: ((Time.now - @start_time)*1000).round}}
end