All Products
Search
Document Center

STAROps:GetThreadData

Last Updated:Jun 16, 2026

Get session data

Operation description

Gets session data.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

starops:GetThreadData

get

*DigitalEmployee

acs:starops:{#regionId}:{#accountId}:digitalemployee/{#name}/thread/{#threadId}

None None

Request syntax

GET /digitalEmployee/{name}/thread/{threadId}/data HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

name

string

Yes

The name of the digital employee.

test

threadId

string

Yes

The unique identifier for the thread.

thread_id01

Request parameters

Parameter

Type

Required

Description

Example

nextToken

string

No

The pagination cursor.

xxxxxxxxxx

maxResults

integer

No

The maximum number of session entries to return. The maximum value is 100.

10

Response elements

Element

Type

Description

Example

object

Response schema.

maxResults

integer

The maximum number of results to return.

2

data

array<object>

The message data.

array<object>

A container for messages and metadata for a single request trace.

traceId

string

The unique ID that identifies the entire trace of a request.

3b5287b717636040171772050d0095

requestId

string

The ID of the original request that generated this message.

8FDE2569-626B-5176-9844-28877A*****

messages

array<object>

A list of messages in the thread.

array<object>

The structure of a message object.

version

string

The message data version.

v0.1.0

parentCallId

string

The parent call ID.

3b5287b7176360

callId

string

The current call ID.

3b5287b7176360

role

string

The role that initiates the message.

user

seq

integer

The sequence number of the message.

0

timestamp

string

The message creation time in nanoseconds since the Unix epoch.

1768702985000000000

type

string

The message type.

task_finished

detail

string

The message details.

context of model exceed

contents

array<object>

The contents of the message.

object

The structure of a content item.

{ "append": false, "lastChunk": false, "type": "text", "value": "result output chunk" }

tools

array<object>

A list of tools used to generate the message.

object

The structure of a tool object.

{ "arguments": { "confidence": "high", "intent": "analyser", "is_new_turn": true, "language": "en", "title": "Root Cause of Alert" }, "id": "IntentRecognition", "name": "IntentRecognition", "status": "start", "toolCallId": "019bc1cb-adad" }

agents

array<object>

A list of called agents.

object

The structure of an agent object.

{ "callId": "019bc1cb-adad", "id": "analyser", "inputs": [ { "append": false, "lastChunk": false, "type": "text", "value": "Analyze this trace: TraceID=xxx" } ], "name": "analyser", "status": "start" }

events

array<object>

A list of events.

object

The structure of an event object.

{ "payload": { "error": { "code": "TASK_FAILED", "message": "Invalid task parameter", "suggestion": "" }, "statistics": { "duration": 300000 }, "success": false }, "type": "task_finished" }

artifacts

array<object>

A list of generated artifacts.

object

The structure of an artifact object.

{ "artifactId": "019bc1cb-9600-703axxx", "name": "sql output", "description": "sql generation task result", "extensions": ["sql_generation_tool", "sql_diagnosis"], "metadata": { "model": "qwen3-coder-plus" }, "parts": [ { "text": "select * from table", "kind": "text" } ] }

nextToken

string

The token to retrieve the next page of results. If this parameter is not returned, there are no more results.

xxxxxxxxx

requestId

string

The unique ID for this GetThreadData API request.

8FDE2569-626B-5176-9844-28877A*****

threadId

string

The unique ID of the thread.

thread_id01

digitalEmployeeName

string

The name of the current digital employee.

test

Examples

Success response

JSON format

{
  "maxResults": 2,
  "data": [
    {
      "traceId": "3b5287b717636040171772050d0095\n",
      "requestId": "8FDE2569-626B-5176-9844-28877A*****\n",
      "messages": [
        {
          "version": "v0.1.0\n",
          "parentCallId": "3b5287b7176360",
          "callId": "3b5287b7176360",
          "role": "user",
          "seq": 0,
          "timestamp": "1768702985000000000",
          "type": "task_finished",
          "detail": "context of model exceed\n",
          "contents": [
            {
              "append": false,
              "lastChunk": false,
              "type": "text",
              "value": "result output chunk"
            }
          ],
          "tools": [
            {
              "arguments": {
                "confidence": "high",
                "intent": "analyser",
                "is_new_turn": true,
                "language": "en",
                "title": "Root Cause of Alert"
              },
              "id": "IntentRecognition",
              "name": "IntentRecognition",
              "status": "start",
              "toolCallId": "019bc1cb-adad"
            }
          ],
          "agents": [
            {
              "callId": "019bc1cb-adad",
              "id": "analyser",
              "inputs": [
                {
                  "append": false,
                  "lastChunk": false,
                  "type": "text",
                  "value": "Analyze this trace: TraceID=xxx"
                }
              ],
              "name": "analyser",
              "status": "start"
            }
          ],
          "events": [
            {
              "payload": {
                "error": {
                  "code": "TASK_FAILED",
                  "message": "Invalid task parameter",
                  "suggestion": ""
                },
                "statistics": {
                  "duration": 300000
                },
                "success": false
              },
              "type": "task_finished"
            }
          ],
          "artifacts": [
            {
              "artifactId": "019bc1cb-9600-703axxx",
              "name": "sql output",
              "description": "sql generation task result",
              "extensions": [
                "sql_generation_tool",
                "sql_diagnosis"
              ],
              "metadata": {
                "model": "qwen3-coder-plus"
              },
              "parts": [
                {
                  "text": "select * from table",
                  "kind": "text"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "nextToken": "xxxxxxxxx",
  "requestId": "8FDE2569-626B-5176-9844-28877A*****\n",
  "threadId": "thread_id01",
  "digitalEmployeeName": "test"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.