Queries approval templates.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListWorkFlowTemplates

The operation that you want to perform. Valid values: ListWorkFlowTemplates

Tid Long Yes -1

The ID of the tenant.

SearchName String No Admin

Search Template name

Response parameters

Prameter Type Sample response Description
ErrorCode String UnknownError

Error code

ErrorMessage String UnknownError

The error message.

RequestId String 41067071-0243-4 AAB-B3CF-4DE6D5******

The ID of the request.

Success Boolean True

Indicates whether the request was successful.

WorkFlowTemplates Array

Approval template list

WorkFlowTemplate
Comment String test

Remarks

CreateUserId Long 1234

The ID of the creator.

Enabled String Y

Indicates whether the template is enabled. Valid values:

  • Y: enabled
  • N: Disabled
IsSystem Integer 1

Specifies whether to create a system-defined approval template. Valid values:

  • 1: Yes
  • 0: No
TemplateId Long 12345

The ID of the instance launch template.

TemplateName String Admin

Template Name

WorkflowNodes Array

The information of the approval node.

WorkflowNode
Comment String test

Remarks

CreateUserId Long 1234

The ID of the creator.

NodeId Long 123

Node ID

NodeName String test

Node Name

NodeType String SYS

The type of the node. Valid values:

  • SYS: System defined
  • USER_LIST: a user-defined dictionary.
Position Integer 1

The sequence number of the check result.

TemplateId Long 12345

The ID of the instance launch template.

Examples

Sample request

http(s)://[Endpoint]/? Action=ListWorkFlowTemplates
&Tid=-1
&<Common request parameters>

Sample success responses

XML format

<RequestId>41067071-0243-4AAB-B3CF-4DE6D5******</RequestId>
<Success>true</Success>
<WorkFlowTemplates>
    <WorkFlowTemplate>
        <Comment> system-defined approval lines, only administrator approval is required. </Comment>
        <WorkFlowNodes>
            <WorkFlowNode>
                <Comment> the system node is dynamically calculated and approved by the administrator. </Comment>
                <NodeName>Admin</NodeName>
                <Position>0</Position>
                <NodeType>SYS</NodeType>
                <NodeId>3**3</NodeId>
                <TemplateId>6**3</TemplateId>
            </WorkFlowNode>
        </WorkFlowNodes>
        <TemplateName>Admin</TemplateName>
        <Enabled>Y</Enabled>
        <IsSystem>1</IsSystem>
        <TemplateId>6243</TemplateId>
    </WorkFlowTemplate>
    <WorkFlowTemplate>
        <Comment> the system defines the approval line. The data Owner, DBA, and Admin approval take effect. </Comment>
        <WorkflowNodes>
            <WorkFlowNode>
                <Comment> the system node is dynamically calculated, and the approval is completed by the Owner of the resource corresponding to the user operation. </Comment>
                <NodeName>Owner</NodeName>
                <Position>0</Position>
                <NodeType>SYS</NodeType>
                <NodeId>3**2</NodeId>
                <TemplateId>6**4</TemplateId>
            </WorkFlowNode>
            <WorkFlowNode>
                <Comment> the system node is dynamically calculated and approved by the DBA that corresponds to the resource being operated by the user. </Comment>
                <NodeName>DBA</NodeName>
                <Position>0</Position>
                <NodeType>SYS</NodeType>
                <NodeId>3**1</NodeId>
                <TemplateId>6**4</TemplateId>
            </WorkFlowNode>
            <WorkFlowNode>
                <Comment> the system node is dynamically calculated and approved by the administrator. </Comment>
                <NodeName>Admin</NodeName>
                <Position>0</Position>
                <NodeType>SYS</NodeType>
                <NodeId>3**3</NodeId>
                <TemplateId>6**4</TemplateId>
            </WorkFlowNode>
        </WorkflowNodes>
        <TemplateName>Owner-->DBA-->Admin</TemplateName>
        <Enabled>Y</Enabled>
        <IsSystem>1</IsSystem>
        <TemplateId>6244</TemplateId>
    </WorkFlowTemplate>
</WorkFlowTemplates>

JSON format

{
  "RequestId": "41067071-0243-4AAB-B3CF-4DE6D5******",
  "Success": true,
  "WorkFlowTemplates": {
    "WorkFlowTemplate": [
      {
        "Comment": "system-defined approval line, only administrator approval is required.",
        "WorkFlowNodes": {
          "WorkFlowNode": [
            {
              "Comment": "system node. It is a dynamic node. The system administrator approves the node.",
              "NodeName": "Admin",
              "Position": 0,
              "NodeType": "SYS",
              "NodeId": 3**3,
              "TemplateId": 6**3
            }
          ]
        },
        "TemplateName": "Admin",
        "Enabled": "Y",
        "IsSystem": 1,
        "TemplateId": 6**3
      },
      {
        "Comment": "system-defined approval line. The data Owner, DBA, and Admin roles approve the approval first.",
        "WorkflowNodes": {
          "WorkFlowNode": [
            {
              "Comment": "system node, dynamic computing, approved by the Owner of the resource you operate",
              "NodeName": "Owner",
              "Position": 0,
              "NodeType": "SYS",
              "NodeId": 3**2,
              "TemplateId": 6**4
            },
            {
              "Comment": "system node, which is a dynamic computing node and is approved by the DBA of the user in charge of the resource",
              "NodeName": "DBA",
              "Position": 0,
              "NodeType": "SYS",
              "NodeId": 3**1,
              "TemplateId": 6**4
            },
            {
              "Comment": "system node. It is a dynamic node. The system administrator approves the node.",
              "NodeName": "Admin",
              "Position": 0,
              "NodeType": "SYS",
              "NodeId": 3**3,
              "TemplateId": 6**4
            }
          ]
        },
        "TemplateName": "Owner-->DBA-->Admin",
        "Enabled": "Y",
        "IsSystem": 1,
        "TemplateId": 6**4
      }
    ]
  }
}

Error codes

For a list of error codes, visit the API Error Center.