jsonAction request

List of properties in JSON Action request messages

jsonAction request

The following properties are part of each jsonAction request message. All are optional except for "action", and "params". APIs often take advantage of the optional properties to implement advanced features.

 

Example

{
  "requestId": "1",
  "api": "someApi",
  "apiVersion": "1.0",
  "action": "someAction",
  "params": {},

  "responseOptions":
  {
    "binaryFormat":   "hex",
    "dataFormat":     "objects",
    "numberFormat":   "string",
    "includeFields":  [],
    "excludeFields":  [],
    "includePaths":   [],
    "excludePaths":   []
  },
  "debug": "max",
  "authToken": "replaceWithAuthTokenFromCreateSession"
}

 

Property summaries

Property Description Default Type Limits (inclusive)

action

The "action" property contains the name of a remote procedure call that the server can execute.

Required - No default value

string  

api

The "api" property contains the name of an API. Optional with default of "" string

"admin"

"db"

"hub"

"mq"

"transform"

apiVersion

The "apiVersion" property specifies the major, minor, and patch versions of the API.

Latest version of the API string 0 to 12 bytes

authToken

The "authToken" property signifies that the client is authenticated and authorized.

Required - No default value

Note Optional for "pingSession" and "createSession" and defaults to "".

 

string 0 to 225 bytes

debug

The "debug" property contains the settings for returning any extra debug information. Optional with default of "none" string

"none"

"max"

params

The "params" property contains the parameters to an action.

Optional with default of {}

object 0 or more parameters

requestId

The "requestId" property contains any JSON value to identify a message as assigned by the client. Optional with default of null string enum

string

number

object

array

Boolean

null

responseOptions

The "responseOptions" property configures the server to return a customized response.

  • None of these properties are required, but some are mutually exclusive:
    • "includeFields" and "excludeFields" are mutually exclusive.
      • Use "includeFields" or "excludeFields" to control which record fields are present in the data.
    • "includePaths" and "excludePaths" are mutually exclusive.
      • Use "includePaths" or "excludePaths" to control which JSON properties are included in the data.
  • A JSON path includes the JSON field name plus the path of the property within the JSON field.
  • Use "omit" to remove a property from a response, such as omitting "errorMessage".
  • Use "dataFormat" to control whether data comes back as an array of arrays or an array of objects.
  • Use "numberFormat" to control whether JSON numbers are rendered as digits or digits embedded in a string.
  • Use “stringFormat” to change how “char”, “varchar”, “lvarchar”, and “variant” string field values are returned. 
  • Use "variantFormat" to control how the server formats the values of variant fields in its response.
Full example
    "responseOptions": 
    { 
     "omit": ["error", "fieldDefs" ]
     "dataFormat": "arrays", 
     "numberFormat": "number",
     "includeFields": [ "name", "email" ],
     "excludeFields": [],
     "includePaths": [],
     "excludePaths": [ "email.domain" ],
     "binaryFormat": "base64",
     "stringFormat": "json",
     "variantFormat": "json"
    }
Optional with default of null object

"omit"

"dataFormat"

"numberFormat"

"includeFields"

"excludeFields"

“includeBookmarks”

"includePaths"

"excludePaths"

"binaryFormat"

"stringFormat"

"variantFormat"

 

responseOptions

.binaryFormat

The "binaryFormat" property designates the format of binary values embedded in JSON strings. For more details, see "binaryFormat" Optional with default of "hex" string One of the following: "base64", "hex", or "byteArray".

responseOptions

.dataFormat

The "dataFormat" property 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".

  • "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.
Optional with default of "arrays" string 

"arrays"

"objects"

responseOptions

.excludeFields

The "excludeFields" property specifies which fields are excluded in the response message.

Optional with default of []

Note Defaults to the "includeFields" specification.

 

array  

responseOptions

.includeFields

The "includeFields" property specifies which fields are returned in the response message.

Optional with default of []

Note Defaults to include all fields.

 

array  

responseOptions

.numberFormat

The "numberFormat" property defines the format of JSON numbers. For more details, see "numberFormat"

Optional with default of "number" string

"number"

"string"