--- title: "Check Object Availability" url: https://docs.catalyst.zoho.com/en/sdk/web/v4/cloud-scale/stratus/check-object/ description: "This page describes the web SDK method to check if an object is present in a bucket." 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: "Java SDK" url: /en/sdk/java/v1/cloud-scale/stratus/check-bucket/ - name: "JavaScript SDK Documentation" url: /en/sdk/javascript/v1/cloudscale/stratus/check-bucket-availability/ - name: "Python SDK" url: /en/sdk/python/v1/cloud-scale/stratus/check-bucket/ - 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 --- # Check Object Availability > **Note:** This SDK is currently in deprecation. Migrate to [JavaScript SDK](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/overview/) now. Using the `headObject()` SDK method, you can check the existence of an object in a bucket, and further check if the user has the relevant permissions to access the objects present in the bucket. The Bucket reference used in the below code snippet is the [component instance](https://docs.catalyst.zoho.com/en/sdk/web/v4/cloud-scale/stratus/initialize-stratus-instance/#initialize-bucket-instance). Possible responses when using this SDK: * If the bucket exists and if the user has the relevant permissions to access the objects in it, the response '**true**' will be returned. * If the bucket does not exist, or if the user does not have permission to access the objects in it, the response '**false**' will be returned. **Parameters Used**
Parameter Name Data Type Definition
`key` **String** A **Mandatory** parameter. Will hold the complete name of the object along with it's [path](https://docs.catalyst.zoho.com/en/cloud-scale/help/stratus/objects/introduction/#path).
`options` **JSON Object** An **Optional** parameter to hold the following parameters:
  • `versionId`:
    • An optional **String** parameter.
    • If [Versioning](https://docs.catalyst.zoho.com/en/cloud-scale/help/stratus/stratus-config/general-settings/#versioning) is enabled for your bucket then, this param will help you refer to a particular version using its unique Version ID.
  • `throwErr`:
    • An optional **Boolean** parameter.
    • If you set this parameter as "**true**", then it will throw an error when the bucket is not found in the project.
    • The default value is "**false**"
### Check Object Availability Without VersionID The following SDK method will provide you with the `topVersion` (latest version) of the object in the bucket. ```javascript // Check if an object is available const checkObjectAvailability = await bucket.headObject("key") ``` ### Check Object Availability With VersionID The following SDK method will check the availability of a specific version of the object. the required version will be reffered by its unique `versionId`. ```javascript // Check if certain version of an object is Available const options = { versionId: 'djkfhdiufy762', throwErr: false }; const checkObjectAvailability = await bucket.headObject("key", options) ``` **Example Response** ```json { "status": 200, "content": true | false, "message": "OK" } ```