Search:

Search all manuals
Search this manual
Manual
Couchbase Server Manual 1.8
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
8 REST API for Administration
Chapter Sections
Chapters

8.22. Creating a Memcached Bucket

To create a memcached bucket:

curl -v -u Administrator:password -d name=newbucket -d ramQuotaMB=100 -d authType=none \
-d bucketType=memcached -d proxyPort=11216 http://localhost:8091/pools/default/buckets

If successful, the HTTP 200 response will contain no URI to check for the bucket, but most bucket creation will complete within a few seconds. You can do a REST request on the new bucket stats to confirm it exists:

curl -u admin:password -v http://localhost:8091/pools/default/buckets/newbucket/stats

The following is the actual HTTP request:

HTTP Request
POST /pools/default/buckets HTTP/1.1
Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
Host: localhost:8091
Accept: */*
Content-Length: 80
Content-Type: application/x-www-form-urlencoded

And the following is the HTTP response sent when Couchbase Server successfully creates the new bucket:

HTTP Response
HTTP/1.1 202 Accepted
Server: Couchbase Server 1.8.1-937-rel-community
Pragma: no-cache
Location: /pools/default/buckets/newbucket
Date: Fri, 13 Jul 2012 18:40:25 GMT
Content-Length: 0
Cache-Control: no-cache