Overview
Making a call to the Flare Bridge API is, although more technical, the potentially quickest way to upload your files. This document outlines the structure of your API request in order for it to be successful.
Prerequisites
Make sure you meet the following requirements before you set up your API connection:
- Know your Flare Bridge URL
The URL to your Flare Bridge instance will be provided by Faye upon purchase. - Know your Flare Access Token
You'll need to create an Access Token in your Flare Bridge that has 'manage files' enabled. Please refer to the Flare Bridge Guide for how to obtain it. The best practice here is to create a token with this single scope and use it only for that purpose. - Admin Permissions
You must be an administrator on your instance of the Flare Bridge.
Setting up your API request
Sending the upload request isn’t complicated. You need to perform an API POST call to “https://{your-bridge-url}/api/v1/files”. You will use form data to specify which file you want to upload; “file” is the only parameter that you need to include in the body of the request.
Headers:
- Authorization: Bearer {your token here}
- Content-Type: multipart/form-data
- Accept: application/json
Body:
-
file: {your-local-file}
Sample cURL request
curl -X POST -H "Authorization: Bearer {your-token-here}" -H "Accept: application/json" -H “Content-Type: multipart/form-data“ -F file=@/your/file/location/file.csv https://{your-bridge-url}/api/v1/files
Comments
0 comments
Please sign in to leave a comment.