mailbox.check

The mailbox.check command checks for pending method executions.

TR50 Request

{
  "cmd": {
    "command": "mailbox.check",
    "params": {
      "autoComplete": true,
      "limit": 0
    }
  }
}

The diagram below shows the status flow while setting the autocomplete:true/false. The autocomplete:true confirms that the message reception is complete.

 

Request Parameters

Name Type Required Description
autoComplete Boolean If the messages returned should be automatically marked as completed. Defaults to false.
limit Integer Limits the number of results returned. Defaults to the maximum configured size.

TR50 Response

If the command is sent successfully a success message and the messages are returned. Otherwise, an error and error message will be returned.

{
  "cmd": {
    "success": true,
    "params": {
      "messages": [
        {
          "id": "5321d2fef2057f1fd400000b",
          "thingKey": "mqtt_client",
          "command": "method.exec",
          "params": {
            "method": "testmethod",
            "params": {
              ...
            }
          }
        }
      ]
    }
  }
}

Response Parameters

Name Type Description
messages Array An array of message objects.

Message Object Parameter

Name Type Description
id String The object id of the message.
thingKey String The thing key the message is related to.
command String The command name.
params Object The command parameters.