Purpose

Checks whether the specified procedure has been created in the database.

For certain restaurants, the request is forwarded to r_k Cloud. No agent is required to be connected.

LimitationsOnly for the "RkReports" aggregator
Supported agent versionv2
PluggetSystemTypeSql

Request format


JSON

{
  "taskType": "IsSqlProcExist",
  "params": {
    "async": {
      "objectId": number,
       "timeout": number
    },
    "sync": {
      "objectId": number,
       "timeout": number
    },
    "procName": "string"
  }
}

Parameter

Type

Mandatory

Description

taskTypestringyesTask type. For this method, the value is ExecuteSqlQuery
async

Asynchronous method call: either synchronous or asynchronous
sync

Synchronous method call: either synchronous or asynchronous
timeoutintnoAgent response time in seconds. Default is 120 seconds
objectIdintyesRestaurant code in the licensing system
procNamestringyesFull name of the stored procedure

Synchronous response format


JSON

{
   "responseCommon":{
      "taskGuid":"guid",
      "taskType":"IsSqlProcExist",
      "objectId": 0
   },
   "error":{
      "wsError":{
         "code":"string",
         "desc":"string"
      }
   }
}

Parameter

Type

Description

-taskGuidguidUnique code for this task. Used when receiving a task via the queue
-taskTypestring enumTask type
-objectIdintRestaurant code in the licensing system
error
Error container, for more details see the article Error Description

Asynchronous response format

Successful response


JSON

{
  "taskResponse": {
     "procName": "name"
     "exist": true,
     }
  },
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "IsSqlProcExist",
    "objectId": 0
  }
}



Response with error


JSON

{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "IsSqlProcExist",
    "objectId": 0
  },
  "error": {
    "wsError": {
      "code": "string",
      "desc": "string"
    },
    "agentError": {
      "code": 0,
      "desc": "string"
    }
  }
}


Example answer


JSON

{
    "taskResponse": {
        "procName": "name"
        "exist": true,
        }
    },
    "responseCommon": {
        "taskGuid": "464ca191-8d3a-439b-ad5b-485f628275e6",
        "taskType": "IsSqlProcExist",
        "objectId": 199997075
    }
}

Parameter

Parameter type

Mandatory

Description

-procNamestringyesFull procedure name
-existboolyes

Takes two values:

  • true — the procedure exists
  • false — the procedure does not exist
errorstring enum
Error container, for more details see the article Error Description