Settings Change selected settings for given package.
A list of all publicly available methods for interacting with the API.
GET
Get settings Settings Return package settings, like name, description, etc. -/package/settings/{id}
Query method
GEThttp://apilocal.stableproxy.com/v2/package/settings/{id}
Query parameters
| Identifier | Regulations | Example |
|---|---|---|
| id | 1required | 55 |
Code examples
JavaScript
async function getPackageSettings() {
const baseUrl = 'http://apilocal.stableproxy.com/v2';
const req = await fetch(baseUrl + '/package/settings/{id}'
.replace("{id}", 55), {
method: 'GET',
headers: {
'Authorization': 'API-Token [YOUR TOKEN]',
'Content-Type': 'application/json'
}
}
);
const res = await req.json();
}Examples of answers
Success response
PUT
Update settings Settings -/package/settings/{id}
Query method
PUThttp://apilocal.stableproxy.com/v2/package/settings/{id}
Query parameters
| Identifier | Regulations | Example |
|---|---|---|
| is-auto-renewNot necessarily | nullableex-boolean | false |
| nameNot necessarily | nullablestring | 25 |
| descriptionNot necessarily | nullablestring | 97 |
| proxy-usernamesNot necessarily | nullablearray | 7 |
| proxy-passwordsNot necessarily | nullablearray | 75 |
| proxy-auth-ipsNot necessarily | nullablearray | [] |
| connect-keep-alive-secondsNot necessarily | nullablenumeric | 154 |
| split-super-proxies-countNot necessarily | nullablenumeric | 8541 |
| ad-blockNot necessarily | nullableex-boolean | false |
| proxy-usernames.* | requiredstring | 12 |
| proxy-passwords.* | requiredstring | 2 |
| proxy-auth-ips.* | requiredstringvalid_ip_or_domain | 38 |
| id | 1required | 55 |
Code examples
JavaScript
async function putPackageSettings() {
const baseUrl = 'http://apilocal.stableproxy.com/v2';
const req = await fetch(baseUrl + '/package/settings/{id}'
.replace("{id}", 55), {
method: 'PUT',
headers: {
'Authorization': 'API-Token [YOUR TOKEN]',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"is-auto-renew": false,
"name": 25,
"description": 97,
"proxy-usernames": 7,
"proxy-passwords": 75,
"proxy-auth-ips": [],
"connect-keep-alive-seconds": 154,
"split-super-proxies-count": 8541,
"ad-block": false,
"proxy-usernames.*": 12,
"proxy-passwords.*": 2,
"proxy-auth-ips.*": 38
}),
}
);
const res = await req.json();
}