agentThreads

Returns thread metadata for usage analytics.

Changed on

Returns thread metadata or period usage rows, including the thread Id, name, credits, and timestamps.

<Check title="Required Permissions" icon="key">The user must be an admin.</Check>

get/agents/management/threads

Request

  • Base URL
    https://api.awork.com/api/v1
  • URL
    https://api.awork.com/api/v1/agents/management/threads
  • Auth
    HTTP bearer

Query parameters

usageFromstring date-time

The first included UTC calendar day for period usage rows.

usageTostring date-time

The last included UTC calendar day for period usage rows.

usageGroupBystring

The report grouping when a usage period is provided.

usagePageSizeinteger

Optional bounded bulk page size for period usage rows.

Response

OK

idstring uuid

The thread identifier.

isDeletedboolean

Whether the thread was deleted and can no longer be opened.

typestring nullable

The thread type.

titlestring nullable

The contextual thread title. A private thread title is available only to its creator. Contributors do not widen this: they exist only on project- or task-backed threads, whose titles are never masked.

createdBystring uuid

The human creator identifier.

agentIdstring uuid nullable

The associated Agent identifier.

agentNameSnapshotstring nullable

The Agent display name captured for the initial run.

executionTypestring nullable

The initial execution trigger type: direct, task-assignment, project-assignment, mention, schedule, automation, queue, delegation, or workflow.

projectIdstring uuid nullable

The project context identifier.

taskIdstring uuid nullable

The task context identifier.

clientIdstring uuid nullable

The client context identifier.

statusstring nullable

The current thread status.

creditsUsedinteger

Whole credits attributed to this thread. Period report rows use the overview's quota factors; unscoped metadata uses the stable display factor.

usageUserIdstring uuid nullable

The responsible user when the report is grouped by user.

usageGroupKeystring nullable

The selected reporting group for this row.

usageOnstring date-time nullable

The latest usage timestamp in the selected period.

providerstring nullable

The provider of the highest-cost model pair in this row's scope, or null without usage.

modelstring nullable

The highest-cost model in this row's scope, or null without usage.

createdOnstring date-time nullable

When the thread was created.

lastActivityOnstring date-time nullable

When the thread last had user-visible activity.

updatedOnstring date-time nullable

When the thread was last updated.

Changes

    • info

      added the new optional query request parameter usageFrom

    • info

      added the new optional query request parameter usageGroupBy

    • info

      added the new optional query request parameter usagePageSize

    • info

      added the new optional query request parameter usageTo

    • info

      added the non-success response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status