Importing from openAPI 3.0 specs
The Open API specification is an API description format for the REST APIs. It enables APIs to define their own structure. The API specification is easy and can be written in JSON or YAML. With the Open APIs specification file, you can get all the available endpoints and all the operations available for the endpoints, the input and output parameters, and authentication methods.
With DronaHQ you can add any of your Open API docs and auto-create APIs. It thus makes it easy to add services from third-party SaaS products.
Configuring REST API connector
If you already have the REST API connector, proceed with importing the API; otherwise, check out how to configure API docs here.
Import API
Under the Custom API connectors
you can see your Connector. If you click the … (More Options)
you can see the Import API
option.
With this, you can import the Open API 3.0 document which is a valid JSON file for the respective API.
Click File Upload
and select the JSON file
from its location.
So once the JSON file
is uploaded you can choose from the APIs available in the document that you want to use in your DronaHQ
apps to enhance their functionality.
Click Select All
, to select all the API
or you can individually select the APIs that you need. You can see the descriptions for each of the API if it is provided in the document. The APIs would be listed out as per the name specified in the document.
Click Import
to import the selected APIs.
Now if you go to Connectors, you can see the REST API
that you added with all the APIs that you selected.
Configure dynamic parameters
If you have any dynamic parameters you can Edit the API and make the necessary changes and updates. Let us take the example of the Petstore from above to get records based on the Status. In this example, we would like to get the Status as input from a Dropdown control. So when you configure your Connector query to Find data by Status in this case, you would need to pass a variable as a query string parameter. It needs to be enabled before so that it can be passed dynamically during run time.
Connecting the Connector to Data Query
Bind the connector to the Data Query and configure essential dynamic parameters using controls, variables, keywords, or static values.
Refresh Response
At times the JSON specification file does not have an API response schema. In such a scenario you can use the Refresh Response which might then help you to fetch the response and generate the keys to bind data.
The Refresh Response eliminates the need to create keys using any function. You can fetch and display data from the API using the control like a table grid control.
Bind to controls
After creating the variable, you can bind the Data Query to any control. For example, you can bind it to a table grid control.
With Import API you have now the flexibility to choose your SaaS service and quickly connect to further enhance the functionality of your Apps.