{"skill":{"slug":"tianji","displayName":"Tianji","summary":"Query website analytics, monitor uptime, survey results, telemetry data, feed events, application stats, and more from the Tianji platform via its read-only...","description":"---\nname: tianji\ndescription: >\n  Query website analytics, monitor uptime, survey results, telemetry data,\n  feed events, application stats, and more from the Tianji platform via its\n  read-only OpenAPI (69 GET endpoints across 14 service domains).\n  Use when the user asks about website traffic, pageviews, monitor status,\n  survey feedback, telemetry events, feed channels, billing usage,\n  or any Tianji platform data.\n---\n\n# Tianji Analytics\n\nQuery any read-only data from the Tianji monitoring and analytics platform.\n\n## Configuration\n\nThree values are required (provided via skill config):\n\n| Variable | Description |\n|----------|-------------|\n| `TIANJI_BASE_URL` | Tianji instance URL (e.g. `https://tianji.example.com`) |\n| `TIANJI_API_KEY` | API key for authentication |\n| `TIANJI_WORKSPACE_ID` | Default workspace ID |\n\n## Making API Requests\n\nAll endpoints are under `{TIANJI_BASE_URL}/open` and require a Bearer token:\n\n```bash\ncurl -H \"Authorization: Bearer {TIANJI_API_KEY}\" \\\n  \"{TIANJI_BASE_URL}/open/workspace/{TIANJI_WORKSPACE_ID}/website/all\"\n```\n\nOnly GET requests are allowed. All responses are JSON.\n\n## Service Domains\n\nFind the exact endpoint and parameters in [api-endpoints.md](references/api-endpoints.md).\nFor full parameter schemas, consult [openapi-readonly.json](references/openapi-readonly.json).\n\n| Domain | Endpoints | Typical Questions |\n|--------|-----------|-------------------|\n| **Website** | 13 | Traffic stats, pageviews, geo distribution, Lighthouse scores |\n| **Monitor** | 9 | Uptime status, recent check data, monitor events |\n| **Survey** | 8 | Survey responses, result stats, AI categories |\n| **Telemetry** | 7 | Custom event counts, telemetry pageviews, metrics |\n| **Billing** | 7 | Usage quotas, subscription tier, credit balance |\n| **Feed** | 6 | Feed channels, event streams, feed states |\n| **Application** | 5 | App store reviews, app info, event stats |\n| **AI/AIGateway** | 5 | Gateway logs, model pricing, quota alerts |\n| **Worker** | 3 | Worker list, worker details, revisions |\n| **Page** | 2 | Status pages |\n| **Workspace** | 2 | Members, service counts |\n| **Global** | 1 | Platform configuration |\n| **AuditLog** | 1 | Audit trail |\n\n## Workflow\n\n1. Identify the service domain from the user's question\n2. Read [api-endpoints.md](references/api-endpoints.md) to find the endpoint\n3. Construct the GET request with required path/query parameters\n4. Parse the JSON response and summarize for the user\n\n## Common Scenarios\n\n### Website traffic overview\n\n```\nGET /open/workspace/{workspaceId}/website/all\n```\nPick the target website ID, then:\n```\nGET /open/workspace/{workspaceId}/website/{websiteId}/stats?startAt={timestamp}&endAt={timestamp}\n```\n\n### Monitor health check\n\n```\nGET /open/workspace/{workspaceId}/monitor/all\n```\nPick the target monitor ID, then:\n```\nGET /open/workspace/{workspaceId}/monitor/{monitorId}/get\nGET /open/workspace/{workspaceId}/monitor/{monitorId}/status\n```\n\n### Survey results analysis\n\n```\nGET /open/workspace/{workspaceId}/survey/all\n```\nPick the target survey ID, then:\n```\nGET /open/workspace/{workspaceId}/survey/{surveyId}/result/list?startAt={timestamp}&endAt={timestamp}&limit=50\nGET /open/workspace/{workspaceId}/survey/{surveyId}/stats?startAt={timestamp}&endAt={timestamp}\n```\n\n### Feed event inspection\n\n```\nGET /open/workspace/{workspaceId}/feed/channels\n```\nPick the channel ID, then:\n```\nGET /open/workspace/{workspaceId}/feed/{channelId}/fetchEventsByCursor?limit=20\n```\n\n## Sensitive Data Handling\n\nSome GET endpoints may return fields containing platform-stored secrets (e.g. `modelApiKey`,\n`customModelBaseUrl` in AI Gateway responses). Additionally, endpoints like workspace members,\naudit logs, and billing may contain PII or internal details.\n\n**Rules:**\n- NEVER display `modelApiKey`, `apiKey`, `secret`, `token`, `password`, or `credential` fields to the user\n- Redact or omit these fields when summarizing API responses\n- When querying workspace members or audit logs, only surface non-sensitive metadata (names, roles, timestamps) unless the user explicitly requests full detail\n\n## Notes\n\n- Timestamps use milliseconds since epoch (e.g. `1704067200000` for 2024-01-01)\n- Pagination: some endpoints use `cursor` parameter; check the response for `nextCursor`\n- The `type` parameter in website metrics accepts: `url`, `language`, `referrer`, `title`, `browser`, `os`, `device`, `country`, `event`\n","tags":{"latest":"1.0.1"},"stats":{"comments":0,"downloads":798,"installsAllTime":1,"installsCurrent":1,"stars":1,"versions":2},"createdAt":1772465552213,"updatedAt":1778994578423},"latestVersion":{"version":"1.0.1","createdAt":1772465888315,"changelog":"- Added a new section on Sensitive Data Handling, detailing rules for redacting or omitting fields containing secrets or personal information from API responses.\n- Clarified that sensitive fields such as API keys, tokens, passwords, and PII should never be shown to users.\n- Updated workflow guidance for summarizing workspace members and audit logs to emphasize non-sensitive data by default.","license":null},"metadata":null,"owner":{"handle":"moonrailgun","userId":"s172g075rn7xzm010cv3d4tw8h83p543","displayName":"moonrailgun","image":"https://avatars.githubusercontent.com/u/6964737?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780089738312}}