Created
July 11, 2021 12:11
-
-
Save kuharan/25a6aef1321c916470fc98e8d2b6587f to your computer and use it in GitHub Desktop.
get all specification configured in data protector
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
def get_all_specifications(access_token, session): | |
url = 'https://xxxx.com:7116/dp-gui/dp-scheduler-gui/restws/specification' | |
headers = { | |
'Authorization': 'Bearer {}'.format(access_token), | |
'Content-Type': 'application/json' | |
} | |
response = json.loads(session.get(url, headers=headers).text) | |
return response['specifications'] | |
all_specifications = get_all_specifications(access_token, session) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment