# Lark aPaaS API Research Report
**Date:** 2025-12-09
**Subject:** Dashboard Component Creation via API
**Status:** CONFIRMED - No Public API Available
---
## Executive Summary
After comprehensive research across official documentation, GitHub repositories, and MCP tools, the finding is clear:
**Dashboard views and chart components CANNOT be created programmatically via the Lark/Feishu Open API.**
---
## Research Sources Consulted
### Official Documentation
- [Lark Developer Portal](https://open.larksuite.com/)
- [Feishu Open Platform](https://open.feishu.cn/)
- [Lark Base API Overview](https://open.larksuite.com/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/bitable-overview)
- [Add Charts to Dashboards](https://www.larksuite.com/hc/en-US/articles/069230317526-add-charts-to-dashboards)
### GitHub Repositories
- [Lark OpenAPI MCP](https://github.com/larksuite/lark-openapi-mcp)
- [Go SDK - chyroc/lark](https://github.com/chyroc/lark)
- [Awesome-BaseScript](https://github.com/ConnectAI-E/Awesome-BaseScript)
- [Lark Base Team](https://github.com/Lark-Base-Team)
---
## API Capabilities Analysis
### Bitable View API
**Endpoint:** POST /open-apis/bitable/v1/apps/:app_token/tables/:table_id/views
**Supported View Types:**
| Type | Support | Notes |
|------|---------|-------|
| grid | Yes | Table view |
| kanban | Yes | Board view |
| gallery | Yes | Card gallery |
| gantt | Yes | Timeline view |
| form | Yes | Form input |
| dashboard | **NO** | Not supported |
| calendar | **NO** | Not supported |
| chart | **NO** | Not supported |
### aPaaS Platform API
**App URL Pattern:** https://{tenant}.larksuite.com/app/{app_id}?mode=edit&pageId={page_id}
**Available APIs:**
- User task management
- Workflow automation
- Data object operations
- **NO** page component creation
- **NO** dashboard widget API
- **NO** chart configuration API
---
## Recommended Solution
### Manual Dashboard + API Data Management
**Time:** 5 minutes | **Difficulty:** Easy
1. Create dashboard view manually in Lark UI (once)
2. Use API to manage all data (records, tables)
3. Dashboard auto-updates when data changes
This is the most practical approach given API limitations.
---
## Conclusion
| Feature | API Support | Alternative |
|---------|-------------|-------------|
| Create Dashboard View | No | Manual UI |
| Add Chart to Dashboard | No | Manual UI |
| Configure Chart Settings | No | Manual UI |
| Read Dashboard Data | Yes | Base JS SDK |
| Manage Table Data | Yes | Bitable API |
| Auto-refresh Charts | Yes* | Via data updates |
**Recommendation:** Create the dashboard structure once manually, then use the API for all data operations. The dashboard will automatically reflect data changes.
---
## Alternative: Lark Block Framework
### Block Framework for Custom Widgets
While dashboard views cannot be created via API, Lark provides a **Block Framework** for creating custom interactive widgets that can be embedded in documents.
**Block Framework Capabilities:**
| Feature | Support | Implementation |
|---------|---------|----------------|
| Custom Chart Widgets | Yes | Creator API |
| Bitable Data Binding | Yes | tt.request() |
| Interactive UI | Yes | TTML templates |
| VChart Integration | Yes | @visactor/vchart |
| Multiple Chart Types | Yes | 7 types supported |
| Real-time Updates | Yes | Data polling |
### Implementation Overview
```typescript
import { createChartBlockCreator } from '@hypelab/lark-dashboard-sdk/block';
// Register Creator
const creator = createChartBlockCreator(LARK_API_KEY);
// Configure chart block
const chartConfig = {
chartType: 'line',
title: 'TikTok Views Over Time',
dataSource: {
appToken: 'xxx',
tableId: 'xxx',
fields: {
xAxis: 'Date',
yAxis: ['Views', 'Likes']
}
},
options: {
showLegend: true,
animation: true,
responsive: true
}
};
// In Lark environment
Creator(creator);
```
### Key Files
- **Implementation:** `/src/block/ChartBlockCreator.ts`
- **Types:** `/src/block/types.ts`
- **Template:** `/src/block/views/chart-block.ttml`
- **Config:** `/src/block/block.config.json`
- **Examples:** `/examples/chart-block-example.ts`
- **Guide:** `/docs/BLOCK_FRAMEWORK_GUIDE.md`
### Supported Chart Types
1. **Bar Chart** - Category comparisons
2. **Line Chart** - Trends over time
3. **Pie Chart** - Proportions
4. **Area Chart** - Cumulative trends
5. **Scatter Plot** - Correlations
6. **Funnel Chart** - Conversion flows
7. **Radar Chart** - Multi-variable analysis
### Use Cases
**TikTok Analytics Dashboard:**
```typescript
// Sentiment analysis chart
const sentimentChart = {
chartType: 'area',
dataSource: {
appToken: TIKTOK_APP_TOKEN,
tableId: TIKTOK_TABLE_ID,
fields: {
xAxis: 'Date',
yAxis: ['Positive', 'Neutral', 'Negative']
}
}
};
// Performance comparison
const performanceChart = {
chartType: 'bar',
dataSource: {
appToken: TIKTOK_APP_TOKEN,
tableId: TIKTOK_TABLE_ID,
fields: {
xAxis: 'Video Title',
yAxis: ['Views', 'Likes', 'Comments']
}
}
};
```
### Advantages
- **Embeddable:** Works in Docs, Wiki, Base
- **Interactive:** User configuration UI
- **Data-Driven:** Real-time Bitable integration
- **Reusable:** Create once, use anywhere
- **Professional:** VChart rendering engine
### Limitations
- Requires manual embedding in documents
- Not a full dashboard replacement
- Limited to document context
- Requires Lark enterprise features
### Documentation
See comprehensive guide: `/docs/BLOCK_FRAMEWORK_GUIDE.md`
---
## NEW: Base Dashboard Custom Extensions
### Discovery (2025-12-09)
Base dashboards support **Custom Extensions** via service URLs. This provides a programmatic path to add custom chart widgets to dashboards.
### How It Works
1. **Navigate to Extensions**: In your Base dashboard, click "Add Extension"
2. **Select "Add Custom"**: Choose the custom extension option
3. **Enter Service URL**: Input your deployed block/widget service URL
4. **Authorize Access**: Grant necessary data permissions
### Extension Types Available
| Extension | Description | Programmatic? |
|-----------|-------------|---------------|
| Countdown | Time-based display | Yes (via service URL) |
| Map | Location visualization | Yes (via service URL) |
| Heatmap | Color-coded density | Yes (via service URL) |
| Milestone | Date tracking | Yes (via service URL) |
| **Custom** | Your chart widget | **Yes** |
### Integration Path
1. Build your chart widget using Block Framework
2. Deploy to hosting (Vercel, Cloudflare Workers)
3. Add as Custom Extension in Base dashboard
4. Widget receives data from Bitable automatically
### Reference Documentation
- [Use Extensions in Base Dashboards](https://www.larksuite.com/hc/en-US/articles/339421823770-use-extensions-in-base-dashboards)
- [Base View Extensions Guide](https://open.larksuite.com/document/uAjLw4CM/uYjL24iN/base-extensions/base-view-extensions)
---
*Research completed 2025-12-09*
*Block Framework added 2025-12-09*
*Custom Extensions discovery added 2025-12-09*