- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAIMPythonExample.py
More file actions
Latest commit
16 lines (9 loc) · 530 Bytes
/
Copy pathAIMPythonExample.py
File metadata and controls
16 lines (9 loc) · 530 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
importrequests
url="https://pvwa.joe-garcia.local/AIMWebService/api/Accounts"
querystring= {"AppID":"RESTExamples","Safe":"T-APP-CYBR-RESTAPI","Folder":"Root","Object":"Database-MicrosoftSQLServer-JG-sql01.joe-garcia.local-Svc_BambooHR"}
headers= {'content-type': 'application/json'}
response=requests.request("GET", url, headers=headers, params=querystring)
print(response.text)
username=response.json().get('UserName')
password=response.json().get('Content')
print(username+" : "+password)