Retrieves the approval policy for a given process definition ID.
Operation description
Request
This API retrieves the details of a specific approval process definition using the
Idparameter.The
Idparameter is required and must be a valid process definition ID.The response includes the basic properties of the approval process definition, rule conditions, notification service configurations, and approval nodes.
A successful request returns the complete process definition object. A failed request returns an error code and message for troubleshooting.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Id |
string |
Yes |
The process definition ID. |
f0d6d578-a305-40ac-ba1e-0a09f64cbc69 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
0bc5df3a17***903790e8e8a |
| ProcessDefinition |
object |
The process definition. |
|
| Id |
string |
The process definition ID. |
210001039767 |
| Name |
string |
The name of the process definition. |
MaxCompute table approval |
| Description |
string |
The description of the process definition. |
Order business data approval process |
| Type |
string |
The type of the process definition. Valid values:
|
MaxCompute |
| SubType |
string |
The subtype. Valid values:
|
Table |
| IsSystem |
boolean |
Indicates whether the policy is a system default policy. |
false |
| Enabled |
boolean |
Indicates whether the policy is enabled. |
true |
| RuleConditions |
array |
The list of rule conditions for the approval policy. |
|
|
object |
A rule condition for the approval policy. |
||
| Type |
string |
The condition type. Valid values:
|
odpsProject |
| Expression |
string |
The condition expression in the format ((#type=='typeValue')). Example: ((#odpsProject=='PX_BEIJING_TEST')). |
((#odpsProject=='PX_BEIJING_TEST')) |
| Scope |
string |
The stage at which the rule takes effect. Valid values:
|
Deployment |
| NotificationServices |
array |
The notification service declarations. |
|
|
object |
A notification service. |
||
| Channel |
string |
The notification channel. Valid values:
|
DingRobot |
| Extension |
string |
The extension information in JSON format. Example: |
{"atAll":"true"} |
| Receiver |
string |
The webhook URL. This parameter is required when Channel is set to DingRobot or Weixin. |
https://dingtalk.com |
| ApprovalNodes |
array |
The list of approval nodes. |
|
|
array |
An approval node. |
||
| Id |
string |
The node ID. |
7a809b6a-2a62-4c6c-9c23-c2a145e3877d |
| Name |
string |
The node name. |
default-name |
| AccountType |
string |
The approver account type. Valid values:
|
TableOrProjectAdministrator |
| Assignees |
array |
The semantics of this parameter varies based on the AccountType value:
|
|
|
string |
The approver. |
213463068144525171 |
|
| ExtensionProperties |
object |
The additional declarations vary based on the
|
|
|
any |
The extension description. |
{ "449656": "role_project_admin,role_project_pe" } |
Examples
Success response
JSON format
{
"RequestId": "0bc5df3a17***903790e8e8a",
"ProcessDefinition": {
"Id": "210001039767",
"Name": "MaxCompute Table Approval",
"Description": "Order business data approval process",
"Type": "MaxCompute",
"SubType": "Table",
"IsSystem": false,
"Enabled": true,
"RuleConditions": [
{
"Type": "odpsProject",
"Expression": "((#odpsProject=='PX_BEIJING_TEST'))",
"Scope": "Deployment"
}
],
"NotificationServices": [
{
"Channel": "DingRobot",
"Extension": "{\"atAll\":\"true\"}",
"Receiver": "https://dingtalk.com"
}
],
"ApprovalNodes": [
{
"Id": "7a809b6a-2a62-4c6c-9c23-c2a145e3877d",
"Name": "default-name",
"AccountType": "TableOrProjectAdministrator",
"Assignees": [
"213463068144525171"
],
"ExtensionProperties": {
"key": "{\n \"449656\": \"role_project_admin,role_project_pe\"\n }"
}
}
]
}
}Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.