Skip to content

Script to obtain the session token when using the RESTAPI in conjunction with a Cisco ACI Multi-Site Controller

License

Notifications You must be signed in to change notification settings

NetworkChris/msc-login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

msc-login

published

Script to obtain the session token when using the RESTAPI in conjunction with a Cisco ACI Multi-Site Controller

Install requirements

pip install -r requirements.txt

Import this module into other scripts and pass through the following:

  • Multi-Site Controller Hostname/IP Address
  • Multi-Site Username
  • Multi-Site Password

Usage Example:

token = msc.login("mschost.cisco.com", "admin", "cisco123")

Example of the generated token being inserted into the header:

headers = {
"Content-Type": "application/json",
"cache-control": "no-cache"
"Authorization": "Bearer " + token
}

About

Script to obtain the session token when using the RESTAPI in conjunction with a Cisco ACI Multi-Site Controller

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages