Introduction
The Form Information API is used to pull form-related information from the forms stored in SafetyChain. Some request parameters are optional.
Getting Started
All API requests require an authorization token – reference our Authentication page for more information
API Structure
POST api/api/Forms/getAllForms
Required Request Parameters
Name | Location | Description |
---|---|---|
Authorization token | Header | See Login Authentication API documentation |
SearchString | Body | Field must be set null |
Name | Body | Field name must be included |
Type | Body | Field name must be included |
Version | Body | Field name must be included |
Draft | Body | Field name must be included |
ModifiedOn | Body | Field name must be included |
ModifiedBy | Body | Field name must be included |
Optional Request Parameters
Name | Location | Description |
---|---|---|
ModifiedOn | Body | DateFormat "mm/dd/yyyy" |
Optional Operators
Name | Location | Description |
---|---|---|
eq | Body | equals |
Request JSON with Parameters
{
"filter": {
"filters": [{
"field": "ModifiedOn",
"operator": "eq",
"value": "04/08/2020"
}
],
"logic": "and"
},
"group": [],
"skip": 0,
"sort": [],
"take": 100,
"Parameters": {
"SearchString": null,
"Columns": [
"RowSelection",
"Name",
"Type",
"Version",
"Draft",
"ModifiedOn",
"ModifiedBy",
"IsEnabled"
]
},
"pageSize": 100
}
Response JSON
{
"Data": {
"Count": 1,
"Rows": [{
"InternalId": 0,
"ID": "e8c7edb3-f491-46a1-8ae6-c03d4b630d9d",
"Name": "Sample Form",
"Type": "Check",
"Version": "1.0",
"Draft": "0.0",
"Modified": {
"Date": "2020-04-08T20:45:17.0000000Z",
"User": {
"Upn": null,
"FirstName": "SC",
"LastName": "User",
"IANA": null,
"IsAdmin": false,
"Partner": null,
"UserType": "TenantUser",
"HasAllLocations": false,
"HasAllSuppliers": false,
"Title": null,
"UserAgent": null,
"IsMobile": false,
"RequestingIp": null,
"EmployeeId": null,
"Phone": null,
"DefaultLocation": "00000000-0000-0000-0000-000000000000",
"SecurityLevel": 0,
"Id": "ea4d1fe3-474e-4f3b-b482-10d92c9f04d1",
"Name": "SC User"
},
"Iana": "US/Central",
"Latitude": 12.23,
"Longitude": null
},
"ModifiedBy": {
"Upn": null,
"FirstName": "SC",
"LastName": "User",
"IANA": null,
"IsAdmin": false,
"Partner": null,
"UserType": "TenantUser",
"HasAllLocations": false,
"HasAllSuppliers": false,
"Title": null,
"UserAgent": null,
"IsMobile": false,
"RequestingIp": null,
"EmployeeId": null,
"Phone": null,
"DefaultLocation": "00000000-0000-0000-0000-000000000000",
"SecurityLevel": 0,
"Id": "ea4d1fe3-474e-4f3b-b482-10d92c9f04d1",
"Name": "SC User"
},
"IsEnabled": true,
"IsEnableFormLocationFilter": false,
"LocationFilterModifiedBy": "00000000-0000-0000-0000-000000000000",
"LocationFilterModifiedDate": "2020-04-08T20:45:17.0000000Z",
"UserFullName": "SC User"
}
]
},
"Status": true,
"Errors": null,
"RefreshToken": false
}
Request JSON
{
"Take": 100,
"Skip": 0,
"Parameters":
{
"SearchString": null,
"Columns": [
"Name",
"Type",
"Version",
"Draft",
"ModifiedOn",
"ModifiedBy"
]
},
"PageSize": 100
}
Response JSON
{
"Data": {
"Count": 366,
"Rows": [
{
"InternalId": 0,
"ID": "f2cc5ded-9787-409b-8464-004fd629b98b",
"Name": "00 Test Form ",
"Type": "Check",
"Version": "1.0",
"Draft": "0.0",
"Modified": {
"Date": "2019-10-24T20:23:58.2970000Z",
"User": {
"Upn": null,
"FirstName": "Test",
"LastName": "User",
"IANA": null,
"IsAdmin": false,
"Partner": null,
"UserType": "TenantUser",
"HasAllLocations": false,
"HasAllSuppliers": false,
"Title": null,
"UserAgent": null,
"IsMobile": false,
"RequestingIp": null,
"Id": "acabe4ef-9e50-4a6f-81b8-7e6ff789eb6c",
"Name": "Test User"
},
"Iana": "US/Pacific",
"Latitude": 11.11,
"Longitude": 12.23
},
"ModifiedBy": {
"Upn": null,
"FirstName": "Test",
"LastName": "User",
"IANA": null,
"IsAdmin": false,
"Partner": null,
"UserType": "TenantUser",
"HasAllLocations": false,
"HasAllSuppliers": false,
"Title": null,
"UserAgent": null,
"IsMobile": false,
"RequestingIp": null,
"Id": "acabe4ef-9e50-4a6f-81b8-7e6ff789eb6c",
"Name": "Test User"
}
},
}