/lua/var/{name}/value

The current value of this persistent variable as a JSON-encoded string.

While it is possible to write this value via the WebAPI, Lua scripts generally will also be updating the value as part of their execution, so any change in value may be temporary and whether or not a WebAPI write is detected by the scripts depends on the scripts themselves.

Get /lua/var/{name}/value

SecurityApiKey
Request
path Parameters
name
required
string

The name of a persistent Lua variable.

Responses
200

Normal response.

401

Unauthorized response.

get/lua/var/{name}/value
Request samples
Response samples
application/json
{
  • "result": {
    },
  • "error": "Error message (present if an error occurred)."
}

Replace /lua/var/{name}/value

SecurityApiKey
Request
path Parameters
name
required
string

The name of a persistent Lua variable.

Request Body schema: application/json
string (luaVarNameValue)

The current value of this persistent variable as a JSON-encoded string.

While it is possible to write this value via the WebAPI, Lua scripts generally will also be updating the value as part of their execution, so any change in value may be temporary and whether or not a WebAPI write is detected by the scripts depends on the scripts themselves.

Responses
200

Normal response.

401

Unauthorized response.

put/lua/var/{name}/value
Request samples
application/json
{
  • "result": "1677697200"
}
Response samples
application/json
{
  • "status": "OK",
  • "error": "Error message (present if an error occurred)."
}

Update /lua/var/{name}/value

SecurityApiKey
Request
path Parameters
name
required
string

The name of a persistent Lua variable.

Request Body schema: application/json
string (luaVarNameValue)

The current value of this persistent variable as a JSON-encoded string.

While it is possible to write this value via the WebAPI, Lua scripts generally will also be updating the value as part of their execution, so any change in value may be temporary and whether or not a WebAPI write is detected by the scripts depends on the scripts themselves.

Responses
200

Normal response.

401

Unauthorized response.

post/lua/var/{name}/value
Request samples
application/json
{
  • "result": "1677697200"
}
Response samples
application/json
{
  • "status": "OK",
  • "error": "Error message (present if an error occurred)."
}

Delete /lua/var/{name}/value

Reset to empty string.

SecurityApiKey
Request
path Parameters
name
required
string

The name of a persistent Lua variable.

Responses
200

Normal response.

401

Unauthorized response.

delete/lua/var/{name}/value
Request samples
Response samples
application/json
{
  • "status": "OK",
  • "error": "Error message (present if an error occurred)."
}