Skip to main content
Skip table of contents

Testing the APIs Using Dev Portal Or Postman

We are committed to make our API testing easy and reliable for everyone; and we believe in making our APIs available for testing by you. That is why we are glad that you have taken the first step towards testing our APIs.

Below are the two ways to test our APIs:

Dev Portal

Postman environment

Either ways, you get to see the same functionality .

Pre-requisites

Our APIs are secured by WSO2 API manager and can be accessed only through a subscription. The subscriptions will be provided by UBS.

Upon subscribing to an API, you will be furnished with a bearer token for authorization. This bearer token has to be passed in every request as a header attribute.

Testing in Dev Portal

  1. Open the Dev portal link and provide your credentials to Sign in.

image-20250127-131637.png
  1. Click Try it Out in the menu bar.

    image-20250127-131706.png
  2. All the supported Resources are listed here. Choose any one resource to try.

Sample test is shown for the below.

  1. Create a Customer

  2. Search for a customer using filter options

Create a Customer

  1. Click Customers resource.

    image-20250127-131816.png

    Figure 1.3: Customer resource

  2. Click POST method.

image-20250127-131933.png

Figure 1.4: POST method

  1. Each method has a Model. Click Model and expand it to see the details.  

    • Follow the model when you are testing. Model gives you which of the fields are mandatory and what its data type as shown below.

image-20250127-132000.png

Figure 1.5: Expand Model

image-20250127-132030.png

Figure 1.6: Details of the model

  1. Click Try it out button.

image-20250127-132054.png

Figure 1.7: Try it Out

  1. Choose the Parameter Content type and Response content type —— application/json or application/xml. Both the content type should be same.

image-20250127-132117.png

Figure 1.8: Choose Parameter content type and Response content type

  1. Input the data as required and click Execute button.

image-20250127-132144.png

Figure 1.9: Create Customer

  1. The results can be seen in the response body.

    • If any error occurs during execution, it is displayed in the response body.

image-20250127-115436.png

Figure 1.10: Response body

You have successfully created a Customer!!

Next, lets try to fetch the customers list using filters.

Fetching Customer list using filters

  1. Click GET method of resource Customers .

image-20250127-132257.png

Figure 1.11: Get Customers

  1. The key points guides to retrieve the data using the filter options and conditions.

image-20250127-132320.png

Figure 1.12: Key Points

  1. Click Try it Out.

  2. Choose the Response content type —— application/json or application/xml.

  3. Search the Customers list using the filters.

For example: To search a customer whose Customer status is potential and customer type is Corporate, provide the filter as customerstatus= "potential" and customertype= "Corporate" .

image-20250127-132339.png

Figure 1.13: Filters

  1. The customer list will be listed in the response body based on the provided filter

image-20250127-132357.png

Figure 1.14: Retrieved customer list

You are done with fetching the customer list using filters!!

Similarly, you can test all the resources in Dev portal.

Testing in Postman environment

  1. Open Postman and provide the credentials to sign in.

  2. Select the workspace and click Create a request.

Sample test is shown for the below.

  1. Create a Customer

  2. Search for a Customer using filter

image-20250127-132432.png

Figure 2.1: Create a request

Create a Customer

  1. Select POST method from dropdown and provide the URL as shown below.

image-20250127-132643.png

Figure 2.2: POST method

  1. Click Authorization. Select the type as Bearer Token from dropdown and enter the bearer token.

    image-20250127-133902.png

    Figure 2.3: Authorization

  2. Go to Body, enable Raw, and select JSON from the text dropdown as shown in Figure 2.3.

  3. Input the data in the body and click Send button.

image-20250127-134027.png

Figure 2.4: Request body

  1. Result is displayed in the Body.

image-20250127-134448.png

Figure 2.5: Results displayed in the Body

Fetching Customer list using filters

  1. Click GET method from dropdown and enter the URL.

  2. Click Authorization, select the type as Bearer Token from dropdown, and enter the bearer token.

image-20250127-134631.png

Figure 2.6: Authorization

  1. Click Params, enter 'search' in the key column and provide the filter in the value column.

For example: To search a customer whose Customer status is potential and customer type is Corporate, provide the filter as customerstatus= "potential" and customertype= "Corporate" .

image-20250127-134850.png

Figure 2.7: Filters

  1. Retrieved data displays in the Body.

image-20250127-135344.png

Figure 2.8: Retrieved data in the Body

Similarly, you can test all other resources through Postman.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.