Promoting REST designs to your production environments

When designing new parts of your system, we always recommend you design these new parts in a development instance, test them thoroughly, and then transfer these designs to production, rather than applying any new content directly to the production environment. This is particularly important when designing features that use the REST behavior.

For information about the design and use of the REST Web Service behavior, see Linking objects to REST Web Services. For more detail about promoting REST designs to your production environments, see the Ivanti Community.

Creating a design using the REST web service creates a set of new objects when you add the behavior to an object. You then need to transfer these objects to your production environments. This section outlines the steps needed to promote the design from a non-production environment into a production environment. You may use Test to Live or Design Transfer.

Test to Live

Test-to-Live enables you to promote the entire design including objects, windows, the REST connection settings, and the Request Body definitions using the Test to Live application.

The body of the REST payload is stored in a reference list in the ObjectBody reference list object. Test to Live migrates only NEW reference lists, so if you update or delete any of these items, you need to update them in the production system manually. For more information about using Test to Live, see Test to Live.

Design Transfer

This section describes how to use Design Transfer to promote REST design into a production environment. For more information about Design Transfer, see Exporting designs from your database with Design Transfer and Importing items into your database.

Design Transfer does not transfer the REST Web Service credentials or the body content definitions, so have the following information ready to enter after completing the Design Transfer import:

  • End Point URI
  • The authentication details if you choose Basic or API Key (Provider)
  • The Response Mapping details, if required
  • The Request Body content

Do not add object or window design for the Request Body object to the Design Transfer file. This will cause an error when you try to run the import.

You need to create two export files: one for the Object design, and one for the Window and REST Body data.

To create export file 1, the Object Design file:

  1. Start the Design Transfer component on your source system and navigate the to the Business Objects folder.
  2. Expand the module folder where you have created the REST object.
  3. Expand the top level object Attributes folder.
  4. Select the collection related to the REST object and include dependent objects.
    This also selects the REST object for inclusion.
  5. Expand the Attributes folder of the REST object and ensure all remaining attributes are selected.
  6. On the Actions list, click Export Selected Items then save the file.

To create export file 2, the Window and REST Body data:

  1. Restart the Design Transfer component and navigate to the Reference folder.
  2. Expand the Reference List and then the module folder that contains the REST object.
  3. Right-click the object folder then click Select.
    All the Request Body definitions are selected. Alternatively, expand the folder and select the required definitions.
  4. Only the names of the request body definitions are transferred. You need to add the request body definitions after you have imported the Design Transfer files.

  5. Navigate to the Windows folder and expand the module folder that contains the REST object.
  6. Expand the REST object folder and select the required window. Do not include dependent objects.
  7. On the Actions list, click Export Selected Items, then save the file.

Now that you have created the two Design Transfer files, you can import the design into your target system.

To import the design into the target system:

  1. In the target system, open the Design Transfer component and select the Import option.
  2. On the Actions list, click Open Import File and select file 1 that you created above.
  3. For the Referenced object missing warning, select Leave value not set, then click Import.
    The file loads and the REST Body object is created.
  4. Click OK.
  5. On the Actions list, click Open Import File and select file 2 that you created above.
    A number of warnings appear after it has loaded.
  6. For all the Object conflict in system warnings, select the Do not create new… option.
  7. For the Referenced object missing warning, select Leave value not set.
  8. Click Import.
    The window selected for the main REST object is created and the selected REST Body reference list entries are populated.
  9. Click OK.

The file based part of the import is complete. You now need to complete the manual updates to the target system.

To complete the manual updates for the transfer of the design:

  1. In Object Designer, open the REST object.
  2. Display the REST Web Services settings on the object and add the connection details, then save the changes.
  3. In Window Manager, navigate to the module then the REST object and right-click the window and select Make available in Web Access.
  4. Right click the Request Body object and create a suitable window for the reference list.
  5. In the Administration component, expand the Reference Lists tree:
  6. Expand the module that contains the REST object and update the Request Body definitions as required. You can add new ones here as well.
    The REST object and associated data are ready to use.