CSV

From DreamFactory
Jump to: navigation, search
(Created page with "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 on...")
 
 
Line 8: Line 8:
 
# Login to DF and navigate to API Docs
 
# Login to DF and navigate to API Docs
 
# Select the System Management Service
 
# Select the System Management Service
# Open the POST /import (Imports resource data) service
+
# Open the '''POST /import''' (Imports resource data) service
 
# Paste the CSV URL into the import_url field
 
# Paste the CSV URL into the import_url field
 
# Optionally identify a target service. If one isn't selected, the db service will be used.
 
# Optionally identify a target service. If one isn't selected, the db service will be used.
# Optionally identify a target resource. If one isn't selected, import_TIMESTAMP will be used.
+
# Optionally identify a target resource. If one isn't selected, '''import_TIMESTAMP''' will be used.
# Once done, return to the API Docs screen and select the DB service defined within the target service field.
+
# Once done, return to the API Docs screen and select the service defined within the target service field.
# Select the GET /table/{table_name} endpoint, press Try It Out, and enter the table name within the table_name field.
+
# Select the '''GET /table/{table_name}''' endpoint, press Try It Out, and enter the table name within the '''table_name''' field.

Latest revision as of 17:55, 4 June 2018

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.