--- title: "Get Table Metadata" url: https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/datastore/get-table-metadata/ description: "This page describes the method to perform operations in the DataStore component." last_updated: 2026-09-09T10:45:38Z service: CloudScale type: general related_links: - name: "Catalyst CloudScale" url: /en/cloud-scale/ - name: "DataStore Help" url: /en/cloud-scale/help/data-store/introduction/ - name: "Java SDK" url: /en/sdk/java/v1/cloud-scale/data-store/get-table-meta/ - name: "Python SDK" url: /en/sdk/python/v1/cloud-scale/data-store/get-table-meta/ - name: "iOS SDK" url: /en/sdk/ios/v2/cloud-scale/data-store/create-data-store-instance/ - name: "Android SDK" url: /en/sdk/android/v2/cloud-scale/data-store/create-data-store-instance/ - name: "Flutter SDK" url: /en/sdk/flutter/v2/cloud-scale/data-store/create-data-store-instance/ - name: "REST APIs" url: /en/api/code-reference/cloud-scale/data-store/get-table-metadata/#GetTableMetadata repository: name: "Repository" url: https://github.com/catalystbyzoho/zcatalyst-sdk-js --- # Get Table Metadata > **Note:** Ensure you have installed the [required package](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/datastore/overview/#prerequisites) to use this SDK method. Using the `getTableDetails()` SDK method, you can get the metadata of a particular table in the [Catalyst Datastore](https://docs.catalyst.zoho.com/en/cloud-scale/help/data-store/introduction/). ### Get a Table's Metadata by Table ID A table's metadata is fetched by referring the table's ID, using the `getTableDetails()` SDK method. The `datastore` reference used in the following code snippet is the [component instance](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/datastore/get-component-instance/). ```javascript const datastore = new Datastore(); const table = await datastore.getTableDetails(20660000000012118); console.log(table); ``` #### Example of Expected Response You have the choice to convert the resultant promise (table metadata) to either a string or JSON output by accessing the `.toString()` or `.toJSON()` methods. ```json { project_id:{ project_name:"AlienCity", id:"2136000000007733" }, table_name:"AlienCity", modified_by:{ zuid:"66466723", is_confirmed:false, email_id:"emma@zylker.com", first_name:"Amelia", last_name:"Burrows", user_type:"Admin", user_id:"2136000000006003" }, modified_time:"Aug 13, 2021 01:47 PM", column_details:[ { table_id:"2136000000007781", column_sequence:"1", column_name:"ROWID", category:1, data_type:"bigint", max_length:"50", is_mandatory:false, decimal_digits:"2", is_unique:false, search_index_enabled:false, column_id:"2136000000007784" }, { table_id:"2136000000007781", column_sequence:"2", column_name:"CREATORID", category:1, data_type:"bigint", max_length:"50", is_mandatory:false, decimal_digits:"2", is_unique:false, search_index_enabled:true, column_id:"2136000000007786" }, { table_id:"2136000000007781", column_sequence:"3", column_name:"CREATEDTIME", category:1, data_type:"datetime", max_length:"50", is_mandatory:false, decimal_digits:"2", is_unique:false, search_index_enabled:true, column_id:"2136000000007788" }, { table_id:"2136000000007781", column_sequence:"4", column_name:"MODIFIEDTIME", category:1, data_type:"datetime", max_length:"50", is_mandatory:false, decimal_digits:"2", is_unique:false, search_index_enabled:true, column_id:"2136000000007790" }, { table_id:"2136000000007781", column_sequence:"5", column_name:"CityName", category:2, data_type:"varchar", max_length:"100", is_mandatory:false, decimal_digits:"2", is_unique:true, search_index_enabled:true, column_id:"2136000000008503" } ], table_id:"2136000000007781" } ``` ### Get a Table's Metadata By Table Name A table's metadata is fetched by referring the name of the table, using the `getTableDetails()` SDK method. The `datastore` reference used in the following code snippet is the [component instance](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/datastore/get-component-instance/). > **Note:** If you change the name of your table at any point, you will need to ensure that the same change is reflected in your codebase in places where you have referred to the required table using the table's name. ```javascript //Get a Single Table's details using the table name const datastore = new Datastore(); const table = await datastore.getTableDetails('VendorSystems'); console.log(table); ``` #### Example of Expected Response You have the choice to convert the resultant promise (table metadata) to either a string or JSON output by accessing the `.toString()` or `.toJSON()` methods. ```json { project_id:{ project_name:"AlienCity", id:"2136000000007733" }, table_name:"AlienCity", modified_by:{ zuid:"66466723", is_confirmed:false, email_id:"emma@zylker.com", first_name:"Amelia", last_name:"Burrows", user_type:"Admin", user_id:"2136000000006003" }, modified_time:"Aug 13, 2021 01:47 PM", column_details:[ { table_id:"2136000000007781", column_sequence:"1", column_name:"ROWID", category:1, data_type:"bigint", max_length:"50", is_mandatory:false, decimal_digits:"2", is_unique:false, search_index_enabled:false, column_id:"2136000000007784" }, { table_id:"2136000000007781", column_sequence:"2", column_name:"CREATORID", category:1, data_type:"bigint", max_length:"50", is_mandatory:false, decimal_digits:"2", is_unique:false, search_index_enabled:true, column_id:"2136000000007786" }, { table_id:"2136000000007781", column_sequence:"3", column_name:"CREATEDTIME", category:1, data_type:"datetime", max_length:"50", is_mandatory:false, decimal_digits:"2", is_unique:false, search_index_enabled:true, column_id:"2136000000007788" }, { table_id:"2136000000007781", column_sequence:"4", column_name:"MODIFIEDTIME", category:1, data_type:"datetime", max_length:"50", is_mandatory:false, decimal_digits:"2", is_unique:false, search_index_enabled:true, column_id:"2136000000007790" }, { table_id:"2136000000007781", column_sequence:"5", column_name:"CityName", category:2, data_type:"varchar", max_length:"100", is_mandatory:false, decimal_digits:"2", is_unique:true, search_index_enabled:true, column_id:"2136000000008503" } ], table_id:"2136000000007781" } ``` ### Get Metadata of all Tables The `getAllTables()` SDK method can be used to retrieve the metadata of all the tables in the Catalyst project. The `datastore` reference used in the following code snippet is the [component instance](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/datastore/get-component-instance/). ```javascript const datastore = new Datastore(); const tables = await datastore.getAllTables(); console.log(tables); ``` #### Example of Expected Response The promise (metadata of all the tables) here will be resolved to an array of table meta details. ```json [ { project_id:{ project_name:"AlienCity", id:"2136000000007733" }, table_name:"AlienCity", modified_by:{ zuid:"66466723", is_confirmed:false, email_id:"emma@zylker.com", first_name:"Amelia", last_name:"Burrows", user_type:"Admin", user_id:"2136000000006003" }, modified_time:"Aug 13, 2021 01:47 PM", table_id:"2136000000007781" }, { table_name:"CityDetails", modified_by:{ zuid:"66466723", is_confirmed:false, email_id:"emma@zylker.com", first_name:"Amelia", last_name:"Burrows", user_type:"Admin", user_id:"2136000000006003" }, modified_time:"Aug 13, 2021 01:47 PM", table_id:"2136000000009090" } ] ```