Test the APIs - HelloWorld!

Test the API in the Portal

Finastra API Catalog uses a Swagger UI to let you interact with the API’s resources directly from the portal.

The API Catalog allows you to expose and consume API resources that are accessible either publicly, or protected behind an authentication layer. The solution of choice for this layer is OIDC.

To test the public resources of the HelloWorld API in the API Developer Portal
  1. On any page, click APIS. The list of the available APIs is displayed.
  2. Under Fusion HelloWorld OIDC, click the latest version: V1. The API documentation page is displayed.
  3. From the left sidebar, select an endpoint: GET hello.
  4. Click Try it. The request form opens, allowing you to read about and test the request with different parameter values.
Fig. 6: Select an operation from the sidebar of an API.

Fig. 6: Select an operation from the sidebar of an API.

  1. Enter a name: world. The hello GET request accepts a single parameter, called name. The value of this parameter is concatenated to hello and returned in the response message.
  2. (Optional) The request header Ocp-Apim-Subscription-Key, that is mandatory, is filled in with your API subscription key. Click to toggle the display of the key. By default it is hidden.
  3. (Optional) Review the HTTP request filled in the corresponding text area.
Fig. 7: The request parameters of the hello endpoint exposed by the Fusion HelloWorld OIDC API.

Fig. 7: The request parameters of the hello endpoint exposed by the Fusion HelloWorld OIDC API.

  1. Click Send to send the request to the server. The response is returned in the Response content text area.
Fig. 8: An example of a successful request sent to the hello endpoint of the Fusion HelloWorld OIDC API.

Fig. 8: An example of a successful request sent to the hello endpoint of the Fusion HelloWorld OIDC API.

To test the protected resources of the HelloWorld API in the API Developer Portal
  1. On any page, click APIS. The list of the available APIs is displayed.
  2. Under Fusion HelloWorld OIDC, click the latest version: V1. The API documentation page is displayed.
  3. From the left sidebar, select an endpoint: GET HelloWithSecurity.
  4. Click Try it. The request form opens, allowing you to read about and test the request with different parameter values.
  5. From the Authorization section, under Fusion Fabric Developer portal, select Authorization code. If you are not logged into the API Developer Portal, you are prompted to log in now. This is necessary to get an authorization token that is added to the headers of the request. After you successfully log into the API Developer Portal, the Authorization header is automatically added to the Headers section of the page.
Fig. 9: The request parameters of the protected HelloWithSecurity endpoint exposed by the Fusion HelloWorld OIDC API.

Fig. 9: The request parameters of the protected HelloWithSecurity endpoint exposed by the Fusion HelloWorld OIDC API.

  1. (Optional) Review the HTTP request filled in the corresponding text area.
  2. Click Send to send the request to the server. The response is returned in the Response content text area. In this case, the response message contains the concatenation of the strings “Hello” and your API Developer Portal username.
Fig. 10: An example of a successful request sent to the protected HelloWithSecurity endpoint of the Fusion HelloWorld OIDC API.

Fig. 10: An example of a successful request sent to the protected HelloWithSecurity endpoint of the Fusion HelloWorld OIDC API.

Test Outside the Portal

Alternatively, you can use external tools, such as Postman, or your custom application. You have code samples automatically generated for all exposed endpoints of any API available in the portal.

To test the HelloWorld API with Postman

You must download and install Postman on your computer. Follow the instructions from the Postman website.

  1. In Postman, select GET from the list of requests.
  2. In the Enter request URL field, enter the hello GET request URL: https://api.sandbox.fusionfabric.cloud/HelloWorld/V1/hello. You find the URL in the API Catalog.
  3. Click Params to get a form for adding the request’s parameters. For the hello GET request, the only parameter is name.
  4. In the parameters table, enter the following on the first line:
    • Key: name
    • Value: world
  5. Click the Headers tab and enter the following header on the first line of the headers table:
    • Key: Ocp-Apim-Subscription-Key
    • Value: <your_api_subscription_key> - for details, see the previous section
  6. Click Send. The request is sent to the API Catalog.
Fig. 11: The HTTP request parameters of the hello endpoint exposed by the Fusion HelloWorld OIDC API, in Postman.

Fig. 11: The HTTP request parameters of the hello endpoint exposed by the Fusion HelloWorld OIDC API, in Postman.

  1. If successful, the request triggers the response displayed in the Body tab.
Fig. 12: An example of a successful HTTP request sent to the hello endpoint of the Fusion HelloWorld OIDC API, in Postman.

Fig. 12: An example of a successful HTTP request sent to the hello endpoint of the Fusion HelloWorld OIDC API, in Postman.