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
|
||||
requests.packages.urllib3.disable_warnings()
|
||||
|
||||
# Authentication
|
||||
baseURL = "http://192.168.4.14:4450/admin"
|
||||
user = "a"
|
||||
password = "QjIlmT4H"
|
||||
#baseURL = "https://20.122.98.106:4450/admin"
|
||||
#baseURL = "https://20.122.98.106:8443/admin"
|
||||
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"
|
||||
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()
|
||||
# print(r1.status_code)
|
||||
print(r1.status_code)
|
||||
# print(eftresp1)
|
||||
authheader ={"Authorization": f"EFTAdminAuthToken {eftresp1['authToken']}"}
|
||||
# print(authheader)
|
||||
|
||||
# Get Server Info
|
||||
getserverURL = f"{baseURL}/v2/server"
|
||||
r2 = requests.get(getserverURL, headers=authheader)
|
||||
getserverURL = f"{baseURL}/v1/server"
|
||||
# print(authheader)
|
||||
r2 = requests.get(getserverURL, headers=authheader, verify=False)
|
||||
eftresp2 = r2.json()
|
||||
# print(r2.status_code)
|
||||
print(r2.status_code)
|
||||
print(eftresp2)
|
||||
|
||||
#Get Server Metrics
|
||||
getservermetricsURL = f"{baseURL}/v2/server/metrics"
|
||||
r3 = requests.get(getservermetricsURL, headers=authheader)
|
||||
eftresp3 = r3.json()
|
||||
# #Get Server Metrics
|
||||
# getservermetricsURL = f"{baseURL}/v2/server/metrics"
|
||||
# r3 = requests.get(getservermetricsURL, headers=authheader, verify=False)
|
||||
# eftresp3 = r3.json()
|
||||
# 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