Owner's Manual
REST API | 123
POST and GET Request Examples
The following output displays a POST request to create BGP 65009:
linux:~/REST$ cat HTTP_SEND_post_bgp
<bgp>
<as-name>65009</as-name>
<maximum-paths>
<ebgp>64</ebgp>
<ibgp>32</ibgp>
</maximum-paths>
</bgp>
linux:~/REST$ curl -v -u admin:admin -X POST -T HTTP_SEND_post_bgp http://
10.43.48.2:8008/api/running/ftos/router
* About to connect() to 10.43.48.2 port 8008 (#0)
* Trying 10.43.48.2... connected
* Server auth using Basic with user 'admin'
> POST /api/running/ftos/router HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1
zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 10.43.48.2:8008
> Accept: */*
> Content-Length: 118
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
< Server: ConfD
< Allow: GET, POST, OPTIONS, HEAD
< Content-Length: 0
* We are completely uploaded and fine
< HTTP/1.1 204 No Content
< Server: ConfD
< Cache-control: private, no-cache, must-revalidate, proxy-revalidate
< Date: Thu, 01 Aug 2013 21:42:46 GMT
< Allow: GET, POST, OPTIONS, HEAD
< Content-Length: 0
< Content-Type: text/html
<
* Connection #0 to host 10.43.48.2 left intact
* Closing connection #0