QueryAuditTask
Queries the results of an audit task.
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.
Authorization information
The following table describes the authorization information of the API. You can use it in the Action element of a RAM permission policy statement to grant RAM users or RAM roles the permission to call this API. For more information, see the following:
-
Action: the specific permission point.
-
Access level: the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: the resource types that support authorization in the operation. For more information, see the following:
- Required resource types are marked with a leading *.
- For operations that do not support resource-level authorization,
All resourcesis used.
-
Condition key: the condition keys defined by the cloud service itself.
-
Dependent action: the other permissions required to successfully perform the operation. The caller must have the permissions of the dependent actions at the same time for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| aimiaobi:QueryAuditTask | get | *All resources * |
| None |
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| ContentAuditTaskId | string | No | Audit task ID (choose either the task ID or the article ID) | xxx |
| ArticleId | string | No | Article ID (choose either the task ID or the article ID) | xxxx |
| WorkspaceId | string | No | llm-xxxx |
Response elements
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Schema of Response | ||
| RequestId | string | Id of the request | xxxxx |
| Success | boolean | Indicates whether the request was successful. | true |
| Code | string | Error code | DataNotExists |
| Message | string | Error message | Error message |
| HttpStatusCode | integer | HTTP error code | 400 |
| Data | object | Asynchronous task object | |
| TaskStatus | integer | Task execution status: 0: pending, 1: running, 2: successful, 3: paused, 4: failed, 6: canceled | 1 |
| Content | string | Original text at the time of audit | Original text at the time of audit |
| AuditTime | string | Audit time | 2025-05-13 12:12:12 |
| Response | object | Audit result | |
| Header | object | Audit response header | |
| Event | string | Event | task-failed |
| ErrorCode | string | Error code | DataNotExists |
| ErrorMessage | string | Error message | Data does not exist |
| SessionId | string | Unique conversation ID | 49eab783-9172-487a-b9df-c6372c47392c |
| TaskId | string | Unique multi-turn conversation ID | 896b733535274d28b1a61c78bc145217 |
| Payload | object | Response body | |
| Output | object | Response body | |
| Text | string | Final response result (JSON array structure) | x'x'x |
| Usage | object | Usage | |
| OutputTokens | integer | Output tokens | 100 |
| InputTokens | integer | Input tokens | 200 |
| TotalTokens | integer | Total tokens | 300 |
| Status | string | Task execution status: PENDING: pending, RUNNING: running, SUCCESSED: successful, SUSPENDED: paused, FAILED: failed, CANCELLED: canceled | RUNNING |
| HtmlContent | string | Formatted content at the time of audit | Formatted content at the time of audit |
| Title | string | Content title | Content title |
Examples
Success response
JSON format
{
"RequestId": "xxxxx",
"Success": true,
"Code": "DataNotExists",
"Message": "错误消息",
"HttpStatusCode": 400,
"Data": {
"TaskStatus": 1,
"Content": "审核时的原文",
"AuditTime": "2025-05-13 12:12:12",
"Response": {
"Header": {
"Event": "task-failed",
"ErrorCode": "DataNotExists",
"ErrorMessage": "数据不存在",
"SessionId": "49eab783-9172-487a-b9df-c6372c47392c",
"TaskId": "896b733535274d28b1a61c78bc145217"
},
"Payload": {
"Output": {
"Text": "x'x'x"
},
"Usage": {
"OutputTokens": 100,
"InputTokens": 200,
"TotalTokens": 300
}
}
},
"Status": "RUNNING",
"HtmlContent": "格式化的审核时的内容\n\n",
"Title": "内容标题\n\n"
}
}
Error codes
For more error codes, visit Error Center.