FastGPTFastGPT

List App Chat Logs

Query paginated FastGPT application chat logs filtered by time range, channel source, feedback status, errors, and search keywords.

Endpoint Overview

  • Method : POST
  • Path : /api/core/app/logs/list
  • Module : Applications / App Logs
  • Authentication : Authorization: Bearer <apiKey>—Supports App API Key ( appId optional) and Personal API Key ( appId required) (see API Getting Started )
  • Interactive Try-It-Out : Open in Scalar API Explorer (self-hosted instances: replace the origin with <instance>/apidoc/systemopenapi#tag/%E5%BA%94%E7%94%A8%E6%97%A5%E5%BF%97/POST/core/app/logs/list )

Description & Notes

Retrieve paginated application chat logs with filters for time range, source, feedback status, errors, and users.

Request Parameters

Request Body ( application/json )

Mutually Exclusive Branches ( anyOf )

  • Explicit App ID

Personal API keys and login sessions must pass appId ; an App API Key always uses the bound application.

FieldTypeRequiredDefaultConstraints & Description
appIdstringYes-Application ID. minLength: 1
  • App API Key (no appId required)

When authorizing with an app-bound App API Key, omit appId and sourceType ; the server resolves the bound app with sourceType fixed to app . Personal keys and login sessions cannot omit appId , and an explicit appId does not override an App API Key binding.

No extra branch-specific fields are required.

Shared Parameters Across Branches

FieldTypeRequiredDefaultConstraints & Description
feedbackTypestring (enum)No-Feedback filter: all (all logs), has_feedback (logs with feedback), good (likes), bad (dislikes). Allowed values: all , has_feedback , good , bad
unreadOnlybooleanNo-Whether to return only unread feedback (ignored when feedbackType is all )
errorFilterstring (enum)No-Error filter: all (all logs), has_error (error logs only). Allowed values: all , has_error
dateStartstringYes-Start time
dateEndstringYes-End time
sourcesstring (enum)[]`No-Chat source filter
tmbIdsstring[]No-List of team member IDs
outLinkUidsstring[]No-List of external user IDs
chatSearchstringNo-Search keyword for chat content

Mutually Exclusive Branches ( anyOf )

  • Offset Pagination

Specify the 0-based starting offset; when both offset and pageNum are provided, offset takes precedence.

FieldTypeRequiredDefaultConstraints & Description
offsetintegerYes-Mutually Exclusive Group: Pagination Parameters . 0-based offset. min: 0; max: 9007199254740991
pageSizeintegerNo20Mutually Exclusive Group: Pagination Parameters . Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500). max: 500
  • Page-Number Pagination

Paginate by page number (starts at page 1); pageSize controls items per page.

FieldTypeRequiredDefaultConstraints & Description
pageNumintegerNo1Mutually Exclusive Group: Pagination Parameters . 1-based page number; ignored when offset is provided. max: 9007199254740991
pageSizeintegerNo20Mutually Exclusive Group: Pagination Parameters . Items per page. Defaults to 20, capped at 500 (larger values are clamped to 500). max: 500

Request Examples

Replace YOUR_API_KEY and placeholder IDs before running. Self-hosted users should replace the base URL with <instance>/api .

cURL Example

curl --fail-with-body -X POST "https://cloud.fastgpt.io/api/core/app/logs/list" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "appId": "68ad85a7463006c963799a05",
  "offset": 0,
  "dateStart": "2024-01-01T00:00:00.000Z",
  "dateEnd": "2024-12-31T23:59:59.999Z"
}'

Minimal Valid JSON Body

{
  "appId": "68ad85a7463006c963799a05",
  "offset": 0,
  "dateStart": "2024-01-01T00:00:00.000Z",
  "dateEnd": "2024-12-31T23:59:59.999Z"
}

Response Schema & Examples

Successful /api/* calls return the standard FastGPT envelope { "code": 200, "statusText": "", "message": "", "data": ... } , where data matches the 200 schema below (when a payload schema is declared; otherwise refer to the status description for runtime data semantics).

HTTP 200

Successfully retrieved application chat logs

Content-Type : application/json

FieldTypeRequiredDefaultConstraints & Description
totalnumberYes-Total record count
listobject[]Yes-List of chat log records
list[].publishSourceobjectNo--
list[].publishSource.typestring (enum)No"unknown"Channel type of the latest run; falls back to unknown if unrecognized. Allowed values: test , online , share , api , cronJob , feishu , official_account , wecom , wechat , mcp , dingtalk , unknown
list[].publishSource.idstringNo-Database ID of the channel record; omitted for internal entry points or legacy data without recoverable references. pattern: ^[0-9a-fA-F]{24}$
list[].publishSource.namestringNo-Current channel name, compatible with legacy source names
list[]._idstringYes-Chat log ID
list[].chatIdstringYes-Chat ID. maxLength: 1024
list[].titlestring | nullNo-Chat title
list[].customTitlestring | nullNo-Custom chat title
list[].sourcestring (enum)Yes"unknown"Deprecated . Legacy channel type retained for compatibility; use publishSource.type instead. Allowed values: test , online , share , api , cronJob , feishu , official_account , wecom , wechat , mcp , dingtalk , unknown
list[].sourceNamestring | nullNo-Deprecated . Legacy channel name retained for compatibility; use publishSource.name instead
list[].updateTimestringYes-Update time
list[].createTimestring | nullNo-Creation time
list[].messageCountinteger | nullNo-Message count
list[].userGoodFeedbackCountinteger | nullNo-Positive feedback count
list[].userBadFeedbackCountinteger | nullNo-Negative feedback count
list[].customFeedbacksCountinteger | nullNo-Custom feedback count
list[].markCountinteger | nullNo-Marked count
list[].averageResponseTimenumber | nullNo-Average response time (ms)
list[].errorCountinteger | nullNo-Error count
list[].totalPointsnumber | nullNo-Total credit points consumed
list[].outLinkUidstring | nullNo-End user ID from a share link visitor or API customUid ; takes precedence over tmbId when non-empty
list[].tmbIdstring | nullNo-Effective authenticated team member ID (or proxied member ID when using authProxy )
list[].sourceMemberobject | nullNo-Source member details (compatibility field; may represent a guest for share-link traffic)
list[].authMemberobject | nullNo-Authenticated member metadata resolved by tmbId , for display only
list[].versionNamestring | nullNo-Version name
list[].originIpstring | nullNo-Origin IP address
list[].regionstring | nullNo-Region
Edit on GitHub

Last updated

On this page

Put your business knowledge to work with AI

Import company documents and build accurate, reliable, traceable AI answers.