def by_name(dataset): dataset = Dataset.find(dataset) name = request.args.get('name') entity = object_or_404(Entity.by_name(dataset, name)) return jsonify(entity)
def view(id): entity = object_or_404(Entity.by_id(id)) return jsonify(entity)