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"
}}}]}
REQUEST
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message- id="urn:uuid:d37ff82d-6290-430a-9002-d2bf6bb17a2b">
<nc:get>
<nc:filter>
<system xmlns="http://openconfig.net/yang/system">
<state>
<domain-name/>
<login-banner/>
<motd-banner/>
<current-datetime/>
</state>
</system>
</nc:filter>
</nc:get>
</nc:rpc>
RESPONSE
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message- id="urn:uuid:d37ff82d-6290-430a-9002-d2bf6bb17a2b">
<data>
<system xmlns="http://openconfig.net/yang/system">
<state>
<domain-name>www.domainCisco.com</domain-name>
<login-banner>#LoginBannerCisco#</login-banner>
<motd-banner>#MOTDBannerCisco#</motd-banner>
<current-datetime>2023-03-20T06:58:14.426+00:00</current-datetime>
</state>
</system>
</data>
</rpc-reply>
Note: This example was added in Cisco NX-OS Release 10.4.(1).
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 Name Data Type Description Values childAction
mo:ModificationChildAction
scalar:Bitmask32Delete or ignore. For internal use only. SELECTION:
descr pol:Descr Description of the specified attribute dn
reference:BinRefA tag or metadata is a non-hierarchical keyword or term assigned to the fabric module. guiMessage aaa:BannerMsg
(string:CharBuffer)The login banner messsage to be displayed in the GUI. message aaa:BannerMsg
(string:CharBuffer)A message displayed in the banner. modTs mo:TStamp
(scalar:Date)The time when this object was last modified. SELECTION: name pol:ObjName
(naming:Name256)Object name ownerKey naming:Descr
(string:Basic)The key for enabling clients to own their data for entity correlation. ownerTag naming:Descr1024
(string:Basic)A tag for enabling clients to add their own data. For example, to indicate who created this object. persistentOnReload
mo:Persistent
scalar:Enum8NO COMMENTS SELECTION:
status mo:ModificationStatus
(scalar:Bitmask32)The upgrade status. This property is for internal use only. SELECTION: uid
scalar:Uint16A unique identifier for this object.
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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: