Add Profile

1. API Description

This API is used to add a profile.

Request mode: POST [ip]/api/profile/add

Administrator Rights Login Authentication
No Yes

2. Input Parameters

Profile Configuration
Parameter Type Description
name String Name
mode Int View Mode
audio-idx Int Optional, select the screen index for output audio, 0-3
pip Struct Optional, configurable when view mode is PIP, or use system default values if not configured. Data structure refers to PIP Configuration.
screens Array Optional, array type of Screen Configuration. For PIP, there are 2 elements (the first is the large screen). For four-screen mode, they are left-top, right-top, left-bottom, right-bottom in order.
Screen Configuration
Parameter Type Description
name String Source name, this field is only provided for reading when listing profiles, not required when configuring or adding profiles
id Int Source ID
PIP Configuration
Parameter Type Description
mode Int Coordinate Mode. When set to custom, x and y are valid
x Float Small screen x-coordinate as a percentage of width (1 = 100%), plus scale must not exceed 1
y Float Small screen y-coordinate as a percentage of height (1 = 100%), plus scale must not exceed 1
scale Float Proportion relative to full screen. Default value: 0.25. Range: 0.2-0.8
Coordinate Mode
Value Description
0 Custom
1 Top left
2 Top center
3 Top right
4 Bottom left
5 Bottom center
6 Bottom right
7 Full screen center

3. Output Parameters

Parameter Type Description
status Int Status code

4. Example

Add a profile with four-screen mode

Input Example
{
    "audio-idx": 0,
    "mode": 4,
    "name": "test",
    "screens": [
        {
            "id": 1
        },
        {
            "id": 2
        },
        {
            "id": 10020
        },
        {
            "id": 10013
        }
    ]
}
Output Example
{
  "status": 0
}

results matching ""

    No results matching ""

    results matching ""

      No results matching ""