Deleted data
Understanding exported data - Deleted data
Deleted entities can't be returned from the SafetyCulture API. If you want to find out when an entity was deleted, please refer to your organization's activity log for the IDs.
You or your team may delete records in SafetyCulture. This guide provides references on how to receive these deletions from the API, and understand if a record is deleted.
Inspections / Inspection items
To capture deleted inspections when exporting the data, ensure that:
archived
flag isboth
. This ensures archival events are exported.include_inactive_items
flag istrue
. This ensures that hidden items due to changes in inspection logic fields are exported.
With SafetyCulture Exporter, any deleted inspections will update to deleted = true
. If you are using our APIs directly, you will need to query the activity log and use any inspection.deleted
events to remove deleted inspections from your database.
Together, the following fields are available:
inspections.deleted
inspections.deleted
This field is unavailable on our APIs and is only available in the SafetyCulture Exporter.
A boolean
(true
or false
) that indicates if an inspection has been deleted. It's important to note that deleted
is not available on inspection_items
. To exclude deleted inspection_items
, the table will need to be joined to inspections
.
inspections.archived
inspections.archived
A boolean
(true
or false
) that indicates if an inspection has been archived.
inspection_items.inactive
inspection_items.inactive
A boolean
(true
or false
) that indicates if an inspection item is no longer active / visible.
An item will be inactive if it is not visible during an inspection, or in the report. This is the case if the question exists under logic fields, but that logic path has not been triggered.
Actions
With SafetyCulture Exporter, any deleted actions will update to deleted = true
. If you are using our APIs directly, you will need to query the activity log and use any action.actions_deleted
events to remove deleted actions from your database.
Sites
To capture deleted sites when exporting the data, ensure that the include_deleted
flag is true
.
Deleted sites will have deleted = true
.
Other
For any other data/tables, if the dataset is small enough, we recommend regularly refreshing the entire dataset to capture any deletions.
Updated about 1 year ago