Please enable JavaScript to view this site.

Returns the query result in a relational table format.

This version of GetTable is used to obtain queries of the DICTIONARIES schema type.

 

GET: api/v1/<apiresource>/crud/GetTable/Dictionaries/<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/GetTable/Dictionaries/LK.CUSTOMERS

 

 

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.

row_headers

string

Include headings in first row MAINLABEL (main headings), SHORTLABEL (short label headings), and NONE (without headings).

repeat_values

boolean

Repeat common atributes in MV and SV groups.

calculated

boolean

Return the resulting values from the calculated dictionaries.

apply_conversion

boolean

Execute Conversions: With Dictionaries, conversion defined in the dictionary. With Schemas conversions defined in Linkar Schemas.

apply_format

boolean

Execute Formats. With Dictionaries, formats defined in the dictionary. With Schemas formats defined in Linkar Schemas.

pagination

boolean

Indicates if pagination is being used or not.

reg_page

integer

In case of pagination it indicates the page number to obtain. Must be greater than 0.

num_page

integer

In case of pagination it indicates the page number to obtain. Must be greater than 0.

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

This image shows an example of running an operation in the LK.CUSTOMERS file.  

In order to avoid a large example, select clause has been defined with the value “WITH ID = ’10’ ID = ‘11’” and the rest of parameters have their default values.                        

 

 

Below is displayed the operation result. The complete content of the response is inside the TABLE node. In this node, the separator between fields is tab (ASCII 9) and the rows separation is vertical tab (ASCII 11).

 

{ "TABLE": "LK.CUSTOMERS\tCustomer ID\tName\tAddress\tPhone\u000b10\t10\tCUSTOMER 10\tADDRESS 10\t444 - 444 - 010\u000b11\t11\tCUSTOMER 11\tADDRESS 11\t444 - 444 - 011" }

 

 

application/xml

This image shows an example of running an operation in the LK.CUSTOMERS file.  

In order to avoid a large example, select clause has been defined with the value “WITH ID = ’10’ ID = ‘11’” and the rest of parameters have their default values.    

 

 

Below is displayed the operation result, formatted to read it more clearly.

Inside CDATA node, the separator between fields is tab (ASCII 9) and the rows separation is vertical tab (ASCII 11).

 

<GETTABLE>

<TABLE><![CDATA[LK.CUSTOMERS        Customer ID        Name        Address        Phone

10        10        CUSTOMER 10        ADDRESS 10        444 - 444 - 010

11        11        CUSTOMER 11        ADDRESS 11        444 - 444 - 011]]>

</TABLE>

</GETTABLE>

                                         

 

text/plain

This image shows an example of running an operation in the LK.CUSTOMERS file.  

In order to avoid a large example, select clause has been defined with the value “WITH ID = ’10’ ID = ‘11’” and the rest of parameters have their default values.    

This response is a chain of characters structured in sections, named "LkString".

For more information about the different tags in this response, click here.

 

 

Below is displayed the operation result, formatted to read it more clearly.

Inside CDATA node, the separator between fields is tab (ASCII 9) and the rows separation is vertical tab (ASCII 11).

 

LK.CUSTOMERS        Customer ID        Name        Address        Phone

10        10        CUSTOMER 10        ADDRESS 10        444 - 444 - 010

11        11        CUSTOMER 11        ADDRESS 11        444 - 444 – 011