Please enable JavaScript to view this site.

Executes a query in the database.

 

GET: 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
 

{id} Parameter. Code of the record to be read. e.g. api/v1/apidemo/crud/LK.CUSTOMERS/10

 

Select 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.

 

 

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

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

 

 

 

Parameters

 

select_clause

string

Statement fragment specifies the selection condition. For example WITH CUSTOMER = '1'

sort_clause

string

Statement fragment specifies the selection order. If there is a selection rule Linkar will execute a SSELECT, otherwise Linkar will execute a SELECT. For example BY CUSTOMER

dict_clause

string

Space-delimited list of dictionaries to read. If this list is not set, all fields are returned. For example CUSTOMER DATE ITEM. In NONE mode you may use the format LKFLDx where x is the attribute number.

preselect_clause

string

An optional command that executes before the main Select.

only_records_ids

boolean

Returns just the selected record codes

pagination

boolean

Indicates if pagination is being used or not.

reg _page

integer

In case of pagination, indicates the number of records by page. It must be greater than 0.

num_page

integer

In case of pagination indicates the page to obtain. This must be greater than 0.

calculated

boolean

Return the resulting values from the calculated dictionaries.

conversion

boolean

Execute the defined conversions in the dictionaries before returning.

format_spec

boolean

Execute the defined formats in the dictionaries before returning

original_record

boolean

Return a copy of the records in MV format.

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

Unused

 

 

 

Responses

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

Response is displayed in JSON format. For more information about the different tags in this response, click here.

 

 

 

application/xml

Response is displayed in XML format. For more information about the different tags in this response, click here.

 

 

 

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.