Test and Publish

A service can have multiple endpoints and each endpoint can have multiple paths. For full coverage, be sure to test all paths. The Hello world of Services tutorial has one endpoint with one path.

You can test a path by copying the URL and modifying it to add authorization and any required parameters. However, it's easier to test in a tool such as Postman. The steps below use Postman as an example. If you don't have a Postman account, you can create one for free.

First, change the Service status to Testing. In APIM 3.0, with the tutorial Service open:

  1. At the top of the screen, click Unpublished, select Testing, and confirm your choice.
  2. Scroll down to the get-message path.
  3. Click the clipboard to copy the URL:
    Copy the path URL

Save the path URL to test in Postman.

Test in Postman

To test the tutorial endpoint:

  1. In the Postman workspace, click New and select HTTP.

    The API dialog opens an Untitled Request with the GET method selected.

  2. Click the Authorization tab.
  3. From the Auth Type field, select Basic Auth.
  4. Enter your SnapLogic user name and password.
  5. In Postman, paste the path URL in the GET field and click Send.
    A successful request returns the following message. If you get an error, check the Troubleshooting section.
    Successful response

Next, publish the Hello World Service to DeveloperHub.

Publish to DeveloperHub

Follow these steps to publish and view the tutorial Service:

  1. With the Hello World Service open, click Testing select one of the Published statuses, and confirm your choice.
  2. From the left navigation pane, open Site Manager.
  3. Click View Site. The View Site button displays when all changes have been published.
    The Service catalog includes the tutorial service with a placeholder image. The card contains the Service name, the Service description, and the version number:
    Published Service card

  4. Click the card to view the Service details and click GET/get-message to expand the path details. You can view where the descriptions display:
    Service details

Troubleshooting

If you encounter issues testing or publishing, check the following:

  • Make sure there are no errors reported in the Service.
  • Make sure the Service status is correct:
    • To test, the Service status must be Testing.
    • To publish, the Service status must be one of Private, Restricted, or Public.
  • Check the Snaplex selected in the Service to make sure it is up.
  • Check to make sure that you added your username and password in Postman correctly.

What's next?

Choose the next step on your learning path: