更新代理 — 启用或停用代理轮换
本节说明如何使用 PinguProxy 可靠地配置更新代理 — 启用或停用代理轮换。
PUT
/proxies/update_rotation请求参数
安全
Authorizationstring必填JWT Bearer 令牌
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
请求正文
idinteger必填要更新的代理 ID
is_rotatingboolean必填启用或停用代理轮换
1const response = await fetch('https://api.pinguproxy.com/proxies/update_rotation', {2 method: 'PUT',3 headers: {4 'Authorization': 'Bearer your-jwt-token',5 'Content-Type': 'application/json'6 },7 body: JSON.stringify({8 id: 1,9 is_rotating: true10 })11});1213const result = await response.json();
响应
状态 200
{"is_rotating": true}
更新代理 — 新的轮换间隔(秒)
本节说明如何使用 PinguProxy 可靠地配置更新代理 — 新的轮换间隔(秒)。
PUT
/proxies/update_rotate_interval请求参数
安全
Authorizationstring必填JWT Bearer 令牌
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
请求正文
idinteger必填要更新的代理 ID
rotate_intervalinteger必填新的轮换间隔(秒)
1const response = await fetch('https://api.pinguproxy.com/proxies/update_rotate_interval', {2 method: 'PUT',3 headers: {4 'Authorization': 'Bearer your-jwt-token',5 'Content-Type': 'application/json'6 },7 body: JSON.stringify({8 id: 1,9 rotate_interval: 30010 })11});1213const result = await response.json();
响应
状态 200
{"success": true}
更新代理 — 新的代理标签
本节说明如何使用 PinguProxy 可靠地配置更新代理 — 新的代理标签。
PUT
/proxies/update_label请求参数
安全
Authorizationstring必填JWT Bearer 令牌
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
请求正文
idinteger必填要更新的代理 ID
labelstring必填新的代理标签
1const response = await fetch('https://api.pinguproxy.com/proxies/update_label', {2 method: 'PUT',3 headers: {4 'Authorization': 'Bearer your-jwt-token',5 'Content-Type': 'application/json'6 },7 body: JSON.stringify({8 id: 1,9 label: 'My Proxy'10 })11});1213const result = await response.json();
响应
状态 200
true