Writes specified value to the GDB group.

Request Structure

JSON object:

{
  "method": "global_db",
  "subcommand": ["write"],
  "arguments": {
    "group": "group_name",
    "key": "key_name",
    "value": "value"
  },
  "id": "1"
}

Parameters:

group - name of the group (list of names can be acquired using JSON-RPC Request - GLOBAL_DB GROUP_LIST) key - key for access the group (list of keys can be acquired using JSON-RPC Request - GLOBAL_DB GET_KEYS) value - any value which you want to write in the specified GDB group (“It can be any data that can be represented as a string in quotes”)

Curl Example

Request:

curl --unix-socket /opt/cellframe-node/var/run/node_cli -X POST http://localhost/connect -d '{
  "method": "global_db",
  "subcommand": ["write"],
  "arguments": {
    "group": "local.general",
    "key": "gdb_version",
    "value": "string in quotes"
  },
  "id": "1"
}'

Response:

{
  "type": 2,
  "result": [
    {
      "write status": "Data has been successfully written to the database"
    }
  ],
  "id": 1
}