QueryAuditTask

Updated at:

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.

Try it now

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 resources is 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.

ActionAccess levelResource typeCondition keyDependent action
aimiaobi:QueryAuditTaskget
*All resources
*
    None
None

Request parameters

NameTypeRequiredDescriptionExample value
ContentAuditTaskIdstringNo

Audit task ID (choose either the task ID or the article ID)

xxx
ArticleIdstringNo

Article ID (choose either the task ID or the article ID)

xxxx
WorkspaceIdstringNollm-xxxx

Response elements

NameTypeDescriptionExample value
object

Schema of Response

RequestIdstring

Id of the request

xxxxx
Successboolean

Indicates whether the request was successful.

true
Codestring

Error code

DataNotExists
Messagestring

Error message

Error message
HttpStatusCodeinteger

HTTP error code

400
Dataobject

Asynchronous task object

TaskStatusinteger

Task execution status: 0: pending, 1: running, 2: successful, 3: paused, 4: failed, 6: canceled

1
Contentstring

Original text at the time of audit

Original text at the time of audit
AuditTimestring

Audit time

2025-05-13 12:12:12
Responseobject

Audit result

Headerobject

Audit response header

Eventstring

Event

task-failed
ErrorCodestring

Error code

DataNotExists
ErrorMessagestring

Error message

Data does not exist
SessionIdstring

Unique conversation ID

49eab783-9172-487a-b9df-c6372c47392c
TaskIdstring

Unique multi-turn conversation ID

896b733535274d28b1a61c78bc145217
Payloadobject

Response body

Outputobject

Response body

Textstring

Final response result (JSON array structure)

x'x'x
Usageobject

Usage

OutputTokensinteger

Output tokens

100
InputTokensinteger

Input tokens

200
TotalTokensinteger

Total tokens

300
Statusstring

Task execution status: PENDING: pending, RUNNING: running, SUCCESSED: successful, SUSPENDED: paused, FAILED: failed, CANCELLED: canceled

RUNNING
HtmlContentstring

Formatted content at the time of audit

Formatted content at the time of audit
Titlestring

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.