Last active
March 12, 2019 22:26
-
-
Save raj-arun/99d943b514e1d30de93aee03fae776a6 to your computer and use it in GitHub Desktop.
Oracle EPM Planning API Version
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_planning_api_version(): | |
''' | |
Get the latest planning api version | |
Input: None | |
Output: planning api version | |
''' | |
try: | |
response = requests.get(planning_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['isLatest']): | |
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