Creates a new approval process definition, supporting custom configuration of approval rules and notification services.
Operation description
Usage notes
This API operation allows you to create a new approval process definition, including setting basic information such as the approval policy name, description, type, and subtype.
You can define a list of condition rules (RuleConditions) to specify the conditions under which the approval process is triggered.
Multiple notification services (NotificationServices) can be configured to send notifications to relevant personnel at different stages of the approval process.
The approval node list (ApprovalNodes) defines the nodes that must be traversed during the approval process and the approver information for each node.
You can choose whether to immediately enable the newly created approval process definition.
Note: Certain fields such as Type have specific value constraints. Refer to the constraint descriptions in the documentation.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
The name of the process definition. |
我的审批策略 |
| Description |
string |
Yes |
The description of the process definition. |
这是一个示例策略 |
| Type |
string |
No |
The type of the process definition. Valid values:
|
Extension |
| SubType |
string |
No |
The subtype. Valid values:
|
Table |
| Enabled |
boolean |
No |
Specifies whether to enable the process definition. |
|
| RuleConditions |
array<object> |
Yes |
The list of condition rules. |
|
|
object |
No |
The rule. |
||
| Type |
string |
No |
The condition type. Valid values:
|
odpsProject |
| Scope |
string |
No |
The stage at which the rule takes effect:
|
Deployment |
| Expression |
string |
No |
The condition expression in the format of ((#type=='typeValue')). Example: ((#odpsProject=='PX_BEIJING_TEST')). |
((#odpsProject=='PX_BEIJING_TEST')) |
| NotificationServices |
array<object> |
No |
The notification service declarations. |
|
|
object |
No |
The notification service declaration. |
||
| Channel |
string |
No |
The notification channel. Valid values:
|
DingRobot |
| Extension |
string |
No |
The extension information in JSON format. Example: |
{"atAll":"true"} |
| Receiver |
string |
No |
The WebhookUrl that must be specified when Channel is set to DingRobot or Weixin. |
https://dingtalk.com |
| ApprovalNodes |
array<object> |
Yes |
The list of approval nodes. |
|
|
array<object> |
No |
The node. |
||
| Name |
string |
No |
The name of the node. |
default-name |
| AccountType |
string |
No |
The type of approver for the node:
|
TableOrProjectAdministrator |
| Assignees |
array |
No |
The semantics of this parameter varies based on the value of
|
|
|
string |
No |
The approver. |
213463068144525171 |
|
| ExtensionProperties |
object |
No |
The additional declarations required based on the value of
|
|
|
any |
No |
The extension description. |
{ "449656": "role_project_admin,role_project_pe" } |
|
| ClientToken |
string |
No |
The idempotency token. We recommend that you use a UUID. |
0000-ABCD-EFG**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
0bc5df3a17***903790e8e8a |
| Id |
string |
The ID of the process definition. |
1010543619 |
Examples
Success response
JSON format
{
"RequestId": "0bc5df3a17***903790e8e8a",
"Id": "1010543619"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.