---
title: "List Object Versions"
url: https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/stratus/list-object-versions/
description: "This page describes the method to execute circuits in your application with sample code snippets."
last_updated: 2026-09-09T10:45:38Z
service: CloudScale
type: general
related_links:
- name: "Catalyst CloudScale"
url: /en/cloud-scale/
- name: "Stratus Help Documentation"
url: /en/cloud-scale/help/stratus/introduction/
- name: "Java SDK Documentation"
url: /en/sdk/java/v1/cloud-scale/stratus/list-object-versions/
- name: "Python SDK Documentation"
url: /en/sdk/python/v1/cloud-scale/stratus/list-object-versions/
- name: "iOS SDK Documentation"
url: /en/sdk/ios/v2/cloud-scale/stratus/overview/
- name: "Android SDK Documentation"
url: /en/sdk/android/v2/cloud-scale/stratus/overview/
- name: "Flutter SDK Documentation"
url: /en/sdk/flutter/v2/cloud-scale/stratus/overview/
- name: "REST API Documentation"
url: /en/api/code-reference/cloud-scale/stratus/get-all-versions/#GetAllVersionsofanObject
repository:
name: "Repository"
url: https://github.com/catalystbyzoho/zcatalyst-sdk-js
---
# List Object Versions
> **Note:** Ensure you have installed the [required package](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/stratus/overview/#prerequisites) to use this SDK method.
If [Versioning](https://docs.catalyst.zoho.com/en/cloud-scale/help/stratus/stratus-config/general-settings/#versioning) is enabled for your bucket, you will be able to store multiple versions of the same object. Each version of the object will be assigned a unique `versionID` at time time of storage.
The following SDK methods will allow you list all the versions of an object either in a paginated or iterated manner.
### List All Versions of an Object Through Pagination
#### Parameters Used
| Parameter Name |
Data Type |
Definition |
| `nextToken` |
**String** |
Will hold the value that determines the next set of versions. |
| `maxVersions` |
**Int** |
An **optional** parameter. Will hold the value of the maximum number of versions of the object that can be listed per iteration. |
You can use the `listMyPaginatedVersions()` SDK method, to list all the versions of a required object in a paginated manner. The `objectIns`, object reference used in the following code snippet is the [component instance](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/stratus/create-object-instance/).
```javascript
async function listMyPaginatedVersions(maxVersion = undefined, nextToken = undefined) {
const response = await objectIns.listPagedVersions({ maxVersion, nextToken}); console.log(response.version); if(response.is_truncated) { listMyPaginatedVersions(maxVersion,nextToken) } } await listMyPaginatedVersions(10);
```
#### Example of Expected Response
```javascript
{
"key": "sam/out/sample.txt",
"versions_count": 2,
"max_versions": "2",
"is_truncated": "False",
"next_continuation_token": "4YpUdkktt2UeWp6MwEK1LZXELnuVhunHLnGgX29uvszwtJEQE2gVDJYyRiLdUmhNst",
"version": [
{
"version_id": "01hyfh12njtpyvzwq6p1fd2d8s",
"is_latest": "True",
"last_modified": "May 22, 2024 12:20 PM",
"size": 1,
"etag": "9af7c117d9de9a06fba7a5f1ea5fcc2d"
},
{
"version_id": "01hyfh0xkvwkxxsjfceef201xa",
"is_latest": "False",
"last_modified": "May 22, 2024 12:20 PM",
"size": "1",
"etag": "9af7c117d9de9a06fba7a5f1ea5fcc2d"
}
]
}
```
### List All Versions of an Object Through Iteration
You can use the `listIterableVersions()` SDK method to get all the available versions of an object stored in a bucket in Stratus in a single call. The `objectIns`, object reference used in the following code snippet is the [component instance](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/stratus/create-object-instance/).
```javascript
const versions = objectIns.listIterableVersions();
for await( const version of versions) {
console.log(version);
}
```
#### Example of Expected Response
```javascript
{
"versionId": "01hyfh12njtpyvzwq6p1fd2d8s",
"is_latest": "True",
"last_modified": "May 22,2024 12:20 PM",
"size": "1",
"etag": "9af7c117d9de9a06fba7a5f1ea5fcc2d"
}
{
"versionId": "01hyfh0xkvwkxxsjfceef201xa",
"is_latest": "False",
"last_modified": "May 22, 2024 12:20 PM",
"size": "1",
"etag": "9af7c117d9de9a06fba7a5f1ea5fcc2d"
}
```