mirror of
https://github.com/jonbranan/globalscape.git
synced 2025-01-17 22:41:56 -06:00
testing
This commit is contained in:
parent
bc95ef693a
commit
f63ed56103
0
powershell/REST API/REST-Basic-Connection-Template.ps1
Executable file → Normal file
0
powershell/REST API/REST-Basic-Connection-Template.ps1
Executable file → Normal file
0
powershell/REST API/REST-Get-Server-Information.ps1
Executable file → Normal file
0
powershell/REST API/REST-Get-Server-Information.ps1
Executable file → Normal file
0
powershell/REST API/REST-testing.ps1
Executable file → Normal file
0
powershell/REST API/REST-testing.ps1
Executable file → Normal file
33
python/REST API/REST-connection.py
Executable file → Normal file
33
python/REST API/REST-connection.py
Executable file → Normal file
@ -1,28 +1,35 @@
|
|||||||
import requests
|
import requests
|
||||||
|
requests.packages.urllib3.disable_warnings()
|
||||||
|
|
||||||
# Authentication
|
# Authentication
|
||||||
baseURL = "http://192.168.4.14:4450/admin"
|
#baseURL = "https://20.122.98.106:4450/admin"
|
||||||
user = "a"
|
#baseURL = "https://20.122.98.106:8443/admin"
|
||||||
password = "QjIlmT4H"
|
baseURL = "https://secops-api.arcusapp.globalscape.com:8443/admin"
|
||||||
|
# baseURL = "https://secops.arcusapp.globalscape.com/admin"
|
||||||
|
# baseURL = "http://192.168.4.13:8080/admin"
|
||||||
|
user = "jbranan_secops"
|
||||||
|
password = "o61KJBbN"
|
||||||
authURL = f"{baseURL}/v1/authentication"
|
authURL = f"{baseURL}/v1/authentication"
|
||||||
body = {"userName": user, "password": password, "authType": "EFT"}
|
body = {"userName": user, "password": password, "authType": "EFT"}
|
||||||
r1 = requests.post(authURL, json=body)
|
r1 = requests.post(authURL, json=body, verify=False)
|
||||||
|
# print(r1.text)
|
||||||
eftresp1 = r1.json()
|
eftresp1 = r1.json()
|
||||||
# print(r1.status_code)
|
print(r1.status_code)
|
||||||
# print(eftresp1)
|
# print(eftresp1)
|
||||||
authheader ={"Authorization": f"EFTAdminAuthToken {eftresp1['authToken']}"}
|
authheader ={"Authorization": f"EFTAdminAuthToken {eftresp1['authToken']}"}
|
||||||
# print(authheader)
|
# print(authheader)
|
||||||
|
|
||||||
# Get Server Info
|
# Get Server Info
|
||||||
getserverURL = f"{baseURL}/v2/server"
|
getserverURL = f"{baseURL}/v1/server"
|
||||||
r2 = requests.get(getserverURL, headers=authheader)
|
# print(authheader)
|
||||||
|
r2 = requests.get(getserverURL, headers=authheader, verify=False)
|
||||||
eftresp2 = r2.json()
|
eftresp2 = r2.json()
|
||||||
# print(r2.status_code)
|
print(r2.status_code)
|
||||||
print(eftresp2)
|
print(eftresp2)
|
||||||
|
|
||||||
#Get Server Metrics
|
# #Get Server Metrics
|
||||||
getservermetricsURL = f"{baseURL}/v2/server/metrics"
|
# getservermetricsURL = f"{baseURL}/v2/server/metrics"
|
||||||
r3 = requests.get(getservermetricsURL, headers=authheader)
|
# r3 = requests.get(getservermetricsURL, headers=authheader, verify=False)
|
||||||
eftresp3 = r3.json()
|
# eftresp3 = r3.json()
|
||||||
# print(r3.status_code)
|
# print(r3.status_code)
|
||||||
print(eftresp3)
|
# print(eftresp3)
|
0
python/REST API/REST-move-user.py
Executable file → Normal file
0
python/REST API/REST-move-user.py
Executable file → Normal file
0
python/eftcom-getusedspace.py
Executable file → Normal file
0
python/eftcom-getusedspace.py
Executable file → Normal file
Loading…
x
Reference in New Issue
Block a user