Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Since version 3.1.0-KickOff, Ontologies have been referred to as "Entities" in the Control Panel. This does not alter any functionality; the nomenclature has simply been changed for a better understanding of the concept.

User Interface: 5.3.1-Ultimate

Introduction

This type of Entity is created from a REST API, either external to Onesait Platform or from the Platform itself. In the first case, the data will not be stored in the Platform, but all operations on these Entities will be derived from the REST API.

Steps

Create the Entity

From the Control Panel, navigate to the Development > My Entities menu.

This will take us to the list of available Entities. To create the Entity, click on the "+" button at the top right of the screen.

From the different Entities that we are going to be able to create, we will select "Creation from a REST API":

image-20240227-122059.png

Fill in general information

This will open the Entity creation wizard, where as with the rest of the Entities we will have to enter some basic information:

image-20240227-122255.png
  • Identification: the unique name to identify the Entity.

  • Meta-Information: tags to characterize the Entity, which will be used for filtering when searching.

  • Description: extended descriptive text of the Entity, such as its use, properties, characteristics, etc.

  • Base URL: address of the REST API service we are going to work with. An example URL would be the following:

https://dog.ceo/api/breeds/list/

In addition, we have the options to characterize the Entities:

  • Active: so that the Entity works or is blocked.

  • Public entity: if we want the Entity to be public, or if we want it to be private.

  • Allows encryption of fields: allows the use of encrypted fields.

  • ContextData Enable: if we want the Entity to register internally the writing and management changes.

Once all this information is filled in, click on the "Continue" button to finish configuring the Entity.

image-20240227-130712.png

 

Configure the headers

If the API REST service requires authorization to use it, either basic or by API Key, we can configure it in this section. To do this we must activate the "Enable Authentication" option.

image-20240227-130900.png

We will fill in the data that we need in each case. For our example we will not use authentication, so we can leave the option disabled.

In case we need to use some other type of header, we can define them in the following section:

image-20240227-131333.png

Add available operations

There are two options for adding operations to the REST API; import them from the REST API service Swagger, or add them by hand.

Import operations from Swagger

In this case, we will add the URL of the REST API Swagger to import the available operations:

image-20240227-134035.png

Define the operations by hand

If a Swagger is not available, or if we are not interested in having all the operations but in defining the ones we are interested in, we can create them by hand.

image-20240227-134324.png

For the Dog API URL, we will add an operation with the following fields:

  • Name: the name with which we will identify the operation. In this case: "getAll".

  • Path: the path of the operation to be executed. In this case "all" (more information).

  • Type: the type of operation we are going to create. In this case "GET".

  • Description: a small text describing the operation to be created. Here we will enter any description that seems to us of interest.

  • Default Operation Type: the type of operation to be carried out.

POST Operations

In order to be able to perform POST operations, the target schema must be defined so that write operations can be performed.

This schema will be defined in the "Schema" section:

image-20240227-134649.png

Once this last step is completed, we will finalize the creation of the Entity by clicking on the "Create" button:

image-20240227-135019.png

Cheking data

Once the Entity has been created, we will be able to query its content from the query tool found in Tools > Query Tool.

image-20240227-135149.png

There, we will select the Entity that we have just created and we will be able to see the content that we would see in case of launching the API REST service:

image-20240227-135525.png

  • No labels