# ['SC'] project key parameter for the project to be enabled
# Store the result of the POST request to [response]
response = enable_project(HOST_URL, USERNAME, PASSWORD, 'SC')
# Check the response if project was enabled
if response.status_code == 200:
# Get the value of the JSON response and print in a readable JSON format
# json dumps formats the JSON string in readable format
json_object = json.loads(response.text)
print json.dumps(json_object, indent=4)
# Grab specific data from the JSON response
print 'Project enabled:', json_object['success']
print 'Project Name:', json_object['prjName']
print 'Issue Count:', json_object['issueCount']
else:
print 'Error code: ', response.status_code
print response.text |