Return evaluation data with results of evaluation
Here's the problem: for UpCounsel, they'd like to be able to look at some of the auditing data for evaluations: which rules fired? Why?
What I've done so far is made the evaluation call by posting to /agent/:agentID, then using the resulting evaluation ID to get /evaluation/:evaluationID, which has all the auditing data
The problem is that there's a race condition between when the evaluation happens and when I retrieve it -- it may not have been stored
And, frankly, there's no point in making two REST calls if the data is all right there when the evaluation happens
I'd like to return the evaluation auditing data along with the outputs from the evaluation itself
It'd be an extra property, like this:
{
"output1": 1.783,
"output2": 81.994,
"meta": {
// meta data goes here
}
}
I'd like it to be on request only, so I'm going to make a flag for it, like POST /agent/:agentID?meta=true|yes|1
Finally, if you have an output named "meta", you can give another name to the property, like this:
POST /agent/:agentID?meta=audit
If there's a conflict, you'll get a 400 error