Devesh Kumar Singh created HDDS-10634:
-----------------------------------------

             Summary: Recon - Extend and Enrich /du API for listing of OBS 
bucket keys
                 Key: HDDS-10634
                 URL: https://issues.apache.org/jira/browse/HDDS-10634
             Project: Apache Ozone
          Issue Type: Task
          Components: Ozone Recon
            Reporter: Devesh Kumar Singh
            Assignee: Devesh Kumar Singh


Existing API:

api/v1/namespace/du?path=/volume1/obs-bucket/&start=5&count=105
h5. Default values of API parameters if not provided:
 # path - /
 # replication_type - RATIS
 # age - null and filter will not be applied, so list out keys irrespective of 
age.
 # key_size - 0 bytes, which means all keys greater than zero bytes will be 
listed, effectively all.
 # start - 1 (inclusive)
 # count - 1000

 
h5. Behavior of API:
h5.        For OBS bucket - list out *_count_* number of keys starting from 
*_start_* value on the provided path.

This API will implement pagination support using *start* and *count  params.*
h3. Get List of All Keys:

     GET /api/v1/namespace/du

     API params:
 # path
 # replication_type
 # age in epoch ms
 # start
 # count
 # key_size

     *Input Request:*

           api/v1/namespace/du?path=/volume1/obs-bucket/dir1/&start=5&count=105

     *Output Response:*

      **      {
    "status": "OK",
    "path": "/volume1/obs-bucket/",
    "size": 62914560,
    "sizeWithReplica": -1,
    "subPathCount": 6,
    "subPaths": [
        {
            "key": true,
            "path": "key1",
            "size": 10485760,
            "sizeWithReplica": -1,
            "isKey": true,

            "replicationType": "RATIS",

            "creationTime": "1234567",

            "modificationTime": "4567259"
        },
        {
            "key": true,
            "path": "key1/key2",
            "size": 10485760,
            "sizeWithReplica": -1,
            "isKey": true
        },
        {
            "key": true,
            "path": "key1/key2/key3",
            "size": 10485760,
            "sizeWithReplica": -1,
            "isKey": true,

            "replicationType": "RATIS",

            "creationTime": "1234567",

            "modificationTime": "4567259"        },
        {
            "key": true,
            "path": "key4",
            "size": 10485760,
            "sizeWithReplica": -1,
            "isKey": true,

            "replicationType": "RATIS",

            "creationTime": "1234567",

            "modificationTime": "4567259"        },
        {
            "key": true,
            "path": "key5",
            "size": 10485760,
            "sizeWithReplica": -1,
            "isKey": true,

            "replicationType": "RATIS",

            "creationTime": "1234567",

            "modificationTime": "4567259"        },
        {
            "key": true,
            "path": "key6",
            "size": 10485760,
            "sizeWithReplica": -1,
            "isKey": true,

            "replicationType": "RATIS",

            "creationTime": "1234567",

            "modificationTime": "4567259"        }
    ],
    "sizeDirectKey": 62914560
}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to