Skip to content

Instantly share code, notes, and snippets.

@kuharan
Created July 11, 2021 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuharan/25a6aef1321c916470fc98e8d2b6587f to your computer and use it in GitHub Desktop.
Save kuharan/25a6aef1321c916470fc98e8d2b6587f to your computer and use it in GitHub Desktop.
get all specification configured in data protector
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