Export/Import ZIP File Format

Components of the ZIP File

Catalyst enables you to export or import the schemas and configurations of a project, along with its functions and client code, without the data. Data, such as the records in the Data Store tables, the list of the application’s users, or files from the File Store, will not be included in the ZIP file.

The ZIP file that is created when a project is exported from its local directory contains the following components.

IAC Export ZIP File

  • ZIP File of the Functions Directory: The export ZIP will contain the functions directory of the project in its standard structure. All functions that were initialized in the project directory will be present as individual ZIP files, with their configuration files and SDK components.

  • ZIP File of the Client Directory: The export ZIP will also include the client directory of the project. The web client that was initialized in the project, with all the client files, will be present as a ZIP file in the webclient folder.

  • Project-Template JSON File: The configurations of the project’s components will be present in a single JSON file in the export ZIP file. The JSON file contains the definitions of the project and component settings. These configurations include Data Store and File Store schemas and meta data, Cache segments, Cron jobs, Circuit configurations, Security rules, email domains and addresses, Event Listeners and rules, APIs in API Gateway, email templates, user profiles, and more.

    An extract from a sample project-template JSON is given below:

    
copy
{ "name" : "project-template", "version" : "1.0.0", "parameters" : { }, "components" : { "Circuits" : [ { "type" : "circuit", "name" : "InvoiceGen", "properties" : { "name" : "InvoiceGen", "states" : { "State1" : { "next" : "End", "start" : true, "type" : "pass" } } }, "dependsOn" : [ ] } ], "Functions" : [ { "type" : "function", "name" : "warehouseportal", "properties" : { "stack" : "node14", "code" : { "path" : "functions/warehouseportal.zip" }, "configuration" : { "memory" : 256 }, "type" : "basicio", "name" : "warehouseportal" }, "dependsOn" : [ ] } ], "WebClient" : [ { "type" : "client", "name" : "warehousePortal", "properties" : { "app_name" : "warehousePortal", "code" : { "path" : "webclient/warehousePortal.zip" } }, "dependsOn" : [ ] } ], "Cron" : [ { "type" : "cron", "name" : "dailyBackup", "properties" : { "cron_url_details" : { "headers" : { }, "request_body" : "", "request_method" : "POST", "params" : { }, "url" : "https://catalyst.zoho.com/help/index.html" }, "end_time" : -1, "description" : "", "cron_name" : "dailyBackup", "job_detail" : { "hour" : 1, "timezone" : "America/Los_Angeles", "minute" : 0, "second" : 0, "repetition_type" : "Daily" }, "cron_type" : "Calendar", "status" : true }, "dependsOn" : [ ] } ], "Datastore" : [ { "type" : "table", "name" : "InventoryDB", "properties" : { "table_name" : "InventoryDB" }, "dependsOn" : [ ] }, { "type" : "column", "name" : "InventoryDB-ProductID", "properties" : { "decimal_digits" : 2, "column_name" : "ProductID", "data_type" : "int", "is_unique" : false, "is_mandatory" : false, "search_index_enabled" : false, "table_id" : "InventoryDB", "table_name" : "InventoryDB", "max_length" : 10 }, "dependsOn" : [ "Datastore.table.InventoryDB" ] }, { "type" : "tableScope", "name" : "InventoryDB-App Administrator", "properties" : { "role_name" : "App Administrator", "table_scope" : "GLOBAL", "type" : "App Administrator", "table_name" : "InventoryDB" }, "dependsOn" : [ "Datastore.table.InventoryDB" ] }, { "type" : "tableScope", "name" : "InventoryDB-App User", "properties" : { "role_name" : "App User", "table_scope" : "GLOBAL", "type" : "App User", "table_name" : "InventoryDB" }, "dependsOn" : [ "Datastore.table.InventoryDB" ] }, { "type" : "tablePermission", "name" : "InventoryDB-App Administrator", "properties" : { "role_name" : "App Administrator", "type" : "App Administrator", "table_permissions" : [ "SELECT", "UPDATE", "INSERT", "DELETE" ], "table_name" : "InventoryDB" }, "dependsOn" : [ "Datastore.table.InventoryDB" ] }, { "type" : "tablePermission", "name" : "InventoryDB-App User", "properties" : { "role_name" : "App User", "type" : "App User", "table_permissions" : [ "SELECT" ], "table_name" : "InventoryDB" }, "dependsOn" : [ "Datastore.table.InventoryDB" ] }] } }
Note:
  • Catalyst will not be able to import a project if the ZIP file does not contain the project-template JSON file. This is a mandatory file that defines the project’s configurations.

  • Currently, the only way to generate the JSON file of a Catalyst project is by exporting it. You will not be able to generate it manually. The update to directly generate a project’s JSON will be rolled out soon.

Last Updated 2023-04-20 21:06:11 +0530 +0530