Get Object Details
Get Details of an Object
Use the following SDK method to get details of an object 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
copyres = object_ins.get_details() print(res)
Note: If Versioning is enabled, then using this SDK method will only return the latest version's object details.
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" }
Get Details of a Particular Version of the Object
Using this SDK method, you will be able to get all details of a particular object’s version.
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 |
---|---|---|
version_id | 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.
copyres = object_ins.get_details('version_id') print(res)
Example Response
copy{ "key": "sample.txt", "version_id": "01j7xgnmv5dhpk45kn3pctkasp", "size": 16, "content_type": "text/plain", "etag": "ad6affccd08876ad9ae5f60b7848b2c7", "last_modified": "Sep 16, 2024 07:04 PM", "object_url": "https://zcstratus123-development.zohostratus.com/sample.txt", "cached_object_url": "https://zcstratus123-development.nimbuslocaledge.com/sample.txt", }
Last Updated 2025-05-30 16:54:59 +0530 +0530
Yes
No
Send your feedback to us
Skip
Submit