def get(self): """ --- summary: List description: List all heartbeats. tags: - Heartbeat responses: 200: description: OK content: application/json: schema: type: array items: type: object description: List of tuples [('Executable', 'Hostname', ...), ...] 401: description: Invalid Auth Token 406: description: Not acceptable """ return Response(json.dumps( list_heartbeats(issuer=request.environ.get('issuer'), vo=request.environ.get('vo')), cls=APIEncoder), content_type='application/json')
def get(self): """ List all heartbeats. .. :quickref: Heartbeat; List heartbeats. :resheader Content-Type: application/json :status 200: OK. :status 401: Invalid Auth Token. :status 406: Not Acceptable. :returns: List of heartbeats. """ return Response(json.dumps(list_heartbeats(issuer=request.environ.get('issuer'), vo=request.environ.get('vo')), cls=APIEncoder), content_type='application/json')
def GET(self): """ List all heartbeats. HTTP Success: 200 OK HTTP Error: 401 Unauthorized """ header('Content-Type', 'application/json') return json.dumps(list_heartbeats(issuer=ctx.env.get('issuer')), cls=APIEncoder)
def get(self): """ List all heartbeats. .. :quickref: Heartbeat; List heartbeats. :resheader Content-Type: application/json :status 200: OK. :status 401: Invalid Auth Token. :status 406: Not Acceptable. :returns: List of heartbeats. """ try: return Response(json.dumps(list_heartbeats( issuer=request.environ.get('issuer'), vo=request.environ.get('vo')), cls=APIEncoder), content_type='application/json') except RucioException as error: return generate_http_error_flask(500, error.__class__.__name__, error.args[0]) except Exception as error: print(format_exc()) return str(error), 500