Skip to main content

"describeMqSessions" (JSON Action)

View information about a client's MQTT or MQ API session

The "describeMqSessions" action requires "clientNames" and returns information about the MQ sessions, which may be an MQTT or MQ API session.

Request examples

Minimal

{
  "api": "mq",
  "action": "describeMqSessions",
  "params": {
    "clientNames": [
      "myClientIdentifier"
    ]
  },
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
{
  "api": "mq",
  "action": "describeMqSessions",
  "params":
  {
    "clientNames": [
      "a unique MQTT or MQ API client name"
    ],
    "includeSubscribedTopics": true,
    "includePublishedTopics": true,
    "includeStats": true
  },
  "apiVersion": "1.0",
  "debug": "max",
  "requestId": "optionalUniqueRequestIdFromTheClient",
  "authToken": "replaceWithAuthTokenFromCreateSession"
} 
{
  "authToken": "bIn7dGR4koiQmx5G8hf1ypnan1U2ZQoiP2r46N5z4WVFmlzTdTZam3JeIiuZ0ryx",
  "result": {
    "data": [
      {
        "clientName": "client1",
        "sessionStatus": "normal",
        "username": "ADMIN",
        "ipaddress": "127.0.0.1",
        "port": 54076,
        "mqttProtocol": "3.1.1",
        "keepAliveSeconds": 0,
        "connectionStatus": "connected",
        "connectionDateTime": "2025-09-18T20:56:13",
        "defaultBinaryFormat": "hex",
        "defaultVariantFormat": "json",
        "defaultResponseOptions": {
          "binaryFormat": "hex",
          "variantFormat": "json",
          "dataFormat": "objects",
          "numberFormat": "number"
        },
        "sessionType": "mqApi",
        "stats": {
          "minHealthySendRatePerMinute": 1,
          "maxHealthySendRatePerMinute": 1000,
          "maxHealthyBacklogRatePerMinute": 1,
          "minHealthySubscribedTopicFiltersCount": 1,
          "maxHealthySubscribedTopicFiltersCount": 1000,
          "sessionHealth": "healthy|unhealthy|offline",
          "totalMessagesPublished": 0,
          "publishRatePerMinute": 0,
          "publishRatePerMinuteLast10Minutes": 0,
          "publishRatePerMinuteInSession": 0,
          "publishRatePerHour": 0,
          "totalMessagesReceived": 0,
          "receiveMessagesPerMinute": 0,
          "receiveMessagesPerMinuteLast10Minutes": 0,
          "receiveMessagesPerMinuteSinceInSession": 0,
          "receiveMessagesPerHour": 0,
          "currentDeliveryBacklogged": 0,
          "deliveryBacklogRatePerMinute": 0,
          "deliveryBacklogRatePerMinuteLast10Minutes": 0,
          "deliveryBacklogRatePerMinuteInSession": 0,
          "deliveryBacklogRatePerHour": 0,
          "deliveryBacklogRatePerDay": 0
        },
        "willTopic": "some/Topic/Name/",
        "willQoS": 2,
        "willPayload": "This message is sent when client disconnects.",
        "willRetain": true,
        "subscriberCount": 0,
        "subscribedTopics": [],
        "publishedTopics": [],
        "metadata": {}
      },
      {
        "clientName": "client2",
        "sessionStatus": "normal",
        "username": "some/Topic/Name/",
        "ipaddress": "127.0.0.1",
        "port": 60678,
        "mqttProtocol": "3.1.1",
        "keepAliveSeconds": 0,
        "connectionStatus": "connected",
        "connectionDateTime": "2025-09-17T16:01:59",
        "lastFailedConnectDateTime": "2025-09-18T20:56:25",
        "lastFailedConnectReason": "API session is already in use",
        "defaultBinaryFormat": "hex",
        "defaultVariantFormat": "json",
        "defaultResponseOptions": {
          "binaryFormat": "hex",
          "variantFormat": "json",
          "dataFormat": "objects",
          "numberFormat": "number"
        },
        "sessionType": "mqApi",
        "stats": {
          "minHealthySendRatePerMinute": 1,
          "maxHealthySendRatePerMinute": 1000,
          "maxHealthyBacklogRatePerMinute": 1,
          "minHealthySubscribedTopicFiltersCount": 1,
          "maxHealthySubscribedTopicFiltersCount": 1000,
          "sessionHealth": "unhealthy",
          "totalMessagesPublished": 0,
          "publishRatePerMinute": 0,
          "publishRatePerMinuteLast10Minutes": 0,
          "publishRatePerMinuteInSession": 0,
          "publishRatePerHour": 0,
          "totalMessagesReceived": 0,
          "receiveMessagesPerMinute": 0,
          "receiveMessagesPerMinuteLast10Minutes": 0,
          "receiveMessagesPerMinuteSinceInSession": 0,
          "receiveMessagesPerHour": 0,
          "currentDeliveryBacklogged": 0,
          "deliveryBacklogRatePerMinute": 0,
          "deliveryBacklogRatePerMinuteLast10Minutes": 0,
          "deliveryBacklogRatePerMinuteInSession": 0,
          "deliveryBacklogRatePerHour": 0,
          "deliveryBacklogRatePerDay": 0
        },
        "subscriberCount": 0,
        "subscribedTopics": [],
        "publishedTopics": [],
        "metadata": {}
      }
    ]
  },
}

The describeMqSessions JSON action, requiring one or more clientNames, retrieves detailed information about specified MQ (MQTT or MQ API) sessions. The comprehensive response includes the session's connectionStatus (disconnected, connected, connectedTemporarily), sessionType (mqApi, mqtt, both), and vital statistics under the stats property such as sessionHealth (healthy, unhealthy, offline), message send/receive rates, and backlog information, enabling administrators to monitor the performance and status of individual client sessions. Additionally, it can optionally include lists of subscribedTopics and publishedTopics to provide a complete overview of the session's activity.

describeMqSessionsdescribe Mq SessionsJSON ActionMQ APIMQ session informationview MQ sessionMQTT session detailsMQ API session dataMQ API session detailsMQTT session dataFairCom MQ monitoringget session dataclient session statussession health metricssubscribed topicspublished topicsmessage ratesconnection statusJSON API describedescribe actionhow to describe MQ API sessionsget MQTT client session informationcheck MQ session connection status
Table 1. "params" property summaries

Property

Description

Default

Type

Limits (inclusive)

clientNames

(optional) an array of the unique names that identify the clients to the FairCom MQ engine.

""

an array of "clientName" strings

0 or more strings

includeOtherFields

(optional) indicates whether or not additional fields that are not the built-in integration table fields, transform fields, or MQTT fields will be included in the response

true

Boolean

true
false

includePublishedTopics

(optional) indicates whether or not the "publishedTopics" property will be included in the response

true

Boolean

true
false

includeStats

(optional) indicates whether or not the "stats" property will be included in the response

true

Boolean

true
false

includeSubscribedTopics

(optional) indicates whether or not the "subscribedTopics" property will be included in the response

true

Boolean

true
false

mqttProtocol

(optional) specifies the version of MQTT protocol to use in your session

5.0

string enum

"5.0"
"3.1.1"

receiveMaximum

(optional) specifies the maximum number of QoS 1 and QoS 2 publish messages that the MQTT client is willing to process concurrently

1024

integer

0 to 65535

sessionExpiryInterval

(conditional) specifies the number of seconds that a temporary MQTT session can be inactive before the server deactivates it

If "temporarySession" is true, "sessionExpiryInterval" defaults to 0 to ensure the temporary session expires when the JSON session does. If "temporarySession" is false, it defaults to 4294967296 because a permanent session never expires.

integer

0 to 4294967296

topicAliasMaximum

(optional) specifies the maximum number of topic aliases that the MQTT client can support

0

integer

0 to 65535



The "clientNames" property is an optional array containing 0 or more "clientName" strings. It is the client identifier (or clientId) in the MQTT protocol. It uniquely identifies an MQ session, which contains information about a client's subscriptions, settings, and queue position of each topic to which the client is subscribed. The FairCom MQ engine stores this information and retrieves it when an MQTT or MQ API client connects.

Connection authorization is done using an account name with a password or a client certificate.

The "clientName" property does not authorize an MQTT or MQ API session. Another authentication technique authorizes the connection, such as an account name and password or a client certificate. Thus, any account may be used to authorize an MQ connection. Each account is assigned to roles that authorize access to specific topics, client names, actions, etc.

The MQ API allows multiple processes to simultaneously use the same client name to manage sessions, subscribe to topics, send messages to topics, and retrieve messages from topics. 

The MQTT protocol allows only one connection per client identifier because each connection is stateful. If another client with the same "clientName" is already connected, the FairCom server disconnects the other client and vice-versa.

Set the "includeOtherFields" property to true to include additional fields that are not the built-in integration table fields, transform fields, or MQTT fields. Otherwise, omit the property or set it to false or null.

Set the "includePublishedTopics" property to true for the response to include the "publishedTopics" property, which contains all topics a client's session has published since the session was created. To omit the list of published topics, omit this property or set it to false or null.

The "includeStats" property indicates whether or not the "stats" property will be returned in the response.

Set the "includeSubscribedTopics" property to true for the response to include the "subscribedTopics" property, which contains the topics a client's session is currently subscribed to. To omit the list of subscribed topics, omit this property or set it to false or null.

The "mqttProtocol" property is an optional enumerated string that specifies the version of MQTT protocol to use in your session. This property currently accepts the following values:

  • "5.0"

  • "3.1.1"

The "receiveMaximum" property is an optional integer that specifies the maximum number of QoS 1 and QoS 2 publish messages that the MQTT client is willing to process concurrently.

The "sessionExpiryInterval" property specifies the number of seconds that a temporary session can be inactive before the server deactivates it. This property defaults to 0 when "temporarySession" is true and to 4294967296 when "temporarySession" is false. When a temporary session expires, the server removes its subscriptions and message delivery queue. 

The "sessionExpiryInterval" property has no effect on a permanent session because it does not expire. 

  • Set "sessionExpiryInterval" to 0 to expire a temporary session when the JSON action session closes.

  • Set "sessionExpiryInterval" to a value between 0 and 4294967296 to expire the session when it has been inactive for the specified number of seconds.

  • Set "sessionExpiryInterval" to 4294967296 to never expire the session.

The "temporarySession" property sets the value of the "sessionExpiryInterval" property.

  • If "temporarySession" is true, the server defaults "sessionExpiryInterval" to 0 so that a temporary session expires by default when the JSON session expires.

  • If "temporarySession" is false, the server sets "sessionExpiryInterval" to 4294967296.

The "topicAliasMaximum" property is an optional integer that specifies the maximum number of topic aliases that the MQTT client can support.

For a list and detailed description of the common properties in the request message, see jsonAction request. Properties that are contained in both "params" and "result" will appear in the "params" table above.

Table 2. describeMqSession "result.Data" property summaries

Property

Description

Type

Limits (inclusive)

connectionStatus

indicates if and how a client is connected to an MQ session

string

"disconnected"
"connected"
"connectedTemporarily"

dataFormat

specifies what format the results will be returned in

string

"default"
"arrays"
"objects"

defaultBinaryFormat

specifies the default value for the "binaryFormat" property, which tells the server how to parse binary data from the client, making it useful when the binary format is not specified in the action request

string

"base64"
"hex"
"byteArray"

defaultVariantFormat

specifies the default value of the "variantFormat" property when a JSON Action request does not include it

string

defaultResponseOptions

specifies a default value for "responseOptions" that is used by default in all other action calls

object

"numberFormat"
"dataFormat"
"binaryFormat"
"variantFormat"
defaultResponseOptions.
binaryFormat

specifies the format in which binary values are returned

string

"base64"
"hex"
"byteArray"
defaultResponseOptions.
variantFormat

specifies the format in which variant fields are returned

string

"variant"
"base64"
"hex"
"utf8"
defaultResponseOptions.
dataFormat

specifies what format the results will be returned in

string

"default"
"arrays"
"objects"
defaultResponseOptions.
numberFormat

specifies how numbers are formatted in the JSON response message

string

"number"
"string"

label

.deprecated

Specifieslabel whether a label is deprecated or not

Boolean

true
false
null

label

.description

describes a label

string

1 to 65,500 bytes

label

.enum

assigns an integer number to a label

smallint

-32768 to 32767

label

.Id

uniquely identifies a label

integer

0 to 65,500

label

.metadata

assigns metadata to a label

JSON

0 to 65,500 bytes

label

.sequence

specifies the numerical order of labels within a group

double

Any floating point or integer number

label

.value

assigns a value to a label

JSON

0 to 65,500 bytes

numberFormat

specifies how numbers are formatted in the JSON response message

string

"number"
"string"

publishedTopics

specifies the list of topics being published

string

1 to 65,500 bytes

sessionType

specifies which type of session the requested client is currently running

string

"mqApi"
"mqtt"
"both"

stats

contains stats about describeMqSessions. See link for more details

object

subscribedTopics

specifies the list of topics subscribed to

array

 

subscriberCount

specifies the number of subscribers

integer

username

specifies the account name of a user or application

string

1 to 64 bytes

variantFormat

specifies the format in which variant fields are returned

string

"variant"
"base64"
"hex"
"utf8"

willPayload

(conditional) contains the payload of the last will message

JSON

willQoS

(optional) specifies the quality of service the publisher used when publishing the will

integer

willRetain

(optional) tells the FairCom server to retain the will message for automatically sending to new subscribers as the first message they receive

Boolean

true
false

willTopic

(optional) specifies the topic that the FairCom server will use to publish the will message

UTF-8 string



The "connectionStatus" property is returned by the "describeMqSessions" action to indicate if and how a client is connected to an MQ session. It has the following values:

  • "disconnected" indicates no device or software is connected to the MQ session.

  • "connected" indicates a device or software has established a permanent connection to the MQ session.

  • "connectedTemporarily" indicates a device or software has established a temporary connection to the MQ session. When the device or software disconnects, the server removes the data associated with the MQ session.

The "dataFormat" property is a case-insensitive string enum that defines the format of the "data" property. The default format is an array of arrays. The alternative is an array of objects. The default for "dataFormat" can be changed during a "createSession" action by assigning a different value to the "dataFormat" property in "defaultResponseOptions".

There are three different (but similar) versions of the "dataFormat" property:

Two of those versions occur in a request, and another occurs in a response. They all indicate how data is formatted.

  • "dataFormat" in the request in "responseOptions" determines how the "data" property in the response is formatted.

    Possible values include:

    • "arrays"

      This is the default and causes the server to return results as an array of arrays, which is the most efficient.

    • "objects"

      This returns results as an array of objects. This is less efficient but is simpler to generate, read, and troubleshoot.

  • "dataFormat" in the request in the "params" object notifies the server how the "sourceData" property is formatted in the request. This version is rarely used because of the default "autoDetect" behavior.

    Possible values include:

    • "arrays"

      This causes the server to return results as an array of arrays, which is the most efficient.

    • "objects"

      This returns results as an array of objects. This is less efficient but is simpler to generate, read, and troubleshoot.

    • "autoDetect"

      This is the default, and the server automatically detects the format of the data in the "sourceData" property.

  • "dataFormat" in the response shows the client how the server formatted the "data" property.

    Possible values include:

    • "arrays"

      This is the default and causes the server to return results as an array of arrays, which is the most efficient.

    • "objects"

      This returns results as an array of objects. This is less efficient but is simpler to generate, read, and troubleshoot.

Example response

{
  "result": {
    "dataFormat": "objects"
  }
}

The "defaultVariantFormat" property sets the default value of the "variantFormat" property when a JSON Action request does not include it.

The "defaultResponseOptions" property is a "responseOptions" object. It defines a default value for "responseOptions" that is used by default in all other action calls. It defaults to an empty object.

  • JSON NAV allows you to choose how your program detects errors. By default, all error properties are included in each response – unless you override this behavior as shown in the example.

  • The example omits the error object in all responses which makes it easier for statically typed languages, such as C, C++, Java, C#, and VB, because they prefer properties to always be present. To help these languages, the "errorCode", "errorMessage", and "errorData" properties are always present whether there is an error or not.

Example

 "defaultResponseOptions": {
      "binaryFormat": "hex",
      "dataFormat": "objects",
      "numberFormat": "number",
      "variantFormat": "json"
    }

"variantFormat"

The "variantFormat" property tells the server how to format the values of variant fields in its response to your request.

The "numberFormat" property is an optional, case-insensitive string enum. It defines the format of JSON numbers. The default value for "numberFormat" is the "defaultNumberFormat" defined in the "createSession" or "alterSession" actions. If it is omitted there, it defaults to the value of the "defaultNumberFormat" property in the <faircom>/config/services.json file.

When "numberFormat" occurs in "mapOfPropertiesToFields", it tells the server how to encode or decode a number assigned to a JSON property.

For example, including "numberFormat" in a "tableFieldsToJson" transform step controls if the server encodes a number in a JSON property as a number or a number embedded in a string.

Possible values:
  • "number"

    This causes the server to return numeric values as JSON numbers, such as -18446744073709551616.000144722494 .

    This is most efficient.

    JSON represents numbers are base-ten numbers that may have any number of digits.

    Large numbers, such as 18446744073709551616.000144722494 are known to cause problems with JSON parsers and some programming languages, such as JavaScript, which are limited to the smaller range and binary rounding errors of IEEE floating point numbers.

  • "string"

    This returns the server to embed numeric values in JSON strings, such as "18446744073709551616.000144722494" .

    This is slightly less efficient because it includes two extra double quote characters

    Returning numbers embedded in strings ensures JSON parsers and programming languages will not automatically convert the number to a numeric representation that loses precision, introduces rounding errors, truncates values, or generates errors. This allows your application to control how numbers are processed.

  • Omitted or set to null

    This defaults to "number".

Example request

{
  "action": "someAction",
  "responseOptions":
  {
    "numberFormat": "string"
  },
  "authToken": "replaceWithAuthTokenFromCreateSession"
}

The "publishedTopics" property returns a list of the topics the client has published since the session was first created.

The "stats" property for describeMqSessions may contain the following information:

Table 3. describeMqSession "result.Stats" properties summary

Property

Description

Type

Limits (inclusive)

currentDeliveryBacklogged

specifies the current number of backlog messages

integer

deliveryBacklogRatePerDay

specifies the number of backlog messages per day

integer

deliveryBacklogRatePerHour

specifies the number of backlog messages per hour

integer

deliveryBacklogRatePerMinute

specifies the number of backlog messages per minute

integer

deliveryBacklogRatePerMinuteInSession

specifies the number of backlog messages per minute in the current session

integer

deliveryBacklogRatePerMinuteLast10Minutes

specifies the number of backlog messages per minute in the last 10 minutes

integer

maxHealthyBacklogRatePerMinute

specifies the maximum number of backlog messages per minute for a session to be considered healthy

integer

maxHealthySendRatePerMinute

specifies the maximum number of messages per minute for a session to be considered healthy

integer

maxHealthySubscribedTopicFiltersCount

specifies the maximum number of topic filters for a session to be considered healthy

integer

minHealthySendRatePerMinute

specifies the minimum number of messages per minute for a session to be considered healthy

integer

minHealthySubscribedTopicFiltersCount

specifies the minimum number of topic filters for a session to be considered healthy

integer

publishedTopics

specifies the topics the client has published since the session was first created

array

publishRatePerHour

specifies the rate of messages published per hour

integer

publishRatePerMinute

specifies the rate of messages published per minute

integer

publishRatePerMinuteInSession

specifies the rate of messages published per minute in the current session

integer

publishRatePerMinuteLast10Minutes

specifies the rate of messages published per minute in the last 10 minutes

integer

receiveMessagesPerHour

specifies the rate of messages received per hour

integer

receiveMessagesPerMinute

specifies the rate of messages received per minute

integer

receiveMessagesPerMinuteLast10Minutes

specifies the rate of messages received per minute in the last 10 minutes

integer

receiveMessagesPerMinuteSinceInSession

specifies the rate of messages received per minute since the start of the current session

integer

sessionHealth

specifies the status of the MQ session's health

string

"healthy"
"unhealthy"
"offline"

totalMessagesPublished

specifies the total number of messages published

integer

totalMessagesReceived

specifies the total number of messages received

integer



The "sessionType" property specifies which type of session the requested client is currently running. This property can return "mqApi", "mqtt", or "both".

The "stats" property for describeMqSessions may contain the following information:

Table 4. describeMqSession "result.Stats" properties summary

Property

Description

Type

Limits (inclusive)

currentDeliveryBacklogged

specifies the current number of backlog messages

integer

deliveryBacklogRatePerDay

specifies the number of backlog messages per day

integer

deliveryBacklogRatePerHour

specifies the number of backlog messages per hour

integer

deliveryBacklogRatePerMinute

specifies the number of backlog messages per minute

integer

deliveryBacklogRatePerMinuteInSession

specifies the number of backlog messages per minute in the current session

integer

deliveryBacklogRatePerMinuteLast10Minutes

specifies the number of backlog messages per minute in the last 10 minutes

integer

maxHealthyBacklogRatePerMinute

specifies the maximum number of backlog messages per minute for a session to be considered healthy

integer

maxHealthySendRatePerMinute

specifies the maximum number of messages per minute for a session to be considered healthy

integer

maxHealthySubscribedTopicFiltersCount

specifies the maximum number of topic filters for a session to be considered healthy

integer

minHealthySendRatePerMinute

specifies the minimum number of messages per minute for a session to be considered healthy

integer

minHealthySubscribedTopicFiltersCount

specifies the minimum number of topic filters for a session to be considered healthy

integer

publishedTopics

specifies the topics the client has published since the session was first created

array

publishRatePerHour

specifies the rate of messages published per hour

integer

publishRatePerMinute

specifies the rate of messages published per minute

integer

publishRatePerMinuteInSession

specifies the rate of messages published per minute in the current session

integer

publishRatePerMinuteLast10Minutes

specifies the rate of messages published per minute in the last 10 minutes

integer

receiveMessagesPerHour

specifies the rate of messages received per hour

integer

receiveMessagesPerMinute

specifies the rate of messages received per minute

integer

receiveMessagesPerMinuteLast10Minutes

specifies the rate of messages received per minute in the last 10 minutes

integer

receiveMessagesPerMinuteSinceInSession

specifies the rate of messages received per minute since the start of the current session

integer

sessionHealth

specifies the status of the MQ session's health

string

"healthy"
"unhealthy"
"offline"

totalMessagesPublished

specifies the total number of messages published

integer

totalMessagesReceived

specifies the total number of messages received

integer



The "username" property is a required string from 1 to 64 bytes. It is the account name of a user or application.

  • It is required by the "createSession" action for authentication.

  • All API actions are performed in the context of the account identified by "username". For example, all tables created by an account are owned by the account. All queries use tables owned by the account.

  • In JSON DB API and JSON Hub API, use the "ownerName" property to cause an action to use a different account name than the value of "username". This allows an account to use tables created by another account and to create tables that are owned by another account.

  • Unlike other property names, such as "databaseName", "username" is all lowercase.

  • A zero-length username is invalid.

Note

See System limits for requirements of this and all other system properties.

The "variantFormat" property is an optional enumerated string that specifies the format in which variant fields are returned. It may have one of the following values: "variant", "base64", "hex", or "utf8":

  • "variant" returns a Variant Object containing JSON describing information about the variant value, including its data type and encoding.

  • "hex" converts the binary value to hexadecimal and returns the field value as a JSON string.

  • "base64" converts the binary value to Base64 and returns the field value as a JSON string.

  • "utf8" converts the binary value into a UTF-8 string and returns the value as a JSON string.

The "variantFormat" property converts the variant value into the form an application needs.

  • Some applications prefer to receive the JSON object form of the variant so they have the metadata describing its data type and how it is encoded. The Variant Object is ideal for web services that transform data.

  • Some applications prefer to process the variant's raw binary value because they use heuristics to determine the data type. They may want a variant returned as Base64 because it is the most efficient encoding of binary data in a JSON string.

  • Some applications may prefer to display the variant's raw binary value as a hexadecimal string because they may not have a widget that can display and edit all possible variant values such as numbers, strings, Booleans, images, audio, JSON, XML, etc. When the user wants to view the actual value, the application queries the record again using the "variantFormat": "variant" setting to get the data type so it can display the value in a more useful manner.

The following examples show the same variant values encoded in various ways.

  1. The first value is a GIF image containing a single black pixel.

  2. The second is the JSON document { "myProperty": "myValue" }.

  3. The third value is a UTF-8 encoded string "UTF-8 encoded string".

A "getRecords..." action containing "variantFormat": "variant" causes the server to return a Variant Object for each variant field. A Variant Object is a JSON object with the property "schema": "jsonaction.org/schemas/variantOjbect".

"getRecords..." response containing a GIF image as a Variant Object encoded as Base64
{
  "data": [
    {
      "myField": {
        "schema": "jsonaction.org/schemas/variantObject",
        "value": "R0lGODlhAQABAIAAAAAAAP///yH5BAUAAAEALAAAAAABAAEAAAICRAEAOw==",
        "valueEncoding": [ "base64" ],
        "type": "gif",
        "storageEncoding": ["7z"]
      }
    }
  ]
}
"getRecords..." response containing the JSON object { "myProperty": "myValue" } as a Variant Object encoded as JSON
{
  "data": [
    {
      "myField": {
        "schema": "jsonaction.org/schemas/variantObject",
        "value": { "myProperty": "myValue" },
        "valueEncoding": [ "json" ], 
        "type": "json",
        "storageEncoding": ["7z"]
      }
    }
  ]
}
"getRecords..." response containing the UTF-8 string "UTF-8 encoded string" as a Variant Object encoded as UTF-8
{
  "data": [
    {
      "myField": {
        "schema": "jsonaction.org/schemas/variantObject",
        "value": "UTF-8 encoded string",
        "valueEncoding": [ "utf8" ],
        "type": "string",
        "storageEncoding": ["7z"]
      }
    }
  ]
}

A "getRecords..." action containing "variantFormat": "hex" causes the server to return the field value as a Hexadecimal-encoded string instead of a Variable Object.

"getRecords..." response containing a GIF image encoded in Hexadecimal
{
  "data": [
    {
      "myField": "47494638396101000100800000000000ffffff21f90405000001002c00000000010001000002024401003b"
    }
  ]
}
"getRecords..." response containing the JSON object { "myProperty": "myValue" } encoded in Hexadecimal
{
  "data": [
    {
      "myField": "7b20226d7950726f7065727479223a20226d7956616c756522207d"
    }
  ]
}
"getRecords..." response containing the UTF-8 string "UTF-8 encoded string" encoded in Hexadecimal
{
  "data": [
    {
      "myField": "5554462d3820656e636f64656420737472696e67"
    }
  ]
}

A "getRecords..." action containing "variantFormat": "base64" causes the server to return the field value as a Base64-encoded string instead of a Variable Object.

"getRecords..." response containing a GIF image encoded in Base64
{
  "data": [
    {
      "myField": "R0lGODlhAQABAIAAAAAAAP///yH5BAUAAAEALAAAAAABAAEAAAICRAEAOw=="
    }
  ]
}
"getRecords..." response containing the JSON object { "myProperty": "myValue" } encoded in Base64
{
  "data": [
    {
      "myField": "eyAibXlQcm9wZXJ0eSI6ICJteVZhbHVlIiB9"
    }
  ]
}
"getRecords..." response containing the UTF-8 string "UTF-8 encoded string" encoded in Base64
{
  "data": [
    {
      "myField": "VVRGLTggZW5jb2RlZCBzdHJpbmc="
    }
  ]
}

A "getRecords..." action containing "variantFormat": "utf8" causes the server to return the field value as a UTF-8-encoded string instead of a Variable Object.

"getRecords..." response containing a GIF Image encoded as a UTF-8 string
{
  "data": [
    {
      "myField": "GIF89a    €     ÿÿÿ!ù      ,           D  ;"
    }
  ]
}
"getRecords..." response containing the JSON object { "myProperty": "myValue" } encoded as a UTF-8 string
{
  "data": [
    {
      "myField": "{ \"myProperty\": \"myValue\" }"
    }
  ]
}
"getRecords..." response containing the UTF-8 string "UTF-8 encoded string"
{
  "data": [
    {
      "myField": "UTF-8 encoded string"
    }
  ]
}

The "willPayload" property is required when a will message is present. It contains the payload of the last will message. You can set it to any JSON value, including binary values embedded in a JSON string or array.

The property "willQoS" is reserved. The server sets it to 2.

The "willRetain" property is optional. It defaults to false.  When true, it tells the FairCom server to send the will message to new subscribers as the first message they receive when subscribing to a topic.

The "willTopic" property is optional. It is a UTF-8 string containing the topic that the FairCom server will use to publish the will message. If you set it to an empty string, "", null, or omit it, the FairCom server will not add the will message to the connection.