Querying the Current MOTD Banner Message

 Querying the Current MOTD Banner Message 
GET http://<IP_address>/api/mo/sys/userext/preloginbanner.json
{
    "totalCount": "1",
    "imdata": [
        {
            "aaaPreLoginBanner": {
                "attributes": {
                    "childAction": "",
                    "descr": "",
                    "dn": "sys/userext/preloginbanner",
                    "guiMessage": "",
                    "message": "Testing Banner 123",
                    "modTs": "2017-12-21T13:09:27.998+00:00",
                    "name": "",
                    "ownerKey": "",
                    "ownerTag": "",
                    "persistentOnReload": "true",
                    "status": "",
                    "uid": "0"
}}}]}
GET http://<IP_Address>/restconf/data/Cisco-NX-OS-device:System/userext-items/preloginbanner-items
<preloginbanner-items>
    <delimiter/>
    <message>Testing Banner 123</message>
</preloginbanner-items>

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(3).

CLI Output
switch(config)# show banner motd   
Testing Banner 123   

Note: The property information for this example was added in Release 9.3(3).


aaaPreLoginBanner Properties

The following table contains information about the aaaPreLoginBanner properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
childAction
mo:ModificationChildAction
scalar:Bitmask32
Delete or ignore. For internal use only.SELECTION:
  • 16384u - deleteAll
  • 4096u - ignore
  • 8192u - deleteNonPresent
  • DEFAULT: 0
  • descrpol:Descr
    Description of the specified attribute
    dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
    guiMessageaaa:BannerMsg
    (string:CharBuffer)
    The login banner messsage to be displayed in the GUI.
    messageaaa:BannerMsg
    (string:CharBuffer)
    A message displayed in the banner.
    modTsmo:TStamp
    (scalar:Date)
    The time when this object was last modified.SELECTION:
    0 - never
    DEFAULT: never
    namepol:ObjName
    (naming:Name256)
    Object name
    MAX SIZE: 64
    ownerKeynaming:Descr
    (string:Basic)
    The key for enabling clients to own their data for entity correlation.
    MAX SIZE: 128
    ownerTagnaming:Descr1024
    (string:Basic)
    A tag for enabling clients to add their own data. For example, to indicate who created this object.
    MAX SIZE: 64
    persistentOnReload
    mo:Persistent
    scalar:Enum8
    NO COMMENTSSELECTION:
  • 0 - false
  • 1 - true
  • DEFAULT: true(1)
  • statusmo:ModificationStatus
    (scalar:Bitmask32)
    The upgrade status. This property is for internal use only.SELECTION:
    2 - created
    4 - modified
    8 - deleted
    16 - replaced
    uid
    scalar:Uint16
    A unique identifier for this object.


    Related Documentation

    For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

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

    See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

    https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

    For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

    https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html