show userpassphrase length

show userpassphrase length

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show userpassphrase length",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

  "ins_api": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show userpassphrase length",
        "msg": "Success",
        "code": "200",
        "body": {
          "Minimum_length": {
            "min_length": "Minimum passphrase length : 8"
          },
          "Maximum_length": {
            "max_length": "\nMaximum passphrase length : 127 \n"
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show userpassphrase length command, see the CLI command reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show userpassphrase length
Minimum passphrase length : 8
Maximum passphrase length : 127








show userpassphrase max-length

show userpassphrase max-length

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show userpassphrase max-length",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

  "ins_api": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show userpassphrase max-length",
        "msg": "Success",
        "code": "200",
        "body": {
          "Maximum_length": {
            "max_length": "Maximum passphrase length : 127 \n"
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show userpassphrase max-length command, see the CLI command reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show userpassphrase max-length
Maximum passphrase length : 127











show userpassphrase min-length

show userpassphrase min-length

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show userpassphrase min-length",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

  "ins_api": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": " show userpassphrase min-length",
        "msg": "Success",
        "code": "200",
        "body": {
          "Minimum_length": {
            "min_length": "Minimum passphrase length : 8"
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show userpassphrase min-length command, see the CLI command reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show userpassphrase min-length
Minimum passphrase length : 8