API – Form GET Media File

The Media File API

provides access to media files submitted by users for a specified Form Entry.  The specific file name must be retrieved from a Form Entry API call as outlined above.

On the Cloud this API is available using the REST GET verb:

http://secure.formsfly.com/api/v1/mediafile

GET Parameters

The required parameters for a GET call to the Media Files API are outlined below.

Parameter Name Data Type Required Description
ProviderId Integer Yes Your unique Provider Id found on the Organisation Setup page of the secure website (under Your Account)
Integrationkey String Yes Your unique Integration Key found on the Organisation Setup page of the secure website (under Your Account)
EntryId String Yes The Id of the Form Entry that this media file belongs to.  This value is found on each Form Entry that you retrieve via the Form Entries API.
FileName String Yes The name of the file to retrieve.  This value is found in the relevant Form Entry answer from the Form Entries API.

GET Response

If the file is found, then the response will be the file contents with MIME type appropriate HTTP headers.

If the file is not found then the response is empty.

API Usage Example

Given that the API is REST based, you can access the API directly via your web browser to test it.  Obviously for actual integration works, you will need to make a web request to the given REST URL and then parse the response.

GET Request

http://secure.formsfly.com/api/v1/mediafile?EntryId=c67d58d4-5e7a-4248-9d19-fd07a50016ff&FileName=162626273723.jpg&integrationkey=xxxxxxxxxxxx&providerid=1