API
The Labii API widget is a powerful tool that allows users to seamlessly connect to various APIs and execute API calls with ease.
Specs
Version
2.0.0 (updated on 2024-10-04)
Developer
Labii Inc.
Type
Column
Support Configuration
Yes
Support Readonly view
Yes
Support Edit view
Yes
Support Form view
Yes
Support Default value
Yes
Support Import
Yes
Allow multiple
Yes
Overview
The Labii API widget is a powerful tool that allows users to seamlessly connect to various APIs and execute API calls with ease. Its flexibility enables users to customize essential elements such as headers, request bodies, and pre-request scripts for preparing POST data. Additionally, the widget supports post-response scripts, allowing users to efficiently update and manage data based on the responses received. With Labii, integrating and interacting with APIs becomes streamlined and highly customizable, catering to diverse application needs.
Use case
Integrate with Quickbooks API to create invoices.
Pull down chemical structures based on chemical name.
Configuration
To enable the widget's functionality, it requires the following configuration.
Authorization Information
Bearer Token - Bearer Token or any other authorization string. Bearer Tokens are the predominant type of access token used with OAuth 2.0. For example: Bearer eyJraWQiOiIy
OAuth 2.0 Provider - If your API requires OAuth 2.0 for authorization, please select one of the available providers. If you’re interested in a provider that isn’t listed, feel free to contact us by create a support ticket.
Refresh Token - The refresh token is used to obtain a new access token when the current access token becomes invalid or expires. It will be used only when the OAuth 2.0 provider is selected.
API Call Methods - The methods to call the API. Each method displays a button to call the API. The button text and icon can be customized.
Name - Name of the method. It is the text to display for the button. The name have to be unique.
Icon - The icon for the method.
Method
Get
Post
Patch
Delete
URL - The request URL.
Headers - The headers to send with the request in JSON format. The Authorization header is automatically added if provided.
Query Params - The parameters to send with the request as query. e.g. id=1&name=labii
Body - The body to send with the request in the JSON format.
Pre Request Scripts - The script to run before the request is sent. Return data as the variables object so that it will be used in the body. Labii SDK is supported, learn more at https://docs.labii.com/api/sdk/sdk-javascript
Mapper - The mapper to map the data from the API response to the Labii data in the JSON format. The value is passed as 'data'. Field: Use the filed as the key. e.g. {'name': 'name'}. Column: Use the column id as the key. e.g. {'xxx': 'customer.name'}. Use nested key to access the nested object. e.g. {'name': 'name.first_name'}.
Post Response Scripts - The script to run after the response is received. The response data will be passed as 'data' object. Pass additional keys to the data object to be used in the mapper. Labii SDK is supported, learn more at https://docs.labii.com/api/sdk/sdk-javascript
Should use request proxy - If checked, the request will be sent through the Labii server. This is useful when the domain is blocked via CROS.
Should auto update when empty - If checked, this method will be executed when no data in current column.
Example
Views
See the interface of the widget in the following views.
Readonly view
A read-only interface displays buttons for each defined API method. Clicking a button triggers the associated API requests.
Edit view
The Edit view closely resembles the Text widget, allowing you to input specific text or an ID. Typically, this text or ID is recognized as the API object ID.
Form view
The form view is identical to the Edit view.
Data
Each widget in Labii stores data in a unique manner; refer below to understand how data from this widget is stored.
Data format
Any text data.
Default value
The Default Value field within the column allows you to specify the default value when a record is created.
Default value can be any text data.
Import value
The Import Value is the value you need to include in your Excel table for it to be imported into Labii.
Import value can be any text data.
Last updated