更新代理 — 启用或停用代理轮换

本节说明如何使用 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: true
10 })
11});
12
13const 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: 300
10 })
11});
12
13const 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});
12
13const result = await response.json();

响应

状态 200
true