Skip to content

Conversation

cesnietor
Copy link
Collaborator

@cesnietor cesnietor commented Sep 29, 2020

For #290
This includes the basic information of an object.
This api can be called using /api/v1/buckets/{bucket_name}/objects?prefix={prefix}&recursive={true|false}
Where prefix is a folder and recursive is used to traverse across the folders.

e.g. GET on /api/v1/buckets/bucket1/objects?recursive=false:
Response Payload:

{
    "objects": [
        {
            "last_modified": "2020-09-28 23:21:02.235 +0000 UTC",
            "name": "file.csv",
            "size": 45813
        },
        {
            "last_modified": "2020-09-28 23:22:08.562 +0000 UTC",
            "name": "photo.jpg",
            "size": 103614
        },
        {
            "last_modified": "0001-01-01 00:00:00 +0000 UTC",
            "name": "inky/"
        }
    ],
    "total": 3
}

With prefix parameter:
/api/v1/buckets/bucket1/objects?prefix=inky/&recursive=false

{
    "objects": [
        {
            "last_modified": "2020-09-28 23:25:31.171 +0000 UTC",
            "name": "inky/.gitignore",
            "size": 330
        },
        {
            "last_modified": "2020-09-28 23:25:31.17 +0000 UTC",
            "name": "inky/.stickler.yml",
            "size": 72
        },
        {
            "last_modified": "0001-01-01 00:00:00 +0000 UTC",
            "name": "inky/.git/"
        },
        {
            "last_modified": "0001-01-01 00:00:00 +0000 UTC",
            "name": "inky/examples/"
        },
        {
            "last_modified": "0001-01-01 00:00:00 +0000 UTC",
            "name": "inky/library/"
        },
    ],
    "total": 5
}
  • Tests included

@cesnietor cesnietor added the enhancement New feature or request label Sep 29, 2020
@cesnietor cesnietor self-assigned this Sep 29, 2020
bexsoft
bexsoft previously approved these changes Sep 29, 2020
Copy link
Collaborator

@bexsoft bexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Alevsk
Alevsk previously approved these changes Sep 29, 2020
This includes the basic information of an object
@cesnietor cesnietor dismissed stale reviews from Alevsk and bexsoft via dbfd98f September 29, 2020 20:46
@cesnietor cesnietor requested review from Alevsk and bexsoft September 29, 2020 20:46
@dvaldivia dvaldivia merged commit 7afd608 into minio:master Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants