openreferral / hsds-transformer

Convert data into valid Human Service Data Specification (HSDS) datapackages. (Produced by the Open Referral Initiative.)
MIT License
11 stars 5 forks source link

Add HTTP API to expose services #9

Closed switzersc closed 5 years ago

switzersc commented 5 years ago

This should be a POST request that kicks off the OpenReferralTransformer class to process the provided files. The request can either be a multipart form request that streams that file contents to the API, or the request could reference the web URIs where the files live. If the latter, then the API needs to pass those URIs to the OpenReferralTransformer which should be able to get them during the transform process.

switzersc commented 5 years ago

You can use sinatra to add a simple http server: http://sinatrarb.com/

andrewwang024 commented 5 years ago

curl -X POST -F "locations=C:\Users\andre\Documents\CS\open_referral_transformer\spec\fixtures\input\locations.csv" -F "organizations=C:\Users\andre\Documents\CS\open_referral_transformer\spec\fixtures\input\organizations.csv" -F "services=C:\Users\andre\Documents\CS\open_referral_transformer\spec\fixtures\input\services.csv" -F "mapping=C:\Users\andre\Documents\CS\open_referral_transformer\spec\fixtures\mapping.yaml" http://localhost:4567/transform

switzersc commented 5 years ago

Added with #32