Tianji Analytics
Query any read-only data from the Tianji monitoring and analytics platform.
Configuration
Three values are required (provided via skill config):
| Variable |
Description |
TIANJI_BASE_URL |
Tianji instance URL (e.g. https://tianji.example.com) |
TIANJI_API_KEY |
API key for authentication |
TIANJI_WORKSPACE_ID |
Default workspace ID |
Making API Requests
All endpoints are under {TIANJI_BASE_URL}/open and require a Bearer token:
curl -H "Authorization: Bearer {TIANJI_API_KEY}" \
"{TIANJI_BASE_URL}/open/workspace/{TIANJI_WORKSPACE_ID}/website/all"
Only GET requests are allowed. All responses are JSON.
Service Domains
Find the exact endpoint and parameters in api-endpoints.md.
For full parameter schemas, consult openapi-readonly.json.
| Domain |
Endpoints |
Typical Questions |
| Website |
13 |
Traffic stats, pageviews, geo distribution, Lighthouse scores |
| Monitor |
9 |
Uptime status, recent check data, monitor events |
| Survey |
8 |
Survey responses, result stats, AI categories |
| Telemetry |
7 |
Custom event counts, telemetry pageviews, metrics |
| Billing |
7 |
Usage quotas, subscription tier, credit balance |
| Feed |
6 |
Feed channels, event streams, feed states |
| Application |
5 |
App store reviews, app info, event stats |
| AI/AIGateway |
5 |
Gateway logs, model pricing, quota alerts |
| Worker |
3 |
Worker list, worker details, revisions |
| Page |
2 |
Status pages |
| Workspace |
2 |
Members, service counts |
| Global |
1 |
Platform configuration |
| AuditLog |
1 |
Audit trail |
Workflow
- Identify the service domain from the user's question
- Read api-endpoints.md to find the endpoint
- Construct the GET request with required path/query parameters
- Parse the JSON response and summarize for the user
Common Scenarios
Website traffic overview
GET /open/workspace/{workspaceId}/website/all
Pick the target website ID, then:
GET /open/workspace/{workspaceId}/website/{websiteId}/stats?startAt={timestamp}&endAt={timestamp}
Monitor health check
GET /open/workspace/{workspaceId}/monitor/all
Pick the target monitor ID, then:
GET /open/workspace/{workspaceId}/monitor/{monitorId}/get
GET /open/workspace/{workspaceId}/monitor/{monitorId}/status
Survey results analysis
GET /open/workspace/{workspaceId}/survey/all
Pick the target survey ID, then:
GET /open/workspace/{workspaceId}/survey/{surveyId}/result/list?startAt={timestamp}&endAt={timestamp}&limit=50
GET /open/workspace/{workspaceId}/survey/{surveyId}/stats?startAt={timestamp}&endAt={timestamp}
Feed event inspection
GET /open/workspace/{workspaceId}/feed/channels
Pick the channel ID, then:
GET /open/workspace/{workspaceId}/feed/{channelId}/fetchEventsByCursor?limit=20
Sensitive Data Handling
Some GET endpoints may return fields containing platform-stored secrets (e.g. modelApiKey,
customModelBaseUrl in AI Gateway responses). Additionally, endpoints like workspace members,
audit logs, and billing may contain PII or internal details.
Rules:
- NEVER display
modelApiKey, apiKey, secret, token, password, or credential fields to the user
- Redact or omit these fields when summarizing API responses
- When querying workspace members or audit logs, only surface non-sensitive metadata (names, roles, timestamps) unless the user explicitly requests full detail
Notes
- Timestamps use milliseconds since epoch (e.g.
1704067200000 for 2024-01-01)
- Pagination: some endpoints use
cursor parameter; check the response for nextCursor
- The
type parameter in website metrics accepts: url, language, referrer, title, browser, os, device, country, event
1---
2name: tianji
3description: >
4 Query website analytics, monitor uptime, survey results, telemetry data,
5 feed events, application stats, and more from the Tianji platform via its
6 read-only OpenAPI (69 GET endpoints across 14 service domains).
7 Use when the user asks about website traffic, pageviews, monitor status,
8 survey feedback, telemetry events, feed channels, billing usage,
9 or any Tianji platform data.
10metadata:
11 source: https://skillmd.com/skills/modbender/tianji
12---
13
14# Tianji Analytics
15
16Query any read-only data from the Tianji monitoring and analytics platform.
17
18## Configuration
19
20Three values are required (provided via skill config):
21
22| Variable | Description |
23|----------|-------------|
24| `TIANJI_BASE_URL` | Tianji instance URL (e.g. `https://tianji.example.com`) |
25| `TIANJI_API_KEY` | API key for authentication |
26| `TIANJI_WORKSPACE_ID` | Default workspace ID |
27
28## Making API Requests
29
30All endpoints are under `{TIANJI_BASE_URL}/open` and require a Bearer token:
31
32```bash
33curl -H "Authorization: Bearer {TIANJI_API_KEY}" \
34 "{TIANJI_BASE_URL}/open/workspace/{TIANJI_WORKSPACE_ID}/website/all"
35```
36
37Only GET requests are allowed. All responses are JSON.
38
39## Service Domains
40
41Find the exact endpoint and parameters in [api-endpoints.md](references/api-endpoints.md).
42For full parameter schemas, consult [openapi-readonly.json](references/openapi-readonly.json).
43
44| Domain | Endpoints | Typical Questions |
45|--------|-----------|-------------------|
46| **Website** | 13 | Traffic stats, pageviews, geo distribution, Lighthouse scores |
47| **Monitor** | 9 | Uptime status, recent check data, monitor events |
48| **Survey** | 8 | Survey responses, result stats, AI categories |
49| **Telemetry** | 7 | Custom event counts, telemetry pageviews, metrics |
50| **Billing** | 7 | Usage quotas, subscription tier, credit balance |
51| **Feed** | 6 | Feed channels, event streams, feed states |
52| **Application** | 5 | App store reviews, app info, event stats |
53| **AI/AIGateway** | 5 | Gateway logs, model pricing, quota alerts |
54| **Worker** | 3 | Worker list, worker details, revisions |
55| **Page** | 2 | Status pages |
56| **Workspace** | 2 | Members, service counts |
57| **Global** | 1 | Platform configuration |
58| **AuditLog** | 1 | Audit trail |
59
60## Workflow
61
621. Identify the service domain from the user's question
632. Read [api-endpoints.md](references/api-endpoints.md) to find the endpoint
643. Construct the GET request with required path/query parameters
654. Parse the JSON response and summarize for the user
66
67## Common Scenarios
68
69### Website traffic overview
70
71```
72GET /open/workspace/{workspaceId}/website/all
73```
74Pick the target website ID, then:
75```
76GET /open/workspace/{workspaceId}/website/{websiteId}/stats?startAt={timestamp}&endAt={timestamp}
77```
78
79### Monitor health check
80
81```
82GET /open/workspace/{workspaceId}/monitor/all
83```
84Pick the target monitor ID, then:
85```
86GET /open/workspace/{workspaceId}/monitor/{monitorId}/get
87GET /open/workspace/{workspaceId}/monitor/{monitorId}/status
88```
89
90### Survey results analysis
91
92```
93GET /open/workspace/{workspaceId}/survey/all
94```
95Pick the target survey ID, then:
96```
97GET /open/workspace/{workspaceId}/survey/{surveyId}/result/list?startAt={timestamp}&endAt={timestamp}&limit=50
98GET /open/workspace/{workspaceId}/survey/{surveyId}/stats?startAt={timestamp}&endAt={timestamp}
99```
100
101### Feed event inspection
102
103```
104GET /open/workspace/{workspaceId}/feed/channels
105```
106Pick the channel ID, then:
107```
108GET /open/workspace/{workspaceId}/feed/{channelId}/fetchEventsByCursor?limit=20
109```
110
111## Sensitive Data Handling
112
113Some GET endpoints may return fields containing platform-stored secrets (e.g. `modelApiKey`,
114`customModelBaseUrl` in AI Gateway responses). Additionally, endpoints like workspace members,
115audit logs, and billing may contain PII or internal details.
116
117**Rules:**
118- NEVER display `modelApiKey`, `apiKey`, `secret`, `token`, `password`, or `credential` fields to the user
119- Redact or omit these fields when summarizing API responses
120- When querying workspace members or audit logs, only surface non-sensitive metadata (names, roles, timestamps) unless the user explicitly requests full detail
121
122## Notes
123
124- Timestamps use milliseconds since epoch (e.g. `1704067200000` for 2024-01-01)
125- Pagination: some endpoints use `cursor` parameter; check the response for `nextCursor`
126- The `type` parameter in website metrics accepts: `url`, `language`, `referrer`, `title`, `browser`, `os`, `device`, `country`, `event`