ExecuteSqlQuery
Purpose | Execute an arbitrary Sql query using the connection string from the agent configuration. For certain aggregators, the request is forwarded to r_k Cloud. No agent connected is required. |
|---|---|
| Request type | Asynchronous |
| Supported agent version | v2 |
| PluggetSystemType | Sql |
Request format
JSON
|
Parameter | Type | Mandatory | Description |
|---|---|---|---|
| taskType | string | yes | Task type, for this method the value is ExecuteSqlQuery. |
| -async | Asynchronous method call: either synchronous or asynchronous | ||
| -sync | Synchronous method call: either synchronous or asynchronous | ||
| --timeout | int | no | Agent response timeout in seconds, default is 120 seconds |
| --objectId | int | yes | Restaurant code in the licensing system |
| -connectionStringName | string | no | The name of the database connection string in the agent configuration. If not specified, the RKeeperReportService connection is searched for in the configuration. |
| -procType | string | yes | Command type, options:
|
| -procName | string | yes | Name of the stored procedure or function |
| -params | no | Parameters for the called procedure/function | |
| --name | string | yes | Parameter name |
| --value | string | yes | Parameter value |
Response format
JSON
|
Parameter | Type | Description |
|---|---|---|
| --taskGuid | guid | Unique code for this task. Used when receiving a task via the queue |
| --taskType | string enum | Task type |
| --objectId | int | Restaurant code in the licensing system |
| -error | Error container, for more details see the article Error Description |
Asynchronous response format
Successful response
JSON
|
Answer with error
JSON
|
Parameter | Parameter type | Mandatory | Description |
|---|---|---|---|
| -rows | array | Array of records of the query execution result | |
| error | string enum | Error container, for more details see the article Error Description |
Example answer
JSON
|