跳转到内容

批量修改浏览器环境代理

Request

Bodyapplication/jsonrequired
envIdsArray of strings

选择一个带有序列号的,必须填写一个。

proxyobjectrequired

用于更改环境绑定的代理。如果提供了 proxyId,则绑定到该 ID 所代表的代理;否则,绑定到新添加的代理。如果代理信息保持不变,则不会重新绑定(proxyIp、proxyPort、proxyType 或 proxyProvider 的任何更改都被视为新的代理,并且重新绑定成功)。

uniqueIdsArray of strings

选择一个带有环境 ID 的环境,必须填写一个。

POST
/api/env/setProxy/batch
curl -i -X POST \
  http://127.0.0.1:40000/api/env/setProxy/batch \
  -H 'Content-Type: application/json' \
  -d '{
  	"envIds": ["2016036223642570752","2016028408622419968"], //Choose one with serial IDs, must fill one
  	"proxy": { //Used to change the bound proxy for environments. If proxyId is provided, bind to the proxy represented by that ID; otherwise, bind to a newly added proxy. If proxy information remains unchanged, no rebinding occurs (any change in proxyIp, proxyPort, proxyType, or proxyProvider is considered a new proxy, and rebinding succeeds)
  		"city": "fuzhou", 
  		"country": "China",
  		"encryptionType": 1,
  		"ipChangeAction": 0,
  		"ipMonitor": false,
  		"password": "testpassword",
  		"proxyId": 0,
  		"proxyIp": "1.1.1.1", //Required
  		"proxyName": "testproxyName111",
  		"proxyPort": 8807, //Required
  		"proxyProvider": "7",//Required
  		"proxyType": 0, //Required
  		"refreshUrl": "",
  		"state": "fujian",
  		"username": "test-un"
  	},
  	"uniqueIds": [] //Choose one with environment ID, must fill one
  }'

Responses

Headers
any
Bodyapplication/json
codeinteger
msgnull
databoolean
requestIdstringrequired
Response
{ "code": 0, "msg": null, "data": true, "requestId": "d57cfecfc6904fcaa57da9f65b2a15fd" }