Get Object DetailsAdmin Scope

Note: Ensure you have installed the required package to use this SDK method.

Get Details of All Objects

You can use the getDetails() SDK method to get the details of all the objects that stored in a bucket in Stratus. The objectIns, object reference used in the following code snippet is the component instance.

Note: If Versioning is enabled for your bucket, and no versionId is provided while using this SDK method, then the SDK method will only return the latest version's object details.
copy
const objectRes = await objectIns.getDetails();
console.log(objectRes);

Example of Expected 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

Parameters Used

Parameter Name Data Type Definition
versionId String An optional parameter. Needs to be used to refer to the required version of the object.

If Versioning is enabled for your bucket, then you will be able to store multiple versions of the object. To get the details of a particular version of the object, you need to pass the versionId of the required object’s version to the getDetails() SDK method.

The objectIns, object reference used in the following code snippet is the component instance.

copy
const objectRes = await objectIns.getDetails("versionId");
console.log(objectRes);

Example of Expected 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 2026-07-02 14:51:41 +0530 IST