- Startup
- Business
- Enterprise
- On-Premise
- Add-on
Overview
It is possible to use an HTTP Listener to upload files into all supported file storage types.
Create a Flow to upload file
Step 1. Create an HTTP Listener.
Step 2. When creating a Listener:
-
set the
Method
toPOST
. -
set the
Authentication Type
to eitherBASIC
orJWT
. -
set the
URL Pattern
to any valid URL Pattern, for example/file/{filename}
. Take note of the{filename}
. You can use{token}
to provide a file name, for example,test.json
, as part of the URL. An example of a URL that contains a file name is:http://app.etlworks.com/rest/v1/httplistener/file/test.json
.
Step 3. Create a Copy Files Flow.
Step 4. Set the source (FROM
) Connection to the Listener created in Step 1.
Step 5. Set the destination (TO
) Connection to any file Connection (e.g., Server Storage, FTP, FTPS, SFTP, Amazon S3, HTTP, etc.).
Step 6. Set TO
to either an actual file name, for example, test.json
, or a token in the URL, which was created in Step 2, for example {filename}
.
Step 7. Schedule the event-driven Flow created in Step 3.
Test a file upload
To test file upload, you can use Postman.
Step 1. Add a new tab.
Step 2. Set the Method
to POST
.
Step 3. Set the URL to the URL you configured when creating the Listener. For example, if the URL is /file/{filename}
, the URL in Postman is going to be https://app.etlworks.com/rest/v1/httplistener/file/test2.json
, where test2.json
is a file name (you can use any file name).
Step 4. Set the Authorization
to Basic
(if that is what you used previously when creating the Listener).
Step 5. Enter the username and password of any valid user under your Etlworks account.
Step 6. Select Body
, click raw
, select Text
, and enter the content of the file (the payload):
Step 7. Click Send
and check the response. Make sure that the file has been created.
Comments
0 comments
Please sign in to leave a comment.