"createSession" returns the "authToken", which is needed for all other actions (except for "pingSession").
Request examples
Minimal
{
"api": "admin",
"action": "createSession",
"params": {
"username": "CHANGE",
"password": "CHANGE"
}
}Maximal
{
"apiVersion": "1.0",
"api": "admin",
"action": "createSession",
"params": {
"username": "CHANGE",
"password": "CHANGE",
"description": "optional user description of session for troubleshooting",
"defaultApi": "db",
"defaultDebug": "max",
"defaultDatabaseName": "ctreeSQL",
"defaultOwnerName": "CHANGE",
"defaultBinaryFormat": "hex",
"defaultVariantFormat": "binary",
"defaultResponseOptions": {
"dataFormat": "objects",
"numberFormat": "string",
"binaryFormat": "hex",
"variantFormat": "variantObject"
},
"idleConnectionTimeoutSeconds": 60000,
"permanentSession": true,
"idleCursorTimeoutSeconds": 60000
},
"responseOptions": {
"binaryFormat": "hex",
"dataFormat": "objects",
"numberFormat": "string",
"variantFormat": "json"
},
"debug": "max"
"requestId": "2",
}
Response examples
Minimal
{
"authToken": "replaceWithAuthTokenFromCreateSession",
"result": {
"authToken": "replaceWithAuthTokenFromCreateSession",
"username": "CHANGE",
"defaultDatabaseName": "faircom",
"defaultOwnerName": "CHANGE",
"defaultBinaryFormat": "hex",
"defaultVariantFormat": "json",
"defaultStringFormat": "json",
"defaultFixedLengthCharFormat": "sql",
"defaultResponseOptions": {
"binaryFormat": "hex",
"variantFormat": "json",
"dataFormat": "objects",
"numberFormat": "number",
"stringFormat": "json",
"fixedLengthCharFormat": "sql",
"includeBookmarks": false
},
"idleConnectionTimeoutSeconds": 3600,
"idleCursorTimeoutSeconds": 600,
"defaultApi": "hub",
"defaultDebug": "max",
"transformBufferInitialBytes": 0,
"permanentSession": false,
"sessionStartTimestamp": "2026-05-07T22:36:42",
"sessionLastAccessedTimestamp": "2026-05-07T22:36:42",
"defaultRetentionPolicy": "autoPurge",
"defaultRetentionUnit": "week",
"defaultRetentionPeriod": 4,
"serverVersion": "FairCom EDGE Server - V5.1.5.125(Build-260503)",
"hostname": "MyServer",
"hostUuid": "564f2c14-1281-48ff-ac4b-6227a288a529",
"hostIpAddresses": [
"fe80::1979:1979:1979:1979",
"192.168.1.2",
"fe80::1979:1979:1979:1979",
"192.168.2.1",
"fe80::1979:1979:1979:1979",
"169.254.41.158",
"fe80::1979:1979:1979:1979",
"169.254.190.179",
"fe80::1979:1979:1979:1979",
"169.254.2.39"
],
"hostServerNamePort": "FAIRCOMS",
"hostSQLPort": 6597
},
"errorCode": 0,
"errorMessage": ""
}
Maximal
{
"authToken": "replaceWithAuthTokenFromCreateSession",
"result": {
"authToken": "replaceWithAuthTokenFromCreateSession",
"username": "CHANGE",
"description": "optional user description of session for troubleshooting",
"defaultDatabaseName": "ctreeSQL",
"defaultOwnerName": "CHANGE",
"defaultBinaryFormat": "hex",
"defaultVariantFormat": "binary",
"defaultStringFormat": "json",
"defaultFixedLengthCharFormat": "sql",
"defaultResponseOptions": {
"dataFormat": "objects",
"numberFormat": "string",
"binaryFormat": "hex",
"variantFormat": "variantObject",
"stringFormat": "json",
"fixedLengthCharFormat": "sql",
"includeBookmarks": false
},
"idleConnectionTimeoutSeconds": -1,
"idleCursorTimeoutSeconds": 60000,
"defaultApi": "db",
"defaultDebug": "max",
"transformBufferInitialBytes": 0,
"permanentSession": true,
"sessionStartTimestamp": "2026-05-07T22:39:34",
"sessionLastAccessedTimestamp": "2026-05-07T22:39:34",
"defaultRetentionPolicy": "autoPurge",
"defaultRetentionUnit": "week",
"defaultRetentionPeriod": 4,
"serverVersion": "FairCom EDGE Server - V5.1.5.125(Build-260503)",
"hostname": "MyServer",
"hostUuid": "564f2c14-1281-48ff-ac4b-6227a288a529",
"hostIpAddresses": [
"fe80::1979:1979:1979:1979",
"192.168.1.2",
"fe80::1979:1979:1979:1979",
"192.168.2.1",
"fe80::1979:1979:1979:1979",
"169.254.41.158",
"fe80::1979:1979:1979:1979",
"169.254.190.179",
"fe80::1979:1979:1979:1979",
"169.254.2.39"
],
"hostServerNamePort": "FAIRCOMS",
"hostSQLPort": 6597
},
"requestId": "2",
"debugInfo": {
"request": {
"authToken": "replaceWithAuthTokenFromCreateSession",
"api": "admin",
"action": "createSession",
"params": {
"username": "CHANGE",
"password": "CHANGE",
"description": "optional user description of session for troubleshooting",
"defaultApi": "db",
"defaultDebug": "max",
"defaultDatabaseName": "ctreeSQL",
"defaultOwnerName": "CHANGE",
"defaultBinaryFormat": "hex",
"defaultVariantFormat": "binary",
"defaultResponseOptions": {
"dataFormat": "objects",
"numberFormat": "string",
"binaryFormat": "hex",
"variantFormat": "variantObject"
},
"idleConnectionTimeoutSeconds": 60000,
"permanentSession": true,
"idleCursorTimeoutSeconds": 60000
},
"apiVersion": "1.0",
"requestId": "2",
"responseOptions": {
"dataFormat": "objects",
"numberFormat": "string",
"binaryFormat": "hex",
"variantFormat": "json"
},
"debug": "max"
}
},
"errorCode": 0,
"errorMessage": ""
}
Invalid
{
"requestId": "2",
"debugInfo": {
"request": {
"api": "admin",
"action": "createSession",
"params": {
"username": "CHANGE",
"password": "CHANGE",
"description": "optional user description of session for troubleshooting",
"defaultApi": "db",
"defaultDebug": "max",
"defaultDatabaseName": "ctreeSQL",
"defaultOwnerName": "CHANGE",
"defaultBinaryFormat": "hex",
"defaultVariantFormat": "binary",
"defaultResponseOptions": {
"dataFormat": "objects",
"numberFormat": "string",
"binaryFormat": "hex",
"variantFormat": "variantObject"
},
"idleConnectionTimeoutSeconds": 60000,
"permanentSession": true,
"idleCursorTimeoutSeconds": 60000
},
"apiVersion": "1.0",
"requestId": "2",
"responseOptions": {
"binaryFormat": "hex",
"dataFormat": "objects",
"numberFormat": "string",
"variantFormat": "json"
},
"debug": "max"
}
},
"errorCode": 1215,
"errorMessage": "Connection pool creation failed - User [CHANGE] authentication failed to server [FAIRCOMS]. Please check user, password, and security privileges."
}
Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
username |
The
|
Required - No default value
Optional with default of the account name of the currently logged-in user for Key-Value actions
|
string | 1 to 64 bytes |
password |
The
|
Required - No default value | string | 0 to 256 bytes |
description |
The "description" property describes objects such as code packages, labels, or things. The server indexes this field with a full-text index so that you can search for any word or phrase. You cannot use this property for filtering in the Thing API. |
Optional with default of
|
string |
0 to 65,500 bytes 1 to 512 bytes for the Thing API |
defaultApi |
The "params": {
"username": "CHANGE",
"password": "CHANGE",
"description": "optional user description of session for troubleshooting",
"defaultApi": "db",
"defaultDebug": "max",
"defaultDatabaseName": "ctreeSQL",
"defaultOwnerName": "admin",
"defaultBinaryFormat": "hex"
}, |
FairCom DB defaults to FairCom Edge defaults FairCom MQ defaults |
string enum |
|
defaultDebug |
The
|
Optional with default of "max"
|
string enum |
|
defaultDatabaseName |
The "params": {
"username": "CHANGE",
"password": "CHANGE",
"description": "optional user description of session for troubleshooting",
"defaultApi": "db",
"defaultDebug": "max",
"defaultDatabaseName": "ctreeSQL",
"defaultOwnerName": "admin",
"defaultBinaryFormat": "hex"
}, |
FairCom DB defaults to FairCom Edge defaults to FairCom MQ defaults to |
string | 1 to 64 bytes |
defaultOwnerName |
The
|
Optional with default of the session's |
string | 1 to 64 bytes |
defaultBinaryFormat |
Defines the default value of “binaryFormat”. |
Optional with default of |
string | One of the following: "base64", "hex", or "byteArray". |
defaultVariantFormat |
The |
Optional with default of "json"
|
string |
|
defaultResponseOptions |
The 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 Example "defaultResponseOptions": {
"binaryFormat": "hex",
"dataFormat": "objects",
"numberFormat": "number",
"variantFormat": "json"
} |
Optional with default of |
object |
|
|
defaultResponseOptions .dataFormat |
The
|
Optional with default of "arrays"
|
string |
|
|
defaultResponseOptions .numberFormat |
The |
Optional with default of "number"
|
string |
|
|
defaultResponseOptions .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". |
|
defaultResponseOptions .stringFormat |
The This property applies to all
|
Optional with default of "json"
|
string |
|
|
defaultResponseOptions .variantFormat |
The "variantFormat" property tells the server how to interpret the variant data included in a JSON Action request. For more details, see "variantFormat". |
Optional with default of "json"
|
string |
|
idleConnectionTimeoutSeconds |
The A value of |
Optional with default of |
integer |
|
permanentSession |
The |
Optional with default of false
|
Boolean |
|
idleCursorTimeoutSeconds |
The
|
Optional with default of |
integer |
|
Response properties ("result")
| Property | Description | Type | Limits (inclusive) |
|---|---|---|---|
username |
The All API actions are performed in the context of the account identified by In JSON DB API and JSON Hub API, use the Unlike other property names, such as A zero-length username is invalid.
In Key-Value actions, the
|
string
|
1 to 64 bytes |
description |
The "description" property describes objects such as code packages, labels, or things. The server indexes this field with a full-text index so that you can search for any word or phrase. You cannot use this property for filtering in the Thing API. |
string |
0 to 65,500 bytes 1 to 512 bytes for the Thing API |
defaultDatabaseName |
The "params": {
"username": "CHANGE",
"password": "CHANGE",
"description": "optional user description of session for troubleshooting",
"defaultApi": "db",
"defaultDebug": "max",
"defaultDatabaseName": "ctreeSQL",
"defaultOwnerName": "admin",
"defaultBinaryFormat": "hex"
}, |
string | 1 to 64 bytes |
defaultFixedLengthCharFormat |
The "defaultFixedLengthCharFormat" property defines the default value of the "fixedLengthCharFormat" property when a JSON Action request does not otherwise define it. |
string enum |
|
defaultOwnerName |
The
|
string | 1 to 64 bytes |
defaultBinaryFormat |
Defines the default value of "binaryFormat". |
string enum | One of the following: "base64", "hex", or "byteArray". |
defaultStringFormat |
The "defaultStringFormat" property sets the default value of the "stringFormat" property when a JSON Action request does not include it. |
string enum |
|
defaultVariantFormat |
The |
string enum |
|
defaultResponseOptions |
The 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 Example "defaultResponseOptions": {
"binaryFormat": "hex",
"dataFormat": "objects",
"numberFormat": "number",
"variantFormat": "json"
} |
object |
|
|
defaultResponseOptions .dataFormat |
The
|
string |
|
|
defaultResponseOptions .fixedLengthCharFormat |
The
For more details, see |
string enum |
|
|
defaultResponseOptions .includeBookmarks |
The "includeBookmarks" property indicates whether or not bookmarks are included in the response by default. |
Boolean |
|
|
defaultResponseOptions .numberFormat |
The |
string |
|
|
defaultResponseOptions .binaryFormat |
The "binaryFormat" property designates the format of binary values embedded in JSON strings. For more details, see "binaryFormat". |
string | One of the following: "base64", "hex", or "byteArray". |
|
defaultResponseOptions .stringFormat |
The This property applies to all
|
string |
|
|
defaultResponseOptions .variantFormat |
The "variantFormat" property tells the server how to interpret the variant data included in a JSON Action request. For more details, see "variantFormat". |
string |
|
defaultRetentionPeriod |
The "defaultRetentionPeriod" property defines the default value of the "retentionPeriod" property when a JSON Action request does not otherwise define it. |
integer |
1 to 100
|
defaultRetentionPolicy |
The "defaultRetentionPolicy" property defines the default value of the "retentionPolicy" property when a JSON Action request does not otherwise define it. |
string enum |
|
defaultRetentionUnit |
The "defaultRetentionUnit" property defines the default value of the "retentionUnit" property when a JSON Action request does not otherwise define it. |
string enum |
|
idleConnectionTimeoutSeconds |
The A value of |
integer |
|
idleCursorTimeoutSeconds |
The
|
integer |
|
defaultApi |
The |
string enum |
|
defaultDebug |
The
|
string enum |
|
sessionStartTimestamp |
The "result": {
"sessionStartTimestamp": "2025-08-27T20:26:25",
"sessionLastAccessedTimestamp": "2025-08-27T20:56:25"
}, |
timestamp | An ISO 8601 timestamp |
sessionLastAccessedTimestamp |
The "result": {
"sessionStartTimestamp": "2025-08-27T20:26:25",
"sessionLastAccessedTimestamp": "2025-08-27T20:56:25"
}, |
timestamp | An ISO 8601 timestamp |
hostname |
The "sessions": [
{
"hostname": "host's name",
"hostUuid": "561d3f41-37da-4d03-bcc2-9cf2b671119f",
"hostIpAddresses": [
"fe80::7b21:ec4f:fbb0:7d45",
"169.254.188.125",
"fe80::62c9:6f17:6132:d13f",
"169.254.150.200",
"fe80::6e3f:653a:ac7b:3074",
"169.254.169.237",
"fe80::c98f:a8f0:25c5:91e4",
"10.250.250.201",
"fe80::48d2:30ab:3798:6a6d",
"169.254.35.210"
],
"hostServerNamePort": "FAIRCOMS",
"hostSQLPort": 6597
}
] |
string | The name of the host device. |
hostUuid |
The "sessions": [
{
"hostname": "host's name",
"hostUuid": "561d3f41-37da-4d03-bcc2-9cf2b671119f",
"hostIpAddresses": [
"fe80::7b21:ec4f:fbb0:7d45",
"169.254.188.125",
"fe80::62c9:6f17:6132:d13f",
"169.254.150.200",
"fe80::6e3f:653a:ac7b:3074",
"169.254.169.237",
"fe80::c98f:a8f0:25c5:91e4",
"10.250.250.201",
"fe80::48d2:30ab:3798:6a6d",
"169.254.35.210"
],
"hostServerNamePort": "FAIRCOMS",
"hostSQLPort": 6597
}
] |
string | A UUID |
hostIpAddresses |
The "sessions": [
{
"hostname": "host's name",
"hostUuid": "561d3f41-37da-4d03-bcc2-9cf2b671119f",
"hostIpAddresses": [
"fe80::7b21:ec4f:fbb0:7d45",
"169.254.188.125",
"fe80::62c9:6f17:6132:d13f",
"169.254.150.200",
"fe80::6e3f:653a:ac7b:3074",
"169.254.169.237",
"fe80::c98f:a8f0:25c5:91e4",
"10.250.250.201",
"fe80::48d2:30ab:3798:6a6d",
"169.254.35.210"
],
"hostServerNamePort": "FAIRCOMS",
"hostSQLPort": 6597
}
] |
array of strings | The host's IP addresses |
hostServerNamePort |
The "sessions": [
{
"hostname": "host's name",
"hostUuid": "561d3f41-37da-4d03-bcc2-9cf2b671119f",
"hostIpAddresses": [
"fe80::7b21:ec4f:fbb0:7d45",
"169.254.188.125",
"fe80::62c9:6f17:6132:d13f",
"169.254.150.200",
"fe80::6e3f:653a:ac7b:3074",
"169.254.169.237",
"fe80::c98f:a8f0:25c5:91e4",
"10.250.250.201",
"fe80::48d2:30ab:3798:6a6d",
"169.254.35.210"
],
"hostServerNamePort": "FAIRCOMS",
"hostSQLPort": 6597
}
] |
string | The name of the server or ISAM port. |
hostSQLPort |
The "sessions": [
{
"hostname": "host's name",
"hostUuid": "561d3f41-37da-4d03-bcc2-9cf2b671119f",
"hostIpAddresses": [
"fe80::7b21:ec4f:fbb0:7d45",
"169.254.188.125",
"fe80::62c9:6f17:6132:d13f",
"169.254.150.200",
"fe80::6e3f:653a:ac7b:3074",
"169.254.169.237",
"fe80::c98f:a8f0:25c5:91e4",
"10.250.250.201",
"fe80::48d2:30ab:3798:6a6d",
"169.254.35.210"
],
"hostServerNamePort": "FAIRCOMS",
"hostSQLPort": 6597
}
] |
string | The name of the server's SQL port. |
authToken |
The It is supplied by the server in response to the connect action. Clients must include it in all subsequent requests to validate that they are authenticated and authorized. If the client does not supply the correct values, the server returns an unauthorized error. |
string | 0 to 255 bytes |
permanentSession |
The |
Optional with default of false
|
Boolean |
serverVersion |
The "result": {
"sessionStartTimestamp": "2025-08-28T15:44:56",
"sessionLastAccessedTimestamp": "2025-08-28T18:07:07",
"defaultRetentionPolicy": "autoPurge",
"defaultRetentionUnit": "week",
"defaultRetentionPeriod": 4,
"serverVersion": "FairCom EDGE Server - V4.2.4.109(Build-250819)"
}, |
string | The name of the version of the FairCom server to which the request was made. |
transformBufferInitialBytes |
The |
integer |
0 or more bytes |