AEM: How to check the REST API connection

Introduction

Since the AEM connector uses a large number of REST API methods in its core functioning, checking the REST API connection should be one of your preliminary steps for troubleshooting issues related to submitting project jobs to XTM Cloud or returning translated content to the AEM instance. In the Project overview, after performing a particular action on the project itself, e.g. starting a particular job, one of the UI errors that the user might experience at that point looks like this:

The error message above might be due to an invalid REST API connection.


Guidelines

To check the REST API connection, follow the guidelines below:

  1. In the AEM instance, go to Adobe Experience Manager → Tools → Cloud ServicesTranslation Cloud Services.

  1. Next, go to conf → (choose the configuration that you are using) → XTM Connector(select the configuration), and then click Edit.

  1. Let’s look at the URL bar. You must extract two components:

  • Your Base_AEM_URL → (example: https://aem-support.xtm-intl.com);

  • Your PATH_TO_CONFIGURATION → (example: conf/we-retail/settings/cloudconfigs/translation/xtm/xtm-conf-sajzik).

  1. Now, depending on your current version of the AEM connector, the whole URL will look different:

  • [Base_AEM_URL]/services/xtm/rest-connection-test?xtmConfPath=[PATH_TO_CONFIGURATION] → for XTM Connector versions lower than 2.4.1;

  • [Base_AEM_URL]/services/xtm/rest-connection-test?configurationPath=[PATH_TO_CONFIGURATION] → for XTM Connector versions 2.4.1 and higher.

Themodel URL looks like this:

https://aem-support.xtm-intl.com/services/xtm/rest-connection-test?configurationPath=/conf/we-retail/settings/cloudconfigs/translation/xtm/xtm-conf-sajzik
  1. Once you enter a newly-created URL in a separate tab, the following message is displayed, confirming that your REST API connection is correct:

If the connection fails, this might be for many reasons. The most possible cause is the existence of any middleware that is blocking otherwise seamless flow of REST API requests between AEM and XTM Cloud instances. Regardless, create a suitable ticket for the XTM International Support team in such a case and provide necessary details.