Get aws bucket content listing using Postman - "Get Bucket (Version 2)" RestAPI

Viewed 19537

I am using Postman to send the AWS S3 RestAPI "Get Bucket (Version 2)" to get bucket listing.

Name of bucket is "test-bucket-1.ahadomain.com" (ahadomain.com is a dummy nonexistent domain that I used when naming the bucket in aws). The user credentials I am using has all the permissions to make S3 calls. I am following the info on page - http://docs.aws.amazon.com/AmazonS3/latest/API/v2-RESTBucketGET.html

I am using the endpoint : https://test-bucket-1.s3.us-east-1.amazonaws.com I am sending the following Headers : Content-Type, Host, X-Amz-Content-Sha256, X-Amz-Date, Authorization

Do I need to add "list-type" as a query parameter or as a header? If as a query parameter, how do I state it in the url.

I am getting the following response, which does not contain a listing of the content, just info about the bucket itself:

<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Owner>
        <ID>6893100ea2b48696e8ccc3aa17414f4325cf59b574474ad9de0bcb0d139590c9</ID>
        <DisplayName>ahmedsmail</DisplayName>
    </Owner>
    <Buckets>
        <Bucket>
            <Name>test-bucket-1.ahadomain.com</Name>
            <CreationDate>2017-09-06T06:36:15.000Z</CreationDate>
        </Bucket>
    </Buckets>
</ListAllMyBucketsResult>

Any help would be greatly appreciated.

Thank you, Ahmed.

1 Answers
Related