Authorize OpenAPI call statistics
Background
The Alibaba Cloud console homepage has an OpenAPI call statistics card on its Overview tab to simplify monitoring OpenAPI calls. If you log on as a RAM user or use role-based SSO without the required permissions, you cannot view these statistics. This topic describes how to grant the required permissions.
Procedure
-
Log on to the Resource Access Management (RAM) console using your Alibaba Cloud account.
-
In the left-side navigation pane, choose Permissions > Policies.
-
On the Policies page, click Create Policy.
-
On the Create Policy page, click the Script Editor tab.
The editor displays a default JSON policy template with elements like
VersionandStatement, which in turn includesEffect,Action,Resource, andCondition. Use this template to create your policy. -
Copy the following permission policy and click OK.
{ "Version": "1", "Statement": [ { "Effect": "Allow", "Action": [ "apiworkbenchpublic:GetUserRequestSourceAnalyse", "apiworkbenchpublic:GetUserRequestSourceOverview", "apiworkbenchpublic:GetUserStatisticData", "apiworkbenchpublic:StatisticOverview" ], "Resource": "*" } ] } -
Enter a Policy Name and Description, and then click OK to create the permission policy.
-
Attach the policy to the relevant RAM user, RAM user group, or RAM role.
-
To grant permissions to a RAM user, see Manage permissions for a RAM user.
-
To grant permissions to a RAM user group, see Grant permissions to a RAM user group.
-
To grant permissions to a RAM role, see Manage permissions for a RAM role.
-
-
After attaching the policy, log on to the Alibaba Cloud console homepage with the corresponding account. You can now view the OpenAPI call statistics.
The OpenAPI Last 7 Days card displays three metrics: Number of Calls, Call Success Rate, and Number of Invocation Methods.