Delete records by query - 8.0

MDM query language and REST data access (deprecated)

Version
8.0
Language
English
Product
Talend Data Fabric
Talend MDM Platform
Module
Talend MDM Server
Talend MDM Web UI
Content
Data Governance > Consolidating data
Data Governance > Retrieving data
Last publication date
2024-04-15
Deletes one or more records that match the provided query. Query is provided in the request content as JSON.
Request
PUT /services/rest/data/{containerName}/delete

The body is a query language in JSON format. The parameter content type is application/json.

Parameters
  • containerName: This is a String value which specifies the name of the data container from which the data record(s) will be deleted.
  • container: This is a String value which represents the type of the data container. It is either MASTER (default) or STAGING.
  • updateReport: This is a Boolean value which controls whether to generate a journal entry (update report). By default, it is false.
  • logical: This is a Boolean value which controls whether to delete records that match the provided query logically. By default, it is false, which implies that the records will be physically removed from the database and cannot be recovered from the Recycle Bin.
    Note: Logical delete is only supported on master data records.
Headers
  • Content-Type: application/json
  • Authorization: Basic Authentication scheme
Response No content.
Status
  • 200 OK: The operation is executed successfully, and all records that match the provided query are deleted.
  • 400 BAD REQUEST: The request contains invalid parameter, for example, invalid storage name, invalid storage type, or wrong XML document.
  • 401 UNAUTHORIZED: Login fails, invalid username or password.
  • 403 FORBIDDEN: Missing required permission, for example, no required WRITE permission.
  • 404 NOT FOUND: The resource does not exist, for example, invalid service URL.
  • 500 INTERNAL SERVER ERROR: Other errors.
Limitation This REST API does not support deleting records by query for the Role entity in the PROVISIONING system data container.

Sample request

To delete the Product instances where Product/Price is greater than 18, use the following query:

{
   "select": {	
      "from": ["Product"],
      "where": {
         "gt":[
           {"field": "Product/Price"},
           {"value": "18"}
         ]
      }
   }
}