#NEWLINE# def get( self ) : #NEWLINE# #INDENT# ' Makes sure the user is allowed to see instance data for the named\n    application, and if so, retrieves it for them. ' #NEWLINE# is_cloud_admin = self . helper . is_user_cloud_admin ( ) #NEWLINE# apps_user_is_admin_on = self . helper . get_owned_apps ( ) #NEWLINE# app_name = self . request . get ( 'appid' ) #NEWLINE# if ( ( not is_cloud_admin ) and ( app_name not in apps_user_is_admin_on ) ) : #NEWLINE# #INDENT# response = json . dumps ( { #NEWLINE# #INDENT# 'error' : True , #NEWLINE# 'message' : 'Not authorized' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . response . out . write ( response ) #NEWLINE# return #NEWLINE# #UNINDENT# appid = self . request . get ( 'appid' ) #NEWLINE# self . response . out . write ( json . dumps ( InstanceStats . fetch_request_info ( appid ) ) )