

def post(self):
    '\n        .. http:post:: /experiment/<exp_uid>/predict\n\n        Get stats related to an experiment. For a list of potential plot types and parameters see: .\n\n        **Example request**:\n        .. sourcecode:: http\n\n        POST /experiment/<exp_uid> HTTP/1.1\n        Host: next_backend.next.discovery.wisc.edu\n\n        {\n\t        exp_uid: exp_uid,\n        \tapp_id: app_id,\n        \targs: { }        \n            }\n        }\n\n        **Example response**:\n\n        .. sourcecode:: http\n        \n        HTTP/1.1 200 OK\n        Vary: Accept\n        Content-Type: application/json\n\n        {   \n        }\n\n        \n        :statuscode 200: prediction successfully accessed\n        :statuscode 400: prediction retrieval error\n        '
    post_parser.add_argument('exp_uid', type=str, required=True, help='Experiment ID Required.')
    post_parser.add_argument('exp_key', type=str, required=True, help='Experiment ID Required.')
    post_parser.add_argument('args', type=dict, required=True, help='Experiment Args Required.')
    args_data = post_parser.parse_args()
    exp_uid = args_data['exp_uid']
    exp_key = args_data['exp_key']
    if (not keychain.verify_exp_key(exp_uid, exp_key)):
        return (api_util.attach_meta({
            
        }, api_util.verification_dictionary), 401)
    app_id = resource_manager.get_app_id(exp_uid)
    args_json = json.dumps(args_data['args'])
    (response_json, didSucceed, message) = broker.applyAsync(app_id, exp_uid, 'predict', args_json)
    if didSucceed:
        return (meta_attach(response_json, meta_success), 200)
    else:
        return (meta_attach({
            
        }, custom_errors['PredictRetrievalError'], backend_error=message), 400)

dataset/ETHPy150Open nextml/NEXT/next/api/resources/predict.py Predict.post/original