Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As an HTTP client, I can push data to an HTM model in a RESTful way #9

Closed
rhyolight opened this issue Dec 8, 2015 · 5 comments · Fixed by #15
Closed

As an HTTP client, I can push data to an HTM model in a RESTful way #9

rhyolight opened this issue Dec 8, 2015 · 5 comments · Fixed by #15

Comments

@rhyolight
Copy link
Contributor

  • PUT /models/<id>: push data to model identified by <id>
    • body [JSON]: data to push to model instance
    • returns [JSON]: response object with same structure as the NuPIC OPF ModelResponse object.

If model does not exist, return 404. Success should return 200. Errors should return non-200 response status codes.

Depends on #5.

@fergalbyrne
Copy link

Should also return an error if overwriting a timestep which has been already processed. Specify such semantic errors in this thread.

@rhyolight
Copy link
Contributor Author

@fergalbyrne See #12.

@rhyolight
Copy link
Contributor Author

@JonnoFTW I'm thinking maybe the POST body for this one containing the data should just be a CSV string instead of JSON. Would be simpler and lighter. What do you think?

@JonnoFTW
Copy link
Collaborator

JonnoFTW commented Dec 9, 2015

JSON makes sure that you don't get the field order messed up. The model doesn't know what order the fields are going to appear in and this will complicate making a model, so I'd probably suggest sticking with JSON, unless you want to encode them form data.

@rhyolight
Copy link
Contributor Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants