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 behaviour.
For information about the design and use of the REST Web Service behaviour, 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 behaviour 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:
- Start the Design Transfer component on your source system and navigate the to the Business Objects folder.
- Expand the module folder where you have created the REST object.
- Expand the top level object Attributes folder.
- Select the collection related to the REST object and include dependent objects.
This also selects the REST object for inclusion. - Expand the Attributes folder of the REST object and ensure all remaining attributes are selected.
- On the Actions list, click Export Selected Items then save the file.
To create export file 2, the Window and REST Body data:
- Restart the Design Transfer component and navigate to the Reference folder.
- Expand the Reference List and then the module folder that contains the REST object.
- Right-click the object folder then click Select.
All the Request Body definitions are selected. Alternatively, expand the folder and select the required definitions. - Navigate to the Windows folder and expand the module folder that contains the REST object.
- Expand the REST object folder and select the required window. Do not include dependent objects.
- On the Actions list, click Export Selected Items, then save the file.
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.
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:
- In the target system, open the Design Transfer component and select the Import option.
- On the Actions list, click Open Import File and select file 1 that you created above.
- For the Referenced object missing warning, select Leave value not set, then click Import.
The file loads and the REST Body object is created. - Click OK.
- 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. - For all the Object conflict in system warnings, select the Do not create new… option.
- For the Referenced object missing warning, select Leave value not set.
- Click Import.
The window selected for the main REST object is created and the selected REST Body reference list entries are populated. - 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:
- In Object Designer, open the REST object.
- Display the REST Web Services settings on the object and add the connection details, then save the changes.
- In Window Manager, navigate to the module then the REST object and right-click the window and select Make available in Web Access.
- Right click the Request Body object and create a suitable window for the reference list.
- In the Administration component, expand the Reference Lists tree:
- 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.