Reset Search
 

 

Article

Rest API not returning any outputs

« Go Back

Information

 
TitleRest API not returning any outputs
Symptoms
  • REST API GET request does not return any information.
  • bash-4.2$ curl -i --request POST "http://admin:password@1.2.3.4/rest/operational-state/show-clock" 
    curl: (7) Failed connect to 1.2.3.4:80; Connection refused

 
Environment
  • VDX
  • Software Release: All
  • API
Cause
This is expected behaviour when http server service is shutdown, API works on HTTP.
VDX# show run | i http
http server shutdown


 
Resolution
Enable HTTP server service on the VDX.

sw0(config)# rb x
sw0(config-rbridge-id-x)# no http server shutdown
sw0(config-rbridge-id-x)#

-bash-4.2$ curl -i --request POST "http://admin:password@1.2.3.4/rest/operational-state/show-clock" 
HTTP/1.1 200 OK
Date: Wed, 25 Sep 2019 11:29:52 GMT
Server: NOS WWW
Authentication-Token: Sjh7RjtifHpcUVVxYnNrXmJ9STtYREtaP1pWaXxvcVo=
Cache-control: private, no-cache, must-revalidate, proxy-revalidate
Content-Length: 224
Content-Type: application/vnd.yang.operation+xml

<output xmlns='urn:brocade.com:mgmt:brocade-clock'>
  <clock-time>
    <rbridge-id-out>1</rbridge-id-out>
    <current-time>2019-09-25T11:29:52+00:00</current-time>
    <timezone>Etc/GMT</timezone>
  </clock-time>
</output>
-bash-4.2$



 
Additional notes

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255