-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Leaseweb CI
committed
Feb 24, 2025
1 parent
3d5608f
commit 01d9005
Showing
37 changed files
with
871 additions
and
1 deletion.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...es/Go+Native/publicCloud_v1_vps_vps_{vpsId}_notificationSettings_dataTraffic/getundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"net/http" | ||
"io/ioutil" | ||
) | ||
|
||
func main() { | ||
|
||
url := "https://api.leaseweb.com/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic?limit=20&offset=10" | ||
|
||
req, _ := http.NewRequest("GET", url, nil) | ||
|
||
req.Header.Add("X-LSW-Auth", "REPLACE_KEY_VALUE") | ||
|
||
res, _ := http.DefaultClient.Do(req) | ||
|
||
defer res.Body.Close() | ||
body, _ := ioutil.ReadAll(res.Body) | ||
|
||
fmt.Println(res) | ||
fmt.Println(string(body)) | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
..._vps_vps_{vpsId}_notificationSettings_dataTraffic_{notificationSettingId}/deleteundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"net/http" | ||
"io/ioutil" | ||
) | ||
|
||
func main() { | ||
|
||
url := "https://api.leaseweb.com/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic/3a042956-0689-45dc-8322-8b8325464182" | ||
|
||
req, _ := http.NewRequest("DELETE", url, nil) | ||
|
||
req.Header.Add("X-LSW-Auth", "REPLACE_KEY_VALUE") | ||
|
||
res, _ := http.DefaultClient.Do(req) | ||
|
||
defer res.Body.Close() | ||
body, _ := ioutil.ReadAll(res.Body) | ||
|
||
fmt.Println(res) | ||
fmt.Println(string(body)) | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
..._v1_vps_vps_{vpsId}_notificationSettings_dataTraffic_{notificationSettingId}/getundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"net/http" | ||
"io/ioutil" | ||
) | ||
|
||
func main() { | ||
|
||
url := "https://api.leaseweb.com/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic/3a042956-0689-45dc-8322-8b8325464182" | ||
|
||
req, _ := http.NewRequest("GET", url, nil) | ||
|
||
req.Header.Add("X-LSW-Auth", "REPLACE_KEY_VALUE") | ||
|
||
res, _ := http.DefaultClient.Do(req) | ||
|
||
defer res.Body.Close() | ||
body, _ := ioutil.ReadAll(res.Body) | ||
|
||
fmt.Println(res) | ||
fmt.Println(string(body)) | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
...v1_vps_vps_{vpsId}_notificationSettings_dataTraffic_{notificationSettingId}/postundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"strings" | ||
"net/http" | ||
"io/ioutil" | ||
) | ||
|
||
func main() { | ||
|
||
url := "https://api.leaseweb.com/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic/3a042956-0689-45dc-8322-8b8325464182" | ||
|
||
payload := strings.NewReader("{\"threshold\":{\"value\":0,\"unit\":\"MB\"},\"timePeriod\":\"DAY\",\"action\":\"POWER_OFF\",\"channels\":[{\"type\":\"EMAIL\",\"contactGroup\":\"TECHNICAL\"}]}") | ||
|
||
req, _ := http.NewRequest("POST", url, payload) | ||
|
||
req.Header.Add("X-LSW-Auth", "REPLACE_KEY_VALUE") | ||
req.Header.Add("content-type", "application/json") | ||
|
||
res, _ := http.DefaultClient.Do(req) | ||
|
||
defer res.Body.Close() | ||
body, _ := ioutil.ReadAll(res.Body) | ||
|
||
fmt.Println(res) | ||
fmt.Println(string(body)) | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
..._v1_vps_vps_{vpsId}_notificationSettings_dataTraffic_{notificationSettingId}/putundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"strings" | ||
"net/http" | ||
"io/ioutil" | ||
) | ||
|
||
func main() { | ||
|
||
url := "https://api.leaseweb.com/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic/3a042956-0689-45dc-8322-8b8325464182" | ||
|
||
payload := strings.NewReader("{\"threshold\":{\"value\":0,\"unit\":\"MB\"},\"timePeriod\":\"DAY\",\"action\":\"POWER_OFF\",\"channels\":[{\"type\":\"EMAIL\",\"contactGroup\":\"TECHNICAL\"}]}") | ||
|
||
req, _ := http.NewRequest("PUT", url, payload) | ||
|
||
req.Header.Add("X-LSW-Auth", "REPLACE_KEY_VALUE") | ||
req.Header.Add("content-type", "application/json") | ||
|
||
res, _ := http.DefaultClient.Do(req) | ||
|
||
defer res.Body.Close() | ||
body, _ := ioutil.ReadAll(res.Body) | ||
|
||
fmt.Println(res) | ||
fmt.Println(string(body)) | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
...cript+Jquery/publicCloud_v1_vps_vps_{vpsId}_notificationSettings_dataTraffic/getundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const settings = { | ||
"async": true, | ||
"crossDomain": true, | ||
"url": "https://api.leaseweb.com/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic?limit=20&offset=10", | ||
"method": "GET", | ||
"headers": { | ||
"X-LSW-Auth": "REPLACE_KEY_VALUE" | ||
} | ||
}; | ||
|
||
$.ajax(settings).done(function (response) { | ||
console.log(response); | ||
}); |
13 changes: 13 additions & 0 deletions
13
..._vps_vps_{vpsId}_notificationSettings_dataTraffic_{notificationSettingId}/deleteundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const settings = { | ||
"async": true, | ||
"crossDomain": true, | ||
"url": "https://api.leaseweb.com/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic/3a042956-0689-45dc-8322-8b8325464182", | ||
"method": "DELETE", | ||
"headers": { | ||
"X-LSW-Auth": "REPLACE_KEY_VALUE" | ||
} | ||
}; | ||
|
||
$.ajax(settings).done(function (response) { | ||
console.log(response); | ||
}); |
13 changes: 13 additions & 0 deletions
13
..._v1_vps_vps_{vpsId}_notificationSettings_dataTraffic_{notificationSettingId}/getundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const settings = { | ||
"async": true, | ||
"crossDomain": true, | ||
"url": "https://api.leaseweb.com/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic/3a042956-0689-45dc-8322-8b8325464182", | ||
"method": "GET", | ||
"headers": { | ||
"X-LSW-Auth": "REPLACE_KEY_VALUE" | ||
} | ||
}; | ||
|
||
$.ajax(settings).done(function (response) { | ||
console.log(response); | ||
}); |
16 changes: 16 additions & 0 deletions
16
...v1_vps_vps_{vpsId}_notificationSettings_dataTraffic_{notificationSettingId}/postundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const settings = { | ||
"async": true, | ||
"crossDomain": true, | ||
"url": "https://api.leaseweb.com/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic/3a042956-0689-45dc-8322-8b8325464182", | ||
"method": "POST", | ||
"headers": { | ||
"X-LSW-Auth": "REPLACE_KEY_VALUE", | ||
"content-type": "application/json" | ||
}, | ||
"processData": false, | ||
"data": "{\"threshold\":{\"value\":0,\"unit\":\"MB\"},\"timePeriod\":\"DAY\",\"action\":\"POWER_OFF\",\"channels\":[{\"type\":\"EMAIL\",\"contactGroup\":\"TECHNICAL\"}]}" | ||
}; | ||
|
||
$.ajax(settings).done(function (response) { | ||
console.log(response); | ||
}); |
16 changes: 16 additions & 0 deletions
16
..._v1_vps_vps_{vpsId}_notificationSettings_dataTraffic_{notificationSettingId}/putundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const settings = { | ||
"async": true, | ||
"crossDomain": true, | ||
"url": "https://api.leaseweb.com/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic/3a042956-0689-45dc-8322-8b8325464182", | ||
"method": "PUT", | ||
"headers": { | ||
"X-LSW-Auth": "REPLACE_KEY_VALUE", | ||
"content-type": "application/json" | ||
}, | ||
"processData": false, | ||
"data": "{\"threshold\":{\"value\":0,\"unit\":\"MB\"},\"timePeriod\":\"DAY\",\"action\":\"POWER_OFF\",\"channels\":[{\"type\":\"EMAIL\",\"contactGroup\":\"TECHNICAL\"}]}" | ||
}; | ||
|
||
$.ajax(settings).done(function (response) { | ||
console.log(response); | ||
}); |
20 changes: 20 additions & 0 deletions
20
...es/Php+Http2/publicCloud_v1_vps_vps_{vpsId}_notificationSettings_dataTraffic/getundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
$client = new http\Client; | ||
$request = new http\Client\Request; | ||
|
||
$request->setRequestUrl('https://api.leaseweb.com/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic'); | ||
$request->setRequestMethod('GET'); | ||
$request->setQuery(new http\QueryString([ | ||
'limit' => '20', | ||
'offset' => '10' | ||
])); | ||
|
||
$request->setHeaders([ | ||
'X-LSW-Auth' => 'REPLACE_KEY_VALUE' | ||
]); | ||
|
||
$client->enqueue($request)->send(); | ||
$response = $client->getResponse(); | ||
|
||
echo $response->getBody(); |
15 changes: 15 additions & 0 deletions
15
..._vps_vps_{vpsId}_notificationSettings_dataTraffic_{notificationSettingId}/deleteundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
$client = new http\Client; | ||
$request = new http\Client\Request; | ||
|
||
$request->setRequestUrl('https://api.leaseweb.com/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic/3a042956-0689-45dc-8322-8b8325464182'); | ||
$request->setRequestMethod('DELETE'); | ||
$request->setHeaders([ | ||
'X-LSW-Auth' => 'REPLACE_KEY_VALUE' | ||
]); | ||
|
||
$client->enqueue($request)->send(); | ||
$response = $client->getResponse(); | ||
|
||
echo $response->getBody(); |
15 changes: 15 additions & 0 deletions
15
..._v1_vps_vps_{vpsId}_notificationSettings_dataTraffic_{notificationSettingId}/getundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
$client = new http\Client; | ||
$request = new http\Client\Request; | ||
|
||
$request->setRequestUrl('https://api.leaseweb.com/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic/3a042956-0689-45dc-8322-8b8325464182'); | ||
$request->setRequestMethod('GET'); | ||
$request->setHeaders([ | ||
'X-LSW-Auth' => 'REPLACE_KEY_VALUE' | ||
]); | ||
|
||
$client->enqueue($request)->send(); | ||
$response = $client->getResponse(); | ||
|
||
echo $response->getBody(); |
21 changes: 21 additions & 0 deletions
21
...v1_vps_vps_{vpsId}_notificationSettings_dataTraffic_{notificationSettingId}/postundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
$client = new http\Client; | ||
$request = new http\Client\Request; | ||
|
||
$body = new http\Message\Body; | ||
$body->append('{"threshold":{"value":0,"unit":"MB"},"timePeriod":"DAY","action":"POWER_OFF","channels":[{"type":"EMAIL","contactGroup":"TECHNICAL"}]}'); | ||
|
||
$request->setRequestUrl('https://api.leaseweb.com/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic/3a042956-0689-45dc-8322-8b8325464182'); | ||
$request->setRequestMethod('POST'); | ||
$request->setBody($body); | ||
|
||
$request->setHeaders([ | ||
'X-LSW-Auth' => 'REPLACE_KEY_VALUE', | ||
'content-type' => 'application/json' | ||
]); | ||
|
||
$client->enqueue($request)->send(); | ||
$response = $client->getResponse(); | ||
|
||
echo $response->getBody(); |
21 changes: 21 additions & 0 deletions
21
..._v1_vps_vps_{vpsId}_notificationSettings_dataTraffic_{notificationSettingId}/putundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
$client = new http\Client; | ||
$request = new http\Client\Request; | ||
|
||
$body = new http\Message\Body; | ||
$body->append('{"threshold":{"value":0,"unit":"MB"},"timePeriod":"DAY","action":"POWER_OFF","channels":[{"type":"EMAIL","contactGroup":"TECHNICAL"}]}'); | ||
|
||
$request->setRequestUrl('https://api.leaseweb.com/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic/3a042956-0689-45dc-8322-8b8325464182'); | ||
$request->setRequestMethod('PUT'); | ||
$request->setBody($body); | ||
|
||
$request->setHeaders([ | ||
'X-LSW-Auth' => 'REPLACE_KEY_VALUE', | ||
'content-type' => 'application/json' | ||
]); | ||
|
||
$client->enqueue($request)->send(); | ||
$response = $client->getResponse(); | ||
|
||
echo $response->getBody(); |
12 changes: 12 additions & 0 deletions
12
...thon+Python3/publicCloud_v1_vps_vps_{vpsId}_notificationSettings_dataTraffic/getundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import http.client | ||
|
||
conn = http.client.HTTPSConnection("api.leaseweb.com") | ||
|
||
headers = { 'X-LSW-Auth': "REPLACE_KEY_VALUE" } | ||
|
||
conn.request("GET", "/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic?limit=20&offset=10", headers=headers) | ||
|
||
res = conn.getresponse() | ||
data = res.read() | ||
|
||
print(data.decode("utf-8")) |
12 changes: 12 additions & 0 deletions
12
..._vps_vps_{vpsId}_notificationSettings_dataTraffic_{notificationSettingId}/deleteundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import http.client | ||
|
||
conn = http.client.HTTPSConnection("api.leaseweb.com") | ||
|
||
headers = { 'X-LSW-Auth': "REPLACE_KEY_VALUE" } | ||
|
||
conn.request("DELETE", "/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic/3a042956-0689-45dc-8322-8b8325464182", headers=headers) | ||
|
||
res = conn.getresponse() | ||
data = res.read() | ||
|
||
print(data.decode("utf-8")) |
12 changes: 12 additions & 0 deletions
12
..._v1_vps_vps_{vpsId}_notificationSettings_dataTraffic_{notificationSettingId}/getundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import http.client | ||
|
||
conn = http.client.HTTPSConnection("api.leaseweb.com") | ||
|
||
headers = { 'X-LSW-Auth': "REPLACE_KEY_VALUE" } | ||
|
||
conn.request("GET", "/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic/3a042956-0689-45dc-8322-8b8325464182", headers=headers) | ||
|
||
res = conn.getresponse() | ||
data = res.read() | ||
|
||
print(data.decode("utf-8")) |
17 changes: 17 additions & 0 deletions
17
...v1_vps_vps_{vpsId}_notificationSettings_dataTraffic_{notificationSettingId}/postundefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import http.client | ||
|
||
conn = http.client.HTTPSConnection("api.leaseweb.com") | ||
|
||
payload = "{\"threshold\":{\"value\":0,\"unit\":\"MB\"},\"timePeriod\":\"DAY\",\"action\":\"POWER_OFF\",\"channels\":[{\"type\":\"EMAIL\",\"contactGroup\":\"TECHNICAL\"}]}" | ||
|
||
headers = { | ||
'X-LSW-Auth': "REPLACE_KEY_VALUE", | ||
'content-type': "application/json" | ||
} | ||
|
||
conn.request("POST", "/publicCloud/v1/vps/vps/999999999/notificationSettings/dataTraffic/3a042956-0689-45dc-8322-8b8325464182", payload, headers) | ||
|
||
res = conn.getresponse() | ||
data = res.read() | ||
|
||
print(data.decode("utf-8")) |
Oops, something went wrong.