Purpose

Get a list of agents who have roles on the restaurant

Request typeSynchronous only
Supported agent versionAny
PluggetSystemTypeWhiteServer

Request format


JSON

{
  "taskType": "GetRestaurantAgents",
  "params": {
    "sync": {
      "objectId": number,
       "timeout": number
    }
  }
}

Parameter

Type

Required

Description

taskTypestringyesTask type: For this method, the value is GetRestaurantAgents
params
yesRequest parameters
-sync
yesSynchronous method
--objectIdintyesRestaurant code in the licensing system
--timeoutintnoResponse timeout in seconds. Default is 120 seconds, maximum is 180 seconds

Response format


JSON

{
   "responseCommon":{
      "taskGuid":"guid",
      "taskType":"GetRestaurantAgents",
      "objectId":0
   },
   "taskResponse":[ 
       {
            "version": string,
            "isOnline": boolean,
            "agentGuid": guid,
            "roles":
            [
                string
            ]
      }  
   ],
   "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
taskResponsearrayArray of registered agents
--versionstringAgent version
--isOnlinebooleanAgent active for the last 10 minutes. True or false
--agentGuidguidAgent's Guid
--rolesarrayList of restaurant agent roles
error
Error container, for more details see the article Error Description

Example request


JSON

{
  "taskType": "GetRestaurantAgents",
  "params": {
    "sync": {
      "objectId": 19999999
    }
  }
}

Example answer


JSON

{
    "taskResponse": [
        {
            "version": "2.5.0.18",
            "isOnline": true,
            "agentGuid": "b922d5c8-a3a5-59ab-4cb3-ec51739b27a3",
            "roles": [
                "Plugin: 'Plugin_wsclient'",
                "Sql: 'Sql_wsclient'; '19999999: 127.0.0.1&rkAgentTest2'",
                "AgentInternal: 'AgentInternal_wsclient'",
                "StoreHouse: 'StoreHouse_wsclient'",
                "RKMid: 'RKMid_wsclient'",
                "RKRef: 'RKRef_wsclient'"
            ]
        },
        {
            "version": "2.4.1.1",
            "isOnline": false,
            "agentGuid": "b77ef27f-1325-4f56-bd86-08c274e12156",
            "roles": [
                "RKRef: 'EMRDP'; 'RKRef_wsclient'",
                "RKMid: 'EMRDPKASS'; 'RKMid_wsclient'",
                "Plugin: 'Plugin_wsclient'",
                "Sql: 'Sql_wsclient'",
                "AgentInternal: 'AgentInternal_wsclient'",
                "StoreHouse: 'StoreHouse_wsclient'"
            ]
        },
        {
            "version": "1.14.0.50",
            "isOnline": false,
            "agentGuid": "0beb9be6-0000-0000-0000-000000000000",
            "roles": [
                "RKMid",
                "RKRef"
            ]
        }
    ],
    "responseCommon": {
        "taskGuid": "fd601123-5c06-420b-b5bc-0cf3806705bd",
        "taskType": "GetRestaurantAgents",
        "objectId": 199990246
    }
}