htm-community / hitc

HTM In The Cloud
GNU Affero General Public License v3.0
7 stars 7 forks source link

As an HTTP client, I can create an HTM model in a RESTful way #5

Closed rhyolight closed 8 years ago

rhyolight commented 8 years ago

Very simple endpoints:

Errors should return a non 200 status code representing the error as well as possible.

rhyolight commented 8 years ago

I updated the URLs in the description spec above to be more RESTful.

fergalbyrne commented 8 years ago

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).

rhyolight commented 8 years ago

@fergalbyrne Yes, great idea. I will put that in another ticket.

JonnoFTW commented 8 years ago

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.

rhyolight commented 8 years ago

No, the predicted field is within the model params. (I was wrong, see example model params in next comment)

rhyolight commented 8 years ago

Example POST payload here: https://gist.github.com/rhyolight/20c937c15e5ae3333f89