openreferral/hsds-transformer

Add HTTP API to expose services

switzersc opened this issue · 3 comments

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.

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

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

Added with #32