FastGPT icon

FastGPT

AI智能客服平台

应用 → 获取应用图表数据

AI-generated

Summary

Fetches chart/time-series statistics for a FastGPT app by POSTing to the commercial-edition endpoint /proApi/core/app/logs/getChartData, filtered by date range, log sources, and per-metric time granularity.

Inputs

  • 应用ID (chartAppId) (required) — FastGPT App ID, sent as body field appId.
  • 开始时间 (chartDateStart) — Start of the statistics window in ISO format, e.g. 2025-09-19T16:00:00.000Z. Sent as dateStart.
  • 结束时间 (chartDateEnd) — End of the statistics window in ISO format, e.g. 2025-09-27T15:59:59.999Z. Sent as dateEnd.
  • 偏移量 (chartOffset) — User-retention offset (default 1); its unit follows the user timespan. Sent as offset.
  • 日志来源 (chartSource) — Comma-separated log sources, default 'test,online,share,api'. Split, trimmed and sent as an array in source.
  • 用户数据时间跨度 (chartUserTimespan) — Granularity for user data: day (default), week, month, or quarter. Sent as userTimespan.
  • 对话数据时间跨度 (chartChatTimespan) — Granularity for chat data: day (default), week, month, or quarter. Sent as chatTimespan.
  • 应用数据时间跨度 (chartAppTimespan) — Granularity for app data: day (default), week, month, or quarter. Sent as appTimespan.
  • Request Options — Optional batching, ignore-SSL, proxy and timeout (default 10000 ms) settings for the HTTP request.

Output shape

The parsed JSON response from FastGPT's getChartData endpoint, returned as the node's output item(s).

The exact chart data structure is determined by the FastGPT server and is not defined in the node. Errors are raised as NodeApiError if the HTTP status is 4xx/5xx or the response body's code is not 200. Requires a FastGPT commercial edition (proApi) and the fastGPTApi credential.

Examples

Example 1: Pull last week's daily usage charts for an app across all log sources

应用ID=, 开始时间/结束时间 set to the week's ISO bounds, 日志来源 default, all three timespans = day.

Example 2: Monthly report of API-only traffic

应用ID=, 日志来源='api', user/chat/app timespans = month, date range covering the quarter.

Links

Discussion