Skip to content
Home » Http API-Development Documentation

Http API-Development Documentation

Usage Overview

  • When the interface request method is POST, the parameter passing method is always body parameter passing, passing data in JSON format, not form-data, nor URL parameter passing
  • When the interface request method is get, the parameter passing is form-data
  • The interface request method is put/patch/delete. For specific parameter passing, refer to the definition in the interface documentation.
  • When the interface request returns 200 successfully, it returns a json object, with code 0 indicating success. If there is return data, it is appended to the data object.
  • When the interface does not return 200, it is considered an exception. Refer to HTTP error codes for exception codes. When the code is not 0, it indicates failure, and failure information will be appended to the msg field. Refer to the following table for the error code field.
  • All requests need to include the request header:X-HTTP-KEY, whose value is the secret key copied from the  [Open Api - Http API] interface of DICloak software.

Profile Interface

GET Obtain profile List

GET /v1/api/request/{env_id}/open

Request Parameters

NameTypeRequiredInstructions
page_nointegerYesPage number, default 1
page_sizeintegerYesPage size, default 10
serial_numintegerNoSerial Number
namestringNoName
group_idstringNoGrouping
proxy_hoststringNoProxy Host (Method 1)
statusstringNoStatus (DISABLED: Disabled, ENABLED: Normal)
platform_userstringNoPlatform
remarkstringNoRemarks
start_create_timestringNoStart Time
end_create_timestringNoEnd Time
operate_statusstringNoprofile Open Status: ENABLED for Open, DISABLED for Closed

Response Parameters

NameTypeInstructions
idstringprofile ID, env_id
create_timestringCreation Time
update_timestringModification Time
serial_numintegerSerial Number
group_idstringGroup ID
group_namestringGroup Name
namestringName
browserstringBrowser Type (CHROME: Chrome)
ua_typestringua type
uastringUser Agent
ua_osstringUser Agent OS WINDOWS/MAC/ANDROID/IOS/LINUX
cookiestringcookie
other_cookiestringOther cookies
proxy_waystringProxy Mode (CUSTOM: Custom SELECT_EXIST: Select Existing)
proxy_idstringAgent ID (Method 2)
proxy_typestringProxy Type (Method 1) (NON_USE: Do not use HTTP HTTPS SSH SOCKS5 IPFLY)
proxy_hoststringProxy Host (Method 1)
proxy_portinteger(int32)Proxy Port (Method 1)
proxy_user_namestringProxy Account (Method 1)
proxy_passwdstringProxy Password (Method 1)
proxy_ip_typestringIP Query Channel (Method 1) (IP2LOCATION)
urls[string]URL List
configstringAdvanced Settings JSON
statusstringStatus (DISABLED: Disabled, ENABLED: Normal)
remarkstringRemarks
last_open_timestringLast Opened Time
operate_statusstringOperating Status DISABLED Closed ENABLED Enabled LOCK Locked
account_list[object]Account
font_idstringFont ID
data_configstringData Configuration
browser_configstringBrowser Configuration
env_mutil_open_typestringprofile Multi-Opening: GLOBAL: Global ALLOW: Allow BAN: Ban
operate_members[object]Current profile Operator Information
config_ext_mapobjectExtended Field
totalinteger(int32)Total number of items

Response Example

{
    "code": 0,
    "msg": "success",
    "data": {
        "list": [
            {
                "id": "1848687666096832515",
                "create_time": "2024-10-22 19:27:41",
                "update_time": "2024-10-23 21:28:15",
                "serial_num": 166,
                "group_id": "1776895967565094913",
                "group_name": null,
                "name": "env——name",
                "browser": "CHROME",
                "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.6005.0 Safari/537.36",
                "ua_os": "MAC",
                "cookie": "",
                "other_cookie": null,
                "urls": [
                    
                ],
                "status": "ENABLED",
                "remark": null,
                "last_open_time": "2024-10-23 21:26:15",
                "operate_status": "DISABLED",
                "account_list": null,
                "font_id": "",
                "data_config": "{\"type\":25,\"dataType\":\"custom\"}",
                "browser_config": "{\"type\":1,\"browserType\":\"custom\"}",
                "env_mutil_open_type": "GLOBAL",
                "config_ext_map": null
            }
        ],
        "total": 65
    }
}

POST Add profile

POST /v1/api/request

Request Parameters

NameTypeRequiredInstructions
group_idstringYesGroup ID
namestringNoName
browserstringYesBrowser Type (CHROME: Chrome)
kernel_versionstringNoKernel version 120 (default), 134
osOsVOYesOperating System
ua_typestringYesua Type (see Appendix ua Type)
uastringYesUser Agent
ua_osstringYesUa OS WINDOWS/LINUX/MAC/ANDROID/IOS
cookiestringNocookie
other_cookiestringNoOther cookies
proxy_waystringNoProxy Mode (CUSTOM: Custom SELECT_EXIST: Select Existing)
proxy_idstringNoAgent ID (Method 2)
proxy_typestringNoProxy Type (Method 1) (NON_USE: Do not use HTTP HTTPS SSH SOCKS5 IPFLY)
proxy_hoststringNoProxy Host
proxy_portinteger(int32)NoProxy Port
proxy_user_namestringNoAgent Account
proxy_passwdstringNoProxy Password
proxy_ip_typestringNoIP Query Channel (IP2LOCATION)
urls[string]NoURL List
configstringYesAdvanced Settings JSON (see attached table: Advanced profile Settings)
remarkstringNoRemarks
data_configstringNoData Configuration (Appendix: Data Synchronization)
browser_configstringNoBrowser Configuration (Appendix: Browser Configuration)
config_ext_mapobjectNoExtended Field
env_mutil_open_typestringNoprofile Multi-Opening: (GLOBAL: Global ALLOW: Allow BAN: Ban)
extensions_typestringNoExtended Configuration: (ALLOW: Allow BAN: Ban)
extensions_group_idstringNoExtended Group ID
account_list[profileAccount]NoAccount

profileAccount

NameTypeRequiredInstructions
platformstringYesPlatform
urlstringYesurl
user_namestringNoLog in to the account
passwdstringNoLogin Password
secretstringNoKey
remarkstringNoAccount Remarks
{
    "extensions_type": "ALLOW",
    "name": "测试环境",
    "group_id": "1858448274955902978",
    "browser": "CHROME",
    "os": {
        "windows": [
            "windows-all"
        ],
        "mac": [
            
        ],
        "android": [
            
        ],
        "ios": [
            
        ],
        "linux": [
            
        ]
    },
    "ua_type": "[\"all\"]",
    "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.6166.0 Safari/537.36",
    "proxy_way": "CUSTOM",
    "proxy_type": "NON_USE",
    "proxy_ip_type": "IPAPI",
    "account_list": [
        
    ],
    "urls": [
        
    ],
    "config": "{\"acceptLangType\":\"ip\",\"acceptLangValue\":[\"en-US\",\"en\"],\"langType\":\"acceptLang\",\"langValue\":\"local\",\"timezoneType\":\"ip\",\"timezoneValue\":\"local\",\"geoType\":\"ask\",\"geoSubType\":\"ip\",\"geoValue\":{},\"fontType\":\"custom\",\"fontValue\":[\"Academy Engraved LET\",\"Yrsa SemiBold\",\"Yu Gothic UI\",\"Yu Gothic UI Regular\",\"Z003\"],\"webrtcType\":\"disable\",\"webrtcValue\":\"\",\"canvasType\":\"noise\",\"canvasValue\":\"42541\",\"ratioType\":\"truth\",\"ratioValue\":\"\",\"webGLImageType\":\"noise\",\"webGLImageValue\":\"92132\",\"webGLMetadataType\":\"custom\",\"webglManufacturer\":\"Google Inc. (AMD)\",\"webglRender\":\"ANGLE (AMD, Radeon RX 580 Series Direct3D11 vs_5_0 ps_5_0, D3D11-31.0.14051.5006)\",\"webGPUType\":\"disable\",\"audioContextType\":\"noise\",\"audioContextValue\":91094,\"clientRectsType\":\"noise\",\"clientRectsValue\":3530,\"speechVoicesType\":\"noise\",\"speechVoicesValue\":10408,\"deviceMemoryValue\":\"8\",\"trackType\":\"0\",\"batteryType\":\"noise\",\"batteryValue\":62582,\"portType\":\"1\",\"portValue\":\"\",\"accelerateType\":\"0\",\"hardwareConcurrencyValue\":\"12\",\"ratioWidth\":\"\"}",
    "data_type": "global",
    "browser_type": "global",
    "env_mutil_open_type": "GLOBAL",
    "ua_os": "WINDOWS",
    "extensions_group_id": "1858448274955902979",
    "data_config": "{\"type\":0,\"dataType\":\"global\"}",
    "browser_config": "{\"type\":0,\"browserType\":\"global\"}"
}

Response Parameters

NameTypeInstructions
idstringUnique ID of the profile
serial_numberintegerprofile Number
Other same request parametersstringprofile Details (Refer to Request Parameter Definitions)
{
    "code": 0,
    "msg": "成功",
    "data": {
        "id": "1864934151789899778",
        "serial_num": 1,
        "extensions_type": "ALLOW",
        "name": "测试环境",
        "group_id": "1858448274955902978",
        "browser": "CHROME",
        "os": {
            "windows": [
                "windows-all"
            ],
            "mac": [
                
            ],
            "android": [
                
            ],
            "ios": [
                
            ],
            "linux": [
                
            ]
        },
        "ua_type": "[\"all\"]",
        "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.6166.0 Safari/537.36",
        "proxy_way": "CUSTOM",
        "proxy_type": "NON_USE",
        "proxy_ip_type": "IPAPI",
        "account_list": [
            
        ],
        "urls": [
            
        ],
        "config": "{\"acceptLangType\":\"ip\",\"acceptLangValue\":[\"en-US\",\"en\"],\"langType\":\"acceptLang\",\"langValue\":\"local\",\"timezoneType\":\"ip\",\"timezoneValue\":\"local\",\"geoType\":\"ask\",\"geoSubType\":\"ip\",\"geoValue\":{},\"fontType\":\"custom\",\"fontValue\":[\"Academy Engraved LET\",\"Yrsa SemiBold\",\"Yu Gothic UI\",\"Yu Gothic UI Regular\",\"Z003\"],\"webrtcType\":\"disable\",\"webrtcValue\":\"\",\"canvasType\":\"noise\",\"canvasValue\":\"42541\",\"ratioType\":\"truth\",\"ratioValue\":\"\",\"webGLImageType\":\"noise\",\"webGLImageValue\":\"92132\",\"webGLMetadataType\":\"custom\",\"webglManufacturer\":\"Google Inc. (AMD)\",\"webglRender\":\"ANGLE (AMD, Radeon RX 580 Series Direct3D11 vs_5_0 ps_5_0, D3D11-31.0.14051.5006)\",\"webGPUType\":\"disable\",\"audioContextType\":\"noise\",\"audioContextValue\":91094,\"clientRectsType\":\"noise\",\"clientRectsValue\":3530,\"speechVoicesType\":\"noise\",\"speechVoicesValue\":10408,\"deviceMemoryValue\":\"8\",\"trackType\":\"0\",\"batteryType\":\"noise\",\"batteryValue\":62582,\"portType\":\"1\",\"portValue\":\"\",\"accelerateType\":\"0\",\"hardwareConcurrencyValue\":\"12\",\"ratioWidth\":\"\"}",
        "data_type": "global",
        "browser_type": "global",
        "env_mutil_open_type": "GLOBAL",
        "ua_os": "WINDOWS",
        "extensions_group_id": "1858448274955902979",
        "data_config": "{\"type\":0,\"dataType\":\"global\"}",
        "browser_config": "{\"type\":0,\"browserType\":\"global\"}"
    },
    "next": null
}

PUT Edit profile

PUT /v1/api/request/{env_id}

Request Parameters

NameTypeRequiredInstructions
env_idstringYesUnique ID of the profile
Other request parametersstringYesRefer toNew profileRequest parameter definition. If a field is not passed, the update will be ignored

Response Parameters

{
    'code': 0,
    'msg': 'success'
}

DELETE Delete profile

DELETE /v1/api/request/{env_id}

Request Parameters

NameTypeRequiredInstructions
env_idstringYesUnique ID of the profile

Response Parameters

{
    'code': 0,
    'msg': 'success'
}

DELETE Completely delete the profile

DELETE /v1/api/request/{env_id}/thorough

Request Parameters

NameTypeRequiredInstructions
env_idstringYesUnique ID of the profile

Response Parameters

{
    'code': 0,
    'msg': 'success'
}