Search records
safetychain_search_recordsSearch submitted records (the headers: record number, compliance, submitted date, location, form and version, resource, who submitted, signed, verifications, ids). Filter by date range, form, location, resource, identifier and compliance. Always narrow by a date range or a name: the tenant can hold millions of records. Pages are not snapshotted: for a stable multi-page read use a closed date range (start and end in the past). Use safetychain_get_record_fields for the field values. POST /clientapis/v2.0/getRecords (a read: it only searches).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | End of the date range (default: now). | |
| page | No | Page number, from 1 (default 1). | |
| start | No | Start of the date range, yyyy-mm-dd or yyyy-mm-dd hh:mm:ss. Not together with min_ago. | |
| min_ago | No | Sliding window: records from the last N minutes (1440 = a day). Not together with start. | |
| date_type | No | Which date the range applies to (default submitted). processed = when SafetyChain saved it; modified = last change (includes submitted when never modified); modifiedOnly = only records actually modified. | |
| form_like | No | Form name contains this text (slower than form_name). | |
| form_name | No | Exact form name. | |
| is_signed | No | Only records with a sign-off or validation. | |
| page_rows | No | Rows per page (default 50, max 500). | |
| is_verified | No | Only verified (true) records. | |
| location_like | No | Location name contains this text (slower). | |
| location_name | No | Exact location name. | |
| record_number | No | One record number. | |
| resource_like | No | Resource name contains this text (slower). | |
| resource_name | No | Exact resource name (customer, equipment, item or supplier). | |
| identifier_name | No | Identifier field name, for example Lot. Use together with identifier_value. | |
| identifier_value | No | Identifier value that goes with identifier_name. | |
| time_zone_offset | No | Hours from UTC applied to the date filters and the dates returned (default 0). | |
| record_compliance | No | Only compliant (true) or non-compliant (false) records. Records without compliance rules count as compliant. |