Skip to main content

API V3 Specification

API V3 follows RESTful design principles. URLs are resource-oriented, HTTP methods indicate the intended operation, and data is exchanged in JSON format.


1. API Components

A complete API request consists of five parts: HTTP method, request URL, authentication, request parameters, and response.

1.1 HTTP Methods

HTTP methods specify the operation to perform on a resource.

MethodPurposeDescriptionExample
GETRetrieveRetrieves a single resource or a list of resources without modifying themGet application details, get record details, get logs
POSTCreateCreates a new resource. The server assigns the resource ID. Also used for complex query requestsCreate a worksheet, create a record, get a filtered record list
PUTReplaceReplaces an entire resource. Fields omitted from the request are cleared
PATCHUpdateUpdates only the specified fields while leaving all others unchangedUpdate a record, batch update records
DELETEDeleteDeletes the specified resourceDelete a worksheet, delete a record, batch delete

1.2 Request URL (Host + URL)

The request URL identifies the target resource. It consists of a Host and a resource path.

https://api.mingdao.com   +   /v3/app/worksheets/{worksheet_id}/rows
↑ Host (environment domain) ↑ URL (resource path)

1.3 Authentication

Authentication verifies the caller's identity and permissions. Credentials are passed in the request headers, and every request must include authentication information.

API V3 supports the following authentication methods:

MethodHeaderDescription
AppKey + SignHAP-Appkey, HAP-SignApplication key authentication. Created by an administrator and accesses data with application administrator permissions.
PATAuthorization: Bearer {{access_token}}, HAP-Appid (required for some APIs)Personal Access Token (PAT). Created by individual users and operates with the user's permissions. Supports configurable expiration and permission scopes.
OAuth 2.0Authorization: Bearer {{access_token}}, HAP-Appid (required for some APIs)User authorization through OAuth 2.0. Supports configurable permission scopes, short-lived access tokens, and automatic token refresh.

Comparison of authentication methods:

CategoryAppKey + SignPATOAuth 2.0
Created byAdministratorIndividual userIntegration developer
Operates asApplication administratorIndividual userAuthorized user
Token lifetimeLong-livedConfigurableShort-lived with automatic refresh
Typical use caseServer-side integrationsPersonal scripts or toolsThird-party application integrations

1.4 Request Parameters

Parameter locations vary depending on the HTTP method. API V3 supports three parameter types.

Path Parameters — Resource identifiers embedded in the URL. These are required.

/v3/app/worksheets/{worksheet_id}/rows/{row_id}
↑ Required: worksheet ID ↑ Required: record ID

Query Parameters — Appended after ? in the URL. Typically used by GET requests for simple query conditions.

GET /v3/app/worksheets/{worksheet_id}/rows/{row_id}?pageSize=50&pageIndex=1

Body Parameters — Sent in the request body (JSON format). Typically used by POST and PATCH requests for complex data.

{
"fields": [...],
"triggerWorkflow": true
}

1.5 Response

All API responses are returned in JSON format.

{
"success": true, // Indicates whether the request succeeded
"error_code": 1, // Error code. `1` indicates success
"error_msg": "string", // Error message
"data": {} // Business data, returned as an object or an array of objects
}

2. Environment Endpoints

EnvironmentHost
HAP SaaShttps://api.mingdao.com
HAP Server{private deployment host}/api (Example: https://p-demo.mingdaoyun.cn/api)

3. URL Naming Conventions

URLs are organized around resource hierarchies. The URL path identifies the target resource, while the HTTP method defines the operation.

3.1 Resource Hierarchy

Child resources are nested under their parent resources.

/v3/app                                          # Application (top-level resource)
/v3/app/worksheets # Worksheet collection (under application)
/v3/app/worksheets/{worksheet_id} # Single worksheet
/v3/app/worksheets/{worksheet_id}/rows # Record collection (under worksheet)
/v3/app/worksheets/{worksheet_id}/rows/{row_id} # Single record

3.2 CRUD Operations

The combination of the HTTP method and the resource path defines the operation.

GET    /v3/app/worksheets/{worksheet_id}/rows/list       # List records (use POST + /list for complex filters)
GET /v3/app/worksheets/{worksheet_id}/rows/{row_id} # Get record details
POST /v3/app/worksheets/{worksheet_id}/rows # Create a record
PATCH /v3/app/worksheets/{worksheet_id}/rows/{row_id} # Update a record
DELETE /v3/app/worksheets/{worksheet_id}/rows/{row_id} # Delete a record

3.3 Batch Operations

Batch operations use the collection path with the /batch suffix.

POST    /v3/app/worksheets/{worksheet_id}/rows/batch     # Batch create
PATCH /v3/app/worksheets/{worksheet_id}/rows/batch # Batch update
DELETE /v3/app/worksheets/{worksheet_id}/rows/batch # Batch delete

3.4 Specialized Operations

Specialized operations append a descriptive endpoint name using lowercase words or hyphen-separated names.

GET  /v3/app/worksheets/{worksheet_id}/rows/pivot                       # Pivot data
POST /v3/app/worksheets/{worksheet_id}/rows/{row_id}/share-link # Generate a share link
GET /v3/app/worksheets/{worksheet_id}/rows/{row_id}/logs # Operation logs
GET /v3/app/worksheets/{worksheet_id}/rows/{row_id}/discussions # Discussions
GET /v3/app/worksheets/{worksheet_id}/rows/{row_id}/relations/{field} # Related records

4. Parameter Naming Conventions

LocationNaming ConventionExample
Authentication headersHAP- prefixHAP-Appkey, HAP-Sign, HAP-Appid
Resource names in pathsLowercase words or hyphen-separatedapp, worksheets, share-link
Resource IDs in pathsSnake case enclosed in braces{worksheet_id}, {row_id}, {app_id}
Query parameters (GET)camelCasepageSize, pageIndex, responseFormat
Body parameters (POST/PATCH)camelCasetriggerWorkflow, rowIds, fields
Response fieldscamelCasetotal, pageIndex, pageSize
System fields_ prefix + camelCase_createdBy, _owner, _createdAt, _updatedAt

5. Input and Output Structure Conventions

The data field directly returns either an object or an array. Within nested objects, the unique identifier is consistently named id without resource-specific prefixes.

Example 1: Request Object

Within the fields array, the field name is simply name rather than fieldName.

{
"name": "New Product Catalog",
"sectionId": "",
"createDefaultView": false,
"fields": [
{
"name": "Product Name",
"alias": "",
"type": "2",
"required": true,
"isTitle": true
},
{
"name": "Category",
"alias": "",
"type": "11",
"options": [
{ "value": "Option 1", "index": 1 },
{ "value": "Option 2", "index": 2 }
],
"config": {
"isColorOptions": true
}
}
]
}

Example 2: data Returns an Array

Retrieve the worksheet list.

{
"success": true,
"error_code": 0,
"error_msg": "string",
"data": [
{
"id": "string",
"name": "string",
"remark": "string"
}
]
}

Example 3: data Returns Nested Objects

Retrieve a record list.

{
"success": true,
"error_code": 0,
"error_msg": "string",
"data": {
"rows": [
{
"id": "row123",
"fields": [
{
"id": "field1",
"value": "Sample Value",
"type": "2",
"controlName": "Text Field"
}
],
"_createdBy": {
"accountId": "user123",
"fullname": "John Smith"
},
"_owner": {
"accountId": "user123",
"fullname": "John Smith"
},
"_createdAt": "2024-03-25T15:52:58.000Z",
"_updatedAt": "2024-03-25T15:52:58.000Z",
"_updatedBy": {
"accountId": "user123",
"fullname": "John Smith"
}
}
],
"total": 100,
"pageIndex": 1,
"pageSize": 20
}
}

6. System Fields

System fields are maintained automatically by the platform. They all use the _ prefix and do not occupy the namespace for custom fields.

API V3 introduces more descriptive and semantic field names compared with API V2.

DescriptionV2 FieldV3 Field
Ownerownerid_owner
Created Bycaid_createdBy
Created Atctime_createdAt
Updated Atutime_updatedAt
Updated Byuaid_updatedBy
Process Namewfname_processName
Node Assigneeswfcuaids_nodeAssignees
Initiated Bywfcaid_initiatedBy
Initiated Atwfctime_initiatedAt
Node Started Atwfrtime_nodeStartedAt
Approval Completed Atwfcotime_approvalCompletedAt
Due Atwfdtime_dueAt
Remaining Timewfftime_remainingTime
Process Statuswfstatus_processStatus

7. API Reference

Users

APIMethodURL
Get User's Organization ListGET/v3/orgs/list
Get Current User InfoGET/v3/users/me

Application Management

APIMethodURL
Get Application ListGET/v3/apps/list
Create ApplicationPOST/v3/apps
Get Application InfoGET/v3/app
Create Application Item GroupPOST/v3/app/sections/batch
Batch Create Application ItemsPOST/v3/app/items/batch
Update ApplicationPOST/v3/app
Delete ApplicationDELETE/v3/app

Worksheets

APIMethodURL
Get Worksheet ListPOST/v3/app/worksheets/list
Create WorksheetPOST/v3/app/worksheets
Get Worksheet SchemaGET/v3/app/worksheets/{worksheet_id}
Update Worksheet SchemaPOST/v3/app/worksheets/{worksheet_id}/structure
Delete WorksheetDELETE/v3/app/worksheets/{worksheet_id}

Records

APIMethodURL
Get Record ListPOST/v3/app/worksheets/{worksheet_id}/rows/list
Get Record DetailsGET/v3/app/worksheets/{worksheet_id}/rows/{row_id}
Create RecordPOST/v3/app/worksheets/{worksheet_id}/rows
Update RecordPATCH/v3/app/worksheets/{worksheet_id}/rows/{row_id}
Delete RecordDELETE/v3/app/worksheets/{worksheet_id}/rows/{row_id}
Batch Create RecordsPOST/v3/app/worksheets/{worksheet_id}/rows/batch
Batch Update RecordsPATCH/v3/app/worksheets/{worksheet_id}/rows/batch
Batch Delete RecordsDELETE/v3/app/worksheets/{worksheet_id}/rows/batch
Get Related RecordsGET/v3/app/worksheets/{worksheet_id}/rows/{row_id}/relations/{field}
Get Record Pivot DataPOST/v3/app/worksheets/{worksheet_id}/rows/pivot
Generate Record Share LinkPOST/v3/app/worksheets/{worksheet_id}/rows/{row_id}/share-link
Get Record LogsGET/v3/app/worksheets/{worksheet_id}/rows/{row_id}/logs
Get Record DiscussionsGET/v3/app/worksheets/{worksheet_id}/rows/{row_id}/discussions

Views

APIMethodURL
Batch Create ViewsPOST/v3/app/worksheets/{worksheet_id}/views/batch

Charts

APIMethodURL
Create ChartPOST/v3/app/worksheets/{worksheet_id}/charts

Custom Pages

APIMethodURL
Update Custom PagePUT/v3/app/custom-pages/{page_id}

Workflows

APIMethodURL
Get Triggered Workflow ListGET/v3/app/workflow/processes
Get Triggered Workflow DetailsGET/v3/app/workflow/processes/{process_id}
Trigger WorkflowPOST/v3/app/workflow/hooks/{process_id}
Create WorkflowPOST/v3/app/workflows
Batch Create Workflow NodesPOST/v3/app/workflows/{workflow_id}/nodes/batch
Delete Workflow NodeDELETE/v3/app/workflows/{workflow_id}/nodes/{node_id}
Delete WorkflowDELETE/v3/app/workflows/{workflow_id}
Get Workflow SchemaGET/v3/app/workflows/{workflow_id}
Validate WorkflowPOST/v3/app/workflows/{workflow_id}/validate
Publish WorkflowPOST/v3/app/workflows/{workflow_id}/publish

Workflow To-dos

APIMethodURL
Get User's Workflow To-do ListGET/v3/app/workflow/instance/list
Get Approval To-do DetailsGET/v3/app/workflow/instance/{instance_id}
Batch ApprovePOST/v3/app/workflow/instance/batch
Revoke WorkflowPOST/v3/app/workflow/instance/{instance_id}/revoke
Return WorkflowPOST/v3/app/workflow/instance/{instance_id}/return
Terminate WorkflowPOST/v3/app/workflow/instance/{instance_id}/terminate
Nudge WorkflowPOST/v3/app/workflow/instance/{instance_id}/urge

ChatBots

APIMethodURL
Create ChatBotPOST/v3/app/chatbots

Roles

APIMethodURL
Get Role ListGET/v3/app/roles
Create RolePOST/v3/app/roles
Get Role DetailsGET/v3/app/roles/{role_id}
Delete RoleDELETE/v3/app/roles/{role_id}
Add Role MembersPOST/v3/app/roles/{role_id}/members
Remove Role MembersDELETE/v3/app/roles/{role_id}/members
Remove User from All RolesDELETE/v3/app/roles/users/{user_id}

Vector Knowledge Bases

APIMethodURL
List Vector Knowledge BasesPOST/v3/app/knowledge/list
Search Vector Knowledge BasePOST/v3/app/knowledge/search

Organizations

APIMethodURL
Lookup DepartmentsGET/v3/departments/lookup
Lookup RegionsGET/v3/regions/lookup

Others

APIMethodURL
Lookup Orgnization UsersGET/v3/users/lookup
List Option SetsGET/v3/app/optionsets
Create Option SetPOST/v3/app/optionsets
Update Option SetPUT/v3/app/optionsets/{optionset_id}
Delete Option SetDELETE/v3/app/optionsets/{optionset_id}

Error Codes

General Error Codes

Error CodeDescription
0Request failed
1Success
51Request rate limited
10000Access denied. IP address is restricted.
10001Invalid request parameters
10002Invalid parameter value
10005Insufficient permission to perform this operation
10006Data already exists
10007Data does not exist or has been deleted
10101Token not found
10102Invalid signature
10105User access token has expired or is invalid
10106User organization access token is restricted
100005Duplicate field value
100006Option limit exceeded
100007Attachment limit exceeded
430013Worksheet not found in the application
430014Insufficient field permissions for the worksheet
430017Application attachment uploads quota exceeded
430018Draft record limit exceeded
430019Required field is empty
430020Invalid subform data
430021Data does not satisfy business rules
430022Worksheet not found
90000Request limit exceeded
99999Data operation failed

OAuth Error Codes

CategoryError CodeError MessageDescription
Token & Authorization600100Access token is invalid or has expiredThe access token does not exist, has expired, or has an invalid signature.
Token & Authorization600101Authorization has expired. Please authorize again.The authorization has been revoked, or the requested scope has changed and reauthorization is required.
Token & Authorization600102Refresh token is invalid or has expiredThe refresh token has expired, been revoked, or can no longer be used.
Token & Authorization600103Refresh token cannot be used to obtain a new access tokenThe authorization has been revoked, or the application is no longer available.
Token & Authorization600104Authorization not foundThe specified authorization relationship does not exist.
Application Status600300Integration application has been disabledThe integration application is in the Disabled state.
Application Status600302Integration application is unavailableThe application is unavailable due to an abnormal application state.
Scope & Permissions600311Invalid scope requestedThe requested scope is not configured or does not exist.
Scope & Permissions600312Permissions have changed. Please authorize again.The application's scope has changed and requires reauthorization.
User Permissions600320The current user does not have permission to perform this operationThe token is valid, but the user does not have permission to access the requested resource (for example, the user is not a member of the organization, project, or workspace, or lacks the required role, row-level, or field-level permissions).
Authorization Flow600000Invalid authorization request parametersInvalid parameters were provided to the authorization or token request.
Authorization Flow600001redirect_uri does not matchThe callback URL does not match the configured redirect URI.
Authorization Flow600002Authorization code is invalid or has already been usedThe authorization code does not exist, has expired, or has already been consumed.
Authorization Flow600003Authorization request was canceledThe user canceled the authorization request.
Authorization Flow600004State validation failedThe state parameter validation failed.
Client Credentials600112Invalid client credentialsThe client_id or client_secret is incorrect.
Client Credentials600113Client IP address is not whitelistedThe client IP address is not included in the configured IP whitelist.

Was this document helpful?