Authorize OpenAPI call statistics

Updated at:

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

  1. Log on to the Resource Access Management (RAM) console using your Alibaba Cloud account.

  2. In the left-side navigation pane, choose Permissions > Policies.

  3. On the Policies page, click Create Policy.

  4. On the Create Policy page, click the Script Editor tab.

    The editor displays a default JSON policy template with elements like Version and Statement, which in turn includes Effect, Action, Resource, and Condition. Use this template to create your policy.

  5. Copy the following permission policy and click OK.

    {
        "Version": "1",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "apiworkbenchpublic:GetUserRequestSourceAnalyse",
                    "apiworkbenchpublic:GetUserRequestSourceOverview",
                    "apiworkbenchpublic:GetUserStatisticData",
                    "apiworkbenchpublic:StatisticOverview"
                ],
                "Resource": "*"
            }
        ]
    }
  6. Enter a Policy Name and Description, and then click OK to create the permission policy.

  7. Attach the policy to the relevant RAM user, RAM user group, or RAM role.

    1. To grant permissions to a RAM user, see Manage permissions for a RAM user.

    2. To grant permissions to a RAM user group, see Grant permissions to a RAM user group.

    3. To grant permissions to a RAM role, see Manage permissions for a RAM role.

  8. 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.