--- title: "Bulk Data Operations: Delete" slug: "bulk-data-operations-delete" updated: 2025-10-28T13:33:29Z published: 2025-10-28T13:33:29Z canonical: "docs.unqork.io/bulk-data-operations-delete" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.unqork.io/llms.txt > Use this file to discover all available pages before exploring further. # Bulk Data Operations: Delete > [!WARNING] > As of the [7.16 release](/v1/docs/7160-platform-release-notes), BDO Delete is now available in production environments. But, this feature is disabled by design. To enable it, please contact your Unqork representative. > [!WARNING] > All BDO endpoints are only accessible to Creator and Express Administrator users in Unqork. The **Bulk Data Operations (BDO) Delete** API endpoint lets you soft delete or hard delete record collections containing submission data stored in the Unqork platform. You can make a delete request using curl, Postman, or any other service that supports a POST request. > [!CAUTION] > Time-Bound Delete is available as of the [7.18 release](https://docs.unqork.io/release-notes/Content/P-Release_Notes/P047-7_18_0_Platform_Release_Notes.htm) only. Do not attempt to use the parameters if you are on a previous version of the platform. > To discover how to set up API calls using a third-party program, view our [Testing API Endpoints Using Third-Party Applications](/v1/docs/testing-api-endpoints-using-third-party-applications) article. > [!TIP] > You can test the BDO Delete endpoint using the Unqork Services page. To access the Unqork Services page, enter the following address into your browser: `https://{environment}.unqork.io/fbu/uapi/docs/documentation/#/Bulk%20Operations/delete`. Replace `{environment}` with the name of your Unqork environment. ## Understanding Soft Delete and Hard Delete The BDO Delete operation contains two stages of functionality: soft delete and hard delete. The first time you run the BDO Delete Operations on a set of records, it soft delete (archives) them. Running the operation again on the same set of records using the `destroy` query parameter hard delete all archived records, including records that were archived at an earlier time. ### Soft Delete The first time the BDO Delete operation runs on one or more records, it soft deletes (archives) them. Soft delete removes records from the application's Record Collections, but retains them in the database. This functionality allows you to recover the records at a later time. > [!CAUTION] > Unqork recommends exporting a copy of the record collection before deleting it. Please reach out to your Unqork representative if a record collection has been soft deleted and needs to be recovered. ### Hard Delete Running the BDO Delete operation a second time on the same set of records using `destroy: trueparameter` permanently and irreversibly deletes the records. Doing so is useful for records containing PII or other sensitive information that should not be retained for regulatory or safety reasons. ## Deleting Submission Data Using Bulk Data Operations The BDO Delete operation uses the HTTP POST method and the following endpoint: `https://{environment}.unqork.io/fbu/uapi/bulkOperations/delete`. Replace `{environment}` with the name of your Unqork environment. > [!WARNING] > BDO Delete removes a maximum of 500,000 records per operation. Collections larger than 500k require the operation to be run multiple times. > [!NOTE] > To make calls using third-party programs, you must add an authorization key/value pair to the header. To learn more, view our [Testing API Endpoints Using Third-Party Applications](/v1/docs/testing-api-endpoints-using-third-party-applications?Highlight=postman#Creating) article. ### Query String Parameters ```json {  "destroy": Boolean } ``` The following parameter is available for the Bulk Data Operation Delete endpoint: | Parameter | Data Type | Description | Required | | --- | --- | --- | --- | | destroy | Boolean | After soft deleting a set of records, permanently delete them by adding the `destroy=true` query to the BDO endpoint. Then, run the operation again. For example `https://envName.unqork.io/fbu/uapi/bulkOperations/delete?destroy=true.` > [!NOTE] > This setting has no effect if records have not been first. | No | ### Body Parameters ```json { "dataModelOrModuleId": "string", "name": "string", "dateFieldToFilterOn": "created", "dateFieldStartToFilterOn": "string", "dateFieldEndToFilterOn": "string", } ``` The following fields are available for the Bulk Data Operation Delete schema: | Key | Possible Values | Description | Required | | --- | --- | --- | --- | | dataModelOrModuleId | string (no spaces) | Specify the Data Model ID, or Module ID, containing the data you want to import. > [!TIP] > To find a Data Model's ID value, view our [How to: Query Data Model Records Data](/v1/docs/how-to-query-data-model-records-data) article. | Yes | | name | string | Enter a value to name the import operation by. Names can include spaces. This value also displays in the [Job Tracker's File Name](/v1/docs/record-collections-viewer-job-tracker-tool) column. | Yes | | dateFieldToFilterOn | created modified deleted | Filter deleted data by the following values: - `created`: Filters the data by the submission creation date. - `modified`: Filters the data by the last date the submission was modified on. - ` deleted`: Filters the data by the submission deletion date. > [!WARNING] > The `deleted` filter requires the `destroy` query parameter to be set to `true`. The `destroy=true` query finds archived records and hard deletes them. You can identify archived records by the date listed under the `deleted` property. > [!WARNING] > When using the `dateFieldToFilterOn` field, you must include `dateFieldEndToFilterOn` or `dateFieldStartToFilterOn`, or both in your request. | Optional | | dateFieldStartToFilterOn | string (YYYY-MM-DDTHH:mm:ss:sssZ) | Delete data recorded after this date. Enter the date and time in ISO 8601 (UTC). For example, setting this key's value to `2024-10-17T18:02:55.101Z` would delete data recorded after October 17th, 2024 at 6:02:55.101PM Zulu time. To delete data from a specific time frame, use `dateFieldStartToFilterOn` as the start date, and `dateFieldEndToFilterOn` as the end date. > [!NOTE] > The `dateFieldStartToFilterOn` is exclusive (`>, <`), but `dateFieldEndToFilterOn` is inclusive (<=, =<). If the start and end dates are the same value, the submission is not found because the combination of `date>startFilter` and `date<=endFilter` is false. | Optional | | dateFieldEndToFilterOn | string (YYYY-MM-DDTHH:mm:ss:sssZ) | Delete data records up to this date. Enter the date and time in ISO 8601 (UTC). For example, setting this key's value to `2024-10-17T18:02:55.101Z` would delete data recorded before October 17th, 2024 at 6:02:55.101PM Zulu time. To delete data from a specific time frame, use `dateFieldStartToFilterOn` as the start date and `dateFieldEndToFilterOn` as the end date. > [!NOTE] > The `dateFieldStartToFilterOn` is exclusive (`>, <`), but `dateFieldEndToFilterOn` is inclusive (<=, =<). If the start and end dates are the same value, the submission is not found because the combination of `date>startFilter` and `date<=endFilter` is false. | Optional | ### Example Response Below is an example response when deleting records: ```json {"id": "6728e46499610f86e6fac431","created": 1730733156824,"modified": 1730733156824,"createdBy": "creatorName@creatorCompany.com","modifiedBy": "creatorName@creatorCompany.com","data": {    "type": "DELETE",    "collection": "658c3c6b70573db027a0f3a2",    "dataLocation": {      "database": "unqork",      "collection": "submissions",      "entityType": "MODULE"    },    "name": "Delete Example",    "steps": [      {        "stepType": "DELETE",        "status": "created",        "options": {          "delete": {            "mode": "DELETE",            "dataSource": "MODULE",            "targetRecords": "ARCHIVED"          }        },        "collection": "658c3c6b70573db027a0f3a2",        "dataLocation": {          "database": "unqork",          "collection": "submissions",          "entityType": "MODULE"        }      }    ],}} ``` ## Viewing a Bulk Data Delete Operation Job's Details After starting a Bulk Data Delete, you can view the job details using the `/fbu/uapi/bulkOperations/job/{jobId}` endpoint and the method. Copy the BDO Delete response's id value and replace the job detail's `{jobId}`placeholder with it. For example, `https://{environment}.unqork.io/fbu/uapi/bulkOperations/job/67169684ec1bf4776fa760a5`. ### Example Job Details Response Below is an example of a Job Details endpoint response: ```json {    "id": "6728e46499610f86e6fac431",    "created": 1730733156824,    "modified": 1730733283591,    "createdBy": "creatorName@companyName.com",    "modifiedBy": null,    "data": {        "type": "DELETE",        "collection": "658c3c6270573d1027a0f3a2",        "dataLocation": {            "database": "unqork",            "collection": "submissions",            "entityType": "MODULE"        },        "name": "Delete Example",        "steps": [            {                "stepType": "DELETE",                "id": "658c3c6270573d1027a0f3a2",                "status": "completed",                "options": {                    "delete": {                        "mode": "DELETE",                        "dataSource": "MODULE",                        "targetRecords": "ARCHIVED"                    }                },                "dataLocation": {                    "database": "unqork",                    "collection": "submissions",                    "entityType": "MODULE"                },                "collection": "658c3c6b7057db027a0f3a2",                "details": {                    "dataLocation": {                        "database": "unqork",                        "collection": "submissions",                        "entityType": "MODULE"                    },                    "chunks": [                        {                            "chunkQueueId": "0",                            "status": "completed",                            "docs": {                                "total": 32,                                "processed": 32                            },                            "auditFileKey": "unqorkResource/audit/6728e48799610f86e6fac432/0.json.gz",                            "startTime": "2024-11-04T15:14:10.970Z",                            "endTime": "2024-11-04T15:14:11.278Z"                        }                    ],                    "docs": {                        "total": 32,                        "processed": 32                    }                }            }        ],        "status": "completed"    }} ``` Using the above example response, the following properties might be important for Creator processes or pipeline development: | Response Property | Description | Example | | --- | --- | --- | | status | The current status of the operation. The overall operation status is displayed at the bottom of the data object. When troubleshooting, review the status property contained in each stepType of the steps array. This value is also reflected in the [Job Tracker's Job Status](/v1/docs/record-collections-viewer-job-tracker-tool) column. Status values include: - `inProgress`: The delete operation is still processing the file(s). - `completed`: The delete is complete. - `canceled`: The delete has been manually stopped by the user. - `failed`: The delete failed. Review each stepType's status value to determine which process failed. | ```json { "data": { "type": "DELETE", "collection": "658c3c6b70573db027a0f3a2", "dataLocation": {}, "name": "Example Delete", "steps": [], "status": "completed" }} ``` | | docs | Located in the details object, the docsobject displays the following properties: - `processed`: The number of records successfully processed by the operation. - `total`: The total records processed. | ```json "details": {"dataLocation": {},"chunks": [],"docs": { "total": 4, "processed": 4 }}} ``` | Also known as Unqork Users, or Designer Users; is anyone who is inside the Unqork platform. Includes the Short Answer component, Long Answer component, Select Boxes, Radio component, Dropdown, Number component and Single Checkbox. APIs (application programming interfaces) are a set of protocols and definitions developers use to build and integrate application software. APIs act as the connective tissue between products and services. A soft delete is a data persistence strategy that retains deleted records in a database instead of permanently removing them. Soft deletes can help protect data from accidental or malicious deletion, and they can also improve performance. Also known as archiving. Hard Delete, also known as "Permanent Delete" or "Destroy", irreversibly erases a file or submission record. There is no option to recover hard deleted files. Also known as Record Data. Submission data consists of information saved by Unqork components. View submission data by using the angular command, or in Record Collections. The HTTP POST method is used to send data to a server to create or update a resource, typically including the data in the body of the request. Personal Identifiable Information (PII) is any representation of information that permits the identity of an individual to whom the information applies to be reasonably inferred by either direct or indirect means. HTTP (Hypertext Transfer Protocol) is an application-layer protocol used to transmit hypermedia documents like HTML. Schema is a declarative language that defines the structure, content, and constraints of the data. A standard format for representing dates and times. ISO 8601 format is represented in the following order: year, month, day, hour, minutes, seconds, and milliseconds. Coordinated Universal Time (UTC) is a standard, globally-accepted timezone used to regulate clocks and time around the world. Zulu Time (also known as Coordinated Universal Time) is an established universal time based on GMT (Greenwich Mean Time).