批量操作
Last updated
2023-07-14 16:33:42
{"value":"## **\u63cf\u8ff0**\n\n\u672c\u63a5\u53e3\u7528\u4e8e\u6267\u884c\u6279\u91cf\u64cd\u4f5c\u3002\u6279\u91cf\u64cd\u4f5c\u610f\u6307\u5728\u5355\u4e00\u8bf7\u6c42\u4e2d\u6267\u884c\u591a\u6b21 (\u6700\u5927\u9650\u52361000\u6b21)\u67e5\u8be2\u5143\u4fe1\u606f\u4fee\u6539\u5143\u4fe1\u606f\u3001\u79fb\u52a8\u3001\u590d\u5236\u3001\u5220\u9664\u3001\u4fee\u6539\u72b6\u6001\u3001\u4fee\u6539\u5b58\u50a8\u7c7b\u578b\u3001\n\u4fee\u6539\u751f\u547d\u5468\u671f\u548c\u89e3\u51bb\u64cd\u4f5c\uff0c\u6781\u5927\u63d0\u9ad8\u8d44\u6e90\u7ba1\u7406\u6548\u7387\u3002\u5176\u4e2d\uff0c \u89e3\u51bb\u64cd\u4f5c\u4ec5\u9488\u5bf9\u5f52\u6863\u6df1\u5ea6\u5f52\u6863\u5b58\u50a8\u6587\u4ef6\u6709\u6548\u3002\n\n\n\n## **\u8bf7\u6c42**\n\n### **\u8bf7\u6c42\u8bed\u6cd5**\n\n```\nPOST \/batch HTTP\/1.1\nHost: rs.qiniuapi.com\nContent-Type: application\/x-www-form-urlencoded\nX-Qiniu-Date: 20060102T150405Z\nAuthorization: Qiniu <AccessToken>\n\nop=<Operation>&op=<Operation>&...\n```\n\n\u4f7f\u7528\u8bf4\u660e\uff1a\n\n- \u8981\u5728 Authorization \u5934\u90e8\u7684 `<AccessToken>` \u524d\u6dfb\u52a0 Qiniu \u548c\u534a\u89d2\u7a7a\u683c\u3002\n- `op=<Operation>` \u662f\u5355\u4e00\u6587\u4ef6\u7ba1\u7406\u6307\u4ee4\uff08\u5982\uff1a`\/stat\/<EncodeEntryURI>`\uff0c`\/delete\/<EncodeEntryURI>` \u7b49\uff09\u3002\n\n\n\n### **\u8bf7\u6c42\u53c2\u6570**\n\n\u5c06\u6839\u636e\u5177\u4f53 `op=<Operation>` \u6587\u4ef6\u7ba1\u7406\u6307\u4ee4\uff0c\u4f7f\u7528\u76f8\u5e94\u53c2\u6570\u3002 \u5e38\u7528\u53c2\u6570 `EncodeEntryURI`\u3001`EncodedEntryURISrc` \u4e0e `EncodedEntryURIDest` \u7ecf\u8fc7 Base64 \u7f16\u7801\uff0c\u5177\u4f53\u8bf7\u53c2\u8003 \u8bf7\u53c2\u8003EncodedEntryURI\u3002\n\n\n\n### **\u8bf7\u6c42\u5934**\n\n| \u5934\u90e8\u540d\u79f0 | \u5fc5\u586b | \u8bf4\u660e | |\n| :------------ | :--- | :----------------------------------------------------------- | ---------------- |\n| Content-Type | \u662f | \u56fa\u5b9a\u4e3a application\/x-www-form-urlencoded | |\n| Authorization | \u662f | \u8be5\u53c2\u6570\u5e94\u4e25\u683c\u6309\u7167\u7ba1\u7406\u51ed\u8bc1\u683c\u5f0f\u8fdb\u884c\u586b\u5145\uff0c\u5426\u5219\u4f1a\u8fd4\u56de 401 \u9519\u8bef\u7801\u4e00\u4e2a\u5408\u6cd5\u7684 Authorization \u503c\u5e94\u7c7b\u4f3c\u4e8e\uff1a`Qiniu QNJi_bYJlmO5LeY08FfoNj9w_r7...` | |\n| | \u5176\u4ed6 | | \u8bf7\u67e5\u9605\u516c\u5171\u8bf7\u6c42\u5934 |\n\n\n\n\n\n### **\u8bf7\u6c42\u5185\u5bb9**\n\n```\n#\u6279\u91cf\u83b7\u53d6\u5143\u4fe1\u606f\nop=\/stat\/<EncodedEntryURI>&op=\/stat\/<EncodedEntryURI>&...\n\n#\u6279\u91cf\u590d\u5236\u8d44\u6e90\nop=\/copy\/<EncodedEntryURISrc>\/<EncodedEntryURIDest>&op=\/copy\/<EncodedEntryURISrc>\/<EncodedEntryURIDest>&...\/force\/<true|false> \n\n#\u6279\u91cf\u79fb\u52a8\u8d44\u6e90\nop=\/move\/<EncodedEntryURISrc>\/<EncodedEntryURIDest>&op=\/move\/<EncodedEntryURISrc>\/<EncodedEntryURIDest>&...\/force\/<true|false> \n\n#\u6279\u91cf\u5220\u9664\u8d44\u6e90\nop=\/delete\/<EncodedEntryURI>&op=\/delete\/<EncodedEntryURI>&...\n\n#\u6279\u91cf\u89e3\u51bb\u8d44\u6e90\nop=\/restoreAr\/<EncodedEntryURI>\/freezeAfterDays\/<FreezeAfterDays>&...\n\n#\u6279\u91cf\u4fee\u6539\u5143\u4fe1\u606f\n\u2026\u2026\n#\u6279\u91cf\u4fee\u6539\u5b58\u50a8\u7c7b\u578b\n\u2026\u2026\n#\u6279\u91cf\u4fee\u6539\u72b6\u6001\n\u2026\u2026\n#\u6279\u91cf\u4fee\u6539\u751f\u547d\u5468\u671f\n\u2026\u2026\n\n#\u6df7\u5408\u591a\u79cd\u64cd\u4f5c\nop=\/stat\/<EncodedEntryURI>&op=\/copy\/<EncodedEntryURISrc>\/<EncodedEntryURIDest>\/force\/<true|false>&op=\/move\/<EncodedEntryURISrc>\/<EncodedEntryURIDest>\/force\/<true|false> &op=\/delete\/<EncodedEntryURI>&op=\/restoreAr\/<EncodedEntryURI>\/freezeAfterDays\/<FreezeAfterDays>&...\n```\n\n*\u6ce8\uff1acopy \u548c move \u64cd\u4f5c\u9700\u4e3a\u6bcf\u4e2a\u6587\u4ef6\u6307\u5b9aforce\u53c2\u6570\u3002*\n\n\n\n# **\u54cd\u5e94**\n\n### **\u54cd\u5e94\u8bed\u6cd5**\n\n```\nHTTP\/1.1 200 OK\nContent-Type: application\/json\nCache-Control: no-store\n```\n\n\n\n### **\u54cd\u5e94\u5934**\n\n| \u5934\u90e8\u540d\u79f0 | \u5fc5\u586b | \u8bf4\u660e |\n| :----------- | :--- | :----------------------------------------------------------- |\n| Content-Type | \u662f | \u6b63\u5e38\u60c5\u51b5\u4e0b\u8be5\u503c\u5c06\u88ab\u8bbe\u4e3a `application\/json`\uff0c\u8868\u793a\u8fd4\u56de JSON \u683c\u5f0f\u7684\u6587\u672c\u4fe1\u606f\u3002 |\n| \u5176\u4ed6 | | \u5176\u5b83\u53ef\u80fd\u8fd4\u56de\u7684\u5934\u90e8\u4fe1\u606f\uff0c\u8bf7\u53c2\u8003\u516c\u5171\u54cd\u5e94\u5934\u3002 |\n\n\n\n\n\n### **\u54cd\u5e94\u5185\u5bb9**\n\n```\n#\u6279\u91cf\u83b7\u53d6\u5143\u4fe1\u606f\n[\n { \"code\": <HttpCode int>, \"data\": <Data> },\n { \"code\": <HttpCode int>, \"data\": <Data> },\n { \"code\": <HttpCode int>, \"data\": { \"error\": \"<ErrorMessage string>\" } },\n ...\n]\n\n#\u6279\u91cf\u590d\u5236\u8d44\u6e90\n[\n { \"code\": <HttpCode int> },\n { \"code\": <HttpCode int> },\n { \"code\": <HttpCode int>, \"data\": { \"error\": \"<ErrorMessage string>\" } },\n ...\n]\n\n#\u6279\u91cf\u79fb\u52a8\u8d44\u6e90\n[\n { \"code\": <HttpCode int> },\n { \"code\": <HttpCode int> },\n { \"code\": <HttpCode int>, \"data\": { \"error\": \"<ErrorMessage string>\" } },\n ...\n]\n\n#\u6279\u91cf\u5220\u9664\u8d44\u6e90\n[\n { \"code\": <HttpCode int> },\n { \"code\": <HttpCode int> },\n { \"code\": <HttpCode int>, \"data\": { \"error\": \"<ErrorMessage string>\" } },\n ...\n]\n\n#\u6279\u91cf\u89e3\u51bb\u8d44\u6e90\n[\n { \"code\": <HttpCode int> },\n { \"code\": <HttpCode int> },\n { \"code\": <HttpCode int>, \"data\": { \"error\": \"<ErrorMessage string>\" } },\n ...\n]\n\n#\u6df7\u5408\u591a\u79cd\u64cd\u4f5c\n[\n { \"code\": <HttpCode int>, \"data\": <Data> },\n { \"code\": <HttpCode int> },\n { \"code\": <HttpCode int> },\n { \"code\": <HttpCode int> },\n { \"code\": <HttpCode int>, \"data\": { \"error\": \"<ErrorMessage string>\" } },\n ...\n]\n```\n\n\n\n### **\u54cd\u5e94\u72b6\u6001\u7801**\n\n| HTTP\u72b6\u6001\u7801 | \u542b\u4e49 |\n| :--------- | :----------------------------------------------------------- |\n| 200 | \u6240\u6709\u8bf7\u6c42\u64cd\u4f5c\u90fd\u5df2\u6210\u529f\u5b8c\u6210 |\n| 298 | \u90e8\u5206\u6216\u6240\u6709\u8bf7\u6c42\u64cd\u4f5c\u5931\u8d25\uff08\u51fa\u9519\u4fe1\u606f\u53c2\u770b\u4e0a\u8ff0\u54cd\u5e94\u5185\u5bb9\uff09 |\n| 400 | \u8bf7\u6c42\u62a5\u6587\u683c\u5f0f\u9519\u8bef |\n| 401 | \u7ba1\u7406\u51ed\u8bc1\u65e0\u6548 |\n| 403 | \u7981\u6b62\u64cd\u4f5c \u5f53\u975e\u5f52\u6863\/\u6df1\u5ea6\u5f52\u6863\u5b58\u50a8\u7c7b\u578b Object \u8c03\u7528\u6b64\u63a5\u53e3\u6307\u5b9a op=restoreAr \u65f6\uff0c\u8fd4\u56de`403 Fobbiden {\"error\": \"operation only allowed for archive or deep archive\"}` |\n| 599 | \u670d\u52a1\u7aef\u64cd\u4f5c\u5931\u8d25 |\n| \u5176\u4ed6\u9519\u8bef\u7801 | \u8bf7\u67e5\u9605\u9519\u8bef\u54cd\u5e94 |\n\n\u5982\u9047 599 \u9519\u8bef\uff0c\u8bf7\u5c06\u5b8c\u6574\u9519\u8bef\u4fe1\u606f\uff08\u5305\u62ec\u6240\u6709 HTTP \u54cd\u5e94\u5934\u90e8\uff09\u63d0\u4ea4\u5de5\u5355\u7ed9\u6211\u4eec\u3002"}