The PublicEchoAPI_Stringer can now be consumed. You are going to test if your API is invokable. Testing is done in the API Developer Portal, but you have easy access from within API Management.

Testing API Access and Policy Functionality

Open tab Overview of the API details page. In section API Endpoint click Try! 

In section Curl you can see the actual call.

In the Response body section, you can see the actual response of the service. The call returned the string Hello World! along with the current timestamp.

Now you know that the PublicEchoAPI is invokable. Next, you are going to test if the Ignored Resources Policy is applied correctly.

As configured in tutorial step 3, consumers of the API should not be able to execute POST requests on resource /HelloWorld.

Open method POST /HelloWorld. Enter a value for the required paramter aString , e.g. Testing tutorial 1.

Click Execute.


In section Server response an error is displayed:

  • type: "NotFound"
  • responseCode: 404
  • message: "Requested path \"/HelloWorld\" has been ignored."

The API can be consumed as intended.

You now can inform David that the API is published and ready to use.


Consuming the API

Now that the PublicEchoAPI has been published, David Stringer wants to test if it is visible to all visitors of the API Developer Portal and can be used by everyone.

Open the API Developer Portal of your PAS installation and make sure that you are not logged in with your PAS user.

Recommendation: Open the portal in an ingocnito window of your current browser or open it in a different browser.

In the Marketplace, search for your PublicEchoAPI_Stringer

Click Learn more.

The API details view opens.

Click API Documentation to open the test UI.

Try to execute a POST request.

Enter the required parameter and click Execute.

Check the response.

The API works if the string has been passed but the Response body shows the 404 NotFound error.

From the details view, you can directly copy the Public Endpoint to consume the API.

Once you have published a public API it is available online and can be consumed by everyone.
If you have tried this tutorial on your own system, we therefore recommend that you disable or delete the created API afterwards if the customer system is accessible to the public. If you want to follow our recommendation, see Managing a Public API Disabling the API.