Info
A list of all publicly available methods for interacting with the API.
GET
Get packages list -/package/list
Query method
GEThttp://apilocal.stableproxy.com/v2/package/list
Query parameters
Identifier | Regulations | Example |
---|---|---|
with-deletedNot necessarily | nullableex-boolean | false |
searchNot necessarily | nullablestring | 241 |
per-pageNot necessarily | nullableinteger | 82 |
pageNot necessarily | nullableinteger | 33 |
sort-byNot necessarily | nullablestringapp\_validators\_ex_in_rule | "" |
sort-orderNot necessarily | nullablestringin:asc, desc | "asc" |
Code examples
JavaScript
1async function getPackageList() {
2 const baseUrl = 'http://apilocal.stableproxy.com/v2';
3 const req = await fetch(baseUrl + '/package/list?' + Object.entries({
4 "with-deleted": false,
5 "search": 241,
6 "per-page": 82,
7 "page": 33,
8 "sort-by": "",
9 "sort-order": "asc"
10 }).map(([key, value]) => key + "=" + value).join('&'), {
11 method: 'GET',
12 headers: {
13 'Authorization': 'API-Token [YOUR TOKEN]',
14 'Content-Type': 'application/json'
15 }
16 }
17 );
18
19 const res = await req.json();
20}
Examples of answers
Success response
DELETE
Cancel non activate package -/package/cancel/{id}
Query method
DELETEhttp://apilocal.stableproxy.com/v2/package/cancel/{id}
Query parameters
Identifier | Regulations | Example |
---|---|---|
id | 1required | 33 |
Code examples
JavaScript
1async function deletePackageCancel() {
2 const baseUrl = 'http://apilocal.stableproxy.com/v2';
3 const req = await fetch(baseUrl + '/package/cancel/{id}'
4 .replace("{id}", 33), {
5 method: 'DELETE',
6 headers: {
7 'Authorization': 'API-Token [YOUR TOKEN]',
8 'Content-Type': 'application/json'
9 }
10 }
11 );
12
13 const res = await req.json();
14}
Examples of answers
Success response
GET
Get package information -/package/view/{id}
Query method
GEThttp://apilocal.stableproxy.com/v2/package/view/{id}
Query parameters
Identifier | Regulations | Example |
---|---|---|
id | 1required | 3 |
Code examples
JavaScript
1async function getPackageView() {
2 const baseUrl = 'http://apilocal.stableproxy.com/v2';
3 const req = await fetch(baseUrl + '/package/view/{id}'
4 .replace("{id}", 3), {
5 method: 'GET',
6 headers: {
7 'Authorization': 'API-Token [YOUR TOKEN]',
8 'Content-Type': 'application/json'
9 }
10 }
11 );
12
13 const res = await req.json();
14}
Examples of answers
Success response
GET
Statistics -/package/statistics/{id}
Query method
GEThttp://apilocal.stableproxy.com/v2/package/statistics/{id}
Code examples
JavaScript
1async function getPackageStatistics() {
2 const baseUrl = 'http://apilocal.stableproxy.com/v2';
3 const req = await fetch(baseUrl + '/package/statistics/{id}'
4 .replace("{id}", ""), {
5 method: 'GET',
6 headers: {
7 'Authorization': 'API-Token [YOUR TOKEN]',
8 'Content-Type': 'application/json'
9 }
10 }
11 );
12
13 const res = await req.json();
14}