GetCustomSourceTopicAnalysisTask

Updated at:

Retrieves the results of a topic analysis task for a custom data source.

Try it now

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

Try it now

RAM authorization

The following table describes the authorization information of the API. You can use the Action element in RAM policy statements to grant RAM users or RAM roles the permissions to call this API. For more information:

  • Action: The specific permission point.

  • Access level: The access level of each action. Valid values: Write, Read, and List.

  • Resource type: The resource types that support authorization for the action. For more information:

    • Required resource types are marked with an asterisk (*).
    • For operations that do not support resource-level authorization, All Resources is used.
  • Condition key: The condition keys defined by the cloud service.

  • Dependent action: The other permissions required to successfully perform the action. The caller must have the permissions of all dependent actions for the action to succeed.

ActionAccess levelResource typeCondition keyDependent action
aimiaobi:GetCustomSourceTopicAnalysisTaskget
*All Resources
*
    None
None

Request parameters

ParameterTypeRequiredDescriptionExample
WorkspaceIdstringYes

The unique identifier of the workspace: AgentKey

xxxxx_p_efm
TaskIdstringYes

The unique ID of the task.

c9f226b02cca4f42a84c5e955c39dfd2

Response elements

ElementTypeDescriptionExample
object

PlainResult

Codestring

The status code.

NoData
Dataobject

The business data.

ErrorMessagestring

The error message.

Error message
Statusstring

The status of the task. Valid values: PENDING (pending), RUNNING (running), SUCCESSED (success), FAILED (failure), and CANCELED (canceled).

SUCCESSED
ParsedNewsSizeinteger

The number of news articles after the file is parsed.

10
ClusterCountinteger

The number of documents after clustering.

5
MaxClusteredTopicNewsSizeinteger

The maximum number of news articles after aggregation.

8
ClusterResultsarray<object>

A list of news aggregation results.

clusterResultsobject

An aggregation result object.

ClusterNewsarray<object>

A list of aggregated news articles (body text not included).

clusterNewsobject

A news object.

Titlestring

The title of the news article.

News title
Urlstring

The URL of the news article.

http://www.example.com/xxx.html
Topicstring

The name of the aggregated topic.

Topic name
usagesobject

The token usage. The possible billable items are: quanmiaoMax and quanmiaoPlus

long

The number of tokens used.

200
rtlong

The total runtime, in milliseconds.

1000
Messagestring

The error description.

success
RequestIdstring

The unique ID of the request.

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

Indicates whether the request is successful. true indicates success and false indicates failure.

true
HttpStatusCodeinteger

The HTTP status code.

200

Examples

Success response

JSON format

{
  "Code": "NoData",
  "Data": {
    "ErrorMessage": "Error message",
    "Status": "SUCCESSED",
    "ParsedNewsSize": 10,
    "ClusterCount": 5,
    "MaxClusteredTopicNewsSize": 8,
    "ClusterResults": [
      {
        "ClusterNews": [
          {
            "Title": "News title\n\n",
            "Url": "http://www.example.com/xxx.html"
          }
        ],
        "Topic": "Topic name"
      }
    ],
    "usages": {
      "key": 200
    },
    "rt": 1000
  },
  "Message": "success",
  "RequestId": "1813ceee-7fe5-41b4-87e5-982a4d18cca5",
  "Success": true,
  "HttpStatusCode": 200
}

Error codes

HTTP status codeError codeError messageDescription
403NoPermissionYou are not authorized to perform this action.Please check the workspaceId assignment

Visit the Error Center for more error codes.