Skip to main content
This document introduces how to get review task results via REST API. Review tasks are executed asynchronously. After creating a task, you need to periodically query the review status until the review is completed, then get detailed review results.
Review tasks are executed asynchronously. After creating a task, you need to query review status and results via the interface. This document introduces how to get review results and use them.

Get Review Task Results

Get detailed results of a review task:
Request Parameters:
  • workspace_id (required): Workspace ID
  • task_id (required): Review task ID
Response Example:

Response Structure Description

Basic Task Information

  • task_id: Review task ID
  • task_name: Task name
  • status: Task status (see status description below)
  • rule_repo: Rule repository information used
  • extract_task_ids: List of extraction task IDs being reviewed

Task Status (status)

Task status represents the overall execution status of the review task:
  • 0: Pending
  • 1: Approved
  • 2: Review failed
  • 3: Reviewing
  • 4: Rejected
  • 5: Recognizing
  • 6: In Queue
  • 7: Recognition Failed

Statistics

  • pass_count: Number of rules that passed review
  • failure_count: Number of rules that failed review
  • error_count: Number of task execution errors

Rule Group Results (groups)

Review results are organized by rule groups. Each rule group contains review results for multiple rules:
  • group_id: Rule group ID
  • group_name: Rule group name
  • review_tasks: List of rule review results

Rule Review Results (review_tasks)

Each rule’s review result contains:
  • rule_task_id: Review subtask ID
  • rule_id: Review rule ID
  • rule_name: Review rule name
  • risk_level: Risk level (10: high risk, 20: medium risk, 30: low risk)
  • prompt: Review rule prompt
  • review_result: Review result (see review result description below)
  • reasoning: Review reasoning, the review reason given by AI
  • anchors: Position anchor information, used to locate the position of review reasoning in the original text

Review Result (review_result)

Review result represents the review status of a single rule:
  • 0: Pending
  • 1: Approved
  • 2: Review failed
  • 3: Reviewing
  • 4: Rejected
  • 5: Recognizing
  • 6: In Queue
  • 7: Recognition Failed

Position Anchors (anchors)

Position anchor information is used to locate the position of review reasoning in the original text:
  • start_pos: Starting character position in reasoning
  • end_pos: Ending character position in reasoning
  • text: Original text content
  • vertices: Bounding quadrilateral coordinates of original text [x1, y1, x2, y2, x3, y3, x4, y4]
  • file_id: File ID

Poll Review Status

Since review tasks are executed asynchronously, you need to periodically query the review status until the review is completed:
Python

Process Review Results

Example of parsing and processing review results:
Python

Visualize Using Position Anchors

Position anchor information can be used to highlight the position of review reasoning in the document:
Python

Complete Example

Complete flow for getting and using review results:
Python

Notes

  1. Asynchronous Execution: Review tasks are executed asynchronously. After creating a task, you need to periodically query the review status
  2. Status Judgment: Use the status field to judge task status. 1 means Approved, 4 means Rejected
  3. Position Anchors: Use anchors information to highlight the position of review reasoning in the document