Query API usage plan details

Last updated: 2020-06-09 15:10:09


    This is a legacy API which has been hidden and will no longer be updated. We recommend using the new API Gateway API 3.0 which is standardized and faster.

    Interface description

    This API (DescribeApiUsagePlan) is used to query the details of the API usage plan in the service.
    If the service needs authentication throttling to take effect, you need to bind the usage plan to this service. This API is used to query all usage plans bound to a service and all the API in it.

    Input Parameter

    The following request parameter list only lists the API request parameters. For other parameters, please see Common Request Parameters .

    Parameter name Required Type Description
    ServiceId Yes String The only service to be queried is ID.
    Offset No Int Offset, default is 0.
    Limit No Int The number returned. The default is 20, and the maximum value is 100.
    SearchEnvironment No String According to the usage plan, the name of the environment is accurate.
    ApiIds.n No List of String API unique ID array. If it is not passed, the usage plan information of all API under the current service is returned.

    Output Parameter

    Parameter name Type Description
    Code Int Common error code, 0 indicates success, other values indicate failure. For more information, please see the error code page Common error code .
    CodeDesc String Error code on the business side. If a Success, error is returned on success, the cause of the business error is returned.
    Message String Module error message description, related to the interface.
    TotalCount Int The total number of usage plans bound on the service.
    UsagePlanList List of Arrays A list of usage plans bound on the service.

    UsagePlanList is a list of usage plans bound to the service. It is an array of usagePlanAttribute. The usagePlanAttribute is composed as follows:

    Parameter name Type Description
    UsagePlanId String Use the only ID of the plan.
    UsagePlanName String Use the name of the plan.
    UsagePlanDesc String Description of the usage plan.
    Environment String Use the service environment that the plan binds.
    CreatedTime Timestamp Use the schedule to create the time.
    ModifiedTime Timestamp Use the last modification time of the plan.
    InUseRequestNum Int Quotas that have been used.
    MaxRequestNum Int The total requested quota,-1 means there is no limit.
    MaxRequestNumPreSec Int Request an upper limit of QPS.-1 means there is no limit.
    ApiId String API unique ID.
    Path String Request path.
    Method String Request method.
    ApiName String API name.
    ServiceId String The service is a unique ID.
    ServiceName String Service Name.


    &<Common request parameters>

    The returned results are as below:

                "maxRequestNumPreSec": 2000,
                "usagePlanId": "usagePlan-0var1p8v",
                "modifiedTime": "2018-07-31 20:26:28",
                "usagePlanDesc": "test",
                "apiId": "api-2yuua008",
                "environment": "release",
                "serviceId": "service-XX",
                "apiName": "sjiofjsdioj",
                "createdTime": "2018-07-20 14:09:47",
                "path": "/fsodjfsd",
                "usagePlanName": "test",
                "method": "GET",
                "serviceName": "test"

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback