A Form is used in inspections to provide a template or structure that defines what the user is to inspect and what fields to fill in. A Form represents a Category in an inspection. Each Form is broken down into Areas and Items to be inspected. Each item has a data type which defines the type of information the inspector is to supply (e.g. pass/fail, numeric, text, etc).
Fields
Tag | Data Type | Description |
accountId | Integer | Information for corresponding ‘account’ record associated with the asset. |
fields | Array | A collection of fields included in the form. |
id | Auto-incremented integer | Unique Identifier. |
imageName | Text (unlimited) | Information for the image associated with the form. |
isParent | Boolean | Information whether the form is a parent form. |
lastChangedDate | Text | Auto-generated timestamp of the last change made to this record Note: Format is in timestamp and timezone (YYYY-MM-DDTHH:MM:SS.sssZ, e.g: 1970-01-01T00:00:00.000Z) |
media | Integer | Collection of information for the image associated to this form. |
name | Text (unlimited) | The name of the the form. |
Read
API PATH: | /api/v2/forms |
METHOD: | GET |
PARAMETERS: | name – Retrieves the matching record with the specified name (e.g. name=Custom-Form, all names by default) from-change-timestamp – Retrieves matching records that were changed after the specified timestamp (e.g. from-change-timestamp=2016-06-17T04:25:52.098Z, all timestamps by default) offset – Retrieves matching records after an offset value (e.g. offset=2, zero offset by default) limit – Retrieves a number of records per page specified by the value (e.g. limit=10, all records by default) |
SORTING: | sort=id – Sort records by their id field in ascending order (DEFAULT) sort=-id – Sort records by their id field in descending order sort=name – Sort records by their name field in ascending order sort=-name – Sort records by their name field in descending order |
QUERY STRING EXAMPLES: | Get the form with the specified id: api/v2/forms/1265 Get the form with the specific name: ?name=Custom-Form Get two forms of the current account with an offset of 1 : ?offset=1&limit=2 Get all forms of the current account sorted by names alphabetically: ?sort=name |
EXAMPLE RESPONSE: |
[ { "name": "Custom-Form", "imageName": "path_to_image", "media": { "name": "lol", "filename": "lol.jpg", "id": 5238 }, "isParent": false, "fields": [ { "formId": 1265, "name": "Tires", "comment": "", "group": "Main", "imageName": null, "type": "triStateItem" } ], "accountId": 1248379, "id": 1265, "lastChangedDate": "2016-06-14T03:55:00.779Z" } ]
|
API error calls
ERROR MESSAGE | POSSIBLE CAUSES |
POST is not supported. | POST method is not allowed |
PUT is not supported. | PUT method is not allowed |
DELETE is not supported. | DELETE method is not allowed |