Closed rhyolight closed 8 years ago
I updated the URLs in the description spec above to be more RESTful.
Suggestion: There's an underlying default model spec (use Grok), so passing an empty JSON map gives you that. The JSON you give just overrides this map (using a merge).
@fergalbyrne Yes, great idea. I will put that in another ticket.
Does the api need to include the predicted field? Currently it's in the URL as /create/{predicted_field}
. Doesn't seem very RESTy though.
No, the predicted field is within the model params. (I was wrong, see example model params in next comment)
Example POST payload here: https://gist.github.com/rhyolight/20c937c15e5ae3333f89
Very simple endpoints:
/models
: create modelmodelParams
: same structure as the NuPIC / HTM.Java model params (sorry, we have no real spec for this, you'll just have to look at some example code)predictedField
[optional]: the string name of the field to be predicted (not necessary for anomaly models){"id":"asdf"}
)Errors should return a non 200 status code representing the error as well as possible.