Skip to content

Instantly share code, notes, and snippets.

@raj-arun
Created March 12, 2019 22:19
Show Gist options
  • Save raj-arun/f3cf7d2981003aa5e12932ddc4999b3e to your computer and use it in GitHub Desktop.
Save raj-arun/f3cf7d2981003aa5e12932ddc4999b3e to your computer and use it in GitHub Desktop.
Oracle EPM Migration Version
def get_migration_api_version():
'''
Get the latest migration api version
Input: None
Output: migration api version
'''
try:
response = requests.get(migration_url,auth=HTTPBasicAuth(uname,password),headers = headers)
if response.status_code == 200:
version_data = json.loads(response.text)
for v in version_data["items"]:
if(v['latest']):
api_version = v['version']
return(api_version)
except Exception as e:
print(e)
return('ERROR')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment