Created
March 12, 2019 22:49
-
-
Save raj-arun/2afc20c6d115bd0d0e7c9ea0413c6276 to your computer and use it in GitHub Desktop.
Get Planning Application Name
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_application_details(): | |
''' | |
Get the Application Name from the instance | |
Input: None | |
Output: application name | |
''' | |
try: | |
response = requests.get(rest_end_point,auth=HTTPBasicAuth(uname,password),headers = headers) | |
if response.status_code == 200: | |
json_data = json.loads(response.text) | |
for d in json_data["items"]: | |
print("Application Name : ", d['name']) | |
except Exception as e: | |
print(e) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment