获取Bucket空间域名
Last updated
2023-07-14 09:53:50
{"value":"## **\u63cf\u8ff0**\n\n\u672c\u63a5\u53e3\u7528\u4e8e\u83b7\u53d6 Bucket \u7684\u57df\u540d\u5217\u8868\u3002\n\n\n\n\n\n## **\u8bf7\u6c42**\n\n\n\n**\u8bf7\u6c42\u8bed\u6cd5**\n\n```\nGET \/v2\/domains?tbl=<bucketName> HTTP\/1.1\nHost: uc.qiniuapi.com \nContent-Type: application\/x-www-form-urlencoded\nX-Qiniu-Date: 20060102T150405Z \nAuthorization: Qiniu <AccessToken>\n```\n\n\n\n\n\n**\u8bf7\u6c42\u53c2\u6570**\n\n| \u53c2\u6570\u540d\u79f0 | \u5fc5\u586b | \u8bf4\u660e |\n| -------- | ---- | ---------------------------- |\n| tbl | \u662f | \u8981\u83b7\u53d6\u57df\u540d\u5217\u8868\u7684\u76ee\u6807\u7a7a\u95f4\u540d\u79f0 |\n\n\n\n\n\n**\u8bf7\u6c42\u5934**\n\n\u8be5\u8bf7\u6c42\u64cd\u4f5c\u7684\u5b9e\u73b0\u4f7f\u7528\u4e86\u6240\u6709\u64cd\u4f5c\u7684\u516c\u5171\u8bf7\u6c42\u5934\u3002\u6709\u5173\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u67e5\u9605\u516c\u5171\u8bf7\u6c42\u5934\u3002\n\n\n\n\n\n**\u8bf7\u6c42\u5185\u5bb9**\n\n\u8be5\u8bf7\u6c42\u64cd\u4f5c\u7684\u8bf7\u6c42\u4f53\u4e3a\u7a7a\u3002\n\n\n\n\n\n## **\u54cd\u5e94**\n\n**\u54cd\u5e94\u8bed\u6cd5**\n\n```\nHTTP\/1.1 200 OK\nContent-Type: application\/json\n{\nDomainName\n}\n```\n\n\n\n**\u54cd\u5e94\u5934**\n\n\u8be5\u8bf7\u6c42\u64cd\u4f5c\u7684\u5b9e\u73b0\u4f7f\u7528\u4e86\u6240\u6709\u64cd\u4f5c\u7684\u516c\u5171\u54cd\u5e94\u5934\u3002\u6709\u5173\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u67e5\u9605\u516c\u5171\u54cd\u5e94\u5934\u3002\n\n\n\n**\u54cd\u5e94\u5185\u5bb9**\n\n| \u540d\u79f0 | \u8bf4\u660e |\n| ---------- | ---------------------- |\n| DomainName | \u7a7a\u95f4\u57df\u540d \u7c7b\u578b\uff1a\u5b57\u7b26\u4e32 |\n\n\n\n\n\n**\u54cd\u5e94\u72b6\u6001\u7801**\n\n\u8be5\u64cd\u4f5c\u7684\u5b9e\u73b0\u4e0d\u4f1a\u8fd4\u56de\u7279\u6b8a\u9519\u8bef\u3002\u6709\u5173\u9519\u8bef\u548c\u9519\u8bef\u4ee3\u7801\u5217\u8868\u7684\u4e00\u822c\u4fe1\u606f\uff0c\u8bf7\u67e5\u9605\u9519\u8bef\u54cd\u5e94\u3002\n\n\n\n\n\n## **\u793a\u4f8b**\n\n\n\n**\u8bf7\u6c42\u793a\u4f8b**\n\n```\nGET \/v2\/domains?tbl=test01 HTTP\/1.1\nHost: uc.qiniuapi.com\nUser-Agent: Go-http-client\/1.1\nX-Qiniu-Date: 20060102T150405Z\nAuthorization: Qiniu j853F3bLkWl59I5BOkWm6q1Z1mZClpr9Z9CLfDE0:jfblnkj6JsrlxgbE3l4SfhSyiL4=\nAccept-Encoding: gzip\n```\n\n*\u6ce8\uff1a\u8981\u5728 `Authorization` \u5934\u90e8\u7684 `<AccessToken>` \u524d\u6dfb\u52a0 `Qiniu` \u548c\u534a\u89d2\u7a7a\u683c\u3002*\n\n\n\n\n\n**\u54cd\u5e94\u793a\u4f8b**\n\n```\nHTTP\/1.1 200 OK\nConnection: keep-alive\nContent-Type: application\/json\nDate: Mon, 02 Jan 2006 15:04:05 GMT\nServer: nginx\nVary: Accept-Encoding\nX-Reqid: BksAALTAQtVZhdsU\n\n[\n \"oupgm4mi4.bkt.clouddn.com\", \n \"sarah.qiniudemo.com\"\n]\n```\n"}