Administrator Guide
* About to connect() to 10.16.151.159 port 8008
* Trying 10.16.151.159... connected
* Connected to 10.16.151.159 (10.16.151.159) port 8008
* Server auth using Basic with user 'admin'
> GET /api/operational/mib/bgp4-v2/f10BgpM2NlriTable?deep HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b
zlib/1.2.3 libidn/0.6.5
> Host: 10.16.151.159:8008
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: ConfD/5.2
< Cache-control: private, no-cache, must-revalidate, proxy-revalidate
< Date: Thu, 04 Dec 2014 12:54:31 GMT
< Content-Type: application/vnd.yang.data+xml
< Transfer-Encoding: chunked
<collection xmlns:y="http://tail-f.com/ns/rest">
<f10BgpM2NlriTable>
<f10BgpM2PeerIndex>1</f10BgpM2PeerIndex?
<f10BgpM2NlriAfi>1</f10BgpM2NlriAfi>
<f10BgpM2NlriSafi>1</f10BgpM2NlriSafi>
<f10BgpM2NlriPrefix>5.0.0.0</f10BgpM2NlriPrefix>
<f10BgpM2NlriPrefixLen>24</f10BgpM2NlriPrefixLen>
<f10BgpM2NlriIndex>0</f10BgpM2NlriIndex>
<f10BgpM2NlriBest>true</f10BgpM2NlriBest>
<f10BgpM2NlriCalcLocalPref>100</f10BgpM2NlriCalcLocalPref>
<f10BgpM2PathAttrIndex>1860238788</f10BgpM2PathAttrIndex
<f10BgpM2NlriOpaqueType>none</f10BgpM2NlriOpaqueType>
<f10BgpM2RouteFlag>active</f10BgpM2RouteFlag>
</f10BgpM2NlriTable>
</collection>
* Connection #0 to host 10.16.151.159 left intact
* Closing connection #0
HTTP Status Error Codes
The REST API server returns the following HTTP status error codes.
Status Error Codes Description
200 OK The request was successfully completed. A response body returns containing a
representation of the resource.
201 Created A resource is created and the new resource URI returns in the “Location” header.
204 No Content The request is successfully completed but no response body returns.
400 Bad Request The request could not be processed because it contains missing or invalid
information (such as a validation error on an input field, a missing required value,
and so on).
401 Unauthorized The request requires user authentication. The response includes a “WWW-
Authenticate” header field for basic authentication.
403 Forbidden Access to the resource is denied by the server due to authorization rules.
404 Not Found The requested resource does not exist.
132
REST API