--- title: "List Object Versions" url: https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/cloud-scale/stratus/list-object-versions/ description: "This page lists the Node.js SDK method to get versions of an object." last_updated: 2026-09-08T11:07:33Z service: Cloud Scale type: general related_links: - name: "Stratus Component Help Documentation" url: /en/cloud-scale/help/stratus/introduction - name: "Object Versioning Help Documentation" url: /en/cloud-scale/help/stratus/stratus-config/general-settings/#versioning - name: "Java SDK" url: /en/sdk/java/v1/cloud-scale/stratus/get-object-versions/ - name: "Python SDK" url: /en/sdk/python/v1/cloud-scale/stratus/get-object-versions/ - name: "JavaScript SDK Documentation" url: /en/sdk/javascript/v1/cloudscale/stratus/rename-move/ - name: "iOS SDK" url: /en/sdk/ios/v2/cloud-scale/stratus/overview/ - name: "Android SDK" url: /en/sdk/android/v2/cloud-scale/stratus/overview/ - name: "Flutter SDK" url: /en/sdk/flutter/v2/cloud-scale/stratus/overview/ - name: "REST API" url: /en/api/code-reference/cloud-scale/stratus/get-all-buckets/#GetAllBuckets --- # List Object Versions > **Note:** This SDK is currently in deprecation. Migrate to [JavaScript SDK](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/stratus/list-object-versions/) now. ### List All Versions of an Object Through Pagination Enabling [Versioning](https://docs.catalyst.zoho.com/en/cloud-scale/help/stratus/stratus-config/general-settings/#versioning) in a bucket allows you to store multiple versions of the same object in the bucket. Each version of the object will have its own `versionId`. This SDK method allows you to get all the existing versions of an object present in a bucket by pagination. The Object reference used in the below code snippet is the [component instance](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/cloud-scale/stratus/create-object-instance/). > **Info:** To use this SDK method, you need intialize it with **Admin** scope. You can learn more about this requirement from this [section](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/overview/#initialize-sdk-with-scopes) **Parameters Used**
Parameter Name Data Type Definition
`nextToken` **String** Will hold the value to determine 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.
```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 Response** ```json { "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 the Object Through Iteration You can use the following SDK method to get all available versions of the object in a single call. > **Info:** To use this SDK method, you need intialize it with **Admin** scope. You can learn more about this requirement from this [section](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/overview/#initialize-sdk-with-scopes) ```javascript const versions = objectIns.listIterableVersions(); for await( const version of versions) { console.log(version); } ``` **Example Response** ```json { "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" } ```