How to Import a Kapp

Overview

This guide covers exporting and importing a Kapp using the Space Console and the Kinetic Data Core API.

Process

Exporting a Kapp

There are two methods for exporting a Kapp.

Using the Space Console

Follow these steps to export a Kapp using the Space Console:

  1. From the Space Console dropdown, select the Kapp you want to export.
  2. In the Configuration section, click Settings.
  3. Click Export Kapp.
  4. Click Download to download a JSON file containing the Kapp export information. Alternatively, you can click Copy (the middle icon in at the bottom of the code editor) to copy the information to the clipboard.

Using the Kinetic Core API

You can make an API call using Kapp Retrieve to obtain the JSON information for the Kapp. Copy this information to the clipboard or save it to a file.

You can either set the export parameter to true to retrieve all child components of the Kapp or specify individual parts you want using the include parameter.

Importing a Kapp

📘

When you import a Kapp, the Kapp's configuration settings and definitions are carried over. Build information (that is, forms, WebAPIs, and workflows) must be imported using separate processes.

Once you have the JSON information for the exported Kapp, you'll need to modify the file output slightly.

Open the JSON file in a text editor. The layout may differ depending on how you exported the file and what options you selected. The example below shows an export with only the Details property included.

{
  "kapp": {
    "afterLogoutPath": null,
    "bundlePath": "webpack",
    "createdAt": "2023-03-23T15:25:47.455Z",
    "createdBy": "space-integration-user",
    "defaultFormConfirmationPage": "space.jsp",
    "defaultFormDisplayPage": "space.jsp",
    "defaultSubmissionLabelExpression": "${form('name')}",
    "displayType": "Display Page",
    "displayValue": "space.jsp",
    "loginPage": "",
    "name": "Services",
    "resetPasswordPage": "",
    "slug": "services",
    "updatedAt": "2024-10-07T21:23:09.323Z",
    "updatedBy": "[email protected]"
  }
}

You can use CTRL + F to search for and find the following fields:

  • "name": "[Kapp name]"
  • "slug": "[Kapp slug]"

Change the Kapp name and slug to a value that's unique to the Space where you are importing the Kapp.

In the Space where you want to create the Kapp, make an API call using Kapp Create, including only the content within the kapp property wrapper. Including the content outside of the wrapper will cause the import to fail.

The example below shows the content of the previous example updated to remove the content outside the Kapp wrapper with a unique Kapp name and slug.

{
    "afterLogoutPath": null,
    "bundlePath": "webpack",
    "createdAt": "2023-03-23T15:25:47.455Z",
    "createdBy": "space-integration-user",
    "defaultFormConfirmationPage": "space.jsp",
    "defaultFormDisplayPage": "space.jsp",
    "defaultSubmissionLabelExpression": "${form('name')}",
    "displayType": "Display Page",
    "displayValue": "space.jsp",
    "loginPage": "",
    "name": "New Services Kapp",
    "resetPasswordPage": "",
    "slug": "services-import",
    "updatedAt": "2024-10-07T21:23:09.323Z",
    "updatedBy": "[email protected]"
  }