version

Return software version.

Description

Returns the application name and build version string in a JSON array (the command is listed in json_commands()).

CLI usage

version

JSON-RPC request

The top-level method must be "version". Two request formats are supported (see index for full rules). If params is present, the version 2 path is ignored.

Version 1 — legacy params string

params is an array; the first element is the command string passed to the CLI parser. Tokens are split on semicolons (;), not spaces. If params is omitted, empty, or the first element is an empty string, the server uses the method name as the command string.

Minimal request

{"method":"version","params":[""],"id":1,"version":1}

Explicit command string

{"method":"version","params":["version"],"id":2,"version":1}

Equivalent forms: params [""], ["version"], omitted params, or params [].

Version 2 — subcommand + arguments

Omit params. No subcommand or arguments are required — the server runs the bare version command.

{"method":"version","id":1,"version":2}

This is equivalent to version 1 with an empty or omitted params array. There are no flags for version; arguments is unused.

Request fields (both formats):

The jsonrpc field is not used by the Cellframe CLI server and may be omitted.

JSON-RPC response

The HTTP body is a Cellframe RPC envelope (not a standard JSON-RPC 2.0 result-only object). type is 2 (TYPE_RESPONSE_JSON). result is a JSON array with one object containing a status string. The response version echoes the request version.

{
  "type": 2,
  "result": [
    {
      "status": "cellframe-node version 5.7-1\n"
    }
  ],
  "id": 1,
  "version": 1
}

Version 2 request returns the same shape with "version": 2 in the envelope.

The status value is <appname> version <DAP_VERSION>\n from dap_get_appname() and the compile-time DAP_VERSION macro. The exact string depends on the running node build (on rpc.cellframe.net, alternating backends have returned both 5.7-1 and 5.7-41).

Restricted access

On public nodes, version is in allowed_cmd and is callable remotely. If a method is not allowed, the server returns type 2 with an error object:

{
  "type": 2,
  "result": [
    {
      "errors": [
        {
          "code": -1,
          "message": "Command \"<name>\" is restricted"
        }
      ]
    }
  ],
  "id": 1,
  "version": 1
}