Get Object Details
Get Details of All Objects
Use the following SDK method to get details of all the objects stored in the bucket. The Object reference used in the below code snippet is the component instance.
Info: To use this SDK method, you need intialize it with Admin scope. You can learn more about this requirement from this section
copyconst objectRes = await objectIns.getDetails(); console.log(objectRes);
Note: If Versioning is enabled, then using this SDK method will only return the latest version's object details.
Get Details of a Particular Version of the Object
To get the details of a particular version of the object, you need to pass the versionId of the object to getDetails() SDK method.
Info: To use this SDK method, you need intialize it with Admin scope. You can learn more about this requirement from this section
Parameters Used
Parameter Name | Data Type | Definition |
---|---|---|
versionId | String | An Optional parameter. If Versioning is enabled for your bucket then, this param will help you refer to a particular version using its unique Version ID. |
Note:
-
You need to have enabled Versioning for your objects at least once to use this method.
-
You can find out more about Versioning from this help documentation.
copyconst objectRes = await objectIns.getDetails("versionId"); console.log(objectRes);
Example Response
copy{ "key": "sam/out/sample.txt", "size": 1, "content_type": "text/plain", "last_modified": "May 22, 2024 12:25 PM", "meta_data": { "author": "John" }, "object_url": "https://zcstratus12345-development.zohostratus.com/sam/out/sample.txt", "cached_object_url": "https://zcstratus12345-development.nimbuslocaledge.com/sam/out/sample.txt" }
Last Updated 2025-05-30 16:54:59 +0530 +0530
Yes
No
Send your feedback to us
Skip
Submit