Skip to main content

Connection State

A new connection moves through a fixed sequence of states, each marked by a reply object, and refuses ordinary commands until the sequence completes.

Initialization

The first reply on a new connection is an extended reply object with status API_INITIALIZED:

{
"status": "API_INITIALIZED",
"request_id": null,
"result": null,
"error": null,
"version": "4.7.0.2600",
"app_version": "4.7.0.2564",
"setupComplete": "1",
"AuthenticationRequired": false
}
MemberTypeDescription
versionStringDisplayNet API version, as major.minor.revision.build
app_versionStringDisplayNet application version
setupCompleteStringThe value of the app.setupComplete config item, set by the application setup wizard; empty until set. See config
AuthenticationRequiredBooleanWhen true, the next command must be login. When false, the session is signed in as the built-in DisplayNet user and DN_AUTHENTICATION follows immediately
InitialServerSetupIncompleteBooleanPresent only when true: initial server setup has not created the admin account yet

Authentication

After a login attempt, or immediately when AuthenticationRequired is false, the server sends a reply with status DN_AUTHENTICATION carrying the session's identity in auth_details:

Session signed in as the built-in user
{
"status": "DN_AUTHENTICATION",
"request_id": null,
"result": null,
"error": null,
"auth_details": {
"IsAuthenticated": true,
"UserName": "DisplayNet",
"UserFullName": "DisplayNet",
"Role": "User",
"ClientAddress": "10.241.35.248:59676",
"AuthState": "COMPLETE",
"AuthenticationDateTime": "2026-07-31T22:19:02.4307202Z",
"ConnectionType": "Socket",
"LoginToken": null
}
}
MemberTypeDescription
IsAuthenticatedBooleanWhether the session is signed in
UserNameStringUser id
UserFullNameStringThe user's full name
RoleStringAdmin or User
ClientAddressStringThe client's address, as IP:port
AuthStateStringINITIAL before a login attempt, COMPLETE once an attempt has been processed, RETRY when the user is unknown or after a logout, EXPIRED when a login token has expired
AuthenticationDateTimeStringWhen the session's identity was established, UTC
ConnectionTypeStringSocket for telnet and SSH, WebSocket for the TCI WebSocket
LoginTokenStringThe user's login token, usable with logintoken; null until one exists

IsAuthenticated is the success flag: a login with a wrong password still produces a DN_AUTHENTICATION reply, with IsAuthenticated set to false.

When AuthenticationRequired is false:

  • The reply arrives immediately after API_INITIALIZED, with no login command.
  • logout signs the connection back in as the DisplayNet user, so AuthState returns COMPLETE and never RETRY.

The setting is read and changed with config, as config get server authentication_required.

Getting the initial state

Once authentication completes, initialize the session:

require api 3.5.0
mode async on

require declares the API version the client expects; the server interprets commands and shapes replies for that version. mode async on turns on notification delivery.

getinitdata then returns the system's current objects in one reply, ready to populate a client's model.