Form Data File REST API

Form Data File REST API

Overview

The Form Data File REST API services allows you to upload, download, get details, and delete Form Data Files programmatically in your Company.

Base URL 
https://fieldconnect.field2base.com/v2/api

Header (Required)
Authorization: Basic {CompanyID}:{Username}:{Password}
Content-Type: multipart/form-data

Info
Note: Authorization Header for uploading is DIFFERENT than most other Mobile Forms REST API calls due to the Content-Type not being application/json. 
Info
Note: The Authorization Header supports including the API Sync Key (Basic {CompanyID}:{Username}:{Password}:{API Sync Key}) in all Mobile Forms REST API calls. 
InfoNote: API Developers can use OAuth 2.0 Authentication instead of the Basic Authentication. The OAuth 2.0 Authentication uses the Client Credentials Grant Type and requires the Company have a Client ID and a Client Secret generated in the Mobile Forms Portal to make web service calls to the REST API Endpoints. You can contact the Professional Services team at f2bps@field2base.com to implement OAuth 2.0 Authentication.


Supported Operations

Append to the Base URL: https://fieldconnect.field2base.com/v2/api
  1. POST datafiles/
    1. Upload a Form Data File
    2. Optional parameters are available
    3. Must use form-data as the Body Type
    4. Must not use application/json as the Content Type
  2. GET  datafiles/
    1. Get list of all Data Files
  3. GET datafiles/folder/{projKey}
    1. Get List of Data Files for a specific Folder
  4. GET datafiles/{resourceId}
    1. Details for a single Form Data file
  5. GET datafiles/{resourceId}/download
             datafiles/{resourceId}/download?format=sqlite
    1. Download a single Form Data file - either original or SQLite format
  6. DELETE datafiles/{resourceId}
    1. Delete a single Form Data File


API Samples

Upload Form Data File

Method: POST
  1. https://fieldconnect.field2base.com/v2/api/datafiles/

Body
  1. {
  2.     "file": "TimesheetData.xlsx",
  3.     "projKey": "ea2d6b46-5273-4df4-9cb3-45fb2405555" // Optional - leave blank or do not include the key to publish Companywide Form Data Files
  4. }
Response: 200 OK
  1. [   
  2.    "Message": "Data file TimesheetData.xlsx uploaded",
  3.    "Name": "TimesheetData.xlsx",
  4.    "ProjKey": "ea2d6b46-5273-4df4-9cb3-45fb24045555"
  5. ]

Get All Form Data Files

Request: GET
Response: 200 OK
  1. [
  2.    {
  3.         "DocumentName": "TimesheetData.xlsx",
  4.         "FriendlyName": "TimesheetData.xlsx.sqlite",
  5.         "ProjKey": "ea2d6b46-5273-4df4-9cb3-45fb24045555",
  6.         "LastModifiedDate": "2026-04-21T12:42:55.397",
  7.         "Version": 2,
  8.         "LastModifiedBy": "UserName",
  9.         "ResourceId": "b4646eb4-0758-4acb-958c-db617d3b5555"
  10.     },
  11.     {
  12.         "DocumentName": "TimesheetData 2.xlsx",
  13.         "FriendlyName": "TimesheetData 2.xlsx.sqlite",
  14.         "ProjKey": "ea2d6b46-5273-4df4-9cb3-45fb24046666",
  15.         "LastModifiedDate": "2026-04-22T17:14:21.997",
  16.         "Version": 2,
  17.         "LastModifiedBy": "Username",
  18.         "ResourceId": "9f3b3010-767a-4d10-b3b9-0e84877d6666"
  19.     }
  20. ]

Get All Form Data Files by Folder

Request: GET
Body
  1. {
  2.     "projKey": "ea2d6b46-5273-4df4-9cb3-45fb24046666"
  3. }
Response: 200 OK
  1. [
  2.     {
  3.         "DocumentName": "TimesheetData 2.xlsx",
  4.         "FriendlyName": "TimesheetData 2.xlsx.sqlite",
  5.         "ProjKey": "ea2d6b46-5273-4df4-9cb3-45fb24046666",
  6.         "LastModifiedDate": "2026-04-22T17:14:21.997",
  7.         "Version": 2,
  8.         "LastModifiedBy": "Username",
  9.         "ResourceId": "9f3b3010-767a-4d10-b3b9-0e84877d6666"
  10.     }
  11. ]

Get Form Data File by Resource ID

Request: GET
Response: 200 OK
  1. [
  2.    {
  3.         "DocumentName": "TimesheetData.xlsx",
  4.         "FriendlyName": "TimesheetData.xlsx.sqlite",
  5.         "ProjKey": "ea2d6b46-5273-4df4-9cb3-45fb24045555",
  6.         "LastModifiedDate": "2026-04-21T12:42:55.397",
  7.         "Version": 2,
  8.         "LastModifiedBy": "UserName",
  9.         "ResourceId": "b4646eb4-0758-4acb-958c-db617d3b5555"
  10.     }
  11. ]

Download Form Data File by Resource ID

Request: GET
Response: 200 OK
  1. [
  2.   {{Raw File data}}
  3. ]

Download Form Data File by Resource ID (as SQLite)

Request: GET
Body
  1. {
  2.     "format": "sqlite"
  3. }
Response: 200 OK
  1. [
  2.   {{Raw File data}}
  3. ]


Delete Form Data File

Request: DELETE
Response: 200 OK
  1. {
  2.     "Message": "Data file TimesheetData 2.xlsx.sqlite deleted"
  3. }