Get Form Definition

Introduction

Use this API to review the complete definition of existing forms, including form details, field details, and field settings. Filters can be applied to FormName and Resources. Depending on user and resource configuration, Location filters may be optional.

Getting Started

All API requests require an authorization token – reference our Authentication page for more information

API Structure

POST api/integration/GetFormDefinition

Required Request Parameters

NameLocationDescription
Authorization tokenHeaderSee Login Authentication API documentation
TakeBodyPaging the data (recommended default 100)
SkipBodyPaging the data (recommended default 0)
FormNameBody within FilterField must be set to FormName
Value the name of the Form to show
ResourceNameBody within FilterField must be set to ResourceName
Value the name of the Resource associated with the Form
Logic"And", "Or" Logic to dictate the operator on the result.

Request JSON

{
  "Take": 100,
  "Skip": "",
  "Filter": {
    "filters": [
      {
        "field": "FormName",
        "operator": "contains",
        "value": "Micro-Environmental Sanitation Check"
      },
      {
        "field": "ResourceName",
        "operator": "contains",
        "value": "Metal Detector Line"
      }
    ],
    "Logic": "And"
  }
}

Response Parameters

A full explanation of all fields included within the Response JSON have been documented on the Save Form Design page and is omitted from this section due to length.

Response JSON

**Note: **This response has been abbreviated due to length and the abbreviations are denoted with the "…" syntax.

{
    "Data": [
        {
            "FormId": "094dac0b-2b5a-4506-989e-4e12a77196bb",
            "FormName": "Micro-Environmental Sanitation Check",
            "Type": 0,
            "Version": "0.1",
            "Resources": [
                {
                    "Id": "57137dba-e1f2-4ee6-96b0-62c1ab1aa7f1",
                    "Name": "Equipment > E1 > Metal Detector Line"
                }
            ],
            "Fields": [
                {...},
                {...}
            ]
        }
    ],
    "RequestError": null,
    "Status": true,
    "Errors": null,
    "RefreshToken": false
}

Sample Request JSON using only the resource filter

The request JSON below will return all forms that contain the resource value.

{
  "Take": 100,
  "Skip": "",
  "Filter": {
    "filters": [
      {
        "field": "ResourceName",
        "operator": "contains",
        "value": "10011110928"
      }
     ],
    "Logic": "Or"
  }
}

Miscellaneous

To limit results to forms released before, after, or within a specific date range, include ReleaseDate in the request parameters. For a date range, specify ReleaseDate twice—once with the operator Before and once with After—to define the range boundaries.

Optional Request Parameters

NameLocationDescription
ReleaseDateBody within FilterLimit return of multiple forms to only forms released after or before a certain date.

Request JSON

{
  "Take": 100,
  "Skip": "",
  "Filter": {
    "filters": [
      {
        "field": "FormName",
        "operator": "contains",
        "value": "Weight Check"
      },
      {
        "field": "ResourceName",
        "operator": "contains",
        "value": "Rye Flour"
      },
      {
        "field": "ReleasedDate",
        "operator": "after",
        "value": "05/24/2018 00:00:00.000"
      }
     ],
    "Logic": "And"
  }
}