CSV

From DreamFactory
Jump to: navigation, search

DreamFactory 2.7 and newer supports a very simple solution for making a CSV file accessible as a REST API. To begin, you'll need to have access to a local CSV file or track one down online. If you'd just like to test out the feature you can reference one of the following URLs; just be sure to click the Raw button next to the file name to obtain the CSV URL rather than the CSV file's web rendering:

Next, follow these instructions to expose the CSV file as a REST API:

  1. Login to DF and navigate to API Docs
  2. Select the System Management Service
  3. Open the POST /import (Imports resource data) service
  4. Paste the CSV URL into the import_url field
  5. Optionally identify a target service. If one isn't selected, the db service will be used.
  6. Optionally identify a target resource. If one isn't selected, import_TIMESTAMP will be used.
  7. Once done, return to the API Docs screen and select the service defined within the target service field.
  8. Select the GET /table/{table_name} endpoint, press Try It Out, and enter the table name within the table_name field.