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
- On any page, click APIS. The list of the available APIs is displayed.
- Under Fusion HelloWorld OIDC, click the latest version: V1. The API documentation page is displayed.
- From the left sidebar, select an endpoint: GET hello.
- Click Try it. The request form opens, allowing you to read about and test the request with different parameter values.
- Enter a name:
world
. Thehello
GET request accepts a single parameter, called name. The value of this parameter is concatenated tohello
and returned in the response message. - (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.
- (Optional) Review the HTTP request filled in the corresponding text area.
- Click Send to send the request to the server. The response is returned in the Response content text area.
To test the protected resources of the HelloWorld API in the API Developer Portal
- On any page, click APIS. The list of the available APIs is displayed.
- Under Fusion HelloWorld OIDC, click the latest version: V1. The API documentation page is displayed.
- From the left sidebar, select an endpoint: GET HelloWithSecurity.
- Click Try it. The request form opens, allowing you to read about and test the request with different parameter values.
- 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.
- (Optional) Review the HTTP request filled in the corresponding text area.
- 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.
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.
- In Postman, select
GET
from the list of requests. - 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. - Click Params to get a form for adding the request’s parameters. For the hello
GET
request, the only parameter is name. - In the parameters table, enter the following on the first line:
- Key:
name
- Value:
world
- Key:
- 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
- Key:
- Click Send. The request is sent to the API Catalog.
- If successful, the request triggers the response displayed in the Body tab.