Retrieves details for a specified approval process instance, including its approval nodes and task list.
Operation description
Request
By providing the approval process instance ID, you can query all related information for the approval process instance, such as the approval process definition, the approval nodes in the current state, and the details of approval tasks on each node. This API is mainly used to monitor and manage the status of an approval process.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProcessInstanceId |
string |
Yes |
The process instance ID. |
332066440109224007 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The request ID, which is used to locate logs and troubleshoot issues. |
0bc5df3a17****903790e8e8a |
| ProcessInstance |
object |
The details of the approval process instance. |
|
| Id |
string |
The process instance ID. |
332066440109224007 |
| Title |
string |
The name of the process instance. |
MaxCompute table permission request |
| Status |
string |
The status of the process instance. Valid values:
Valid values:
|
completed |
| Applicator |
string |
The UserId of the applicant. |
1107558004253538 |
| ApplicatorName |
string |
The Alibaba Cloud account name of the applicant. |
test_account |
| StartTime |
any |
The time when the application was submitted. |
2026-05-25 10:20:18 CST |
| Reason |
string |
The reason for the application. |
Business requirement |
| AuthErrorMessage |
string |
The error message of authorization failure. Note: This field is present only when authorization fails. |
S-400007:ODPS acl auth failed. odps table acl auth failed |
| ApprovalTasks |
array |
The list of approval tasks. |
|
|
array |
The approval task. |
||
| Id |
string |
The approval task ID. |
task_001 |
| Status |
string |
The task status:
Valid values:
|
Aborted |
| ApprovalComment |
string |
The approval comment. |
Approved |
| Assignee |
string |
The UserId of the actual approver. |
207947399706614297 |
| AssigneeName |
string |
The name of the actual approver. |
John |
| ApprovalDecision |
string |
The approval decision:
Valid values:
|
Deny |
| CreateTime |
integer |
The time when the task was created. |
1715587200000 |
| CompleteTime |
integer |
The time when the task was completed. |
1715590800000 |
| ApprovalNode |
object |
The approval node in the approval policy. |
|
| Id |
string |
The node ID. |
7a809b6a-2a62-4c6c-9c23-c2a145e3877d |
| Name |
string |
The node name. |
default-name |
| AccountType |
string |
The type of the node approver:
Valid values:
|
DataWorksProjectRole |
| Assignees |
array |
The specified approvers. When AccountType is set to different types, this field has different semantics:
|
|
|
string |
The approver. |
role_project_admin |
|
| TaskCandidates |
array |
The list of candidate approvers for the task. |
|
|
object |
The candidate approver. |
||
| MemberUserId |
string |
The UserId of the approver. |
207947397776614297 |
| MemberName |
string |
The name of the approver. |
John |
| ApprovalProcessDefinition |
object |
The approval policy associated with the current process instance. |
|
| Id |
string |
The approval policy ID. |
323861511451222099 |
| Name |
string |
The name of the approval policy. |
SYSTEM_GENERATE_DEFAULT |
| Description |
string |
The description of the approval policy. |
Process definition description |
| Type |
string |
The type of the approval policy. Valid values:
|
MaxCompute |
| SubType |
string |
The subtype of the approval policy:
|
Table |
| Enabled |
boolean |
Indicates whether the approval policy is enabled. |
true |
| RuleConditions |
array |
The list of rule conditions for the approval policy. |
|
|
object |
The rule condition for the approval policy. |
||
| Type |
string |
The type of the rule condition:
Valid values:
|
odpsProject |
| Expression |
string |
The expression for the rule condition. Format: ((#type=='typeValue')). |
((#odpsProject=='PX_BEIJING_TEST')) |
| Scope |
string |
The scope in which the rule takes effect:
Valid values:
|
Deployment |
| NotificationServices |
array |
The list of notification services. |
|
|
object |
The notification service. |
||
| Channel |
string |
The notification channel:
Valid values:
|
|
| Extension |
string |
The extension information in JSON format, such as {"atAll":"true"} to specify whether to @all members. |
{"atAll":"true"} |
| Receiver |
string |
When Channel is set to DingRobot or Weixin, you must specify a WebhookUrl as the receiver. |
https://dingtalk |
| ApprovalNodes |
array |
The list of approval nodes. |
|
|
object |
The approval node. |
||
| Id |
string |
The node ID. |
7a809b6a-2a62-4c6c-9c23-c2a145e3877d |
| Name |
string |
The node name. |
default-name |
| AccountType |
string |
The type of the node approver:
|
DataWorksProjectRole |
| Assignees |
array |
The specified approvers. When AccountType is set to different types, this field has different semantics:
|
|
|
string |
The approver. |
role_project_admin |
|
| ExtensionProperties |
string |
The extension description of the approval node. |
none |
Examples
Success response
JSON format
{
"RequestId": "0bc5df3a17****903790e8e8a",
"ProcessInstance": {
"Id": "332066440109224007",
"Title": "MaxCompute table permission request",
"Status": "completed",
"Applicator": "1107558004253538",
"ApplicatorName": "test_account",
"StartTime": "2026-05-25 10:20:18 CST",
"Reason": "Business requirement",
"AuthErrorMessage": "S-400007:ODPS acl auth failed. odps table acl auth failed",
"ApprovalTasks": [
{
"Id": "task_001",
"Status": "Aborted",
"ApprovalComment": "Approved",
"Assignee": "207947399706614297",
"AssigneeName": "John",
"ApprovalDecision": "Deny",
"CreateTime": 1715587200000,
"CompleteTime": 1715590800000,
"ApprovalNode": {
"Id": "7a809b6a-2a62-4c6c-9c23-c2a145e3877d",
"Name": "default-name",
"AccountType": "DataWorksProjectRole",
"Assignees": [
"role_project_admin"
]
},
"TaskCandidates": [
{
"MemberUserId": "207947397776614297",
"MemberName": "John"
}
]
}
],
"ApprovalProcessDefinition": {
"Id": "323861511451222099",
"Name": "SYSTEM_GENERATE_DEFAULT",
"Description": "Process definition description",
"Type": "MaxCompute",
"SubType": "Table",
"Enabled": true,
"RuleConditions": [
{
"Type": "odpsProject",
"Expression": "((#odpsProject=='PX_BEIJING_TEST'))",
"Scope": "Deployment"
}
],
"NotificationServices": [
{
"Channel": "Mail",
"Extension": "{\"atAll\":\"true\"}",
"Receiver": "https://dingtalk"
}
],
"ApprovalNodes": [
{
"Id": "7a809b6a-2a62-4c6c-9c23-c2a145e3877d",
"Name": "default-name",
"AccountType": "DataWorksProjectRole",
"Assignees": [
"role_project_admin"
],
"ExtensionProperties": "none"
}
]
}
}
}Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.