Forms and Regions REST API
Overview
The Forms and Regions REST API services allows you to get information on the Form Templates for your company.
Base URL
https://fieldconnect.field2base.com/v2/api
Header (Required)
Authorization: Basic {CompanyID}:{Username}:{Password}:{API Sync Key}
Content-Type: application/json
Note: Authorization Header above is the same as all other Mobile Forms REST API calls.
Note: 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
- GET forms/
- Retrieve a list of form templates
- GET forms/{folderKey}
- Retrieve a list of form templates in a folder
- folderKey is the same as projectKey or ProjKey
- GET forms/regions/{formTemplateID}
- Retrieve a list of Region details in a Form Template
- GET forms/regions/options/{formTemplateID}/{datasourceNameGUID}
- Retrieve possible datasource options
- GET forms/region/options/{formTemplateID}/{datasourceNameGUID}?parameters={parameterOption}
- Get results of executing a Datasource in a Form Template if Datasource uses parameters
Note: You will need to add "/" at the end of the call if there is a period in the Username.
API Samples
Method: GET
- https://fieldconnect.field2base.com/v2/api/forms/
Response:
- [
- {
- "TemplateId": "1dd66dcf-2ab2-40b0-8241-98bfdf5a6d84",
- "Name": "Inspection Sheet",
- "ProjKey": "ed02146a-2ca7-4ce7-980f-7f840ba3f568",
- "ProjName": "Sandbox (Ceara)",
- "Version": 27,
- "Description": "for home inspections"
- },
- {
- "TemplateId": "ba056acd-75f7-45b1-b5ab-1937aab8e411",
- "Name": "DVIR",
- "ProjKey": "3fec86e5-7069-41e4-966e-b3ad96ed1f8e",
- "ProjName": "Sandbox (Nick)",
- "Version": 1,
- "Description": ""
- },
- {
- "TemplateId": "1d5f3b89-ae47-4d1d-afae-5f6d5d9d233f",
- "Name": "F2B Statement of Work",
- "ProjKey": "0f4300b6-9548-4e7a-85d9-c53122626010",
- "ProjName": "Contracts",
- "Version": 4,
- "Description": ""
- },
- {
- "TemplateId": "2d1dfad1-9ae4-4990-a3e8-ba86bdb07b1f",
- "Name": "Sample Expense Report",
- "ProjKey": "1be2fd67-9c0b-40ba-a440-40a9c6fe0589",
- "ProjName": "Form Library",
- "Version": 23,
- "Description": ""
- },
- {
- "TemplateId": "e8bac552-3486-47ff-87ed-6cfaf3c1c0fb",
- "Name": "Sample Timesheet",
- "ProjKey": "1be2fd67-9c0b-40ba-a440-40a9c6fe0589",
- "ProjName": "Form Library",
- "Version": 2,
- "Description": ""
- }
- ]
Method: GET
- https://fieldconnect.field2base.com/v2/api/forms/1359c762-4842-4276-be5d-90925b137a2e
Response:
- [
- {
- "TemplateId": "2d1dfad1-9ae4-4990-a3e8-ba86bdb07b1f",
- "Name": "Sample Expense Report",
- "ProjKey": "1359c762-4842-4276-be5d-90925b137a2e",
- "ProjName": "Form Library",
- "Version": 23.
- "Description": "for work expenses, has a workflow for approval then send to Payroll"
- },
- {
- "TemplateId": "e8bac552-3486-47ff-87ed-6cfaf3c1c0fb",
- "Name": "Sample Timesheet",
- "ProjKey": "1359c762-4842-4276-be5d-90925b137a2e",
- "ProjName": "Form Library",
- "Version": 2,
- "Description": ""
- }
- ]
Method: GET
- https://fieldconnect.field2base.com/v2/api/forms/regions/2d1dfad1-9ae4-4990-a3e8-ba86bdb07b1f
Response:
- [
- {
- "Number": 1,
- "Name": "PageName1",
- "Description": "",
- "Title": "Page 1 Regions",
- "Regions": [
- {
- "FullName": "Page1@ApprovalSignDate",
- "DisplayName": "ApprovalSignDate",
- "Type": "Label",
- "DefaultValue": "",
- "DateTimeFormat": null,
- "Options": null,
- "MaxTextLength": null,
- "MinDateValue": null,
- "MaxDateValue": null,
- "IsRequired": false,
- "DecimalPlaces": null,
- "MaxNumericValue": null,
- "MinNumericValue": null,
- "Formula": "",
- "UserCanOverride": false,
- "UserCanEdit": true,
- "ToolTip": "",
- "DataSourceName": "",
- "DataSourceParameters": []
- },
- {
- "FullName": "Page1@EmployeeName",
- "DisplayName": "EmployeeName",
- "Type": "Text",
- "DefaultValue": "",
- "DateTimeFormat": null,
- "Options": null,
- "MaxTextLength": null,
- "MinDateValue": null,
- "MaxDateValue": null,
- "IsRequired": true,
- "DecimalPlaces": null,
- "MaxNumericValue": null,
- "MinNumericValue": null,
- "Formula": "",
- "UserCanOverride": false,
- "UserCanEdit": true,
- "ToolTip": "",
- "DataSourceName": "",
- "DataSourceParameters": []
- },
- {
- "FullName": "Page1@EndDate",
- "DisplayName": "EndDate",
- "Type": "Date",
- "DefaultValue": "",
- "DateTimeFormat": "M/d/yyyy",
- "Options": null,
- "MaxTextLength": null,
- "MinDateValue": "0002-01-01T00:00:00",
- "MaxDateValue": "9998-12-31T23:59:59.999",
- "IsRequired": true,
- "DecimalPlaces": null,
- "MaxNumericValue": null,
- "MinNumericValue": null,
- "Formula": "",
- "UserCanOverride": false,
- "UserCanEdit": true,
- "ToolTip": "",
- "DataSourceName": "",
- "DataSourceParameters": []
- }
- ]
- },
- {
- "Number": 2,
- "Name": "Page2",
- "Description": "",
- "Title": "Page 2 Regions",
- "Regions": [
- {
- "FullName": "Page2@ExpenseCategory1",
- "DisplayName": "ExpenseCategory1",
- "Type": "Datasource",
- "DefaultValue": "",
- "DateTimeFormat": null,
- "Options": [
- "Airfare",
- "Hotel",
- "Meals",
- "Rental Car",
- "Transit / Ride Share",
- "Personal Vehicle",
- "Phone Bill"
- ],
- "MaxTextLength": null,
- "MinDateValue": null,
- "MaxDateValue": null,
- "IsRequired": false,
- "DecimalPlaces": null,
- "MaxNumericValue": null,
- "MinNumericValue": null,
- "Formula": "",
- "UserCanOverride": false,
- "UserCanEdit": true,
- "ToolTip": "",
- "DataSourceName": "7e9a57a3-dba3-41e0-aa43-ea38e3bc8827",
- "DataSourceParameters": []
- },
- {
- "FullName": "Page2@ExpenseComments1",
- "DisplayName": "ExpenseComments1",
- "Type": "Text",
- "DefaultValue": "",
- "DateTimeFormat": null,
- "Options": null,
- "MaxTextLength": null,
- "MinDateValue": null,
- "MaxDateValue": null,
- "IsRequired": false,
- "DecimalPlaces": null,
- "MaxNumericValue": null,
- "MinNumericValue": null,
- "Formula": "",
- "UserCanOverride": false,
- "UserCanEdit": true,
- "ToolTip": "",
- "DataSourceName": "",
- "DataSourceParameters": []
- },
- {
- "FullName": "Page2@ExpenseDate1",
- "DisplayName": "ExpenseDate1",
- "Type": "Date",
- "DefaultValue": "",
- "DateTimeFormat": "M/d/yyyy",
- "Options": null,
- "MaxTextLength": null,
- "MinDateValue": "0002-01-01T00:00:00",
- "MaxDateValue": "9998-12-31T23:59:59.999",
- "IsRequired": false,
- "DecimalPlaces": null,
- "MaxNumericValue": null,
- "MinNumericValue": null,
- "Formula": "",
- "UserCanOverride": false,
- "UserCanEdit": true,
- "ToolTip": "",
- "DataSourceName": "",
- "DataSourceParameters": []
- },
- {
- "FullName": "Page2@ExpensePhoto1",
- "DisplayName": "ExpensePhoto1",
- "Type": "Camera",
- "DefaultValue": "",
- "DateTimeFormat": null,
- "Options": null,
- "MaxTextLength": null,
- "MinDateValue": null,
- "MaxDateValue": null,
- "IsRequired": false,
- "DecimalPlaces": null,
- "MaxNumericValue": null,
- "MinNumericValue": null,
- "Formula": "",
- "UserCanOverride": false,
- "UserCanEdit": true,
- "ToolTip": "",
- "DataSourceName": "",
- "DataSourceParameters": []
- },
- {
- "FullName": "Page2@ExpenseTotal1",
- "DisplayName": "ExpenseTotal1",
- "Type": "Numeric",
- "DefaultValue": "",
- "DateTimeFormat": null,
- "Options": null,
- "MaxTextLength": null,
- "MinDateValue": null,
- "MaxDateValue": null,
- "IsRequired": false,
- "DecimalPlaces": 2,
- "MaxNumericValue": null,
- "MinNumericValue": null,
- "Formula": "",
- "UserCanOverride": false,
- "UserCanEdit": true,
- "ToolTip": "",
- "DataSourceName": "",
- "DataSourceParameters": []
- },
- {
- "FullName": "Page2@MilesDriven1",
- "DisplayName": "MilesDriven1",
- "Type": "Numeric",
- "DefaultValue": "",
- "DateTimeFormat": null,
- "Options": null,
- "MaxTextLength": null,
- "MinDateValue": null,
- "MaxDateValue": null,
- "IsRequired": false,
- "DecimalPlaces": null,
- "MaxNumericValue": null,
- "MinNumericValue": null,
- "Formula": "",
- "UserCanOverride": false,
- "UserCanEdit": true,
- "ToolTip": "Mileage rate is automatically calculated at .58 per mile",
- "DataSourceName": "",
- "DataSourceParameters": []
- },
- {
- "FullName": "Page2@NoReceipt1",
- "DisplayName": "NoReceipt1",
- "Type": "Checkbox",
- "DefaultValue": "",
- "DateTimeFormat": null,
- "Options": null,
- "MaxTextLength": null,
- "MinDateValue": null,
- "MaxDateValue": null,
- "IsRequired": false,
- "DecimalPlaces": null,
- "MaxNumericValue": null,
- "MinNumericValue": null,
- "Formula": "",
- "UserCanOverride": false,
- "UserCanEdit": true,
- "ToolTip": "",
- "DataSourceName": "",
- "DataSourceParameters": []
- }
- ]
- }
- ]
Get Options for a Datasource Region
Method: GET
- https://fieldconnect.field2base.com/v2/api/forms/region/options/2d1dfad1-9ae4-4990-a3e8-ba86bdb07b1f/7e9a57a3-dba3-41e0-aa43-ea38e3bc8827
Response:
- [
- "Airfare",
- "Hotel",
- "Meals",
- "Rental Car",
- "Transit / Ride Share",
- "Personal Vehicle",
- "Phone Bill"
- ]
Get Options for a Datasource Region with Parameters
Method: GET
This example assumes that we are using two regions, with Region 1 as a parameter for the Region 2 query. For this example, we will assume that the corresponding datafile contains an ExpenseCategory "Airfare" with a corresponding Rate of "$100".
Region 1: {
FullName: "Page2@ExpenseCategory1",
Type: "Datasource",
DataSourceName: "7e9a57a3-dba3-41e0-aa43-ea38e3bc8827"
}
Region 2: {
FullName: "Page2@Rate1",
Type: "Datasource",
DataSourceName: "1a2b3c4d-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
DataSourceParameters: [
"{Page2@ExpenseCategory1}"
]
}
Region 2 SQL Query:
SELECT [Rate]
FROM [SheetName$]
WHERE [ExpenseCategory] = ?
Parameters: {Page2@ExpenseCategory1}
- https://fieldconnect.field2base.com/v2/api/forms/region/options/2d1dfad1-9ae4-4990-a3e8-ba86bdb07b1f/1a2b3c4d-xxxx-xxxx-xxxx-xxxxxxxxxxxx?parameters=Airfare
Response:
Note: If you are using multiple parameters in a query, use the endpoint format: forms/region/options/{formTemplateID}/{DataSourceName}?parameters={parameter option}¶meters={parameter option}
Popular Articles
Forms Designer Quick Start Guide
Overview Field2Base Forms Designer is the proprietary software application that allows your existing paper forms to be quickly converted to a smart E-form available to your end users via our mobile and web-based Mobile Forms applications. This ...
Portal 11.28.2023 Release Notes
Overview Our release notes offer brief descriptions of product enhancements and bug fixes. We include links to the current articles for any affected features. Those articles will be updated shortly after the Portal release to include new ...
Integration Service Configuration Guide
How To Configure Integration Services To Allow Read/Write Access on a Network Path All of our Integration Products, including the DIM, DUU, and EDM have respective Windows Services responsible for communicating with our server. Occassionally, ...
Data Integration Module (DIM) Migration Guide
Overview This article provides the information necessary to migrate the Field2Base Data Integration Module (DIM) over from one server to another. Please refer to the DIM Install Guide for the initial installation of the Field2Base DIM. Once that's ...
How to Check the Version of Integration Products Running on a Windows 10 Machine
Right-click on the Start menu button. Click on Apps & Features. In the Apps & Features search bar type in the Integration Product you are looking for, eg. F2B Data Integration Module, F2B Data Upload, or F2B Enterprise Dispatch Module. Click to ...