【问题标题】:Some of the APIs are not accessible of IBM cloud storage object S3 APIIBM 云存储对象 S3 API 无法访问某些 API
【发布时间】:2017-11-17 12:05:21
【问题描述】:

我指的是有关以下网址的信息。 https://ibm-public-cos.github.io/crs-docs/about-compatibility-api#operations-on-buckets 如上面的 URL 所述,有 3 个与 IBM 云存储对象 API 相关的对象是可访问的。但是,IBM CSO API 的一些 API 是不可访问的,例如PUT Bucket ACL & GET Bucket ACL 并在使用 POSTMAN 访问它们时收到 403 错误消息。我需要有关如何访问这些 API 的信息?请提供任何相关信息。 非常感谢任何帮助。

【问题讨论】:

    标签: api object-storage ibm-cloud-storage


    【解决方案1】:

    截至今天,IBM COS 支持 GET/PUT Bucket ACL。如果您使用 Postman,这里有一个 Postman 转储的示例(显然您需要计算 Authorization 标头并使用所有您自己的信息,这只是一个教育样本):

    {
        "version": 1,
        "collections": [
            {
                "id": "ab20b534-025a-4be2-b90f-a980d4a81632",
                "name": "Operations on buckets",
                "folders": [],
                "requests": [
                    {
                        "id": "b89a66a4-0183-43cf-9712-7c07ba615b0b",
                        "url": "http://endpoint/bucket-name?acl=",
                        "method": "PUT",
                        "collectionId": "ab20b534-025a-4be2-b90f-a980d4a81632",
                        "name": "Add a bucket ACL (canned)",
                        "description": "",
                        "headers": "x-amz-date: {timestamp}\nAuthorization: {authorization-string}\nx-amz-acl: public-read\nContent-Type: text/plain",
                        "dataMode": "raw",
                        "data": ""
                    },
                    {
                        "id": "df2a9b2a-d66b-4ea6-8cfb-ab341ec23bc2",
                        "url": "http://endpoint/bucket-name?acl=",
                        "method": "PUT",
                        "collectionId": "ab20b534-025a-4be2-b90f-a980d4a81632",
                        "name": "Add a bucket ACL (custom)",
                        "description": "",
                        "headers": "x-amz-date: {timestamp}\nx-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\nAuthorization: {authorization-string}\nContent-Type: text/plain; charset=utf-8",
                        "dataMode": "raw",
                        "data": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<AccessControlPolicy xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">\n  <Owner>\n    <ID>d4d11b981e6e489486a945d640d41c4d</ID>\n    <DisplayName>OwnerDisplayName1</DisplayName>\n  </Owner>\n  <AccessControlList>\n    <Grant>\n      <Grantee xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"CanonicalUser\">\n        <ID>d4d11b981e6e489486a945d640d41c4d</ID>\n        <DisplayName>some-name</DisplayName>\n      </Grantee>\n      <Permission>FULL_CONTROL</Permission>\n    </Grant>\n    <Grant>\n      <Grantee xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"CanonicalUser\">\n        <ID>a5c26620b0704967a72d7aeb90cf57b2</ID>\n        <DisplayName>some-name</DisplayName>\n      </Grantee>\n      <Permission>WRITE</Permission>\n    </Grant>\n  </AccessControlList>\n</AccessControlPolicy>"
                    },
                    {
                        "id": "7f79523f-b9aa-46ad-abda-9ad7e37d3980",
                        "url": "http://bucket-name.endpoint/?acl=",
                        "method": "GET",
                        "collectionId": "ab20b534-025a-4be2-b90f-a980d4a81632",
                        "name": "Get a bucket ACL",
                        "description": "",
                        "headers": "x-amz-date: {timestamp}\nAuthorization: {authorization-string}\nContent-Type: text/plain",
                        "dataMode": "raw",
                        "data": ""
                    }
                ],
                "order": [
                    "b89a66a4-0183-43cf-9712-7c07ba615b0b",
                    "df2a9b2a-d66b-4ea6-8cfb-ab341ec23bc2",
                    "7f79523f-b9aa-46ad-abda-9ad7e37d3980"
                ]
            }
        ],
        "environments": [
            {
                "id": "fa619322-0a84-47b5-958b-84fa4a6286ba",
                "name": "API-Flow Imports",
                "values": [],
                "timestamp": 1497532748923
            }
        ]
    }
    

    根据您对“云存储对象 API”的引用,我猜您可能正在使用 IBM COS 的本地安装。请通过 nicholas.lange[at]ibm.com 给我发送电子邮件,以便我们可以讨论您正在寻找的内容。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-27
      • 2021-04-14
      • 1970-01-01
      • 2018-12-03
      • 2019-09-18
      相关资源
      最近更新 更多