def post(self): """ Create a new sketch record and call celery tasks for populating record data """ # Determine the hostname/port as well as scheme of webserver base_url = app.config['BASE_URL'] # Parse out all arguments that may be provided by requestor args = JSONPARSER.parse_args() capture_record = Capture() capture_record.url = args["url"] capture_record.status_only = args["status_only"] capture_record.callback = args["callback"] # Add the capture_record and commit to the DB try: db.session.add(capture_record) db.session.commit() except IntegrityError, exc: return {"error": exc.message}, 500