ListPendingApprovals
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
NextTokenparameter can be empty or omitted in the first call. For subsequent page requests, use theNextTokenvalue provided in the previous response. -
The default value of
PageSizeis 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
HasMorefield is set tofalse, andNextTokenis 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
Test
RAM authorization
|
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. |
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:
|
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:
|
RamUser |
| PrincipalId |
string |
The ID of the principal. Note: The semantic meaning varies based on the principalType:
|
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:
|
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.