1

我指的是有关以下网址的信息。 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 的信息?请提供任何相关信息。任何帮助是极大的赞赏。

4

1 回答 1

0

As of today, GET/PUT Bucket ACL are supported in IBM COS. If you are using Postman, here's an example of a Postman dump for these (obviously you'll need to calculate the Authorization header and use all of your own info, this is just an educational sample):

{
    "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
        }
    ]
}

Based on your reference to the 'Cloud Storage Object API', I can guess you might be working with an on-premises installation of IBM COS. Please send me an email at nicholas.lange[at]ibm.com so we can discuss what you are looking for.

于 2017-06-15T13:21:50.033 回答