Please enable JavaScript to view this site.

Deletes one or more records of a file.

 

Important: This action is not available in Swagger. DELETE operation implemented on Linkar Web Services gets the records to delete from the request body.

Swager does not allow to define the content of the body on operations of type DELETE. However, this is possible with applications like Postman.

 

DELETE: api/v1/<apiresource>/crud/<filename>

 

<apiresource> ApiResource name. e.g. apidemo.
 

<filename> Name of the file on which the operation is performed. e.g. LK.CUSTOMERS
e.g. api/v1/apidemo/crud/LK.CUSTOMERS/

 

Delete operation has 2 more variants: DICTIONARIES and SCHEMA. The difference between the 3 variants is in how the results are displayed.

Input and output parameters are the same in all 3 variants, and the differences are present only when records have multivalues.

For more information, see Response section below.

 

 

DELETE (DICTIONARIES mode): api/v1/<apiresource>/crud/dict/<filename>

DELETE (SCHEMA mode): api/v1/<apiresource>/crud/sch/<filename>

 

 

 

Parameters

 

recover_id

string

If empty, the record will be deleted. in which case the record will be deleted without the possibility of using techniques to reuse deleted codes.

Or it can contain any of the following values:

LINKAR. Linkar deleted code recovery will be used. The prefix and separator options can be used.

CUSTOM. Customized code recovering.

prefix

string

The code prefix

separator

string

The separator between the prefix and the code. The allowed separators list is: ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~

optimistic_locking

string

Checks out if the file has not been modified by another user

custom_vars

string

This is a free text field to send in the transaction. If not empty, subroutine SUB.LK.MAIN.CONTROL.CUSTOM will be called. Add custom code to that subroutine to define special behaviours for some or all transactions.

svr_timeout

integer

This is the maximum time in seconds that the client will wait for a response. Use 0 for no timeout.

(*) Mandatory

 

 

 

Request Body

 

application/json

The entry record has the following structure:

 

 

{                                        

 "RECORDS": [                            

   {                                    

     "LKITEMID": "string",              

     "ORIGINAL_RECORD": "string"        

   }                                    

 ]                                      

}                                        

 

 

If optimistic locking parameter is activated, ORIGINAL_RECORD tag must be included. The content of this tag its always a MV buffer as is, with its attribute, multivalue and subvalue marks. If the content of the MV buffer has invalid JSON characters, like double quotation, they must be escaped.

 

 

application/xml

The entry record has the following structure:

 

<?xml version="1.0" encoding="UTF-8"?>                

<LINKAR>                                              

   <RECORDS>                                          

       <RECORD>                                      

           <LKITEMID>string</LKITEMID>                

           <ORIGINAL_RECORD>string</ORIGINAL_RECORD>  

          </RECORD>                                  

   </RECORDS>                                        

</LINKAR>                                              

 

 

If optimistic locking parameter is activated, ORIGINAL_RECORD tag must be included. The content of this tag its always a MV buffer as is, with its attribute, multivalue and subvalue marks. If the content of the MV buffer has XML invalid characters, they must be escaped.

 

 

text/plain

The entry record has the following structure:

 

recordId_1 + RS + recordId_2 + FS + original_record_1 + RS + original_record_2

 

In this structure, there are two main blocks separated by the FS character (ASCII 28). The first part is the list of records IDs, the second one is the list of records MV buffer.

 

In case of being more than one element in any of the three lists, they must be separated with each other with the RS character (ASCII 30).

 

The MV buffers are the records as is, with attribute (AM), multivalue (VM) and subvalue (SM) marks.

 

 

 

Responses

The response, if no errors occurred, will be a list of deleted record IDs. There is no difference between DICTIONARIES and SCHEMA variants.

 

On all kind of responses, an ERROR tag will list all possible errors during execution of the operation. This tag includes CODE tag with the error codes and MESSAGE tag with messages of each error.

In responses of type "text/plain" (LkString MV), error codes and messages are separated by multivalue marks.

 

application/json

 

{                                        

 "RECORDS": [                            

   {                                    

     "LKITEMID": "string"                

   }                                    

 ],                                      

 “ERRORS”: []                            

}                                        

 

 

application/xml

 

<?xml version="1.0" encoding="UTF-8"?>                

<LINKAR>                                              

   <RECORDS>                                          

       <RECORD>                                      

           <LKITEMID>string</LKITEMID>                

          </RECORD>                                  

   </RECORDS>                                        

   <ERRORS></ERRORS>                                  

</LINKAR>                                              

 

 

text/plain

Response is displayed in text format. This response is a chain of characters structured in sections, named LkString. For more information about the different tags in this response, click here.