Delete supplemental table records

Use this interface to delete a Supplemental Table Records by specifying the primary key using request parameters.

Service URL:

/rest/api/v1.3/folders/{folderName}/suppData/{tableName}/members

Request Method:

DELETE

Request Header:

Authorization=<AUTH_TOKEN>

Request Parameters:

  • qa – Query Attribute. All of the Primary Key values of the Supplemental Table must be specified by repeating this parameter. Do not send other field names
  • id – IDs corresponding to the query attribute. All the Primary Key Values of the Supplemental Table must be specified by repeating this parameter. The order of the values must match the order of the Primary Keys specified in the ‘qa’ parameter.

Request Body:

None

Sample Request:

rest/api/v1.3/folders/DemoNewsLetter/suppData/CompositePKSuppTable/members?qa=PK1&qa=PK2&qa=PK3&fs=PK1,PK2,PK3,F1,F2&id=1&id=1&id=1

Sample Response in case of success:

RESPONSE NOTES:

  • The response will always contain all the query attributes specified in the request parameter in the fieldNames attribute and the corresponding values for the records in the records attribute in case the deletion of that record is successful.
  • In case a record is not found for the given id, an error response is returned that states, “No Records found for the Id”.
  • In case a record is found and delete failed for some reason, the record in the response contains an error message starting with DELETEFAILED:. Client developers can look for the string DELETEFAILED: in the response for a particular row to determine whether that record was deleted successfully or not.
  • Other attributes in the response, such as mapTemplateName, insertOnNoMatch, updateOnMatch, and matchColumn, will have default values (null/false).
{  
    "recordData":{  
        "fieldNames":[  
            "PK1",
            "PK2",
            "PK3"
        ],
        "records":[  
            [  
                "1",
                "1",
                "1"
            ]
        ],
        "mapTemplateName":null
    },
    "insertOnNoMatch":false,
    "updateOnMatch":null,
    "links":[  
        {  
            "rel":"self",
            "href":"/rest/api/v1.3/folders/DemoNewsLetter/suppData/CompositePKSuppTable/members?qa=PK1&qa=PK2&qa=PK3&fs=PK1,PK2,PK3,F1,F2&id=1&id=1&id=1",
            "method":"DELETE"
        },
       
 {  
            "rel":"mergeTableMembers",
            "href":"/rest/api/v1.3/folders/DemoNewsLetter/suppData/CompositePKSuppTable/members",
            "method":"POST"
        }
    ]
}

Sample Response in case of failure:

{
   "type": "",
   "title": "Record not found",
   "errorCode": "RECORD_NOT_FOUND",
   "detail": "No records found in the table for the given ids",
   "errorDetails": []
}

Sample Response in case not ALL Primary Key Columns are specified in the ‘qa’ request parameter:

{
   "type": "",
   "title": "Invalid request parameters",
   "errorCode": "INVALID_PARAMETER",
   "detail": "All and Only the Primary Keys in the Table [PK1, PK2, PK3] must be specified as Query Columns.",
   "errorDetails": []
}