lib/fire_cloud_client.rb
# get more detailed status information about FireCloud api
# this method doesn't use process_firecloud_request as we want to preserve error states rather than catch and suppress them
#
# * *return*
#   - +Hash+ with health status information for various FireCloud services or error response
get more detailed status information about FireCloud api
this method doesn't use process_firecloud_request as we want to preserve error states rather than catch and suppress them

*return
+Hash+ with health status information for various FireCloud services or error response
get more detailed status information about FireCloud api this method doesn ' t use process_firecloud_request as we want to preserve error states rather than catch and suppress them * return + Hash + with health status information for various FireCloud services or error response
def api_status
    path = self.api_root + '/status'
    self.access_token_expired? ? self.refresh_access_token : nil
    headers = {
        'Authorization' => "Bearer #{self.access_token['access_token']}",
        'Content-Type' => 'application/json',
        'Accept' => 'application/json'
    }
    begin
      response = RestClient::Request.execute(method: :get, url: path, headers: headers)
      JSON.parse(response.body)
    rescue RestClient::ExceptionWithResponse => e
      Rails.logger.error "FireCloud status error: #{e.message}"
      e.response
    end
  end
def api_status path = self . api_root + '/status' self . access_token_expired? ? self . refresh_access_token : nil headers = { 'Authorization' => "Bearer #{self.access_token['access_token']}" , 'Content-Type' => 'application/json' , 'Accept' => 'application/json' } begin response = RestClient :: Request . execute ( method : :get , url : path , headers : headers ) JSON . parse ( response . body ) rescue RestClient :: ExceptionWithResponse => e Rails . logger . error "FireCloud status error: #{e.message}" e . response end end
get more detailed status information about FireCloud api
this method doesn't use process_firecloud_request as we want to preserve error states rather than catch and suppress them
get more detailed status information about FireCloud api this method doesn ' t use process_firecloud_request as we want to preserve error states rather than catch and suppress them
# make sure access token is still valid