coralproject / pillar

Deprecated: Service layer for the Coral ecosystem
Other
4 stars 1 forks source link

Build Ask Apis for Forms and Submissions #107

Closed jde closed 8 years ago

jde commented 8 years ago

The two major datatypes of Ask are Forms and Submissions. Their schema draft is here:

https://github.com/coralproject/elkhorn/issues/14

Build out a set of apis that will provide the basic functionality needed to get the data flowing.

jde commented 8 years ago

Created these apis to support the initial form and submission buildout:

    Route{"POST", "/api/form", handler.CreateUpdateForm},
    Route{"PUT", "/api/form", handler.CreateUpdateForm},
    Route{"PUT", "/api/form/{id}/status/{status}", handler.UpdateFormStatus},
    Route{"GET", "/api/forms", handler.GetForms},
    Route{"GET", "/api/form/{id}", handler.GetForm},
    Route{"DELETE", "/api/form/{id}", handler.DeleteForm},

// Form Submissions Route{"POST", "/api/form_submission/{form_id}", handler.CreateFormSubmission}, Route{"PUT", "/api/form_submission/{id}/status/{status}", handler.UpdateFormSubmissionStatus}, Route{"GET", "/api/form_submissions/{form_id}", handler.GetFormSubmissionsByForm}, Route{"GET", "/api/form_submission/{id}", handler.GetFormSubmission}, Route{"DELETE", "/api/form_submission/{id}", handler.DeleteFormSubmission},