Executes a subroutine.
POST: api/v1/<apiresource>/Subroutine/{name}
•<apiresource>ApiResource name. e.g. apidemo.
•{name} Parameter
Example: api/v1/apidemo/ Subroutine /SUB.DEMOLINKAR/
Parameters
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. |
arg_number_httpstatuscode |
integer |
Optional. It is the argument of the subroutine with the HTTS Error Code to be returned to the client More info in HTTP status code |
name (*) |
string |
Name of BASIC subroutine to execute. |
(*) Mandatory
Request Body
The following examples used SUB.DEMOLINKAR subroutine. This subroutine has 3 arguments.
The first one is the number of waiting seconds before the subroutine returns control.
The second argument is a text that will be converted to uppercase and be returned as a result in the third argument when the subroutine terminates.
application/json
application/xml
text/plain
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
The image below shows an example of the result of executing the operation.
application/xml
The image below shows an example of the result of executing the operation.
text/plain
The image below shows an example of the result of executing the operation.