Onboard a REST data source

Data sources are key to building a project. In Xapix, you onboard REST and SOAP data sources using swagger files, schema URLs, the Xapix internal API and an HTTP method and address.

In the following steps, we first download the Quickstart OpenAPI 2.0 Swagger file and then using the Data Sources page we import this yaml file into our project. This onboards four data sources:

  • allVariants

  • findEnglineById

  • findModelById

  • findVariantById

Download the REST OpenAPI 2.0 Swagger file

Xapix has provided a demo file for use with this tutorial. Begin by downloading the following swagger file to a local drive, then continue with the next steps.

Import the REST OpenAPI 2.0 Swagger file

Let's import the REST OpenAPI 2.0 file. We do this using the Data Sources page. Currently, the project does not have any available data sources.

Data Sources page

On the Data Source page, a number of options are provided. We want to onboard a REST data source by importing the Quickstart OpenAPI 2.0 file.

Create a REST data source

Let's click REST Data Source and then on the resultant page, import the scheme file we uploaded previously.

Import the Swagger file

Once the import is successfully completed, a confirmation dialog appears. Any schema validation issues are provided.

Data sources successfully onbarded

The Data Sources page shows the new data sources you can use for the Quickstart tutorial.

New data sources

Step

Description

1

From the Home menu, click Data Sources.

2

From the Data Sources page, click REST Data Source.

3

Click the Import icon and browse to the swagger file we downloaded previously. Then import the file into your project by clicking Open.

4

Xapix validates the schema file and if no validation errors were identified, you should see the message "Schema was successfully imported".

5

The onboarded data sources now appear on the Data Source page.

Next step
Next step

To continue, see Create a REST endpoint.

See also: REST/SOAP Data Sources‚Äč