Skip to main content

GetTopicById

Retrieve hot topic event information by ID.

Debug

You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples. Debug

Authorization information

The following table describes the authorization information for this API. You can use it in the Action element of a RAM policy statement to grant RAM users or RAM roles the permission to call this API. Details:
  • Action: the specific permission point.
  • Access level: the access level of each action. Valid values: Write, Read, or List.
  • Resource type: the resource types that support authorization for the operation. Details:
    • Required resource types are marked with a leading *.
    • For operations that do not support resource-level authorization, All resources is used.
  • Condition key: the condition keys defined by the cloud service itself.
  • Dependent action: other permissions required to successfully perform the action. The caller must also have the permissions of the dependent actions for the operation to succeed.
ActionAccess levelResource typeCondition keyDependent action
aimiaobi:GetTopicByIdget
*All resources
*
    None
None

Request parameters

NameTypeRequiredDescriptionExample value
AgentKeystringYes

Workspace unique identifier: AgentKey

xxxxx_p_efm
IdstringYes

Data ID

Data ID

Response parameters

NameTypeDescriptionExample value
object

PlainResult

Codestring

Status code

NoData
Dataobject

Business data

AsyncTaskIdstring

Asynchronous task ID (used in custom topic scenarios)

Asynchronous task ID (used in custom topic scenarios)
CreateUserstring

Creator user ID (used in custom topic scenarios)

Creator user ID (used in custom topic scenarios)
HotValuelong

Hotness value

43
Idstring

Hot topic ID

Hot topic ID
Statusstring

Asynchronous task status (used in custom event scenarios) (PENDING: pending, RUNNING: running, SUCCESSED: succeeded, SUSPENDED: suspended, FAILED: failed, CANCELED: canceled)

PENDING
StructureSummaryarray<object>

List of structured topic summaries

StructureSummaryobject

Structured topic summary object

DocListarray<object>

Articles referenced to generate the title summary

DocListobject

Article object

Sourcestring

Article source

Toutiao
Titlestring

Article title

Article title
Urlstring

Article URL

http://www.example.com
Summarystring

Summary

Summary
Titlestring

Title

Title
Summarystring

Hot topic summary

Hot topic summary
TaskErrorMessagestring

Error message for asynchronous task failure

Error message for asynchronous task failure
TaskStatusinteger

Asynchronous task status. 0-pending, 1-running, 2-succeeded, 3-suspended (not used), 4-failed, 6-canceled (used in custom event scenarios).

14
Topicstring

Unique topic name

Unique topic name
TopicSourcestring

Hot topic source. Currently supported hot topic sources:

  • Toutiao: Toutiao

  • Quark: Quark

  • Baidu: Baidu

  • Sina: Sina

  • Custom: Custom

  • Aggregation: hot topic list

Toutiao
Versionstring

Data version

Data version
HttpStatusCodeinteger

HTTP status code

200
Messagestring

Error description

success
RequestIdstring

Unique request identifier

1813ceee-7fe5-41b4-87e5-982a4d18cca5
Successboolean

Indicates whether the operation succeeded: true for success, false for failure

true

Examples

Success response JSON format
{
  "Code": "NoData",
  "Data": {
    "AsyncTaskId": "异步任务ID(自定义主题场景下使用)",
    "CreateUser": "创建用户ID(自定义主题场景下使用)",
    "HotValue": 43,
    "Id": "热榜ID",
    "Status": "PENDING",
    "StructureSummary": [
      {
        "DocList": [
          {
            "Source": "头条",
            "Title": "文章标题",
            "Url": "http://www.example.com"
          }
        ],
        "Summary": "摘要",
        "Title": "标题"
      }
    ],
    "Summary": "热榜摘要",
    "TaskErrorMessage": "异步任务失败错误信息",
    "TaskStatus": 14,
    "Topic": "主题唯一名称",
    "TopicSource": "Toutiao",
    "Version": "数据版本"
  },
  "HttpStatusCode": 200,
  "Message": "success",
  "RequestId": "1813ceee-7fe5-41b4-87e5-982a4d18cca5",
  "Success": true
}

Error codes

Visit the Error Center to view more error codes.