Skip to content

Instantly share code, notes, and snippets.

@netmanchris
Created July 25, 2015 18:46
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 netmanchris/1e2d7ff8f2d0a30826d1 to your computer and use it in GitHub Desktop.
Save netmanchris/1e2d7ff8f2d0a30826d1 to your computer and use it in GitHub Desktop.
Get Custom Views
def get_custom_views():
# checks to see if the imc credentials are already available
if auth == None or url == None:
imc_creds()
get_custom_view_url = '/imcrs/plat/res/view/custom?resPrivilegeFilter=false&desc=false&total=false'
f_url = url + get_custom_view_url
# creates the URL using the payload variable as the contents
r = requests.get(f_url, auth=auth, headers=headers)
if r.status_code == 200:
view_list = (json.loads(r.text))["customView"]
return view_list
else:
print("An Error has occured")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment