This API is used to run various tasks: run sample, run analyze, run CloudFunction.
The target parameter has two kinds of values:
MARVIZPLOT). In this case, the action parameter
must be run. The content in parameters is defined by the specific Cloud
Function.F46FF98D7). In this case, the action parameter must be
run_sample or run_analyze, and parameters should be empty or ignored.The get_response parameter is used to indicate whether to synchronously and
wait for the response from the command. If set to true, the API will wait for
the command to finish and return the response. If set to false, the API will
return immediately after the command is started.
The return format is also defined by the specific Cloud Function.
Example:
// curl -H "Authorization: Bearer $token" "$root/invoke" --json \
{
"target": "MARVIZPLOT",
"action": "run",
"get_response": true,
"parameters": {
"experiment_id": "X7CED97DD",
"return_type": "json",
"plot_func": "plot_ecdf",
"plot_chain": "chain#1",
"plot_var": "σ/val"
}
}
// OUTPUT
{"status": "ok", "data": {"cloudfunction_response": {<plotdata>}}}
// curl -H "Authorization: Bearer $token" "$root/invoke" --json \
{
"target": "F46FF98D7",
"action": "run_sample",
"get_response": true
}
// OUTPUT
{"status": "ok", "data": {"experiment_id": "XFF2F7F8B", "experiment_name": "priceless_elion"}}
// curl -H "Authorization: Bearer $token" "$root/invoke" --json \
{
"target": "F46FF98D7",
"action": "run_analyze",
"get_response": false
}
// OUTPUT
{"status": "ok", "data": {}}
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.