def get(self):
        args = self.get_parser.parse_args()

        qs_filters = []

        if args.app:
            app = App.query.filter(App.name == args.app).first()
            if not app:
                return self.respond([])
            qs_filters.append(Deploy.app_id == app.id)

        if args.user:
            user = User.query.filter(User.name == args.user).first()
            if not user:
                return self.respond([])
            qs_filters.append(Task.user_id == user.id)

        if args.env:
            qs_filters.append(Deploy.environment == args.env)

        if args.ref:
            qs_filters.append(Task.ref == args.ref)

        if args.status:
            status_list = map(TaskStatus.label_to_id, args.status)
            qs_filters.append(Task.status.in_(status_list))

        deploy_qs = Deploy.query.filter(*qs_filters).order_by(Deploy.id.desc())

        return self.paginate(deploy_qs, on_results=serialize)
Retrieve a list of deploys.
dataset/ETHPy150Open getsentry/freight/freight/api/deploy_index.py/DeployIndexApiView.get