【问题标题】:Create Bucket in Couchbase using Http Post Request使用 Http Post 请求在 Couchbase 中创建存储桶
【发布时间】:2018-04-11 14:40:05
【问题描述】:

我想在运行时使用简单的 http post 请求在 couchbase 中创建一个存储桶。我已使用以下链接完成任务link

我在邮递员上生成的原始请求如下:-

http://:8091/pools/default/buckets?name=newbucket&bucketType=membase&ramQuotaMB=20&authType=none&replicaNumber=2&proxyPort=11215

但它给了我错误:-

{
    "errors": {
        "authType": "invalid authType"
    },
    "summaries": {
        "ramSummary": {
            "total": 20191379456,
            "otherBuckets": 16710107136,
            "nodesCount": 2,
            "perNodeMegs": 0,
            "thisAlloc": 0,
            "thisUsed": 0,
            "free": 3481272320
        },
        "hddSummary": {
            "total": 158247145472,
            "otherData": 11366997180,
            "otherBuckets": 68794932977,
            "thisUsed": 0,
            "free": 78085215315
        }
    }
}

我已使用基本身份验证作为 couchbase 控制台的用户名和密码。

知道电话有什么问题。

【问题讨论】:

  • 你在使用 Couchbase 5.x 吗?
  • 4.6.4-4590企业版

标签: couchbase


【解决方案1】:

我认为问题在于您在 URL 中传递参数,而不是作为 POST 正文的一部分。由于您使用的是 Postman,请选中“x-www-form-urlencoded”选项并在此处输入各种值。

这是一个示例的屏幕截图,它返回 202(已接受)响应:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多