API
Overview
● API (Application Programming Interface)
● Provides an easy way to integrate data from your business (app) with any external system
● You only need to call the API in the specified format to obtain the corresponding information
● The API strictly follows REST semantics, uses JSON to encode objects, and relies on standard HTTP codes to indicate the operation results
The API request method
● What is a request: To call the API interface, it must be transmitted through the URL address. A request happens whenever the URL is opened, and refreshing the URL is another request
● How to request the API interface: open the URL of the access interface. A URL requires several components when requested:
1. API interface address
The address of the API interface service for external access
Request method:
The common ones are GET, POST, and other methods.
For GET requests, all parameters are passed after the URL by concatenation.
For POST requests, the request's body must be in JSON format, and the Content-Type of the HTTP header needs to be set to application/JSON.
Request parameters:
The API interface will process the corresponding data according to your provided parameters.
Authorization verification method:
When making requests to the API, your request needs to be authenticated. Including Appkey/Secretkey and Sign. API service providers will provide you with these sets of information.
Header:
The header information that needs to be passed during the request is a system-level parameter. Usually, we don't need configuration. If configuration is required, the API will specify it.
Body:
It is used to store the passed data. It needs to be configured only when the request method is POST and is used to store form information, and some authorization verification parameters can also be stored here.
For example: Add form data to a third-party system through the API interface, and the form's field names and values will be stored in BODY.
To sum up, we need the following three parts to call the API interface:
- the API URL address
- Parameters to pass
- Authorization to verify identity
2. Platform-supported modes
Basic module
Interface contents include:
● Account
● Login/Authentication
● Notifications
Applications
Worksheets
- Get worksheet structure information GET
Application (App) permission groups
- Create app permission group POST
- Get app permission group GET
- Delete app permission group DELETE
- Edit app permission group PUT
- Copy app permission group POST
Option sets
- Create an option set POST
- Get option set GET
- Edit option set PUT
API interface documentation
Enter the application, and click […] - [Application Management] - [API Documentation].
Field and control type comparison table
Control ID: ID generated automatically and cannot be changed. When writing data through the API, the control ID must be used to represent the control
Field name: the name set by the user for the field
Description: If the flag is read-only, writing and updating is not supported
Data API
We provide different interfaces to meet all scenarios of data operation:
● Get list GET
● Create row record POST
● Query row record GET
● Edit row record PUT
● Delete row record DELETE
● Batch update record POST
● Batch delete records DELETE
For example, we need to create a new row of records, that is, add a row of records to the worksheet through the API
Rules
● Request URL: https://lancode.com/worksheet/api/v1/open/worksheets/{worksheetId}/records
● Parameters appkey, sign, worksheetld, and fields can directly reuse the values provided on the right