Get All Pricing Data
Download all CSV files from a DTN FTP directory and parse them into pricing data records.
Operation
Section titled “Operation”getAllFiles
Resource
Section titled “Resource”file
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Path | string | No | / | The directory path to download files from |
Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
| Recursive | boolean | true | Whether to search for files recursively in subdirectories |
| Include Debug Info | boolean | false | Whether to include metadata about the source file |
Response
Section titled “Response”Success
Section titled “Success”Returns an array of parsed pricing records from all CSV files:
{ "product": "Propane", "terminal": "Dallas Terminal", "price": 1.25, "effectiveDate": "2024-01-15", "supplier": "ABC Energy"}With debug info enabled:
{ "product": "Propane", "terminal": "Dallas Terminal", "price": 1.25, "effectiveDate": "2024-01-15", "supplier": "ABC Energy", "_source": { "fileName": "pricing_2024-01-15.csv", "filePath": "/data/pricing_2024-01-15.csv", "fileSize": 15420 }}{ "success": false, "error": "Connection refused", "path": "/"}Behavior
Section titled “Behavior”- Lists all files in the specified directory (recursively by default)
- Downloads only
.csvfiles - Parses each CSV file into individual records
- Returns all records as separate output items
Error Handling
Section titled “Error Handling”- Missing Host: DTN credential is missing host
- Connection Failure: Unable to connect to FTP server
- Invalid Path: Directory path does not exist
- Parse Errors: CSV parsing errors are included in error output