06-02-2022 01:50 PM
Hi, I'm trying to use RESTConf to test IOS upgrades, but I'm getting a malformed message error.
I'm on Cisco IOS XE Software, Version 17.02.01r trying to upgrade to 17.03.04a
I'm doing a post to
https://{{ _.router }}/restconf/operations/Cisco-IOS-XE-install-rpc:install
with this in the body:
{ "Cisco-IOS-XE-install-rpc:input": { "uuid": "test", "one-shot": true, "path": "bootflash:isr4400-universalk9.17.03.04a.SPA.bin", reloadfast": true } }
but I receive a 400 Bad request error:
{ "errors": { "error": [ { "error-message": "application error", "error-path": "/Cisco-IOS-XE-install-rpc:install", "error-tag": "malformed-message", "error-type": "application" } ] } }
Does anyone know what the issue is? Other RestConf operations like reload work fine
06-03-2022 01:14 AM - edited 06-03-2022 01:41 AM
Hello,
tough one. Are you able to execute any other (simple) RESTCONF operation (such as retrieving interface information) ? The reason I am asking is that the error might apply to the specific action you want to execute (IOS upgrade)...
Also, the problem might be with the YANG module installed on your client. I checked Github and I think you need this one:
https://github.com/YangModels/yang/blob/main/vendor/cisco/xe/1731/Cisco-IOS-XE-install-rpc.yang
06-03-2022 04:24 AM
Hi,
Thank you for your response. Yes, I have been able to execute ios-xe-rpc:copy and ios-xe-rpc:reload. When I do a GET on /restconf/operations I get:
<operations xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"> <ios-xe-cell-rpc:cellular xmlns:ios-xe-cell-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-cellular-rpc">/restconf/operations/Cisco-IOS-XE-cellular-rpc:cellular </ios-xe-cell-rpc:cellular> <ios-xe-cts-rpc:cts xmlns:ios-xe-cts-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-cts-rpc">/restconf/operations/Cisco-IOS-XE-cts-rpc:cts </ios-xe-cts-rpc:cts> <install-ios-xe-rpc:install xmlns:install-ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-install-rpc">/restconf/operations/Cisco-IOS-XE-install-rpc:install </install-ios-xe-rpc:install> <install-ios-xe-rpc:activate xmlns:install-ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-install-rpc">/restconf/operations/Cisco-IOS-XE-install-rpc:activate </install-ios-xe-rpc:activate> <install-ios-xe-rpc:install-commit xmlns:install-ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-install-rpc">/restconf/operations/Cisco-IOS-XE-install-rpc:install-commit </install-ios-xe-rpc:install-commit> <install-ios-xe-rpc:remove xmlns:install-ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-install-rpc">/restconf/operations/Cisco-IOS-XE-install-rpc:remove </install-ios-xe-rpc:remove> <install-ios-xe-rpc:deactivate xmlns:install-ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-install-rpc">/restconf/operations/Cisco-IOS-XE-install-rpc:deactivate </install-ios-xe-rpc:deactivate> <install-ios-xe-rpc:abort xmlns:install-ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-install-rpc">/restconf/operations/Cisco-IOS-XE-install-rpc:abort </install-ios-xe-rpc:abort> <install-ios-xe-rpc:auto-abort-timer xmlns:install-ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-install-rpc">/restconf/operations/Cisco-IOS-XE-install-rpc:auto-abort-timer </install-ios-xe-rpc:auto-abort-timer> <install-ios-xe-rpc:rollback xmlns:install-ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-install-rpc">/restconf/operations/Cisco-IOS-XE-install-rpc:rollback </install-ios-xe-rpc:rollback> <ios-xe-rpc:default xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:default </ios-xe-rpc:default> <ios-xe-rpc:clear xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:clear </ios-xe-rpc:clear> <ios-xe-rpc:crypto xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:crypto </ios-xe-rpc:crypto> <ios-xe-rpc:release xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:release </ios-xe-rpc:release> <ios-xe-rpc:reload xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:reload </ios-xe-rpc:reload> <ios-xe-rpc:factory-reset xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:factory-reset </ios-xe-rpc:factory-reset> <ios-xe-rpc:license xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:license </ios-xe-rpc:license> <ios-xe-rpc:service xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:service </ios-xe-rpc:service> <ios-xe-rpc:virtual-service xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:virtual-service </ios-xe-rpc:virtual-service> <ios-xe-rpc:copy xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:copy </ios-xe-rpc:copy> <ios-xe-rpc:delete xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:delete </ios-xe-rpc:delete> <ios-xe-rpc:app-hosting xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:app-hosting </ios-xe-rpc:app-hosting> <ios-xe-rpc:guestshell xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:guestshell </ios-xe-rpc:guestshell> <ios-xe-rpc:start xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:start </ios-xe-rpc:start> <ios-xe-rpc:stop xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:stop </ios-xe-rpc:stop> <ios-xe-rpc:hw-module xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:hw-module </ios-xe-rpc:hw-module> <ios-xe-rpc:debug xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:debug </ios-xe-rpc:debug> <ios-xe-rpc:monitor xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:monitor </ios-xe-rpc:monitor> <ios-xe-rpc:pnpa xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:pnpa </ios-xe-rpc:pnpa> <ios-xe-rpc:test xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:test </ios-xe-rpc:test> <ios-xe-ucse-rpc:ucse xmlns:ios-xe-ucse-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-ucse-rpc">/restconf/operations/Cisco-IOS-XE-ucse-rpc:ucse </ios-xe-ucse-rpc:ucse> <ios-xe-utd-rpc:utd xmlns:ios-xe-utd-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-utd-rpc">/restconf/operations/Cisco-IOS-XE-utd-rpc:utd </ios-xe-utd-rpc:utd> <bd:clear-bridge-domain xmlns:bd="urn:cisco:params:xml:ns:yang:cisco-bridge-domain">/restconf/operations/cisco-bridge-domain:clear-bridge-domain </bd:clear-bridge-domain> <bd:clear-mac-address xmlns:bd="urn:cisco:params:xml:ns:yang:cisco-bridge-domain">/restconf/operations/cisco-bridge-domain:clear-mac-address </bd:clear-mac-address> <bd:create-parameterized-bridge-domains xmlns:bd="urn:cisco:params:xml:ns:yang:cisco-bridge-domain">/restconf/operations/cisco-bridge-domain:create-parameterized-bridge-domains </bd:create-parameterized-bridge-domains> <cisco-ia:sync-from xmlns:cisco-ia="http://cisco.com/yang/cisco-ia">/restconf/operations/cisco-ia:sync-from </cisco-ia:sync-from> <cisco-ia:save-config xmlns:cisco-ia="http://cisco.com/yang/cisco-ia">/restconf/operations/cisco-ia:save-config </cisco-ia:save-config> <cisco-ia:is-syncing xmlns:cisco-ia="http://cisco.com/yang/cisco-ia">/restconf/operations/cisco-ia:is-syncing </cisco-ia:is-syncing> <cisco-ia:checkpoint xmlns:cisco-ia="http://cisco.com/yang/cisco-ia">/restconf/operations/cisco-ia:checkpoint </cisco-ia:checkpoint> <cisco-ia:revert xmlns:cisco-ia="http://cisco.com/yang/cisco-ia">/restconf/operations/cisco-ia:revert </cisco-ia:revert> <cisco-ia:rollback xmlns:cisco-ia="http://cisco.com/yang/cisco-ia">/restconf/operations/cisco-ia:rollback </cisco-ia:rollback> <cisco-smart-license:register-id-token xmlns:cisco-smart-license="http://cisco.com/ns/yang/cisco-smart-license">/restconf/operations/cisco-smart-license:register-id-token </cisco-smart-license:register-id-token> <cisco-smart-license:de-register xmlns:cisco-smart-license="http://cisco.com/ns/yang/cisco-smart-license">/restconf/operations/cisco-smart-license:de-register </cisco-smart-license:de-register> <cisco-smart-license:renew-id xmlns:cisco-smart-license="http://cisco.com/ns/yang/cisco-smart-license">/restconf/operations/cisco-smart-license:renew-id </cisco-smart-license:renew-id> <cisco-smart-license:renew-auth xmlns:cisco-smart-license="http://cisco.com/ns/yang/cisco-smart-license">/restconf/operations/cisco-smart-license:renew-auth </cisco-smart-license:renew-auth> <notif-bis:establish-subscription xmlns:notif-bis="urn:ietf:params:xml:ns:yang:ietf-event-notifications">/restconf/operations/ietf-event-notifications:establish-subscription </notif-bis:establish-subscription> <notif-bis:create-subscription xmlns:notif-bis="urn:ietf:params:xml:ns:yang:ietf-event-notifications">/restconf/operations/ietf-event-notifications:create-subscription </notif-bis:create-subscription> <notif-bis:delete-subscription xmlns:notif-bis="urn:ietf:params:xml:ns:yang:ietf-event-notifications">/restconf/operations/ietf-event-notifications:delete-subscription </notif-bis:delete-subscription> <notif-bis:kill-subscription xmlns:notif-bis="urn:ietf:params:xml:ns:yang:ietf-event-notifications">/restconf/operations/ietf-event-notifications:kill-subscription </notif-bis:kill-subscription> <rt:fib-route xmlns:rt="urn:ietf:params:xml:ns:yang:ietf-routing">/restconf/operations/ietf-routing:fib-route </rt:fib-route> </operations>
So the install module is there. Is there something specific I need to do to install the yang module?
06-03-2022 02:03 PM - edited 06-03-2022 02:04 PM
Hello,
I looked at the body code again. Try and remove the ',':
{
"Cisco-IOS-XE-install-rpc:input": {
"uuid": "test",
"one-shot": true,
"path": "bootflash:isr4400-universalk9.17.03.04a.SPA.bin", <-- remove the ',' (comma) at the end of this line
reloadfast": true
}
}
06-03-2022 02:53 PM
The comma is needed to separate the "reloadfast" property. I deleted a double quote in front of reloadfast when I was formatting the code. The orginal json body should have looked like this:
{ "Cisco-IOS-XE-install-rpc:input": { "uuid": "test", "one-shot": true, "path": "bootflash:isr4400-universalk9.17.02.01r.SPA.bin", "reloadfast": true } }
I have tried without "one-shot" and without "one-shot" and "reloadfast". Everything I've tried just gives me a malformed message error
06-03-2022 11:06 PM
Hello,
sorry for the misunderstanding, what I meant was to run the code below, but I guess you have already tried that. I'll check further...
{
"Cisco-IOS-XE-install-rpc:input": {
"uuid": "test",
"one-shot": true,
"path": "bootflash:isr4400-universalk9.17.02.01r.SPA.bin"
}
}
06-03-2022 11:25 PM
Hello,
can you run the GET below ? That should render a list of available operations. I wonder if the 'install' is available at all in the 17.2 Amsterdam release...
GET https://<IP:Port>/restconf/operations/
06-04-2022 06:49 AM
Yeah, it's there. I posted the GET operations response a few post above.
<operations xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"> <ios-xe-cell-rpc:cellular xmlns:ios-xe-cell-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-cellular-rpc">/restconf/operations/Cisco-IOS-XE-cellular-rpc:cellular </ios-xe-cell-rpc:cellular> <ios-xe-cts-rpc:cts xmlns:ios-xe-cts-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-cts-rpc">/restconf/operations/Cisco-IOS-XE-cts-rpc:cts </ios-xe-cts-rpc:cts> <install-ios-xe-rpc:install xmlns:install-ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-install-rpc">/restconf/operations/Cisco-IOS-XE-install-rpc:install </install-ios-xe-rpc:install> <install-ios-xe-rpc:activate xmlns:install-ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-install-rpc">/restconf/operations/Cisco-IOS-XE-install-rpc:activate </install-ios-xe-rpc:activate> <install-ios-xe-rpc:install-commit xmlns:install-ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-install-rpc">/restconf/operations/Cisco-IOS-XE-install-rpc:install-commit </install-ios-xe-rpc:install-commit> <install-ios-xe-rpc:remove xmlns:install-ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-install-rpc">/restconf/operations/Cisco-IOS-XE-install-rpc:remove </install-ios-xe-rpc:remove> <install-ios-xe-rpc:deactivate xmlns:install-ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-install-rpc">/restconf/operations/Cisco-IOS-XE-install-rpc:deactivate </install-ios-xe-rpc:deactivate> <install-ios-xe-rpc:abort xmlns:install-ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-install-rpc">/restconf/operations/Cisco-IOS-XE-install-rpc:abort </install-ios-xe-rpc:abort> <install-ios-xe-rpc:auto-abort-timer xmlns:install-ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-install-rpc">/restconf/operations/Cisco-IOS-XE-install-rpc:auto-abort-timer </install-ios-xe-rpc:auto-abort-timer> <install-ios-xe-rpc:rollback xmlns:install-ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-install-rpc">/restconf/operations/Cisco-IOS-XE-install-rpc:rollback </install-ios-xe-rpc:rollback> <ios-xe-rpc:default xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:default </ios-xe-rpc:default> <ios-xe-rpc:clear xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:clear </ios-xe-rpc:clear> <ios-xe-rpc:crypto xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:crypto </ios-xe-rpc:crypto> <ios-xe-rpc:release xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:release </ios-xe-rpc:release> <ios-xe-rpc:reload xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:reload </ios-xe-rpc:reload> <ios-xe-rpc:factory-reset xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:factory-reset </ios-xe-rpc:factory-reset> <ios-xe-rpc:license xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:license </ios-xe-rpc:license> <ios-xe-rpc:service xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:service </ios-xe-rpc:service> <ios-xe-rpc:virtual-service xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:virtual-service </ios-xe-rpc:virtual-service> <ios-xe-rpc:copy xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:copy </ios-xe-rpc:copy> <ios-xe-rpc:delete xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:delete </ios-xe-rpc:delete> <ios-xe-rpc:app-hosting xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:app-hosting </ios-xe-rpc:app-hosting> <ios-xe-rpc:guestshell xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:guestshell </ios-xe-rpc:guestshell> <ios-xe-rpc:start xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:start </ios-xe-rpc:start> <ios-xe-rpc:stop xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:stop </ios-xe-rpc:stop> <ios-xe-rpc:hw-module xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:hw-module </ios-xe-rpc:hw-module> <ios-xe-rpc:debug xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:debug </ios-xe-rpc:debug> <ios-xe-rpc:monitor xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:monitor </ios-xe-rpc:monitor> <ios-xe-rpc:pnpa xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:pnpa </ios-xe-rpc:pnpa> <ios-xe-rpc:test xmlns:ios-xe-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-rpc">/restconf/operations/Cisco-IOS-XE-rpc:test </ios-xe-rpc:test> <ios-xe-ucse-rpc:ucse xmlns:ios-xe-ucse-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-ucse-rpc">/restconf/operations/Cisco-IOS-XE-ucse-rpc:ucse </ios-xe-ucse-rpc:ucse> <ios-xe-utd-rpc:utd xmlns:ios-xe-utd-rpc="http://cisco.com/ns/yang/Cisco-IOS-XE-utd-rpc">/restconf/operations/Cisco-IOS-XE-utd-rpc:utd </ios-xe-utd-rpc:utd> <bd:clear-bridge-domain xmlns:bd="urn:cisco:params:xml:ns:yang:cisco-bridge-domain">/restconf/operations/cisco-bridge-domain:clear-bridge-domain </bd:clear-bridge-domain> <bd:clear-mac-address xmlns:bd="urn:cisco:params:xml:ns:yang:cisco-bridge-domain">/restconf/operations/cisco-bridge-domain:clear-mac-address </bd:clear-mac-address> <bd:create-parameterized-bridge-domains xmlns:bd="urn:cisco:params:xml:ns:yang:cisco-bridge-domain">/restconf/operations/cisco-bridge-domain:create-parameterized-bridge-domains </bd:create-parameterized-bridge-domains> <cisco-ia:sync-from xmlns:cisco-ia="http://cisco.com/yang/cisco-ia">/restconf/operations/cisco-ia:sync-from </cisco-ia:sync-from> <cisco-ia:save-config xmlns:cisco-ia="http://cisco.com/yang/cisco-ia">/restconf/operations/cisco-ia:save-config </cisco-ia:save-config> <cisco-ia:is-syncing xmlns:cisco-ia="http://cisco.com/yang/cisco-ia">/restconf/operations/cisco-ia:is-syncing </cisco-ia:is-syncing> <cisco-ia:checkpoint xmlns:cisco-ia="http://cisco.com/yang/cisco-ia">/restconf/operations/cisco-ia:checkpoint </cisco-ia:checkpoint> <cisco-ia:revert xmlns:cisco-ia="http://cisco.com/yang/cisco-ia">/restconf/operations/cisco-ia:revert </cisco-ia:revert> <cisco-ia:rollback xmlns:cisco-ia="http://cisco.com/yang/cisco-ia">/restconf/operations/cisco-ia:rollback </cisco-ia:rollback> <cisco-smart-license:register-id-token xmlns:cisco-smart-license="http://cisco.com/ns/yang/cisco-smart-license">/restconf/operations/cisco-smart-license:register-id-token </cisco-smart-license:register-id-token> <cisco-smart-license:de-register xmlns:cisco-smart-license="http://cisco.com/ns/yang/cisco-smart-license">/restconf/operations/cisco-smart-license:de-register </cisco-smart-license:de-register> <cisco-smart-license:renew-id xmlns:cisco-smart-license="http://cisco.com/ns/yang/cisco-smart-license">/restconf/operations/cisco-smart-license:renew-id </cisco-smart-license:renew-id> <cisco-smart-license:renew-auth xmlns:cisco-smart-license="http://cisco.com/ns/yang/cisco-smart-license">/restconf/operations/cisco-smart-license:renew-auth </cisco-smart-license:renew-auth> <notif-bis:establish-subscription xmlns:notif-bis="urn:ietf:params:xml:ns:yang:ietf-event-notifications">/restconf/operations/ietf-event-notifications:establish-subscription </notif-bis:establish-subscription> <notif-bis:create-subscription xmlns:notif-bis="urn:ietf:params:xml:ns:yang:ietf-event-notifications">/restconf/operations/ietf-event-notifications:create-subscription </notif-bis:create-subscription> <notif-bis:delete-subscription xmlns:notif-bis="urn:ietf:params:xml:ns:yang:ietf-event-notifications">/restconf/operations/ietf-event-notifications:delete-subscription </notif-bis:delete-subscription> <notif-bis:kill-subscription xmlns:notif-bis="urn:ietf:params:xml:ns:yang:ietf-event-notifications">/restconf/operations/ietf-event-notifications:kill-subscription </notif-bis:kill-subscription> <rt:fib-route xmlns:rt="urn:ietf:params:xml:ns:yang:ietf-routing">/restconf/operations/ietf-routing:fib-route </rt:fib-route> </operations>
06-04-2022 07:00 AM
Hello,
I should have seen that in your initial post...my bad.
I am still looking at the syntax, but it looks perfectly ok. What client do you use to send the request ? Have you turned on debugging (debug restconf) ? That could render a clue...
06-04-2022 07:06 AM
Currently I am using Insomnia to test before trying to implement into our C# project. I have not turned on debugging, it's just adding "debug restconf" to the Cisco config?
06-04-2022 07:20 AM
Hello,
just type debug restconf at the exec prompt. Curious to know the results...
06-04-2022 07:46 AM
I am not getting any output. Will this work over SSH or do I need to be consoled in?
06-04-2022 09:04 AM
Hello,
SSH should work, as long as you have access to the command prompt:
Nexus#debug restconf
Just make sure you have logging enabled. Can you post the output of 'show log' ?
06-04-2022 09:20 AM
Ok, I can see the logging by running "show log profile restconf". Thank you
ROuter000001#show log profile restconf Displaying logs from the last 0 days, 0 hours, 10 minutes, 0 seconds executing cmd on chassis local ... 2022/06/04 16:03:30.814378 {dmiauthd_R0-0}{1}: [errmsg] [13816]: (note): %DMI-5-AUTH_PASSED: User 'root' authenticated successfully fromIP_ADDRESS:0 and was authorized for rest over http. External groups: PRIV15 2022/06/04 16:03:30.821218 {nginx_R0-0}{1}: [ngx_core] [15990]: (note): [15995] [access_log]IP_ADDRESS - root [04/Jun/2022:16:03:30 +0000] "GET /restconf/operations HTTP/1.1" 200 8420 "-" "insomnia/2022.3.0" 2022/06/04 16:04:22.113604 {dmiauthd_R0-0}{1}: [errmsg] [13816]: (note): %DMI-5-AUTH_PASSED: User 'root' authenticated successfully fromIP_ADDRESS:0 and was authorized for rest over http. External groups: PRIV15 2022/06/04 16:04:22.169999 {nginx_R0-0}{1}: [ngx_core] [15990]: (note): [15995] [access_log]IP_ADDRESS - root [04/Jun/2022:16:04:22 +0000] "POST /restconf/operations/Cisco-IOS-XE-install-rpc:install HTTP/1.1" 400 253 "-" "insomnia/2022.3.0" 2022/06/04 16:06:54.695660 {dmiauthd_R0-0}{1}: [errmsg] [13816]: (note): %DMI-5-AUTH_PASSED: User 'root' authenticated successfully fromIP_ADDRESS:0 and was authorized for rest over http. External groups: PRIV15 2022/06/04 16:06:54.718553 {nginx_R0-0}{1}: [ngx_core] [15990]: (note): [15995] [access_log]IP_ADDRESS - root [04/Jun/2022:16:06:54 +0000] "POST /restconf/operations/Cisco-IOS-XE-install-rpc:install HTTP/1.1" 400 253 "-" "insomnia/2022.3.0"
06-04-2022 10:11 AM
Hello,
I am not really sure why it authenticates 'root', since you specified 'test' as the uuid. Is there a user root and/or test configured on the Nexus with privilege level 15 ?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide