The /checklists/ API was created to allow users to download and analyze answers to checklist questions in L2L's DISPATCH. Each record returned in this API represents a checklist that has been created from a Dispatch, the Operator Portal, or manually.
Filtering Checklists
The /checklists/ API can be filtered and sorted by any of the main properties, such as: site, document name, dispatch, product, line, machine, etc.
Questions and Answers
Questions and Answers are found under the tasks and answers properties respectively.
The tasks list contains all questions that were in the published version of the checklist at the time the checklist was created. If a new version of a checklist is published, and a user chooses to update the checklist questions, the tasks list will also be updated in the API.
The answers list contains all answers entered on the checklist. Each answer has a task_number property which is the index of the question in the tasks list that the answer is for. For instance, if an answer has a task_number of 3, the related question is the third item on the tasks list.
The answers API also has the pass, fail, warn criteria if you are using checklist scoring. The API will give you a number: 0 = Pass, 1 = Warn, 2 = Fail
Tables
Questions and Answers for checklists that are inside tables are also included in the /checklists/ API. The task object defines the table, including column headers, row and column information, and question definitions. Answers are included in the answers list, and the associated question can be found in the tasks list by using the task_number, table_row_number, and table_column_number properties.
Development Considerations
- The
task_hashproperty on the task object and answer object are there for legacy reasons. This property should not be used to link task questions and answers together. - The
/checklistsanswers/API was developed and released before answers were included in the/checklists/API payload, and will continue to provide answers in the future. However, the answers object in the/checklists/payload is more robust, and is the preferred method of gathering checklist answers.