What is a Schema?
A schema refers to a structured framework or plan that outlines the organization or arrangement of a system or information. It is a formal specification that defines the valid elements and their relationships in web document. It provides a set of rules to which a web document must adhere.
This blog will explain how to make a Web URL structure using the IBM DevOps Test Integrations and APIs product.
Before ping into the schema, it is important to understand what an API is?
An API, or Application Programming Interface, is a set of rules and tools that allows different software applications to communicate with each other. It defines the methods and data formats that applications can use to exchange information.
This blog talks about using the Phonebook Rest API that comes with the IBM DevOps Test Virtualization Control Panel. If you have the Control Panel installed on your machine, you can use this API to learn more.
This Rest API is for Phonebook and has the URL: https://localhost:5443/RTCP/examples/phonebook/api
It uses the HTTPS protocol, meaning the connection is secure and uses port 5443. There are three ways of identifying a server on a network: IP address, fully qualified domain name, and network short name. In this example, localhost is a special short name commonly defined as the immediate machine you are using.
The method employed is GET. To verify the output, you can enter this URL in your browser. The same output should be displayed in your API tool as well:

Test Integrations and APIs Project
- Open the Test Integrations and APIs product and create a new project.
- In the logical view, create a HTTP Connection to set the transport of your API.
- In the physical view, double click on your created transport and set the hostname and port no as shown:

- As the API operates on a secured port and utilizes HTTPS, you need to enable the SSL option to ensure it functions over HTTPS.


- Go to logical view and create a service component for your services and add an operation.
- Double-click on the operation to open it. You will notice that there is no schema displayed in the Request/Reply field.

To create the schema, follow these instructions:
- Go to Schema Library and click on the drop down to add a new schema.

Add >> Web >> Web URL
- Provide the schema name and the base path, if any. Base path is /RTCP/examples/phonebook/
- Click on + icon to create the template for request/reply. Now, click on + icon to add the path segment:


Select "Literal" as the API endpoint is static. Click on Ok and save the schema.
- Go to Architecture School >> Logical View and open the operation again. Click on Browse in Request field and select the Template:


Click on Finish >> Save.
- Navigate to Test Factory and create a new Test.

- In the "Receive Reply" section, disable validation to eliminate the assertion option and obtain the correct verdict.

- Run the test and compare the values.


To know how to virtualize this web service, please refer to Virtualizing a web service with IBM DevOps Test Integration and APIs
In this way you can establish a web schema using the IBM DevOps Test Integrations and APIs. If you encounter any further issues, please submit a support case to the DevOps team.