Purpose

Get a list of agents installed in restaurants with information about their activity

Request typesynchronous
Supported agent versionv1, v2
PluggetSystemTypeServer

Notes:

  • The aggregator must have a WSServer license, otherwise the corresponding error will be returned
    The token is required to authorize the aggregator:
    • In API v1, the token is passed to the aggregator. The aggregator uses it when forming a request to the WS

    • In API v2 there is no need to pass a token. Within an hour, the new license will appear on the WS server automatically.
      If there is no license or it has expired, an error is returned:
      JSON

      {
        "error": {
          "wsError": {
            "code": "AuthFailed"
          }
        }
      }

  • The list of agents is formed from agents of version 1 and 2. If the agent was not connected to the server, it will not appear in the list
  • The list of agents displays only agents available to the aggregator, i.e. with an active WsProduct license and a non-expired date.
  • The list of agents also displays objects with expired WsClient licenses. The licenseExpirationDate for them will be expired
  • The list of agents displays only agents v2 for which the Executes commands from aggregators role is selected.

If the agent v2 was previously connected to the server, data will be issued on it regardless of whether the old agent v1 is running or not.

Request format


JSON

{
  "taskType": "GetAgentList"
}

Parameter

Type

Mandatory

Description

taskTypestringyesTask type, for this method the value is ExecuteRk7Query

Response format

Successful response


JSON

{
    "taskResponse":{
        "agents":[
          {
            "objectId":0,
            "version":"string",
            "isOnline": "true",
            "licenseExpirationDate": "2019-28-T15:00:00+03:00",
            "rkVersion": "7.6.225"
          }
        ],
   "responseCommon":{
      "taskGuid":"string",
      "taskType":"GetAgentList"
   }
}

Parameter

Parameter type

Mandatory

Description

-agentsarray
Array of agents
--objectIdintyesRestaurant code in the licensing system
--versionstring

Agent version

--isOnlineboolean
Agent activity
--licenseExpirationDatestring

Agent License Expiry Date — WsClient in Licensing System

--rkVersionstring
r_keeper mid version. Only for agent v2

Response with error


JSON

{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "GetAgentList"
  },
  "error": {
    "wsError": {
      "code": "string",
      "desc": "string"
    }
  }
}

Parameter

Parameter type

Required

Description

errorstring enum
Error container, for more details see the article Error Description