ListPendingApprovals

Updated at:

Retrieves the list of pending permission applications where the current user is the approver.

Operation description

Request description

This operation queries all pending permission applications where the current logged-on user is the approver. You can filter the applications by multiple conditions, such as resource type, time range, and approval status, to locate specific applications.

  • ResourceType: Specifies the resource types, such as tables. Multiple values are supported.

  • Resource: Specifies the specific resource search conditions, such as the project, database, or table name.

  • StartTime and EndTime: Defines the time range when the applications were initiated.

  • Statuses: Filters the results by approval status, such as viewing only the pending approval status.

  • Grantee: Filters the applications by the grantee information.

  • AccessTypes: Filters the applications by the specific permission types requested, such as read or update.

  • PageSize and NextToken: Used for pagination control. Specifies the number of items returned per request and the cursor required to retrieve the next page.

Precautions:

  • If no filter conditions are provided, all matching records are returned by default.

  • The NextToken parameter can be empty or omitted in the first call. For subsequent page requests, use the NextToken value provided in the previous response.

  • The default value of PageSize is 10, and the maximum value is 200. If the specified value exceeds the maximum limit, the maximum value is used.

  • When no more data is available, the HasMore field is set to false, and NextToken is empty or does not exist.

Response description

After a successful API call, the response body contains the paginated results and the details of each application, such as the application time, resource description, grantee, and requested permissions. It also provides the status of the approval process and other related metadata.

  • Data: The paginated result set, including the page size (PageSize), cursor (NextToken), and whether more data is available (HasMore).

  • ApplicationQueryResponse: The specific content of each application, including the application reason, initiation time, status, and the detailed list of application contents.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dataworks:ListPendingApprovals

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

DefSchema

string

Yes

Filters by resource type.

Note: The resource types supported by the system are constrained by ResourceSchema.name.

Appendix: ResourceSchema documentation for the international site

MaxCompute

ResourceType

array

Yes

Filters by the least privilege resource type.

Note: The least privilege resource types are constrained by ResourceSchema.resources[*].isValidLeaf being true.

Appendix: ResourceSchema documentation for the international site

["table", "column"]

string

No

The resource type.

table

Resource

object

No

Filters by exact or generalized resources. The resource description is constrained by ResourceSchema.

Appendix: ResourceSchema documentation for the international site

DefSchema

string

No

The resource type.

Note: The resource types supported by the system are constrained by ResourceSchema.name.

Appendix: ResourceSchema documentation for the international site

MaxCompute

DefVersion

string

No

The resource parsing version is constrained by ResourceSchema.version.

ResourceSchema documentation for the international site

v1.0.0

MetaData

object

No

The resource metadata.

Note: The metadata is constrained by ResourceSchema.resources. A valid resource declaration must include the full-path metadata declaration from level 0 to the validLeaf level.

Appendix: ResourceSchema documentation for the international site

{"workspace": "449056", "project": "sync_destination"}

any

No

The resource metadata.

{ "workspace": "449056", "project": "sync_destination" }

StartTime

integer

No

The start of the application submission time range, specified as a UNIX timestamp in milliseconds.

1771948800000

EndTime

integer

No

The end of the application submission time range, specified as a UNIX timestamp in milliseconds.

1779724799999

Grantee

object

No

Filters by the authorization principal.

Note: The authorization principal types supported by the system are constrained by ResourceSchema.authPrincipal.

Appendix: ResourceSchema documentation for the international site

PrincipalType

string

No

The type of the authorization principal.

RamRole

PrincipalId

string

No

The ID of the authorization principal.

ROLE_3133343434

AccessTypes

array

No

Filters by the requested permissions.

Note: The permission types supported for application vary by resource level and are uniformly constrained by ResourceSchema.isValidLeaf, accessTypeRestrictions, and authMethodAccessTypes.

Appendix: ResourceSchema documentation for the international site

string

No

The permission.

select

NextToken

string

No

The pagination token.

eyJpZCI6MTIzfQ==

PageSize

integer

No

The number of items per page. Default value: 10. Maximum value: 200.

20

Response elements

Element

Type

Description

Example

object

The error code of the API response. This field is not empty when an error occurs.

RequestId

string

The ID of the API request, which is a UUID.

0bc5df3a17****903790e8e8a

Data

object

The paginated results.

PageSize

integer

The number of items per page. Default value: 10. Maximum value: 200.

10

NextToken

string

The pagination token.

eyJpZCI6MTIzfQ==

HasMore

boolean

Indicates whether more data is available.

false

Data

array<object>

The list of data in the paginated results.

array<object>

The approval process and application content.

ProcessInstanceId

string

The flow instance ID.

176906667488145

DefSchema

string

The resource type.

MaxCompute

Reason

string

The reason for the application.

Business requirement

ApplicationTime

integer

The time when the application was initiated, specified as a 13-digit UNIX timestamp in milliseconds.

1778641560000

Status

string

The approval status. Valid values:

  • WaitApproval: pending approval

  • Confirmed: pending authorization

  • RejectApproval: approval rejected

  • AuthorizeSucceed: authorization succeeded

  • AuthorizeFailed: authorization failed

  • Deleted: deleted

  • Canceled: withdrawn

Deleted

Contents

array<object>

The application content.

array<object>

The application content.

Id

string

The unique identifier of the application content.

210001918826

ProcessInstanceId

string

The flow instance ID.

176906667488145

TenantId

string

The ID of the tenant.

69973837489

ResourceName

string

The least privilege resource type.

table

DefSchema

string

The resource type.

MaxCompute

AuthMethod

string

The authorization method.

default

Resource

object

The resource declaration.

DefSchema

string

The ResourceSchema.name that the resource parsing depends on.

MaxCompute

DefVersion

string

The ResourceSchema.version that the resource parsing depends on.

v1.0.0

MetaData

object

The resource metadata. The data content is constrained by ResourceSchema.

{"schema": "default", "threeTierModel": false, "project": "sync_dtestn", "workspace": "4477656", "table": "order", "tenant": "524257424864736"}

any

The resource content.

{ "schema": "default", "threeTierModel": false, "project": "sync_dtestn", "workspace": "4477656", "table": "order", "tenant": "524257424864736" }

Grantee

object

The description of the authorization principal.

PrincipalType

string

The type of the principal. Valid values:

  • RamRole

  • RamUser

  • DataworksTenantMember

  • DataworksTenantRole

  • DataworksProjectMember

  • DataworksProjectRole

  • DlfRole

RamUser

PrincipalId

string

The ID of the principal.

Note: The semantic meaning varies based on the principalType:

  • RamUser: DataWorks user ID

  • RamRole: DataWorks user ID starting with "ROLE_"

  • DataworksTenantMember: DataWorks user ID

  • DataworksTenantRole: DataWorks tenant role code

  • DataworksProjectRole: DataWorks workspace role code

  • DataworksProjectMember: DataWorks user ID

  • DlfRole: DlfNext role name

213463068144525171

AccessTypes

array

The resource operation permissions requested in the application.

string

The permission.

select

FinalAccessTypes

array

The final approved resource operation permissions.

string

select

select

ExpirationTime

integer

The expiration date of the permissions, specified as a UNIX timestamp in milliseconds.

1782354014507

Status

string

The approval status. Valid values:

  • WaitApproval: pending approval

  • Confirmed: pending authorization

  • RejectApproval: approval rejected

  • AuthorizeSucceed: authorization succeeded

  • AuthorizeFailed: authorization failed

  • Deleted: deleted

  • Canceled: withdrawn

Deleted

CreateTime

integer

The time when the application content was created, specified as a UNIX timestamp in milliseconds.

1778641560000

UpdateTime

integer

The time when the application content was updated, specified as a UNIX timestamp in milliseconds.

1778641620000

Examples

Success response

JSON format

{
  "RequestId": "0bc5df3a17****903790e8e8a",
  "Data": {
    "PageSize": 10,
    "NextToken": "eyJpZCI6MTIzfQ==",
    "HasMore": false,
    "Data": [
      {
        "ProcessInstanceId": "176906667488145",
        "DefSchema": "MaxCompute",
        "Reason": "Business requirement",
        "ApplicationTime": 1778641560000,
        "Status": "Deleted",
        "Contents": [
          {
            "Id": "210001918826",
            "ProcessInstanceId": "176906667488145",
            "TenantId": "69973837489",
            "ResourceName": "table",
            "DefSchema": "MaxCompute",
            "AuthMethod": "default",
            "Resource": {
              "DefSchema": "MaxCompute",
              "DefVersion": "v1.0.0",
              "MetaData": {
                "key": "{\n                \"schema\": \"default\",\n                \"threeTierModel\": false,\n                \"project\": \"sync_dtestn\",\n                \"workspace\": \"4477656\",\n                \"table\": \"order\",\n                \"tenant\": \"524257424864736\"\n              }"
              }
            },
            "Grantee": {
              "PrincipalType": "RamUser",
              "PrincipalId": "213463068144525171"
            },
            "AccessTypes": [
              "select"
            ],
            "FinalAccessTypes": [
              "select"
            ],
            "ExpirationTime": 1782354014507,
            "Status": "Deleted",
            "CreateTime": 1778641560000,
            "UpdateTime": 1778641620000
          }
        ]
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.