Import Services

   Journey Manager (JM) The transaction engine for the platform. |   System Manager / DevOps |  23.04This feature was updated in 23.04

Manager allows you to import services, which were previously exported. Use this functionality to:

  • Roll back one or several services.
  • Re-create one or several services in another Manager.
  • Promote services to another environment.

Manager runs a virus scanning service before an import file is processed, so the antivirus service must be properly configured and enabled. If a virus is detected, the import operation fails and a corresponding record is added to the Error Log.  |  23.04 This feature was introduced in 23.04

You can import a service using one of following options:

Import Using UI

To import a service:

  1. Select Services > All Services.
  2. Click Import.
    Manager import a service
  3. Click Choose File and choose a service archive ZIP file, which has been previously exported.
  4. Click Upload.
    Manager upload a service archive
  5. Select an organization from the Add to Organization dropdown list where you want to add the services to or use the organization already configured in the import archive file.
  6. Click Proceed To import.
  7. Review the Import Options as shown below:
    Manager review import options
  8. Select the Preserve Existing Services, so any services that already exist in the target environment will not be modified in any way. Only new to the target environment services will be imported.
  9. Note

    If you import a new version of a service, clear the Preserve Existing Services, then manually activate this service version and update the configurations that refer to the old version of the service to point to the new version.

  10. Select the Preserve Existing Service Connections, so any service connections that already exist in the target environment will not be modified in any way. Only new to the target environment service connections will be created.
  11. Select the Preserve Service Type Defaults, so none of the imported services will be promoted to be the default for their service types, regardless of their default status in the source environment. Otherwise, the service type default flag will be imported, and existing services may be denoted.
  12. Click Import to complete the process. The expected result page looks like this.
    Manager review the import results
  13. Select the Detail Messages tab to see more information about the import. This tab pops up open if the import operation has any issues you may need to check and resolve.
  14. Click Close and check the list of services to verify the imported services have been added.
Note

You can check the Audit Log and Error Log for successful and failed import operations respectively, whilst the Import Log shows all import operations.

To help you avoid enabling the Groovy Debug Logging option for a Groovy service or a function by mistake in a production environment, Manager checks if this option should be disabled on import. For more information, see the Production Mode option.  |  23.04 This feature was introduced in 23.04

Import Using SDK

The Journey Manager SDK Maven plugin provides the tm-sdk:archive-deploy goal to import a service.

Import Using API

The Journey Manager REST API provides the endpoint URL to import a service.

To call this REST API, you need:

HTTP Request
Both HTTP and HTTPS protocols are supported:
http(s)://<JM_SERVER>/manager/secure/rest/archive/v1/
Parameters

--header ‘Authorization: Basic <USE-NAME-AND-PASSWORD-BASE64-ENCODED>’ - an HTTP header containing 'username:password' encoded as Base64Base64 is a binary to a text encoding scheme that represents binary data in an American Standard Code for Information Interchange (ASCII) string format..

--form ‘archiveFile=@“/Users/my-service.zip”’ - a path to a form archive file to be imported.

--form ‘importOptions=“PRESERVE_DEFAULT_SERVICES,PRESERVE_EXISTING_SERVICES”’ - a comma-separated list of import options to perform. The option names are the same as described in the Import Using UI section but they use an underscore, for example, PRESERVE_DEFAULT_SERVICES for Preserve Existing Services.

Response
If successful, this operation returns the following response with a HTTP 200 OK status code.
Example
curl --location --request PUT ‘https://<JM_SERVER>/manager/secure/rest/archive/v1/’ \
--header ‘Authorization: Basic <USE-NAME-AND-PASSWORD-BASE64-ENCODED>’ \
--form ‘archiveFile=@“/Users/my-service.zip”’ \
--form ‘importOptions=“PRESERVE_DEFAULT_SERVICES,PRESERVE_EXISTING_SERVICES,PRESERVE_SERVICE_CONNECTIONS”’

Next, learn how to migrate services.