Basic authentication to a REST endpoint

Verify and obtain the base URI of the RESTCONF API and then create the URI as shown in the below example.

curl -v -X GET -u admin:password https://10.20.192.65:80/restconf/

root@XMC:~/firmware/images$ curl -v -X GET -u admin:password http://10.20.192.66:80/rest
Note: Unnecessary use of -X or --request, GET is already inferred.
*   Trying 10.20.192.66...
* TCP_NODELAY set
* Connected to 10.20.192.66 (10.20.192.66) port 80 (#0)
* Server auth using Basic with user 'admin'
> GET /rest HTTP/1.1
> Host: 10.20.192.66
> Authorization: Basic YWRtaW46cGFzc3dvcmQ=
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: 2019-12-27 10:39:54
< Server: SLX-OS Wave WWW
< Authentication-Token: QDtEdkMzfHJKUEhZYGkyZE5sLz40fG5CfVNnWlJjRl8=
< Cache-control: private, no-cache, must-revalidate, proxy-revalidate
< Content-Type: application/vnd.base.resource+xml
< Content-Length: 3548
<

<rest xmlns="http://brocade.com/ns/rest" xmlns:y="http://brocade.com/ns/rest" y:self="/rest">

  <config y:self="/rest/config">
    <running y:self="/rest/config/running"/>
  </config>

  <operational-state y:self="/rest/operational-state"/>
  <operations y:self="/rest/operations">
    <get-maint-mode-status y:self="/rest/operations/get-maint-mode-status"/>
    <user-session-info y:self="/rest/operations/user-session-info"/>
    <get-arp y:self="/rest/operations/get-arp"/>
    <show-clock y:self="/rest/operations/show-clock"/>
    <get-contained-in-ID y:self="/rest/operations/get-contained-in-ID"/>
    <fwdl-status y:self="/rest/operations/fwdl-status"/>
    <activate-status y:self="/rest/operations/activate-status"/>
    <firmware-download y:self="/rest/operations/firmware-download"/>
    <firmware-commit y:self="/rest/operations/firmware-commit"/>
    <firmware-restore y:self="/rest/operations/firmware-restore"/>
    <firmware-download-sanity y:self="/rest/operations/firmware-download-sanity"/>
    <show-firmware-version y:self="/rest/operations/show-firmware-version"/>
    <reload y:self="/rest/operations/reload"/>
    <set-http-application-url y:self="/rest/operations/set-http-application-url"/>
    <get-vlan-brief y:self="/rest/operations/get-vlan-brief"/>
    <get-interface-switchport y:self="/rest/operations/get-interface-switchport"/>
    <get-ip-interface y:self="/rest/operations/get-ip-interface"/>
    <get-interface-detail y:self="/rest/operations/get-interface-detail"/>
    <get-media-detail y:self="/rest/operations/get-media-detail"/>
    <get-port-channel-detail y:self="/rest/operations/get-port-channel-detail"/>
    <get-portchannel-info-by-intf y:self="/rest/operations/get-portchannel-info-by-intf"/>
    <get-lldp-neighbor-detail y:self="/rest/operations/get-lldp-neighbor-detail"/>
    <get-mac-acl-for-intf y:self="/rest/operations/get-mac-acl-for-intf"/>
    <get-mac-address-table y:self="/rest/operations/get-mac-address-table"/>
    <get-netconf-client-capabilities y:self="/rest/operations/get-netconf-client-capabilities"/>
    <show-ntp y:self="/rest/operations/show-ntp"/>
    <bna-config-cmd y:self="/rest/operations/bna-config-cmd"/>
    <bna-config-cmd-status y:self="/rest/operations/bna-config-cmd-status"/>
    <show-raslog y:self="/rest/operations/show-raslog"/>
    <show-support-save-status y:self="/rest/operations/show-support-save-status"/>
    <show-system-info y:self="/rest/operations/show-system-info"/>
    <get-system-uptime y:self="/rest/operations/get-system-uptime"/>
    <show-system-monitor y:self="/rest/operations/show-system-monitor"/>
    <clear-tm-voq-stat-ing-all-egr-all y:self="/rest/operations/clear-tm-voq-stat-ing-all-egr-all"/>
    <clear-tm-voq-stat-ing-all-egr-ifname y:self="/rest/operations/clear-tm-voq-stat-ing-all-egr-ifname"/>
    <clear-tm-voq-stat-slot-id-egr-all y:self="/rest/operations/clear-tm-voq-stat-slot-id-egr-all"/>
    <clear-tm-voq-slot-id-egress-port-name y:self="/rest/operations/clear-tm-voq-slot-id-egress-port-name"/>
    <get-tunnel-info y:self="/rest/operations/get-tunnel-info"/>
    <get-tunnel-statistics y:self="/rest/operations/get-tunnel-statistics"/>
    <get-last-config-update-time y:self="/rest/operations/get-last-config-update-time"/>
    <get-last-config-update-time-for-xpaths y:self="/rest/operations/get-last-config-update-time-for-xpaths"/>
    <get-stp-brief-info y:self="/rest/operations/get-stp-brief-info"/>
    <get-stp-mst-detail y:self="/rest/operations/get-stp-mst-detail"/>
  </operations>

</rest>
* Connection #0 to host 10.20.192.66 left intact

from the rest reply user can derive the URI for any REST endpoint
curl -v -X GET -u admin:password http://10.20.192.65:80//rest/config/running -H "Accept: application/
vnd.configuration.resource+xml"

Limitations

The REST Commands for show-ha and show-slots are not supported.