1Overview
Most device settings are accessed through the general-purpose option read/write endpoints. Options are divided into two categories by value type — integer and string — each with its own endpoint:
| Endpoint | Purpose | Value Type |
|---|---|---|
/get_option | Read the current value of a single option | Integer or string |
/set_option | Set an integer-type option | Integer |
/set_string | Set a string-type option | String |
All three are protected endpoints and require logging in first to obtain a token (token) — see the Login API guide for details.
value as a numeric type for integer options and as a string for string options; never mix the two. Limit options cannot be read or written and will return 400.2Connection Information
| Protocol | Default Port | Base URL |
|---|---|---|
| HTTP | 80 | http://<camera-ip>/ |
| HTTPS | 443 | https://<camera-ip>/ |
The content type is application/json, and all endpoints must include the token:
Authorization: Bearer <access_token>
3Read an Option
Read the current value of a single option. The read type is determined by method: "Get" returns an integer, "GetString" returns a string.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
method | string | Yes | "Get" (integer) or "GetString" (string) |
option | string | Yes | Option key |
Request · Read an Integer Option
POST /get_option
Authorization: Bearer <access_token>
Content-Type: application/json
{ "method": "Get", "option": "<option_key>" }
Response · 200 OK
{ "code": 200, "msg": "ok", "data": 1 }
Request · Read a String Option
{ "method": "GetString", "option": "<option_key>" }
Response · 200 OK
{ "code": 200, "msg": "ok", "data": "<value>" }
data is the option value that was read: an integer read returns a number, a string read returns a string.4Set an Integer Option
Set a single integer-type option. Some options are trigger-type (setting them performs an action); refer to each model's option documentation for usage.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
method | string | Yes | Fixed value "Set" |
option | string | Yes | Option key |
value | int | Yes | Option value (integer) |
Request
POST /set_option
Authorization: Bearer <access_token>
Content-Type: application/json
{
"method": "Set",
"option": "<option_key>",
"value": 1
}
Response · 200 OK
{ "code": 200, "msg": "ok", "data": null }
5Set a String Option
Set a single string-type option (such as an IP address, name, etc.).
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
method | string | Yes | Fixed value "SetString" |
option | string | Yes | Option key |
value | string | Yes | Option value (string) |
Request
POST /set_string
Authorization: Bearer <access_token>
Content-Type: application/json
{
"method": "SetString",
"option": "<option_key>",
"value": "<value>"
}
Response · 200 OK
{ "code": 200, "msg": "ok", "data": null }
sys_admin_pwd cannot be set through this endpoint and will return 400; to change the password, use the dedicated endpoint.6Option List (Per Model)
The accessible option keys, types, allowed values, and meanings depend on the model, each organized into a separate Option Spec. Select a model from the API List on the left, or open one from the table below:
| Model | Option Spec |
|---|
models.js, so it stays in sync with the API List.7Responses and Error Codes
All responses use a unified JSON structure:
{ "code": <http_status>, "msg": "<message>", "data": <payload> }
| code | msg | Meaning |
|---|---|---|
200 | ok | Success. data is the read value or null |
400 | invalid params | Missing required field, malformed format, or a limit/protected option (such as sys_admin_pwd) |
401 | token malformed / failed | Token missing, malformed, or not accepted |
500 | unknown fail | Read or set failed on the device side |